OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::SuperLatticeRefinement< T, DESCRIPTOR > Class Template Reference

#include <superLatticeRefinement.h>

+ Collaboration diagram for olb::SuperLatticeRefinement< T, DESCRIPTOR >:

Public Member Functions

 SuperLatticeRefinement (SuperLattice< T, DESCRIPTOR > &cLattice, SuperLattice< T, DESCRIPTOR > &fLattice, const LoadBalancer< T > &balancer)
 
BlockRefinementContextD< T, DESCRIPTOR > & getBlock (int iC)
 
void apply (BlockRefinementOperatorPromise< T, DESCRIPTOR > &&promise)
 Apply coupling operation on all blocks.
 
void setProcessingContext (ProcessingContext context)
 
SuperCommunicator< T, SuperLattice< T, DESCRIPTOR > > & getCoarseCommunicator (BlockRefinementOperatorPromise< T, DESCRIPTOR > &&promise)
 
SuperCommunicator< T, SuperLattice< T, DESCRIPTOR > > & getFineCommunicator (BlockRefinementOperatorPromise< T, DESCRIPTOR > &&promise)
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::SuperLatticeRefinement< T, DESCRIPTOR >

Definition at line 152 of file superLatticeRefinement.h.

Constructor & Destructor Documentation

◆ SuperLatticeRefinement()

template<typename T , typename DESCRIPTOR >
olb::SuperLatticeRefinement< T, DESCRIPTOR >::SuperLatticeRefinement ( SuperLattice< T, DESCRIPTOR > & cLattice,
SuperLattice< T, DESCRIPTOR > & fLattice,
const LoadBalancer< T > & balancer )
inline

Definition at line 178 of file superLatticeRefinement.h.

181 : _data(balancer)
182 , _cLattice(cLattice)
183 , _fLattice(fLattice)
184 , _balancer(dynamic_cast<const RefinedLoadBalancer<T,DESCRIPTOR::d>&>(balancer))
185 {
186 for (int iC = 0; iC < _balancer.size(); ++iC) {
188 [&](auto platform) {
189 _context.emplace_back(constructConcreteBlockContext<platform.value>(iC));
190 });
191 }
192 }
virtual Platform platform(int loc) const
auto callUsingConcretePlatform(Platform platform, typename CONCRETIZABLE::base_t *ptr, F f)
Dispatcher for concrete platform access.
Definition dispatch.h:41

References olb::callUsingConcretePlatform(), olb::LoadBalancer< T >::platform(), and olb::LoadBalancer< T >::size().

+ Here is the call graph for this function:

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR >
void olb::SuperLatticeRefinement< T, DESCRIPTOR >::apply ( BlockRefinementOperatorPromise< T, DESCRIPTOR > && promise)
inline

Apply coupling operation on all blocks.

Definition at line 199 of file superLatticeRefinement.h.

199 {
200 {
201 auto iter = _cCommunicator.find(promise.id());
202 if (iter != _cCommunicator.end()) {
203 std::get<1>(*iter)->communicate();
204 }
205 }
206 {
207 auto iter = _fCommunicator.find(promise.id());
208 if (iter != _fCommunicator.end()) {
209 std::get<1>(*iter)->communicate();
210 }
211 }
212
213 #ifdef PARALLEL_MODE_OMP
214 #pragma omp taskloop
215 #endif
216 for (int iC = 0; iC < _balancer.size(); ++iC) {
217 _context[iC]->apply(std::forward<BlockRefinementOperatorPromise<T,DESCRIPTOR>&&>(promise));
218 }
219 }

References olb::LoadBalancer< T >::size().

+ Here is the call graph for this function:

◆ getBlock()

template<typename T , typename DESCRIPTOR >
BlockRefinementContextD< T, DESCRIPTOR > & olb::SuperLatticeRefinement< T, DESCRIPTOR >::getBlock ( int iC)
inline

Definition at line 194 of file superLatticeRefinement.h.

194 {
195 return *_context[iC];
196 }

◆ getCoarseCommunicator()

template<typename T , typename DESCRIPTOR >
SuperCommunicator< T, SuperLattice< T, DESCRIPTOR > > & olb::SuperLatticeRefinement< T, DESCRIPTOR >::getCoarseCommunicator ( BlockRefinementOperatorPromise< T, DESCRIPTOR > && promise)
inline

Definition at line 227 of file superLatticeRefinement.h.

228 {
229 auto iter = _cCommunicator.find(promise.id());
230 if (iter == _cCommunicator.end()) {
231 iter = std::get<0>(_cCommunicator.emplace(promise.id(),
232 std::make_unique<SuperCommunicator<T,SuperLattice<T,DESCRIPTOR>>>(_cLattice)));
233 }
234 return *std::get<1>(*iter);
235 }
SuperCommunicator(SUPER &) -> SuperCommunicator< typename SUPER::value_t, SUPER >

◆ getFineCommunicator()

template<typename T , typename DESCRIPTOR >
SuperCommunicator< T, SuperLattice< T, DESCRIPTOR > > & olb::SuperLatticeRefinement< T, DESCRIPTOR >::getFineCommunicator ( BlockRefinementOperatorPromise< T, DESCRIPTOR > && promise)
inline

Definition at line 237 of file superLatticeRefinement.h.

238 {
239 auto iter = _fCommunicator.find(promise.id());
240 if (iter == _fCommunicator.end()) {
241 iter = std::get<0>(_fCommunicator.emplace(promise.id(),
242 std::make_unique<SuperCommunicator<T,SuperLattice<T,DESCRIPTOR>>>(_fLattice)));
243 }
244 return *std::get<1>(*iter);
245 }

◆ setProcessingContext()

template<typename T , typename DESCRIPTOR >
void olb::SuperLatticeRefinement< T, DESCRIPTOR >::setProcessingContext ( ProcessingContext context)
inline

Definition at line 221 of file superLatticeRefinement.h.

221 {
222 for (int iC = 0; iC < _balancer.size(); ++iC) {
223 _context[iC]->setProcessingContext(context);
224 }
225 }

References olb::LoadBalancer< T >::size().

+ Here is the call graph for this function:

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