Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120088469
test_configuration.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, Jul 1, 20:44
Size
1 KB
Mime Type
text/x-c
Expires
Thu, Jul 3, 20:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27136802
Attached To
rSPECMICP SpecMiCP / ReactMiCP
test_configuration.cpp
View Options
#include <catch.hpp>
#include "utils/io/yaml.hpp"
#include "dfpm/meshes/mesh1d.hpp"
#include "dfpm/io/configuration.hpp"
TEST_CASE("Configuration", "[meshes],[io],[configuration]") {
SECTION("Uniform mesh") {
YAML::Node conf = specmicp::io::parse_yaml_file("unif_mesh.yaml");
specmicp::mesh::Mesh1DPtr the_mesh = specmicp::io::configure_mesh(conf);
REQUIRE(the_mesh->nb_nodes() == 50);
}
SECTION("Ramp mesh") {
YAML::Node conf = specmicp::io::parse_yaml_file("ramp_mesh.yaml");
specmicp::mesh::Mesh1DPtr the_mesh = specmicp::io::configure_mesh(conf);
REQUIRE(the_mesh->get_dx(0) == 1.0);
REQUIRE(the_mesh->get_dx(the_mesh->nb_nodes()-2) == 5.0);
}
SECTION("Uniform axisymmetric mesh") {
YAML::Node conf = specmicp::io::parse_yaml_file("unif_axisym.yaml");
specmicp::mesh::Mesh1DPtr the_mesh = specmicp::io::configure_mesh(conf);
REQUIRE(the_mesh->get_dx(0) == 1.0);
REQUIRE(the_mesh->nb_nodes() == 10);
}
}
Event Timeline
Log In to Comment