Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F84821754
test_generic1d.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
Wed, Sep 25, 02:02
Size
825 B
Mime Type
text/x-c
Expires
Fri, Sep 27, 02:02 (2 d)
Engine
blob
Format
Raw Data
Handle
21013649
Attached To
rSPECMICP SpecMiCP / ReactMiCP
test_generic1d.cpp
View Options
#include "catch.hpp"
#include "dfpm/meshes/generic_mesh1d.hpp"
#include "dfpm/io/meshes.hpp"
using namespace specmicp;
using namespace specmicp::mesh;
TEST_CASE("Generic mesh 1d", "[ReactMiCP],[Mesh],[NonUniform],[1D]") {
SECTION("test ramp mesh 1d") {
Ramp1DMeshGeometry geometry;
geometry.dx_min = 2;
geometry.dx_max = 100;
geometry.length_ramp = 1000;
geometry.length_plateau = 1000;
geometry.section = 1;
Mesh1DPtr the_mesh = ramp_mesh1d(geometry);
CHECK(the_mesh->get_position(0) == 0);
CHECK(the_mesh->get_position(1) == 2);
CHECK(the_mesh->get_position(2) >= 2);
CHECK(the_mesh->get_position(the_mesh->nb_nodes()-1) > 2000);
io::print_mesh("test_ramp_mesh.dat", the_mesh, units::LengthUnit::meter);
}
}
Event Timeline
Log In to Comment