Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90904895
boundary_conditions.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 5, 20:17
Size
1 KB
Mime Type
text/x-c
Expires
Thu, Nov 7, 20:17 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22156336
Attached To
rSPECMICP SpecMiCP / ReactMiCP
boundary_conditions.cpp
View Options
#include <catch.hpp>
#include "reactmicp/systems/unsaturated/boundary_conditions.hpp"
#include "specmicp/adimensional/adimensional_system_structs.hpp"
using namespace specmicp;
using namespace specmicp::reactmicp::systems::unsaturated;
TEST_CASE("Boundary conditions", "[bcs],[constraitns]")
{
SECTION("Boundary conditions")
{
auto bcs = BoundaryConditions::make(5);
bcs->add_gas_node(0);
bcs->add_fixed_node(4);
CHECK(bcs->is_gas_node(0) == true);
CHECK(bcs->is_fixed_node(0) == false);
CHECK(bcs->is_normal_node(0) == false);
CHECK(bcs->is_normal_node(1) == true);
CHECK(bcs->is_normal_node(2) == true);
CHECK(bcs->is_normal_node(3) == true);
CHECK(bcs->is_fixed_node(4) == true);
CHECK(bcs->is_gas_node(4) == false);
CHECK(bcs->is_normal_node(4) == false);
AdimensionalSystemConstraints& fixed_compo = bcs->fork_constraints(4, "fixed_compo");
fixed_compo.set_inert_volume_fraction(0.2);
AdimensionalSystemConstraints& not_fixed = bcs->get_constraint(0);
CHECK(not_fixed.inert_volume_fraction == 0.0);
CHECK(bcs->get_constraint("fixed_compo").inert_volume_fraction == 0.2);
}
}
Event Timeline
Log In to Comment