Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102381128
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
Thu, Feb 20, 02:57
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Feb 22, 02:57 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24342261
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