![]() |
OpenLB 1.8.1
|
Storage of any FIELD_TYPE data on PLATFORM. More...
#include <data.h>
Inheritance diagram for olb::ConcreteData< T, DESCRIPTOR, PLATFORM >:
Collaboration diagram for olb::ConcreteData< T, DESCRIPTOR, PLATFORM >:Public Member Functions | |
| ConcreteData () | |
| Construct empty. | |
| ConcreteData (std::size_t size) | |
| Construct Array<FIELD> of size for each FIELD in DESCRIPTOR and mark for serialization. | |
| template<typename FIELD_TYPE > | |
| bool | provides () const |
| Returns true iff FIELD_TYPE is allocated and can be accessed. | |
| template<typename FIELD_TYPE , typename... ARGS> | |
| auto & | allocate (ARGS &&... args) |
| Allocate and return FIELD_TYPE data. | |
| template<typename FIELD_TYPE > | |
| const auto & | get () const |
| Return reference to data of FIELD_TYPE. | |
| template<typename FIELD_TYPE > | |
| auto & | get () |
| Return reference to data of FIELD_TYPE. | |
| template<typename F > | |
| void | forEach (F f) |
| Call f for each managed AnyFieldType. | |
| template<typename TYPE , typename F > | |
| void | forEachCastable (F f) |
| Call f for each managed AnyFieldType of TYPE. | |
| void | resize (std::size_t newSize) override |
| void | setProcessingContext (ProcessingContext context) override |
| Set processing context of all managed fields. | |
| auto & | getRegistry () |
| Expose FieldTypeRegistry for device-support. | |
| template<typename FIELD_TYPE > | |
| void | setSerialization (bool active) |
| Sets FIELD_TYPE serialization state to active. | |
| std::size_t | getNblock () const override |
| Number of data blocks for the serializable interface. | |
| std::size_t | getSerializableSize () const override |
| Binary size for the serializer. | |
| bool * | getBlock (std::size_t iBlock, std::size_t &sizeBlock, bool loadingMode) override |
| Return a pointer to the memory of the current block and its size for the serializable interface. | |
Public Member Functions inherited from olb::Data< T, DESCRIPTOR > | |
| Data (Platform platform) | |
| virtual | ~Data ()=default |
| Platform | getPlatform () const |
| Return platform of concrete implementation. | |
| template<typename FIELD_TYPE > | |
| bool | provides () |
| Return whether FIELD_TYPE is available / has been allocated. | |
| template<typename FIELD_TYPE , typename... ARGS> | |
| auto & | allocate (ARGS &&... args) |
| Allocate and return FIELD_TYPE data. | |
| template<typename FIELD_TYPE > | |
| const auto & | get () const |
| Return reference to data of FIELD_TYPE. | |
| template<typename FIELD_TYPE > | |
| auto & | get () |
| Return reference to data of FIELD_TYPE. | |
| template<typename OPERATOR > | |
| void | apply () |
| template<typename FIELD_TYPE > | |
| void | setSerialization (bool active) |
| Sets FIELD_TYPE serialization state to active. | |
Public Member Functions inherited from olb::Serializable | |
| virtual | ~Serializable ()=default |
| template<bool includeLogOutputDir = true> | |
| bool | save (std::string fileName="", const bool enforceUint=false) |
Save Serializable into file fileName | |
| template<bool includeLogOutputDir = true> | |
| bool | load (std::string fileName="", const bool enforceUint=false) |
Load Serializable from file fileName | |
| bool | save (std::uint8_t *buffer) |
Save Serializable into buffer of length getSerializableSize | |
| bool | load (const std::uint8_t *buffer) |
Load Serializable from buffer of length getSerializableSize | |
| virtual void | postLoad () |
Additional Inherited Members | |
Protected Member Functions inherited from olb::Data< T, DESCRIPTOR > | |
| template<typename F > | |
| auto | dispatch (F &&f) const |
| Calls f on concrete implementation of the Data interface. | |
| template<typename F > | |
| auto | dispatch (F &&f) |
Protected Member Functions inherited from olb::Serializable | |
| template<typename DataType > | |
| void | registerVar (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, const DataType &data, const size_t arrayLength=1) const |
Register primitive data types (int, double, ...) or arrays of those. | |
| template<typename DataType > | |
| void | registerSerializableOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType &data, const bool loadingMode=false) |
Register Serializable object of constant size. | |
| template<typename DataType > | |
| void | registerSerializablesOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType *data, const size_t arrayLength, const bool loadingMode=false) |
Register an array of Serializable objects of constant size. | |
Protected Attributes inherited from olb::Data< T, DESCRIPTOR > | |
| const Platform | _platform |
Storage of any FIELD_TYPE data on PLATFORM.
Manages access and serialization of dynamically allocated FIELD_TYPE data. This is the core storage class used for ConcreteBlockLattice on any platform supported by OpenLB.
See Data<T,DESCRIPTOR> for the platform-agnostic interface.
|
inline |
Construct empty.
|
inline |
Construct Array<FIELD> of size for each FIELD in DESCRIPTOR and mark for serialization.
Definition at line 440 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::allocate(), and olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::setSerialization().
Here is the call graph for this function:
|
inline |
Allocate and return FIELD_TYPE data.
Definition at line 459 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::get().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |
Call f for each managed AnyFieldType of TYPE.
Used to e.g. iterate over all field arrays
Definition at line 492 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::forEach().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Return reference to data of FIELD_TYPE.
Definition at line 475 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::get().
Here is the call graph for this function:
|
inline |
Return reference to data of FIELD_TYPE.
Definition at line 470 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::get().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Return a pointer to the memory of the current block and its size for the serializable interface.
Implements olb::Serializable.
Definition at line 52 of file data.hh.
|
overridevirtual |
Number of data blocks for the serializable interface.
Implements olb::Serializable.
Definition at line 32 of file data.hh.
|
inline |
Expose FieldTypeRegistry for device-support.
Definition at line 514 of file data.h.
Here is the caller graph for this function:
|
overridevirtual |
Binary size for the serializer.
Implements olb::Serializable.
Definition at line 42 of file data.hh.
|
inline |
Returns true iff FIELD_TYPE is allocated and can be accessed.
Definition at line 453 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::provides().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineoverridevirtual |
Implements olb::Data< T, DESCRIPTOR >.
Definition at line 500 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::forEachCastable().
Here is the call graph for this function:
|
inlineoverridevirtual |
Set processing context of all managed fields.
Implements olb::Data< T, DESCRIPTOR >.
Definition at line 507 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::forEach(), and olb::AnyFieldTypeD< T, DESCRIPTOR, PLATFORM >::setProcessingContext().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Sets FIELD_TYPE serialization state to active.
Definition at line 520 of file data.h.
References olb::ConcreteData< T, DESCRIPTOR, PLATFORM >::get(), and olb::meta::name().
Here is the call graph for this function:
Here is the caller graph for this function: