23 #include "openPMD/backend/Attributable.hpp"
24 #include "openPMD/backend/BaseRecord.hpp"
25 #include "openPMD/backend/MeshRecordComponent.hpp"
30 #include <type_traits>
47 Mesh& operator=(
Mesh const&) =
default;
48 ~
Mesh()
override =
default;
124 std::vector< std::string >
axisLabels()
const;
137 template<
typename T >
146 template<
typename T,
147 typename = std::enable_if_t<std::is_floating_point< T >::value> >
184 template<
typename T >
193 template<
typename T,
194 typename = std::enable_if_t<std::is_floating_point< T >::value> >
200 void flush_impl(std::string
const&)
override;
201 void read()
override;
204 template<
typename T >
205 inline std::vector< T >
207 {
return readVectorFloatingpoint< T >(
"gridSpacing"); }
209 template<
typename T >
212 {
return readFloatingpoint< T >(
"timeOffset"); }
Mesh & setTimeOffset(T timeOffset)
Set the offset between the time at which this record is defined and the Iteration::time attribute of ...
Definition: Mesh.cpp:206
std::string geometryParameters() const
Definition: Mesh.cpp:105
Definition: BaseRecord.hpp:36
double gridUnitSI() const
Definition: Mesh.cpp:179
T timeOffset() const
Definition: Mesh.hpp:211
std::string geometryString() const
Definition: Mesh.cpp:56
DataOrder dataOrder() const
Definition: Mesh.cpp:118
Mesh & setGridSpacing(std::vector< T > const &gridSpacing)
Set the spacing of the grid points along each dimension (in the units of the simulation).
Definition: Mesh.cpp:147
Container for N-dimensional, homogeneous Records.
Definition: Mesh.hpp:40
Geometry
Enumerated datatype for the geometry of the mesh.
Definition: Mesh.hpp:56
std::array< double, 7 > unitDimension() const
Return the physical dimension (quantity) of a record.
Definition: BaseRecord.hpp:247
std::vector< double > gridGlobalOffset() const
Definition: Mesh.cpp:166
Logical compilation of data from one snapshot (e.g.
Definition: Iteration.hpp:39
Public definitions of openPMD-api.
Definition: Date.cpp:29
Mesh & setAxisLabels(std::vector< std::string > const &axisLabels)
Set the ordering of the labels for the Mesh::geometry of the mesh.
Definition: Mesh.cpp:139
std::vector< std::string > axisLabels() const
Definition: Mesh.cpp:133
std::vector< T > gridSpacing() const
Definition: Mesh.hpp:206
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:106
Geometry geometry() const
Definition: Mesh.cpp:46
Mesh & setGridGlobalOffset(std::vector< double > const &gridGlobalOffset)
Set the start of the current domain of the simulation (position of the beginning of the first cell) i...
Definition: Mesh.cpp:172
DataOrder
Enumerated datatype for the memory layout of N-dimensional data.
Definition: Mesh.hpp:67
Mesh & setDataOrder(DataOrder dor)
Set the memory layout of N-dimensional data.
Definition: Mesh.cpp:124
Mesh & setGeometry(Geometry g)
Set the geometry of the mesh of the mesh record.
Definition: Mesh.cpp:62
Mesh & setUnitDimension(std::map< UnitDimension, double > const &unitDimension)
Set the powers of the 7 base measures characterizing the record's unit in SI.
Definition: Mesh.cpp:192
Mesh & setGridUnitSI(double gridUnitSI)
Set the unit-conversion factor to multiply each value in Mesh::gridSpacing and Mesh::gridGlobalOffset...
Definition: Mesh.cpp:185
Mesh & setGeometryParameters(std::string const &geometryParameters)
Set additional parameters for the geometry, separated by a.
Definition: Mesh.cpp:111