OpenLB 1.8.1
Loading...
Searching...
No Matches
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 >::AbstractParameters & getParameters () 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::AbstractCouplingO< COUPLEES >
- 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 250 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 269 of file operator.h.

269 :
270 _lattices{lattices}
271 { }

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 709 of file operator.hh.

710{
711 auto deviceLattice = _lattices.exchange_values([&](auto name) -> auto {
712 return gpu::cuda::DeviceBlockLattice{*_lattices.get(name)};
713 });
714 if (_mask) {
715 _mask->setProcessingContext(ProcessingContext::Simulation);
717 deviceLattice, _mask->deviceData(),
718 gpu::cuda::UnmaskedCoupling<COUPLER>{});
719 } else {
720 auto& mask = _lattices.template get<0>()->template getData<CollisionSubdomainMask>();
722 deviceLattice, mask.deviceData(),
723 gpu::cuda::UnmaskedCoupling<COUPLER>{});
724 }
725}
void call_coupling_operators(CONTEXT &lattices, bool *subdomain, ARGS &&... args)
Apply coupling on subdomain.
Definition operator.hh:513
@ Simulation
Data available on host for e.g. functor evaluation.
constexpr auto & get() any_platform
Access Ith element.
constexpr auto exchange_values(F f) any_platform
Returns new TypeIndexedTuple with same keys but values generated by f(key)

References olb::gpu::cuda::call_coupling_operators(), 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 277 of file operator.h.

277 {
278 return _parameters;
279 }

◆ 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 273 of file operator.h.

273 {
274 return typeid(COUPLER);
275 }

◆ 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 696 of file operator.hh.

698{
699 if (!_mask) {
700 _mask = std::make_unique<ConcreteBlockMask<typename COUPLEES::values_t::template get<0>::value_t,
702 _lattices.template get<0>()->template getData<CollisionSubdomainMask>()
703 );
704 }
705 _mask->set(iCell, state);
706}
@ GPU_CUDA
Vector CPU (AVX2 / AVX-512 collision)

References olb::GPU_CUDA.


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