OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::refinement::CoarseCell< CELL > Class Template Reference

#include <coarseCell.h>

+ Collaboration diagram for olb::refinement::CoarseCell< CELL >:

Public Types

using value_t = typename CELL::value_t
 
using descriptor_t = typename CELL::descriptor_t
 

Public Member Functions

 CoarseCell (CELL &&cell, const LatticeR< CELL::descriptor_t::d > &fineLatticeR) any_platform
 
 CoarseCell (const CELL &cell, const LatticeR< CELL::descriptor_t::d > &fineLatticeR) any_platform
 
 CoarseCell (const CoarseCell &rhs) any_platform
 
 operator bool () const any_platform
 Returns true iff present fine location is co-incident with a coarse cell.
 
CELL & operator* () any_platform
 Return reference to coarse cell (only well defined if isCoIncident)
 
CoarseCell neighbor (LatticeR< descriptor_t::d > offset) any_platform
 Return neighbor along fine offset.
 

Detailed Description

template<typename CELL>
class olb::refinement::CoarseCell< CELL >

Definition at line 32 of file coarseCell.h.

Member Typedef Documentation

◆ descriptor_t

template<typename CELL >
using olb::refinement::CoarseCell< CELL >::descriptor_t = typename CELL::descriptor_t

Definition at line 39 of file coarseCell.h.

◆ value_t

template<typename CELL >
using olb::refinement::CoarseCell< CELL >::value_t = typename CELL::value_t

Definition at line 38 of file coarseCell.h.

Constructor & Destructor Documentation

◆ CoarseCell() [1/3]

template<typename CELL >
olb::refinement::CoarseCell< CELL >::CoarseCell ( CELL && cell,
const LatticeR< CELL::descriptor_t::d > & fineLatticeR )
inline

Definition at line 41 of file coarseCell.h.

42 : _cell{std::move(cell)}
43 , _fineLatticeR{fineLatticeR}
44 {
45 _cell.setLatticeR(_fineLatticeR / 2);
46 }

◆ CoarseCell() [2/3]

template<typename CELL >
olb::refinement::CoarseCell< CELL >::CoarseCell ( const CELL & cell,
const LatticeR< CELL::descriptor_t::d > & fineLatticeR )
inline

Definition at line 48 of file coarseCell.h.

49 : _cell{cell}
50 , _fineLatticeR{fineLatticeR}
51 {
52 _cell.setLatticeR(_fineLatticeR / 2);
53 }

◆ CoarseCell() [3/3]

template<typename CELL >
olb::refinement::CoarseCell< CELL >::CoarseCell ( const CoarseCell< CELL > & rhs)
inline

Definition at line 55 of file coarseCell.h.

56 : _cell(rhs._cell)
57 , _fineLatticeR(rhs._fineLatticeR)
58 { }

Member Function Documentation

◆ neighbor()

template<typename CELL >
CoarseCell olb::refinement::CoarseCell< CELL >::neighbor ( LatticeR< descriptor_t::d > offset)
inline

Return neighbor along fine offset.

Definition at line 76 of file coarseCell.h.

76 {
77 return CoarseCell{_cell, _fineLatticeR + offset};
78 }
CoarseCell(CELL &&cell, const LatticeR< CELL::descriptor_t::d > &fineLatticeR) any_platform
Definition coarseCell.h:41

◆ operator bool()

template<typename CELL >
olb::refinement::CoarseCell< CELL >::operator bool ( ) const
inline

Returns true iff present fine location is co-incident with a coarse cell.

Definition at line 61 of file coarseCell.h.

61 {
62 using DESCRIPTOR = typename CELL::descriptor_t;
63 bool coIncident = true;
64 for (unsigned iD=0; iD < DESCRIPTOR::d; ++iD) {
65 coIncident &= !(_fineLatticeR[iD] & 1);
66 }
67 return coIncident;
68 }

◆ operator*()

template<typename CELL >
CELL & olb::refinement::CoarseCell< CELL >::operator* ( )
inline

Return reference to coarse cell (only well defined if isCoIncident)

Definition at line 71 of file coarseCell.h.

71 {
72 return _cell;
73 }

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