Block¶
-
namespace
Cubism
::
Block
¶ Namespace for block data types.
Typedefs
-
using
CellField
= Field<T, EntityType::Cell, DIM, State, Alloc> Basic cell-centered data field.
- Template Parameters
T
: Data type (must be POD)DIM
: Field dimensionState
: State typeAlloc
: Allocator type
-
using
NodeField
= Field<T, EntityType::Node, DIM, State, Alloc> Basic node-centered data field.
- Template Parameters
T
: Data type (must be POD)DIM
: Field dimensionState
: State typeAlloc
: Allocator type
-
using
FaceField
= Field<T, EntityType::Face, DIM, State, Alloc> Basic face-centered data field.
Faces are stored individually for the dimensionality specified by
CUBISM_DIMENSION
at compile time. See theFaceContainer
type for a container of sizeCUBISM_DIMENSION
.- Template Parameters
T
: Data type (must be POD)DIM
: Field dimensionState
: State typeAlloc
: Allocator type
-
using
VectorField
= TensorField<T, 1, Entity, DIM, State, Alloc> Convenience type for vector fields.
- Template Parameters
T
: Field data typeEntity
: Entity typeDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
template<typename
T
, Cubism::EntityTypeEntity
, size_tDIM
, typenameBlockAlloc
= AlignedBlockAllocator<T>>
classData
: public Cubism::Block::DataBase - #include <Data.h>
Generic block data.
Data type that manages memory allocation and data access for the specified index range spanned by the data.
Note
The memory allocation for a block may be larger than the minimum required data specified by the index range.
- Template Parameters
T
: Data typeEntity
: Entity typeDIM
: Data dimensionalityBlockAlloc
: Allocator type
-
class
DataBase
- #include <Data.h>
Type-less base class for a data block.
For byte-level operations on the data only.
Subclassed by Cubism::Block::Data< T, Entity, DIM, BlockAlloc >, Cubism::Block::Data< T, Entity, DIM, Alloc< T > >, Cubism::Block::Data< TField::DataType, TField::EntityType, TField::IndexRangeType::Dim, Cubism::AlignedBlockAllocator< TField::DataType > >
-
template<typename
TField
>
classFaceContainer
: public Cubism::Block::FieldContainer<TField> - #include <Field.h>
Container class for all faces in a
CUBISM_DIMENSION
-ional problem.For
CUBISM_DIMENSION
in{1,2,3}
, the face field for faces with normal in theX
direction can be obtained withff[0]
orff[Cubism::Dir::X]
for example, whereff
is of typeFaceContainer
.- Template Parameters
TField
: Face field type (scalar or tensor)
-
template<typename
T
, Cubism::EntityTypeEntity
, size_tDIM
= CUBISM_DIMENSION, typenameState
= FieldState, template<typename> classAlloc
= AlignedBlockAllocator>
classField
: public Cubism::Block::Data<T, Entity, DIM, Alloc<T>> - #include <Field.h>
Block scalar field base class.
Generic block scalar field type used by Grid classes to compose a certain topology of block fields.
- Template Parameters
T
: Field data typeEntity
: Entity typeDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
template<typename
TField
>
classFieldContainer
- #include <Field.h>
Field container type.
This is an actively managed field container. Unlike
std::vector
, the destructors of the container elements are called upon destruction of the container. An incomplete container containsnullptr
for some of its components.- Template Parameters
TField
: Type of field
Subclassed by Cubism::Block::FaceContainer< TField >
-
template<typename
TField
>
classFieldLab
: public Cubism::Block::Data<TField::DataType, TField::EntityType, TField::IndexRangeType::Dim, Cubism::AlignedBlockAllocator<TField::DataType>> - #include <FieldLab.h>
Field laboratory.
A
FieldLab
is an extended data structure to include ghost cells for a given stencil. Loading a lab takes care of loading the ghost cells from neighboring block fields and applies boundary conditions if present. The default is periodic if no boundary conditions are specified otherwise.- Template Parameters
TField
: Field type to map to the lab
-
template<typename
FieldType
, size_tDIM
>
structFieldLabLoader
¶
-
struct
FieldState
- #include <Field.h>
Default meta data (state) of a block field.
Minimal (default) state of a field is empty. Custom field state types my add additional state to describe meta data of a field. A field state type must define copy semantics. Components in
TensorField
types andFaceContainer
types share one instance of a state.
-
template<typename
T
, size_tRANK
, Cubism::EntityTypeEntity
, size_tDIM
= CUBISM_DIMENSION, typenameState
= FieldState, template<typename> classAlloc
= AlignedBlockAllocator>
structFieldTypeFactory
¶ - #include <Field.h>
Field type factory for tensor fields.
- Template Parameters
T
: Field data typeRANK
: Tensor rankEntity
: Entity typeDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
template<typename T, size_t DIM, typename State, template< typename > class Alloc> Face, DIM, State, Alloc >
- #include <Field.h>
Field type factory for face scalar fields.
- Template Parameters
T
: Field data typeDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
template<typename
T
, Cubism::EntityTypeEntity
, size_tDIM
, typenameState
, template<typename> classAlloc
>
structFieldTypeFactory
<T, 0, Entity, DIM, State, Alloc>¶ - #include <Field.h>
Field type factory for scalar fields.
- Template Parameters
T
: Field data typeEntity
: Entity typeDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
template<typename T, size_t RANK, size_t DIM, typename State, template< typename > class Alloc> Face, DIM, State, Alloc >
- #include <Field.h>
Field type factory for face tensor fields.
- Template Parameters
T
: Field data typeRANK
: Tensor rankDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
template<typename
TField
>
classFieldView
: public TField - #include <Field.h>
Field view type.
Provides a view (shallow copy) for scalar fields, tensor fields or face field containers. The corresponding field interface is inherited.
Note
A view type never owns memory.
- Template Parameters
TField
: Field type
-
template<typename
FContainer
, Cubism::FieldClassClass
, size_tRANK
>
classPeriodicIndexFunctor
¶
-
template<typename
FContainer
, Cubism::FieldClassClass
, size_tRANK
>
structScalarFieldMap
¶
-
template<typename
FContainer
, Cubism::FieldClassClass
>
structScalarFieldMap
<FContainer, Class, 0>¶
-
template<typename FContainer> FaceContainer, 0 >
-
template<typename FContainer, size_t RANK> FaceContainer, RANK >
-
template<typename
T
, size_tRANK
, Cubism::EntityTypeEntity
, size_tDIM
= CUBISM_DIMENSION, typenameState
= FieldState, template<typename> classAlloc
= AlignedBlockAllocator>
classTensorField
: public Cubism::Block::FieldContainer<Field<T, Entity, DIM, State, Alloc>> - #include <Field.h>
Generic tensor field.
- Template Parameters
T
: Field data typeRANK
: Tensor rankEntity
: Entity typeDIM
: Field dimensionState
: Field state typeAlloc
: Memory allocator
-
using