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

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

#include <operator.h>

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

Public Member Functions

template<typename LATTICES >
 ConcreteBlockPointCouplingO (LATTICES &&lattices, Cuboid< typename AbstractCouplingO< COUPLEES >::value_t, AbstractCouplingO< COUPLEES >::descriptor_t::d > &cuboid)
 
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::ConcreteBlockPointCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCellWithParameters >

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

Definition at line 330 of file operator.h.

Constructor & Destructor Documentation

◆ ConcreteBlockPointCouplingO()

template<typename COUPLER , typename COUPLEES >
template<typename LATTICES >
olb::ConcreteBlockPointCouplingO< COUPLEES, Platform::GPU_CUDA, COUPLER, OperatorScope::PerCellWithParameters >::ConcreteBlockPointCouplingO ( LATTICES && lattices,
Cuboid< typename AbstractCouplingO< COUPLEES >::value_t, AbstractCouplingO< COUPLEES >::descriptor_t::d > & cuboid )
inline

Definition at line 365 of file operator.h.

367 :
368 _lattices{lattices},
369 _cuboid{cuboid}
370 { }

Member Function Documentation

◆ execute()

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

Execute coupling operation.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 767 of file operator.hh.

768{
769 if (_lattices.get(meta::id<names::Points>{})->getNcells() == 0) {
770 return;
771 }
772
773 auto* particleLattice = _lattices.get(meta::id<names::Points>{});
774 auto deviceLattice = _lattices.exchange_values([&](auto name) -> auto {
775 if constexpr (std::is_same_v<typename decltype(name)::type, names::Points>) {
776 return gpu::cuda::DeviceContext{*_lattices.get(name)};
777 } else {
778 return gpu::cuda::DeviceBlockLattice{*_lattices.get(name)};
779 }
780 });
781
783 deviceLattice,
784 gpu::cuda::ParticleCouplingWithParameters<COUPLER,COUPLEES>{_parameters});
785}
std::string name()
Returns name of FIELD for human consumption.
Definition fields.h:49
void call_particle_coupling_operators(CONTEXT &lattices, ARGS &&... args)
Apply coupling on particles and lattices.
Definition operator.hh:524
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_particle_coupling_operators().

+ Here is the call graph for this function:

◆ getParameters()

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

Return reference to parameters of coupling operator.

Implements olb::AbstractCouplingO< COUPLEES >.

Definition at line 376 of file operator.h.

376 {
377 return _parameters;
378 }

◆ id()

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

Implements olb::AbstractBlockO.

Definition at line 372 of file operator.h.

372 {
373 return typeid(COUPLER);
374 }

◆ set()

template<typename COUPLER , typename COUPLEES >
void olb::ConcreteBlockPointCouplingO< 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 760 of file operator.hh.

762{
763 throw std::bad_function_call();
764}

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