Page MenuHomec4science

io_hdf5_meshes.cpp
No OneTemporary

File Metadata

Created
Mon, Nov 4, 04:19

io_hdf5_meshes.cpp

#include "catch.hpp"
#include "dfpm/meshes/generic_mesh1d.hpp"
#include "dfpm/io/meshes.hpp"
#include <H5Cpp.h>
#include "dfpm/io/hdf5_mesh.hpp"
#include "specmicp_common/io/hdf5/file.hpp"
using namespace specmicp;
using namespace specmicp::mesh;
using namespace specmicp::io;
TEST_CASE("HDF5 output", "[Mesh],[1D],[io],[hdf5]") {
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);
auto file = hdf5::File::open("test_mesh.hf5", hdf5::OpenMode::CreateTruncate);
save_mesh_coordinates(file, "mesh", the_mesh);
}
}

Event Timeline