FieldAOS.h¶
-
template<typename
Field, typenameBuffer>
voidCubism::IO::Field2AOS(const Field &f, const typename Field::IndexRangeType &r, Buffer *buf, const size_t dface = 0)¶ Write field data into AoS buffer.
Copy the data from a structure of arrays (SoA) field into an array of structures (AoS) buffer for I/O operation. This is a low-level function which can be used in high-level I/O interfaces. The index range
rmay describe a sub-region of the index range spanned by the fieldf. The size of the output bufferbufis determined by the index rangerandField::NComponents.- Template Parameters
Field: Field typeBuffer: Data type of AoS buffer
- Parameters
f: Input fieldr: Index space for the copy (describes the memory region of buf)buf: Output bufferdface: Face direction (relevant forCubism::EntityType::Face)
-
template<typename
Field, typenameBuffer>
voidCubism::IO::AOS2Field(const Buffer *buf, const typename Field::IndexRangeType &r, Field &f, const size_t dface = 0)¶ Read AoS buffer into field data.
Copy the data from an array of structures (AoS) buffer into a structure of arrays field. This is a low-level function which can be used in high-level I/O interfaces. The index range
rmay describe a sub-region of the index range spanned by the fieldf. The size of the input bufferbufis determined by the index rangerandField::NComponents.- Template Parameters
Field: Field typeBuffer: Data type of AoS buffer
- Parameters
buf: Input bufferr: Index space for the read (describes the memory region of buf)f: Output fielddface: Face direction (relevant forCubism::EntityType::Face)