Page MenuHomec4science

boundary_conditions.cpp
No OneTemporary

File Metadata

Created
Fri, Nov 22, 17:49

boundary_conditions.cpp

#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_constraint(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