24#ifndef CORE_OPERATOR_H
25#define CORE_OPERATOR_H
29template <
typename T,
typename DESCRIPTOR, Platform PLATFORM>
class ConcreteBlockLattice;
30template <
typename T, Platform PLATFORM>
class ConcreteBlockMask;
36 virtual std::type_index
id()
const = 0;
40template <
typename T,
typename DESCRIPTOR, Platform PLATFORM>
64template<
typename T,
typename DESCRIPTOR, Platform PLATFORM,
typename OPERATOR, OperatorScope SCOPE>
68template <
typename T,
typename DESCRIPTOR>
77 virtual std::size_t
weight()
const = 0;
84 virtual void set(
CellID iCell,
bool state,
bool overlap) = 0;
96template <
typename T,
typename DESCRIPTOR, Platform PLATFORM>
110template<
typename T,
typename DESCRIPTOR, Platform PLATFORM,
typename DYNAMICS>
114template <
typename COUPLEES>
117 using value_t =
typename COUPLEES::values_t::template get<0>::value_t;
119 using descriptor_t =
typename COUPLEES::values_t::template get<0>::descriptor_t;
125 template <
typename FIELD>
141template<
typename COUPLEES, Platform PLATFORM,
typename OPERATOR, OperatorScope SCOPE>
Collision operation of concrete DYNAMICS on concrete block lattices of PLATFORM.
Coupling of COUPLEES using concrete OPERATOR with SCOPE on PLATFORM lattices.
Implementation of BlockLattice on a concrete PLATFORM.
Block application of concrete OPERATOR called using SCOPE on PLATFORM.
Top level namespace for all of OpenLB.
std::uint32_t CellID
Type for sequential block-local cell indices.
CollisionDispatchStrategy
Collision dispatch strategy.
@ Individual
Apply all dynamics individually (async for Platform::GPU_CUDA)
@ Dominant
Apply dominant dynamics using mask and fallback to virtual dispatch for others.
OperatorScope
Block-wide operator application scopes.
@ PerBlock
Per-block application, i.e. OPERATOR::apply is passed a ConcreteBlockLattice.
@ PerCell
Per-cell application, i.e. OPERATOR::apply is passed a CELL concept implementation.
@ PerCellWithParameters
Per-cell application with parameters, i.e. OPERATOR::apply is passed a CELL concept implementation an...
Base of any block operator.
virtual std::type_index id() const =0
virtual ~AbstractBlockO()=default
Base of collision operations performed by BlockDynamicsMap.
virtual void set(CellID iCell, bool state, bool overlap)=0
Set whether iCell is covered by the present collision step.
virtual std::size_t weight() const =0
Returns number of assigned cells.
virtual Dynamics< T, DESCRIPTOR > * getDynamics()=0
Base of block-wide coupling operators executed by SuperLatticeCoupling.
typename COUPLEES::values_t::template get< 0 >::descriptor_t descriptor_t
Descriptor type used for coupling parameters.
typename COUPLEES::values_t::template get< 0 >::value_t value_t
Value type used for coupling parameters.
virtual void set(CellID iCell, bool state)=0
Set whether iCell is covered by the present coupling.
virtual AbstractParameters & getParameters()=0
Return reference to parameters of coupling operator.
virtual void execute()=0
Execute coupling operation.
Dynamic access interface for FIELD-valued parameters.
Collision operation on concrete blocks of PLATFORM.
virtual void setup(ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &block)=0
Setup collision on block.
virtual void apply(ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &block, ConcreteBlockMask< T, PLATFORM > &subdomain, CollisionDispatchStrategy strategy)=0
Apply collision on subdomain of block using strategy.
Base of block-wide operators such as post processors.
virtual void apply(ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &block)=0
Apply operator on block.
virtual void set(CellID iCell, bool state)=0
Set whether iCell is covered by the operator (optional)
virtual void setup(ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &block)=0
Setup operator context.
Interface for per-cell dynamics.
Set of FIELD-valued parameters.