OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCellWithParameters > Class Template Referencefinal

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

#include <operator.h>

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

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::PerCellWithParameters >

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

Definition at line 289 of file operator.h.

Constructor & Destructor Documentation

◆ ConcreteBlockCouplingO()

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

Definition at line 310 of file operator.h.

310 :
311 _lattices{lattices}
312 { }

Member Function Documentation

◆ execute()

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

Execute coupling operation.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 741 of file operator.hh.

742{
743 auto deviceLattice = _lattices.exchange_values([&](auto name) -> auto {
744 return gpu::cuda::DeviceBlockLattice{*_lattices.get(name)};
745 });
746 if (_mask) {
747 _mask->setProcessingContext(ProcessingContext::Simulation);
749 deviceLattice, _mask->deviceData(),
750 gpu::cuda::UnmaskedCouplingWithParameters<COUPLER,COUPLEES>{_parameters});
751 } else {
752 auto& mask = _lattices.template get<0>()->template getData<CollisionSubdomainMask>();
754 deviceLattice, mask.deviceData(),
755 gpu::cuda::UnmaskedCouplingWithParameters<COUPLER,COUPLEES>{_parameters});
756 }
757}
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::PerCellWithParameters >::getParameters ( )
inlineoverridevirtual

Return reference to parameters of coupling operator.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 318 of file operator.h.

318 {
319 return _parameters;
320 }

◆ id()

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

Implements olb::AbstractBlockO.

Definition at line 314 of file operator.h.

314 {
315 return typeid(COUPLER);
316 }

◆ set()

template<typename COUPLER , typename COUPLEES >
void olb::ConcreteBlockCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCellWithParameters >::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 728 of file operator.hh.

730{
731 if (!_mask) {
732 _mask = std::make_unique<ConcreteBlockMask<typename COUPLEES::values_t::template get<0>::value_t,
734 _lattices.template get<0>()->template getData<CollisionSubdomainMask>()
735 );
736 }
737 _mask->set(iCell, state);
738}
@ GPU_CUDA
Vector CPU (AVX2 / AVX-512 collision)

References olb::GPU_CUDA.


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