EBGeometry 1.0
Loading...
Searching...
No Matches
EBGeometry_VTK.hpp
1/* EBGeometry
2 * Copyright © 2026 Robert Marskar
3 * Please refer to Copyright.txt and LICENSE in the EBGeometry root directory.
4 */
5
6#ifndef EBGeometry_VTK
7#define EBGeometry_VTK
8
9// Std includes
10#include <array>
11#include <vector>
12#include <map>
13
14// Our includes
15#include "EBGeometry_Vec.hpp"
17
22template <typename T>
23class VTK
24{
25public:
30
35 VTK(const std::string a_id) noexcept;
36
41
45 std::string&
47
51 const std::string&
53
58 std::vector<Vec3T<T>>&
60
65 const std::vector<Vec3T<T>>&
67
72 std::vector<std::vector<size_t>>&
74
79 const std::vector<std::vector<size_t>>&
81
88 std::vector<T>&
90
97 const std::vector<T>&
99
106 std::vector<T>&
108
115 const std::vector<T>&
117
123 void
125
131 void
133
140 std::shared_ptr<EBGeometry::DCEL::MeshT<T, Meta>>
142
147 std::string m_id;
148
153
157 std::vector<std::vector<size_t>> m_facets;
158
162 std::map<std::string, std::vector<T>> m_pointDataScalars;
163
167 std::map<std::string, std::vector<T>> m_cellDataScalars;
168};
169
170#include "EBGeometry_NamespaceFooter.hpp"
171
172#include "EBGeometry_VTKImplem.hpp"
173
174#endif
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Class for storing VTK Polydata meshes.
Definition EBGeometry_VTK.hpp:24
std::string m_id
VTK object ID.
Definition EBGeometry_VTK.hpp:147
void setPointDataScalars(const std::string a_name, const std::vector< T > &a_data) noexcept
Set point data scalars.
std::map< std::string, std::vector< T > > m_pointDataScalars
Point data scalar arrays.
Definition EBGeometry_VTK.hpp:162
std::vector< std::vector< size_t > > & getFacets() noexcept
Get the face indices.
std::vector< Vec3T< T > > m_vertexCoordinates
Vertex coordinates.
Definition EBGeometry_VTK.hpp:152
std::shared_ptr< EBGeometry::DCEL::MeshT< T, Meta > > convertToDCEL() const noexcept
Turn the VTK mesh into a DCEL mesh.
std::vector< T > & getPointDataScalars(const std::string a_name) noexcept
Get the point data scalars.
std::string & getID() noexcept
Get the identifier for this object.
std::vector< Vec3T< T > > & getVertexCoordinates() noexcept
Get the vertex coordinates.
VTK() noexcept
Default constructor. Initializes empty member data holder.
std::vector< T > & getCellDataScalars(const std::string a_name) noexcept
Get the cell data scalars.
void setCellDataScalars(const std::string a_name, const std::vector< T > &a_data) noexcept
Set cell data scalars.
std::vector< std::vector< size_t > > m_facets
Faces – each entry in the outer vector contains the indices defining one face.
Definition EBGeometry_VTK.hpp:157
std::map< std::string, std::vector< T > > m_cellDataScalars
Cell data scalar arrays.
Definition EBGeometry_VTK.hpp:167
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218
Namespace containing various double-connected edge list (DCEL) functionality.
Name space for all of EBGeometry.
Definition EBGeometry.hpp:23