diff --git a/docs/source/usage/concepts.rst b/docs/source/usage/concepts.rst index 43e9ace4dc..91253f8945 100644 --- a/docs/source/usage/concepts.rst +++ b/docs/source/usage/concepts.rst @@ -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 -------------------- diff --git a/include/openPMD/backend/BaseRecord.hpp b/include/openPMD/backend/BaseRecord.hpp index 25606f9f76..88bd73b247 100644 --- a/include/openPMD/backend/BaseRecord.hpp +++ b/include/openPMD/backend/BaseRecord.hpp @@ -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 class BaseRecord : public Container