|
| | TetVTUWriter (const TetMesh &mesh) |
| | Construct a VTU writer for the given mesh.
|
| |
| void | add_vertex_positions (const std::function< VectorXd(const size_t)> &f) |
| | Add vertex positions.
|
| |
| void | add_vertex_attribute (const std::string &name, const std::function< VectorXd(const size_t)> &f) |
| | Add vertex attribute.
|
| |
| void | add_edge_attribute (const std::string &name, const std::function< VectorXd(const size_t)> &f) |
| | Add edge attribute.
|
| |
| void | add_triangle_attribute (const std::string &name, const std::function< VectorXd(const size_t)> &f) |
| | Add triangle attribute.
|
| |
| void | add_tet_attribute (const std::string &name, const std::function< VectorXd(const size_t)> &f) |
| | Add tet attribute.
|
| |
| bool | write_tets (const std::filesystem::path &filename) |
| | Write the tet mesh with tet and vertex attributes.
|
| |
| bool | write_triangles (const std::filesystem::path &filename) |
| | Write the triangle mesh with triangle and vertex attributes.
|
| |
| bool | write_edges (const std::filesystem::path &filename) |
| | Write the edge mesh with edge and vertex attributes.
|
| |
|
|
const TetMesh & | m_mesh |
| |
|
MatrixXd | m_V |
| |
|
MatrixXi | m_E |
| |
|
MatrixXi | m_F |
| |
|
MatrixXi | m_T |
| |
|
std::map< std::string, MatrixXd > | m_V_attributes |
| |
|
std::map< std::string, MatrixXd > | m_E_attributes |
| |
|
std::map< std::string, MatrixXd > | m_F_attributes |
| |
|
std::map< std::string, MatrixXd > | m_T_attributes |
| |
◆ TetVTUWriter()
| wmtk::io::TetVTUWriter::TetVTUWriter |
( |
const TetMesh & |
mesh | ) |
|
Construct a VTU writer for the given mesh.
The IDs in the written mesh might not be the same as in inside the code. If you want these two to match, you must consolidate before writing. Additionally, edge IDs will never match.
If you want to know the IDs in your code, you can add an attribute like:
writer.add_edge_attribute("eid", [&m](int i) { return VectorXd::Constant(1, i); });
◆ add_edge_attribute()
| void wmtk::io::TetVTUWriter::add_edge_attribute |
( |
const std::string & |
name, |
|
|
const std::function< VectorXd(const size_t)> & |
f |
|
) |
| |
Add edge attribute.
See add_vertex_attribute for details.
◆ add_tet_attribute()
| void wmtk::io::TetVTUWriter::add_tet_attribute |
( |
const std::string & |
name, |
|
|
const std::function< VectorXd(const size_t)> & |
f |
|
) |
| |
Add tet attribute.
See add_vertex_attribute for details.
◆ add_triangle_attribute()
| void wmtk::io::TetVTUWriter::add_triangle_attribute |
( |
const std::string & |
name, |
|
|
const std::function< VectorXd(const size_t)> & |
f |
|
) |
| |
Add triangle attribute.
See add_vertex_attribute for details.
◆ add_vertex_attribute()
| void wmtk::io::TetVTUWriter::add_vertex_attribute |
( |
const std::string & |
name, |
|
|
const std::function< VectorXd(const size_t)> & |
f |
|
) |
| |
Add vertex attribute.
Examples:
writer.add_vertex_attribute("abc", [&m](int i) { return m.vertex_attrs[i].pos; });
writer.add_vertex_attribute("vid", [&m](int i) { return VectorXd::Constant(1, i); });
- Parameters
-
| f | A function that takes the vertex ID as input and returns the attribute value for that vertex. |
◆ add_vertex_positions()
| void wmtk::io::TetVTUWriter::add_vertex_positions |
( |
const std::function< VectorXd(const size_t)> & |
f | ) |
|
Add vertex positions.
If no positions are provided, all vertices will be placed at (0,0,0).
- Parameters
-
| f | A function that takes the vertex ID as input and returns the position. |
◆ write_edges()
| bool wmtk::io::TetVTUWriter::write_edges |
( |
const std::filesystem::path & |
filename | ) |
|
Write the edge mesh with edge and vertex attributes.
- Parameters
-
| filename | The file the mesh is written to. Should have the extension .VTU. |
◆ write_tets()
| bool wmtk::io::TetVTUWriter::write_tets |
( |
const std::filesystem::path & |
filename | ) |
|
Write the tet mesh with tet and vertex attributes.
- Parameters
-
| filename | The file the mesh is written to. Should have the extension .VTU. |
◆ write_triangles()
| bool wmtk::io::TetVTUWriter::write_triangles |
( |
const std::filesystem::path & |
filename | ) |
|
Write the triangle mesh with triangle and vertex attributes.
- Parameters
-
| filename | The file the mesh is written to. Should have the extension .VTU. |
The documentation for this class was generated from the following files:
- /home/runner/work/wildmeshing-toolkit/wildmeshing-toolkit/src/wmtk/io/TetVTUWriter.hpp
- /home/runner/work/wildmeshing-toolkit/wildmeshing-toolkit/src/wmtk/io/TetVTUWriter.cpp