23#include "openPMD/UnitDimension.hpp"
24#include "openPMD/backend/Attributable.hpp"
25#include "openPMD/backend/BaseRecord.hpp"
26#include "openPMD/backend/MeshRecordComponent.hpp"
40class Mesh :
public BaseRecord<MeshRecordComponent>
43 friend class Iteration;
46 Mesh(Mesh
const &) =
default;
47 Mesh &operator=(Mesh
const &) =
default;
48 ~Mesh()
override =
default;
144 template <
typename T>
158 typename = std::enable_if_t<std::is_floating_point<T>::value>>
238 Mesh &setGridUnitSIPerDimension(std::vector<double>
const &
gridUnitSI);
307 template <
typename T>
322 typename = std::enable_if_t<std::is_floating_point<T>::value>>
std::vector< T > readVectorFloatingpoint(std::string const &key) const
Retrieve a vector of values of a floating point Attributes of user-defined precision with ensured typ...
Definition Attributable.hpp:669
T readFloatingpoint(std::string const &key) const
Retrieve the value of a floating point Attribute of user-defined precision with ensured type-safety.
Definition Attributable.hpp:658
unit_representations::AsArray unitDimension() const
Map-like container that enforces openPMD requirements and handles IO.
Definition Container.hpp:104
Container for N-dimensional, homogeneous Records.
Definition Mesh.hpp:41
std::string geometryString() const
Definition Mesh.cpp:75
Geometry geometry() const
Definition Mesh.cpp:50
Mesh & setAxisLabels(std::vector< std::string > const &axisLabels)
Set the ordering of the labels for the Mesh::geometry of the mesh.
Definition Mesh.cpp:149
std::vector< std::string > axisLabels() const
Definition Mesh.cpp:144
std::vector< double > gridUnitSIPerDimension() const
Definition Mesh.cpp:229
T timeOffset() const
Definition Mesh.hpp:340
unit_representations::AsArrays gridUnitDimension() const
Return the physical dimensions of the mesh axes.
Definition Mesh.cpp:316
std::vector< T > gridSpacing() const
Definition Mesh.hpp:334
DataOrder dataOrder() const
Definition Mesh.cpp:132
Mesh & setGridUnitSI(double gridUnitSI)
Set the unit-conversion factor to multiply each value in Mesh::gridSpacing and Mesh::gridGlobalOffset...
Definition Mesh.cpp:186
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:156
std::string geometryParameters() const
Definition Mesh.cpp:121
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:351
Mesh & setDataOrder(DataOrder dor)
Set the memory layout of N-dimensional data.
Definition Mesh.cpp:138
Mesh & setGeometry(Geometry g)
Set the geometry of the mesh of the mesh record.
Definition Mesh.cpp:80
std::vector< double > gridGlobalOffset() const
Definition Mesh.cpp:170
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:175
double gridUnitSI() const
Definition Mesh.cpp:181
Mesh & setUnitDimension(unit_representations::AsMap const &unitDimension)
Set the powers of the 7 base measures characterizing the record's unit in SI.
Definition Mesh.cpp:268
Geometry
Enumerated datatype for the geometry of the mesh.
Definition Mesh.hpp:57
Mesh & setGridUnitDimension(unit_representations::AsMaps const &gridUnitDimension)
Set the unitDimension for each axis of the current grid.
Definition Mesh.cpp:286
Mesh & setGeometryParameters(std::string const &geometryParameters)
Set additional parameters for the geometry, separated by a.
Definition Mesh.cpp:126
DataOrder
Enumerated datatype for the memory layout of N-dimensional data.
Definition Mesh.hpp:68
Public definitions of openPMD-api.
Definition Date.cpp:29
@ T
time
Definition UnitDimension.hpp:41
Parameters recursively passed through the openPMD hierarchy when flushing.
Definition AbstractIOHandler.hpp:106