Wildmeshing Toolkit
|
Classes | |
struct | OutputOptions |
Functions | |
void | output (const Mesh &mesh, const std::filesystem::path &file, const std::string &position_attr_name={}) |
Write the mesh to file. More... | |
void | output (const Mesh &mesh, const std::filesystem::path &file, const attribute::MeshAttributeHandle &position_attr) |
Write the mesh to file. More... | |
void | output_hdf5 (const Mesh &mesh, const std::filesystem::path &file) |
Write the mesh to file. More... | |
void | output (const Mesh &mesh, const OutputOptions &opts) |
void | output (const multimesh::NamedMultiMesh &mesh, const OutputOptions &opts) |
WMTK_NLOHMANN_JSON_FRIEND_TO_JSON_PROTOTYPE (OutputOptions) | |
WMTK_NLOHMANN_JSON_FRIEND_FROM_JSON_PROTOTYPE (OutputOptions) | |
void wmtk::components::output::output | ( | const Mesh & | mesh, |
const OutputOptions & | opts | ||
) |
Definition at line 54 of file output.cpp.
References wmtk::components::output::OutputOptions::file, output_hdf5(), wmtk::components::output::OutputOptions::position_attribute, wmtk::Mesh::serialize(), wmtk::Mesh::top_cell_dimension(), and wmtk::components::output::OutputOptions::type.
void wmtk::components::output::output | ( | const Mesh & | mesh, |
const std::filesystem::path & | file, | ||
const attribute::MeshAttributeHandle & | position_attr | ||
) |
Write the mesh to file.
The mesh can be either outputted as .vtu or as .hdf5.
.vtu: Do not add a file extension, if you want to write in .vtu format. This writes a file for each dimension. For example, specifying the file "abc" will create "abc_vertices.vtu", "abc_edges.vtu", and "abc_triangles.vtu", if the mesh is a triangle mesh. Note that .vtu output is meant for visualization. We do not support reading from .vtu files!
.hdf5: Write the entire mesh in .hdf5 file format. The file contains all attributes of the mesh and can be loaded again using the input component.
Other file formats are not supported at this moment.
mesh | The mesh that should be written to file. |
file | The desired output file(s). |
position_attr. | The position attribute. It must be of type double. |
Definition at line 37 of file output.cpp.
References wmtk::attribute::MeshAttributeHandle::as(), wmtk::Mesh::get_attribute_name(), and output().
void wmtk::components::output::output | ( | const Mesh & | mesh, |
const std::filesystem::path & | file, | ||
const std::string & | position_attr_name = {} |
||
) |
Write the mesh to file.
The mesh can be either outputted as .vtu or as .hdf5.
.vtu: Do not add a file extension, if you want to write in .vtu format. This writes a file for each dimension. For example, specifying the file "abc" will create "abc_vertices.vtu", "abc_edges.vtu", and "abc_triangles.vtu", if the mesh is a triangle mesh. Note that .vtu output is meant for visualization. We do not support reading from .vtu files!
.hdf5: Write the entire mesh in .hdf5 file format. The file contains all attributes of the mesh and can be loaded again using the input component.
Other file formats are not supported at this moment.
mesh | The mesh that should be written to file. |
file | The desired output file(s). |
position_attr_name | The name of the position attribute. It must be of type double. |
Definition at line 16 of file output.cpp.
References wmtk::logger(), output_hdf5(), wmtk::Mesh::serialize(), and wmtk::Mesh::top_cell_dimension().
Referenced by output(), and wmtk::components::internal::periodic_optimization().
void wmtk::components::output::output | ( | const multimesh::NamedMultiMesh & | mesh, |
const OutputOptions & | opts | ||
) |
Definition at line 84 of file output.cpp.
References wmtk::components::multimesh::NamedMultiMesh::get_names_json(), wmtk::components::output::OutputOptions::mesh_name_path, output(), and wmtk::components::multimesh::NamedMultiMesh::root().
void wmtk::components::output::output_hdf5 | ( | const Mesh & | mesh, |
const std::filesystem::path & | file | ||
) |
Write the mesh to file.
The mesh can be either outputted as .hdf5. .hdf5: Write the entire mesh in .hdf5 file format. The file contains all attributes of the mesh and can be loaded again using the input component.
mesh | The mesh that should be written to file. |
file | The desired output file(s). |
Definition at line 46 of file output.cpp.
References wmtk::Mesh::serialize().
Referenced by output().
wmtk::components::output::WMTK_NLOHMANN_JSON_FRIEND_FROM_JSON_PROTOTYPE | ( | OutputOptions | ) |
Definition at line 33 of file OutputOptions.cpp.
References wmtk::logger().
wmtk::components::output::WMTK_NLOHMANN_JSON_FRIEND_TO_JSON_PROTOTYPE | ( | OutputOptions | ) |
Definition at line 11 of file OutputOptions.cpp.
References WMTK_NLOHMANN_ASSIGN_TYPE_TO_JSON.