OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM > Class Template Referencefinal

Block operator for supporting legacy post processor in the new operator-centric framework. More...

#include <blockPostProcessorMap.h>

+ Inheritance diagram for olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >:
+ Collaboration diagram for olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >:

Public Member Functions

std::type_index id () const override
 
void set (CellID iCell, bool state) override
 Set whether iCell is covered by the operator (optional)
 
void setup (ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &block) override
 Setup operator context.
 
void apply (ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &block) override
 Apply operator on block.
 
void add (PostProcessor< T, DESCRIPTOR > *postProcessor)
 
- Public Member Functions inherited from olb::AbstractBlockO
virtual ~AbstractBlockO ()=default
 

Detailed Description

template<typename T, typename DESCRIPTOR, Platform PLATFORM>
class olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >

Block operator for supporting legacy post processor in the new operator-centric framework.

Definition at line 108 of file blockPostProcessorMap.h.

Member Function Documentation

◆ add()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >::add ( PostProcessor< T, DESCRIPTOR > * postProcessor)
inline

Definition at line 148 of file blockPostProcessorMap.h.

149 {
150 _postProcessors.emplace_back(postProcessor);
151 }
+ Here is the caller graph for this function:

◆ apply()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >::apply ( ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > & block)
inlineoverridevirtual

Apply operator on block.

Implements olb::BlockO< T, DESCRIPTOR, PLATFORM >.

Definition at line 126 of file blockPostProcessorMap.h.

127 {
128 #ifdef PLATFORM_GPU_CUDA
129 if constexpr (PLATFORM == Platform::GPU_CUDA) {
130 if (!_postProcessors.empty()) {
131 throw std::runtime_error("Legacy post processors not supported on GPU_CUDA");
132 }
133 }
134 #else // CPU_* platform
135 #ifdef PARALLEL_MODE_OMP
136 #pragma omp parallel for schedule(dynamic)
137 #endif
138 for (std::size_t i=0; i < _postProcessors.size(); ++i) {
139 if constexpr (DESCRIPTOR::d == 3) {
140 _postProcessors[i]->processSubDomain(block, 0, block.getNx()-1, 0, block.getNy()-1, 0, block.getNz()-1);
141 } else {
142 _postProcessors[i]->processSubDomain(block, 0, block.getNx()-1, 0, block.getNy()-1);
143 }
144 }
145 #endif
146 }
int getNy() const
Read only access to block height.
int getNx() const
Read only access to block width.
int getNz() const
Read only access to block height.
@ GPU_CUDA
Vector CPU (AVX2 / AVX-512 collision)

References olb::BlockStructureD< D >::getNx(), olb::BlockStructureD< D >::getNy(), olb::BlockStructureD< D >::getNz(), and olb::GPU_CUDA.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ id()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
std::type_index olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >::id ( ) const
inlineoverridevirtual

Implements olb::AbstractBlockO.

Definition at line 114 of file blockPostProcessorMap.h.

115 {
116 return typeid(LegacyBlockPostProcessorO);
117 }

◆ set()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >::set ( CellID iCell,
bool state )
inlineoverridevirtual

Set whether iCell is covered by the operator (optional)

Implements olb::BlockO< T, DESCRIPTOR, PLATFORM >.

Definition at line 119 of file blockPostProcessorMap.h.

120 {
121 throw std::logic_error("Invalid legacy post processor setter");
122 }

◆ setup()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyBlockPostProcessorO< T, DESCRIPTOR, PLATFORM >::setup ( ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > & block)
inlineoverridevirtual

Setup operator context.

Implements olb::BlockO< T, DESCRIPTOR, PLATFORM >.

Definition at line 124 of file blockPostProcessorMap.h.

124{ }

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