Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102095617
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
Mon, Feb 17, 01:47
Size
1 KB
Mime Type
text/x-c
Expires
Wed, Feb 19, 01:47 (2 d)
Engine
blob
Format
Raw Data
Handle
24280860
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