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

Concrete CPU dynamics for legacy dynamics. More...

#include <blockDynamicsMap.h>

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

Public Member Functions

 LegacyConcreteDynamics (ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > &lattice, Dynamics< T, DESCRIPTOR > *dynamics)
 
CellStatistic< T > collide (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell) override
 
computeRho (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell) override
 
void computeU (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T *u) override
 
void computeJ (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T *j) override
 
void computeRhoU (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho, T *u) override
 
void defineRho (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho) override
 
void defineU (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T *u) override
 
void defineRhoU (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho, T *u) override
 
void defineAllMomenta (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho, T *u, T *pi) override
 
void computeStress (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho, T *u, T *pi) override
 
void computeAllMomenta (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho, T *u, T *pi) override
 
getOmegaOrFallback (T fallback) override
 
computeEquilibrium (int iPop, T rho, T *u) override
 
void inverseShiftRhoU (cpu::Cell< T, DESCRIPTOR, PLATFORM > &cell, T &rho, T *u) override
 
- Public Member Functions inherited from olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >
virtual ~Dynamics ()
 
void iniEquilibrium (Cell< T, DESCRIPTOR, PLATFORM > &cell, T rho, T *u)
 
void iniRegularized (Cell< T, DESCRIPTOR, PLATFORM > &cell, T rho, T *u, T *pi)
 

Detailed Description

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

Concrete CPU dynamics for legacy dynamics.

Required to enable interaction between generic operators / non-legacy post processors and legacy dynamics. Note that this is only supported on CPU targets.

Definition at line 49 of file blockDynamicsMap.h.

Constructor & Destructor Documentation

◆ LegacyConcreteDynamics()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::LegacyConcreteDynamics ( ConcreteBlockLattice< T, DESCRIPTOR, PLATFORM > & lattice,
Dynamics< T, DESCRIPTOR > * dynamics )
inline

Definition at line 55 of file blockDynamicsMap.h.

56 :
57 _lattice(lattice),
58 _dynamics{dynamics} {
59 }

Member Function Documentation

◆ collide()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
CellStatistic< T > olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::collide ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell)
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 61 of file blockDynamicsMap.h.

61 {
62 auto abstractCell = _lattice.get(cell.getCellId());
63 return _dynamics->collide(abstractCell);
64 }

References olb::Dynamics< T, DESCRIPTOR >::collide(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ computeAllMomenta()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeAllMomenta ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho,
T * u,
T * pi )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 106 of file blockDynamicsMap.h.

106 {
107 auto abstractCell = _lattice.get(cell.getCellId());
108 _dynamics->computeAllMomenta(abstractCell, rho, u, pi);
109 }

References olb::Dynamics< T, DESCRIPTOR >::computeAllMomenta(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ computeEquilibrium()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
T olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeEquilibrium ( int iPop,
T rho,
T * u )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 115 of file blockDynamicsMap.h.

115 {
116 return _dynamics->computeEquilibrium(iPop, rho, u);
117 }

References olb::Dynamics< T, DESCRIPTOR >::computeEquilibrium().

+ Here is the call graph for this function:

◆ computeJ()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeJ ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T * j )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 74 of file blockDynamicsMap.h.

74 {
75 auto abstractCell = _lattice.get(cell.getCellId());
76 _dynamics->computeJ(abstractCell, j);
77 }

References olb::Dynamics< T, DESCRIPTOR >::computeJ(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ computeRho()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
T olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeRho ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell)
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 66 of file blockDynamicsMap.h.

66 {
67 auto abstractCell = _lattice.get(cell.getCellId());
68 return _dynamics->computeRho(abstractCell);
69 }

References olb::Dynamics< T, DESCRIPTOR >::computeRho(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ computeRhoU()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeRhoU ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho,
T * u )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 78 of file blockDynamicsMap.h.

78 {
79 auto abstractCell = _lattice.get(cell.getCellId());
80 _dynamics->computeRhoU(abstractCell, rho, u);
81 }

References olb::Dynamics< T, DESCRIPTOR >::computeRhoU(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ computeStress()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeStress ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho,
T * u,
T * pi )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 102 of file blockDynamicsMap.h.

102 {
103 auto abstractCell = _lattice.get(cell.getCellId());
104 _dynamics->computeStress(abstractCell, rho, u, pi);
105 }

References olb::Dynamics< T, DESCRIPTOR >::computeStress(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ computeU()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::computeU ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T * u )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 70 of file blockDynamicsMap.h.

70 {
71 auto abstractCell = _lattice.get(cell.getCellId());
72 _dynamics->computeU(abstractCell, u);
73 }

References olb::Dynamics< T, DESCRIPTOR >::computeU(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ defineAllMomenta()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::defineAllMomenta ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho,
T * u,
T * pi )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 97 of file blockDynamicsMap.h.

97 {
98 auto abstractCell = _lattice.get(cell.getCellId());
99 _dynamics->defineAllMomenta(abstractCell, rho, u, pi);
100 }

References olb::Dynamics< T, DESCRIPTOR >::defineAllMomenta(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ defineRho()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::defineRho ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 82 of file blockDynamicsMap.h.

82 {
83 auto abstractCell = _lattice.get(cell.getCellId());
84 _dynamics->defineRho(abstractCell, rho);
85 }

References olb::Dynamics< T, DESCRIPTOR >::defineRho(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ defineRhoU()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::defineRhoU ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho,
T * u )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 92 of file blockDynamicsMap.h.

92 {
93 auto abstractCell = _lattice.get(cell.getCellId());
94 _dynamics->defineRhoU(abstractCell, rho, u);
95 }

References olb::Dynamics< T, DESCRIPTOR >::defineRhoU(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ defineU()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::defineU ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T * u )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 87 of file blockDynamicsMap.h.

87 {
88 auto abstractCell = _lattice.get(cell.getCellId());
89 _dynamics->defineU(abstractCell, u);
90 }

References olb::Dynamics< T, DESCRIPTOR >::defineU(), olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId().

+ Here is the call graph for this function:

◆ getOmegaOrFallback()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
T olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::getOmegaOrFallback ( T fallback)
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 111 of file blockDynamicsMap.h.

111 {
112 throw std::runtime_error("getOmegaOrFallback not supported for legacy dynamics");
113 }

◆ inverseShiftRhoU()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::LegacyConcreteDynamics< T, DESCRIPTOR, PLATFORM >::inverseShiftRhoU ( cpu::Cell< T, DESCRIPTOR, PLATFORM > & cell,
T & rho,
T * u )
inlineoverridevirtual

Implements olb::cpu::Dynamics< T, DESCRIPTOR, PLATFORM >.

Definition at line 119 of file blockDynamicsMap.h.

119 {
120 auto abstractCell = _lattice.get(cell.getCellId());
121 _dynamics->inverseShiftRhoU(abstractCell, rho, u);
122 }

References olb::BlockLattice< T, DESCRIPTOR >::get(), olb::cpu::Cell< T, DESCRIPTOR, PLATFORM >::getCellId(), and olb::Dynamics< T, DESCRIPTOR >::inverseShiftRhoU().

+ Here is the call graph for this function:

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