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

#include <dynamics.h>

+ Inheritance diagram for olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >:
+ Collaboration diagram for olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >:

Public Member Functions

 NoLatticeDynamics (T rho=T(1))
 You may fix a fictitious density value on no dynamics node via this constructor.
 
computeEquilibrium (int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform
 Yields 0;.
 
CellStatistic< T > collide (Cell< T, DESCRIPTOR > &cell) override
 Collision step.
 
computeRho (ConstCell< T, DESCRIPTOR > &cell) const override
 Yields 1;.
 
void computeU (ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const override
 Yields 0;.
 
void computeJ (ConstCell< T, DESCRIPTOR > &cell, T j[DESCRIPTOR::d]) const override
 Yields 0;.
 
void computeStress (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override
 Yields NaN.
 
void computeRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override
 Compute fluid velocity and particle density.
 
void computeAllMomenta (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override
 Compute all momenta up to second order.
 
void defineRho (Cell< T, DESCRIPTOR > &cell, T rho) override
 Does nothing.
 
void defineU (Cell< T, DESCRIPTOR > &cell, const T u[DESCRIPTOR::d]) override
 Does nothing.
 
void defineRhoU (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d]) override
 Does nothing.
 
void defineAllMomenta (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n]) override
 Does nothing.
 
std::type_index id () override
 Expose unique type-identifier for RTTI.
 
AbstractParameters< T, DESCRIPTOR > & getParameters (BlockLattice< T, DESCRIPTOR > &block) override
 Parameters access for legacy post processors.
 
- Public Member Functions inherited from olb::Dynamics< T, DESCRIPTOR >
virtual ~Dynamics () any_platform
 
virtual std::string getName () const
 Return human-readable name.
 
virtual void initialize (Cell< T, DESCRIPTOR > &cell)
 Initialize dynamics-specific data for cell.
 
void iniEquilibrium (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d])
 Initialize to equilibrium distribution.
 
void iniRegularized (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n])
 Initialize cell to equilibrium and non-equilibrum part.
 
virtual void inverseShiftRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const
 Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU.
 

Additional Inherited Members

- Public Types inherited from olb::Dynamics< T, DESCRIPTOR >
using value_t = T
 
using descriptor_t = DESCRIPTOR
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >

Definition at line 83 of file dynamics.h.

Constructor & Destructor Documentation

◆ NoLatticeDynamics()

template<typename T , typename DESCRIPTOR >
olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::NoLatticeDynamics ( T rho = T(1))

You may fix a fictitious density value on no dynamics node via this constructor.

Definition at line 189 of file dynamics.h.

189 :_rho(rho)
190{
191 this->getName() = "NoLatticeDynamics";
192}
virtual std::string getName() const
Return human-readable name.
Definition interface.h:63

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

+ Here is the call graph for this function:

Member Function Documentation

◆ collide()

template<typename T , typename DESCRIPTOR >
CellStatistic< T > olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::collide ( Cell< T, DESCRIPTOR > & cell)
overridevirtual

Collision step.

Reimplemented from olb::Dynamics< T, DESCRIPTOR >.

Definition at line 201 of file dynamics.h.

201 {
202 return {-1, -1};
203}

◆ computeAllMomenta()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeAllMomenta ( ConstCell< T, DESCRIPTOR > & cell,
T & rho,
T u[DESCRIPTOR::d],
T pi[util::TensorVal< DESCRIPTOR >::n] ) const
overridevirtual

Compute all momenta up to second order.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 252 of file dynamics.h.

