OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell > Class Template Referencefinal

Application of a block-wise COUPLER on concrete CUDA COUPLEES. More...

#include <operator.h>

+ Inheritance diagram for olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >:
+ Collaboration diagram for olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >:

Public Member Functions

template<typename LATTICES >
 ConcreteBlockCouplingO (LATTICES &&lattices)
 
std::type_index id () const override
 
AbstractCouplingO< COUPLEES >::AbstractParametersgetParameters () override
 Return reference to parameters of coupling operator.
 
void set (CellID iCell, bool state) override
 Set whether iCell is covered by the present coupling.
 
void execute () override
 Execute coupling operation.
 
- Public Member Functions inherited from olb::AbstractBlockO
virtual ~AbstractBlockO ()=default
 

Additional Inherited Members

- Public Types inherited from olb::AbstractCouplingO< COUPLEES >
using value_t = typename COUPLEES::values_t::template get<0>::value_t
 Value type used for coupling parameters.
 
using descriptor_t = typename COUPLEES::values_t::template get<0>::descriptor_t
 Descriptor type used for coupling parameters.
 
using AbstractParameters = olb::AbstractParameters<value_t,descriptor_t>
 
using ParametersD = olb::ParametersD<value_t,descriptor_t>
 
using LatticeR = olb::LatticeR<descriptor_t::d>
 
template<typename FIELD >
using FieldD = olb::FieldD<value_t,descriptor_t,FIELD>
 

Detailed Description

template<typename COUPLER, typename COUPLEES>
class olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >

Application of a block-wise COUPLER on concrete CUDA COUPLEES.

Definition at line 228 of file operator.h.

Constructor & Destructor Documentation

◆ ConcreteBlockCouplingO()

template<typename COUPLER , typename COUPLEES >
template<typename LATTICES >
olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >::ConcreteBlockCouplingO ( LATTICES && lattices)
inline

Definition at line 247 of file operator.h.

247 :
248 _lattices{lattices}
249 { }

Member Function Documentation

◆ execute()

template<typename COUPLER , typename COUPLEES >
void olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >::execute ( )
overridevirtual

Execute coupling operation.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 638 of file operator.hh.

639{
640 auto deviceLattice = _lattices.exchange_values([&](auto name) -> auto {
641 return gpu::cuda::DeviceBlockLattice{*_lattices.get(name)};
642 });
643 if (_mask) {
644 _mask->setProcessingContext(ProcessingContext::Simulation);
646 deviceLattice, _mask->deviceData(),
647 gpu::cuda::UnmaskedCoupling<COUPLER>{});
648 } else {
649 auto& mask = _lattices.template get<0>()->template getData<CollisionSubdomainMask>();
651 deviceLattice, mask.deviceData(),
652 gpu::cuda::UnmaskedCoupling<COUPLER>{});
653 }
654}
void call_coupling_operators(CONTEXT &lattices, bool *subdomain, ARGS &&... args)
Apply coupling on subdomain.
Definition operator.hh:453
@ Simulation
Data available on host for e.g. functor evaluation.

References olb::gpu::cuda::call_coupling_operators(), olb::gpu::cuda::DeviceBlockLattice< T, DESCRIPTOR >::get(), and olb::Simulation.

+ Here is the call graph for this function:

◆ getParameters()

template<typename COUPLER , typename COUPLEES >
AbstractCouplingO< COUPLEES >::AbstractParameters & olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >::getParameters ( )
inlineoverridevirtual

Return reference to parameters of coupling operator.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 255 of file operator.h.

255 {
256 return _parameters;
257 }

◆ id()

template<typename COUPLER , typename COUPLEES >
std::type_index olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >::id ( ) const
inlineoverridevirtual

Implements olb::AbstractBlockO.

Definition at line 251 of file operator.h.

251 {
252 return typeid(COUPLER);
253 }

◆ set()

template<typename COUPLER , typename COUPLEES >
void olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCell >::set ( CellID iCell,
bool state )
overridevirtual

Set whether iCell is covered by the present coupling.

By default the entire non-overlap block area is coupled.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 625 of file operator.hh.

627{
628 if (!_mask) {
629 _mask = std::make_unique<ConcreteBlockMask<typename COUPLEES::values_t::template get<0>::value_t,
631 _lattices.template get<0>()->template getData<CollisionSubdomainMask>()
632 );
633 }
634 _mask->set(iCell, state);
635}
@ GPU_CUDA
Vector CPU (AVX2 / AVX-512 collision)

References olb::GPU_CUDA.


The documentation for this class was generated from the following files: