Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87769802
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
Mon, Oct 14, 20:57
Size
825 B
Mime Type
text/x-c
Expires
Wed, Oct 16, 20:57 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21511428
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