OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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 >::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::PerCellWithParameters >

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

Definition at line 267 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 288 of file operator.h.

288 :
289 _lattices{lattices}
290 { }

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

671{
672 auto deviceLattice = _lattices.exchange_values([&](auto name) -> auto {
673 return gpu::cuda::DeviceBlockLattice{*_lattices.get(name)};
674 });
675 if (_mask) {
676 _mask->setProcessingContext(ProcessingContext::Simulation);
678 deviceLattice, _mask->deviceData(),
679 gpu::cuda::UnmaskedCouplingWithParameters<COUPLER,COUPLEES>{_parameters});
680 } else {
681 auto& mask = _lattices.template get<0>()->template getData<CollisionSubdomainMask>();
683 deviceLattice, mask.deviceData(),
684 gpu::cuda::UnmaskedCouplingWithParameters<COUPLER,COUPLEES>{_parameters});
685 }
686}
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::PerCellWithParameters >::getParameters ( )
inlineoverridevirtual

Return reference to parameters of coupling operator.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 296 of file operator.h.

296 {
297 return _parameters;
298 }

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

292 {
293 return typeid(COUPLER);
294 }

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

659{
660 if (!_mask) {
661 _mask = std::make_unique<ConcreteBlockMask<typename COUPLEES::values_t::template get<0>::value_t,
663 _lattices.template get<0>()->template getData<CollisionSubdomainMask>()
664 );
665 }
666 _mask->set(iCell, state);
667}
@ GPU_CUDA
Vector CPU (AVX2 / AVX-512 collision)

References olb::GPU_CUDA.


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