OpenLB 1.8.1
Loading...
Searching...
No Matches
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.
 
void computeEquilibrium (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T fEq[DESCRIPTOR::q]) const override any_platform
 Yields 0;.
 
CellStatistic< T > collide (Cell< T, DESCRIPTOR > &cell) override
 Collision step.
 
T 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 85 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 191 of file dynamics.h.

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

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 203 of file dynamics.h.

203 {
204 return {-1, -1};
205}

◆ 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 254 of file dynamics.h.

258{
259 computeRhoU(cell, rho, u);
260 computeStress(cell, rho, u, pi);
261}
void computeRhoU(ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override
Compute fluid velocity and particle density.
Definition dynamics.h:245
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:234

◆ computeEquilibrium()

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

Yields 0;.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 197 of file dynamics.h.

198{
199 return T();
200}

◆ 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 224 of file dynamics.h.

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

◆ 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 208 of file dynamics.h.

209{
210 return _rho;
211}

◆ 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 245 of file dynamics.h.

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

◆ 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 234 of file dynamics.h.

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

◆ 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 214 of file dynamics.h.

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

◆ 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 280 of file dynamics.h.

284{ }

◆ 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 264 of file dynamics.h.

265{ }

◆ 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 274 of file dynamics.h.

277{ }

◆ 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 268 of file dynamics.h.

271{ }

◆ 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 134 of file dynamics.h.

134 {
135 throw std::bad_function_call();
136 }

◆ 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 130 of file dynamics.h.

130 {
131 return typeid(NoLatticeDynamics<T,DESCRIPTOR>);
132 }
NoLatticeDynamics(T rho=T(1))
You may fix a fictitious density value on no dynamics node via this constructor.
Definition dynamics.h:191

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