|
template<typename TYPE , typename CELL , typename J , typename V = typename CELL::value_t, 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 , typename DESCRIPTOR = typename CELL::descriptor_t> |
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 , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t> |
void | inverseShift (CELL &cell, U &u) any_platform |
|
template<typename MOMENTUM>
struct olb::momenta::GuoZhaoForcedMomentum< MOMENTUM >
Definition at line 1125 of file elements.h.
template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
Definition at line 1133 of file elements.h.
1134 {
1135 MOMENTUM().template computeU<TYPE>(cell, u);
1136 const V epsilon = cell.template getField<descriptors::EPSILON>();
1137 const V nu = cell.template getField<descriptors::NU>();
1138 const V k = cell.template getField<descriptors::K>();
1139 const auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
1140
1141 const V uMag =
util::sqrt( util::normSqr<V,DESCRIPTOR::d>(u) );
1142 const V Fe = 0.;
1143 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
1145
1146 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
1147 u[iVel] += bodyF[iVel] * V(0.5) * epsilon;
1148 u[iVel] /= (c_0 +
util::sqrt(c_0*c_0 + c_1*uMag));
1149 }
1150 }
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
References olb::util::sqrt().
template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
Definition at line 1165 of file elements.h.
1165 {
1166 const V epsilon = cell.template getField<descriptors::EPSILON>();
1167 const V nu = cell.template getField<descriptors::NU>();
1168 const V k = cell.template getField<descriptors::K>();
1169 const auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
1170
1171 const V uMag =
util::sqrt( util::normSqr<V,DESCRIPTOR::d>(u) );
1172 const V Fe = 0.;
1173 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
1175
1176 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
1177 u[iVel] *= (c_0 +
util::sqrt(c_0*c_0 + c_1*uMag));
1178 u[iVel] -= bodyF[iVel] * V(0.5) * epsilon;
1179 }
1180 }
References olb::util::sqrt().