24#ifndef FIELD_ARRAY_D_HH
25#define FIELD_ARRAY_D_HH
33template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
34template <
typename FIELD>
35const typename FIELD::template value_type<T>&
38 return get<FIELD>()[iDim][iCell];
41template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
42template <
typename FIELD>
43typename FIELD::template value_type<T>&
46 return get<FIELD>()[iDim][iCell];
49template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
53 fields_t::for_each([&](
auto field) {
58template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
62 fields_t::for_each([&](
auto field) {
67template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
71 fields_t::for_each([&](
auto field) {
72 f(get(field).getFieldPointer(idx), field);
76template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
79 return (get<FIELDS>().getNblock() + ... + 0);
82template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
85 return (get<FIELDS>().getSerializableSize() + ... + 0);
88template <
typename T,
typename DESCRIPTOR,
Platform PLATFORM,
typename... FIELDS>
91 std::size_t currentBlock = 0;
92 bool* dataPtr =
nullptr;
95 registerSerializableOfConstSize(iBlock, sizeBlock, currentBlock, dataPtr, field, loadingMode);
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.
std::size_t getSerializableSize() const override
Binary size for the serializer.
const FIELD::template value_type< T > & getFieldComponent(std::size_t iCell, unsigned iDim) const
void forFieldsAt(std::size_t idx, F f)
Apply generic lambda expression to each FIELD of a cell.
std::size_t getNblock() const override
Number of data blocks for the serializable interface.
void forFields(F f) const
Apply generic expression to each FIELD array.
Top level namespace for all of OpenLB.
Platform
OpenLB execution targets.