23 #include "openPMD/UnitDimension.hpp"
24 #include "openPMD/backend/Attributable.hpp"
25 #include "openPMD/backend/BaseRecord.hpp"
26 #include "openPMD/backend/Container.hpp"
27 #include "openPMD/backend/MeshRecordComponent.hpp"
28 #include "openPMD/backend/scientific_defaults/ScientificDefaults.hpp"
29 #include "openPMD/backend/scientific_defaults/ScientificDefaults_auxiliary.hpp"
33 #include <type_traits>
52 Mesh &operator=(
Mesh const &) =
default;
53 ~
Mesh()
override =
default;
149 template <
typename T>
163 typename = std::enable_if_t<std::is_floating_point<T>::value>>
243 Mesh &setGridUnitSIPerDimension(std::vector<double>
const &
gridUnitSI);
312 template <
typename T>
327 typename = std::enable_if_t<std::is_floating_point<T>::value>>
338 auto retrieveDimensionality() const -> uint64_t;
341 void scientificDefaults_impl(
342 internal::WriteOrRead, OpenpmdStandard) override;
345 template <typename T>
348 return readVectorFloatingpoint<T>(
"gridSpacing");
351 template <
typename T>
354 return readFloatingpoint<T>(
"timeOffset");
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:225
Base class for any type of record (e.g.
Definition: BaseRecord.hpp:186
unit_representations::AsArray unitDimension() const
Return the physical dimension (quantity) of a record.
Definition: BaseRecord.cpp:752
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:106
Definition: HierarchyVisitor.hpp:20
Logical compilation of data from one snapshot (e.g.
Definition: Iteration.hpp:172
Container for N-dimensional, homogeneous Records.
Definition: Mesh.hpp:44
std::string geometryString() const
Definition: Mesh.cpp:72
Geometry geometry() const
Definition: Mesh.cpp:47
Mesh & setAxisLabels(std::vector< std::string > const &axisLabels)
Set the ordering of the labels for the Mesh::geometry of the mesh.
Definition: Mesh.cpp:146
std::vector< std::string > axisLabels() const
Definition: Mesh.cpp:141
std::vector< double > gridUnitSIPerDimension() const
Definition: Mesh.cpp:294
T timeOffset() const
Definition: Mesh.hpp:352
unit_representations::AsArrays gridUnitDimension() const
Return the physical dimensions of the mesh axes.
Definition: Mesh.cpp:388
std::vector< T > gridSpacing() const
Definition: Mesh.hpp:346
DataOrder dataOrder() const
Definition: Mesh.cpp:129
Mesh & setGridUnitSI(double gridUnitSI)
Set the unit-conversion factor to multiply each value in Mesh::gridSpacing and Mesh::gridGlobalOffset...
Definition: Mesh.cpp:183
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:153
std::string geometryParameters() const
Definition: Mesh.cpp:118
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:423
Mesh & setDataOrder(DataOrder dor)
Set the memory layout of N-dimensional data.
Definition: Mesh.cpp:135
Mesh & setGeometry(Geometry g)
Set the geometry of the mesh of the mesh record.
Definition: Mesh.cpp:77
std::vector< double > gridGlobalOffset() const
Definition: Mesh.cpp:167
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
double gridUnitSI() const
Definition: Mesh.cpp:178
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:333
void visitHierarchy(HierarchyVisitor &v, bool recursive) override
Visitor pattern for the openPMD object hierarchy in postfix traversal.
Definition: Mesh.cpp:40
Geometry
Enumerated datatype for the geometry of the mesh.
Definition: Mesh.hpp:62
Mesh & setGridUnitDimension(unit_representations::AsMaps const &gridUnitDimension)
Set the unitDimension for each axis of the current grid.
Definition: Mesh.cpp:353
Mesh & setGeometryParameters(std::string const &geometryParameters)
Set additional parameters for the geometry, separated by a.
Definition: Mesh.cpp:123
DataOrder
Enumerated datatype for the memory layout of N-dimensional data.
Definition: Mesh.hpp:73
Definition: ScientificDefaults.hpp:23
Public definitions of openPMD-api.
Definition: Date.cpp:29
Parameters recursively passed through the openPMD hierarchy when flushing.
Definition: AbstractIOHandler.hpp:106