256{
257 computeRhoU(cell, rho, u);
258 computeStress(cell, rho, u, pi);
259}
void computeRhoU(ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override
Compute fluid velocity and particle density.
Definition dynamics.h:243
void computeStress(ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override
Yields NaN.
Definition dynamics.h:232

◆ computeEquilibrium()

template<typename T , typename DESCRIPTOR >
T olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeEquilibrium ( int iPop,
T rho,
const T u[DESCRIPTOR::d] ) const
overridevirtual

Yields 0;.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 195 of file dynamics.h.

196{
197 return T();
198}

◆ computeJ()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeJ ( ConstCell< T, DESCRIPTOR > & cell,
T j[DESCRIPTOR::d] ) const
overridevirtual

Yields 0;.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 222 of file dynamics.h.

225{
226 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
227 j[iD] = T();
228 }
229}

◆ computeRho()

template<typename T , typename DESCRIPTOR >
T olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeRho ( ConstCell< T, DESCRIPTOR > & cell) const
overridevirtual

Yields 1;.

Implements olb::Dynamics< T, DESCRIPTOR >.

Reimplemented in olb::legacy::OffDynamics< T, DESCRIPTOR >.

Definition at line 206 of file dynamics.h.

207{
208 return _rho;
209}

◆ computeRhoU()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeRhoU ( ConstCell< T, DESCRIPTOR > & cell,
T & rho,
T u[DESCRIPTOR::d] ) const
overridevirtual

Compute fluid velocity and particle density.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 243 of file dynamics.h.

246{
247 rho = computeRho(cell);
248 computeU(cell, u);
249}
T computeRho(ConstCell< T, DESCRIPTOR > &cell) const override
Yields 1;.
Definition dynamics.h:206
void computeU(ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const override
Yields 0;.
Definition dynamics.h:212

◆ computeStress()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeStress ( ConstCell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
T pi[util::TensorVal< DESCRIPTOR >::n] ) const
overridevirtual

Yields NaN.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 232 of file dynamics.h.

236{
237 for (int iPi=0; iPi<util::TensorVal<DESCRIPTOR >::n; ++iPi) {
238 pi[iPi] = T();//std::numeric_limits<T>::signaling_NaN();
239 }
240}

◆ computeU()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::computeU ( ConstCell< T, DESCRIPTOR > & cell,
T u[DESCRIPTOR::d] ) const
overridevirtual

Yields 0;.

Implements olb::Dynamics< T, DESCRIPTOR >.

Reimplemented in olb::legacy::OffDynamics< T, DESCRIPTOR >.

Definition at line 212 of file dynamics.h.

215{
216 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
217 u[iD] = T();
218 }
219}

◆ defineAllMomenta()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::defineAllMomenta ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
const T pi[util::TensorVal< DESCRIPTOR >::n] )
overridevirtual

Does nothing.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 278 of file dynamics.h.

282{ }

◆ defineRho()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::defineRho ( Cell< T, DESCRIPTOR > & cell,
T rho )
overridevirtual

Does nothing.

Implements olb::Dynamics< T, DESCRIPTOR >.

Reimplemented in olb::legacy::OffDynamics< T, DESCRIPTOR >.

Definition at line 262 of file dynamics.h.

263{ }

◆ defineRhoU()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::defineRhoU ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d] )
overridevirtual

Does nothing.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 272 of file dynamics.h.

275{ }

◆ defineU()

template<typename T , typename DESCRIPTOR >
void olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::defineU ( Cell< T, DESCRIPTOR > & cell,
const T u[DESCRIPTOR::d] )
overridevirtual

Does nothing.

Implements olb::Dynamics< T, DESCRIPTOR >.

Reimplemented in olb::legacy::OffDynamics< T, DESCRIPTOR >.

Definition at line 266 of file dynamics.h.

269{ }

◆ getParameters()

template<typename T , typename DESCRIPTOR >
AbstractParameters< T, DESCRIPTOR > & olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::getParameters ( BlockLattice< T, DESCRIPTOR > & block)
inlineoverridevirtual

Parameters access for legacy post processors.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 132 of file dynamics.h.

132 {
133 throw std::bad_function_call();
134 }

◆ id()

template<typename T , typename DESCRIPTOR >
std::type_index olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >::id ( )
inlineoverridevirtual

Expose unique type-identifier for RTTI.

Implements olb::Dynamics< T, DESCRIPTOR >.

Reimplemented in olb::legacy::OffDynamics< T, DESCRIPTOR >.

Definition at line 128 of file dynamics.h.

128 {
129 return typeid(NoLatticeDynamics<T,DESCRIPTOR>);
130 }

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