#include <elements.h>
|
template<typename TYPE , typename CELL , typename J , typename DESCRIPTOR = typename CELL::descriptor_t> |
void | compute (CELL &cell, J &j) any_platform |
|
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t> |
void | computeU (CELL &cell, U &u) any_platform |
|
template<typename TYPE , typename CELL , typename U > |
void | define (CELL &cell, const U &u) any_platform |
|
template<typename TYPE , typename CELL > |
void | initialize (CELL &cell) any_platform |
|
template<typename TYPE , typename CELL , typename U > |
void | inverseShift (CELL &cell, U &u) any_platform |
|
Definition at line 758 of file elements.h.
◆ compute()
template<typename TYPE , typename CELL , typename J , typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::GuoZhaoMomentum::compute |
( |
CELL & | cell, |
|
|
J & | j ) |
|
inline |
◆ computeU()
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::GuoZhaoMomentum::computeU |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
Definition at line 768 of file elements.h.
769 {
770 lbm<DESCRIPTOR>::computeU(cell, u);
771
772 const V epsilon = cell.template getField<descriptors::EPSILON>();
773 const V nu = cell.template getField<descriptors::NU>();
774 const V k = cell.template getField<descriptors::K>();
775
776 auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
777
778 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
779 u[iDim] += 0.5*epsilon*bodyF[iDim];
780 }
781
782 const V uMag =
util::sqrt( util::normSqr<V,DESCRIPTOR::d>(u) );
783 const V Fe = 0.;
784
785 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
787
788 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
789 u[iDim] /= (c_0 +
util::sqrt(c_0*c_0 + c_1*uMag));
790 }
791 }
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
References olb::util::sqrt().
◆ define()
template<typename TYPE , typename CELL , typename U >
void olb::momenta::GuoZhaoMomentum::define |
( |
CELL & | cell, |
|
|
const U & | u ) |
|
inline |
◆ getName()
static std::string olb::momenta::GuoZhaoMomentum::getName |
( |
| ) |
|
|
inlinestatic |
Definition at line 803 of file elements.h.
803 {
804 return "GuoZhaoMomentum";
805 }
◆ initialize()
template<typename TYPE , typename CELL >
void olb::momenta::GuoZhaoMomentum::initialize |
( |
CELL & | cell | ) |
|
|
inline |
◆ inverseShift()
template<typename TYPE , typename CELL , typename U >
void olb::momenta::GuoZhaoMomentum::inverseShift |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
The documentation for this struct was generated from the following file: