Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Aug 11, 2023
1 parent 05bd135 commit 0443ea6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/usage/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ A record is an data set with common properties, e.g. the electric field :math:`\
A density field could be another record - which is scalar as it only has one component.

In general, openPMD allows records with arbitrary number of components (tensors), as well as vector records and scalar records.
In the case of vector records, the single components are stored as datasets within the record.
In the case of scalar records, the record and component are equivalent.
In the API, the record can be directly used as a component, and in the standard a scalar record is represented by the scalar dataset with attributes.

Meshes and Particles
--------------------
Expand Down
10 changes: 10 additions & 0 deletions include/openPMD/backend/BaseRecord.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@ namespace internal
};
} // namespace internal

/**
* @brief Base class for any type of record (e.g. mesh or particle record).
*
* If the record is a vector record, the single components are accessed via the
* container interface (base class 1).
* If the record is a scalar record, it directly acts as a record component
* (base class 2) and the Container API needs not be used.
*
* @tparam T_elem
*/
template <typename T_elem>
class BaseRecord
: public Container<T_elem>
Expand Down

0 comments on commit 0443ea6

Please sign in to comment.