OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
olb::momenta::InnerCornerStress3D< normalX, normalY, normalZ > Struct Template Reference

Computation of the stress tensor in an inner corner (3D case) More...

#include <elements.h>

+ Collaboration diagram for olb::momenta::InnerCornerStress3D< normalX, normalY, normalZ >:

Public Member Functions

template<typename TYPE , typename CELL , typename RHO , typename U , typename PI , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void compute (CELL &cell, const RHO &rho, const U &u, PI &pi) any_platform
 

Static Public Member Functions

static std::string getName ()
 

Detailed Description

template<int normalX, int normalY, int normalZ>
struct olb::momenta::InnerCornerStress3D< normalX, normalY, normalZ >

Computation of the stress tensor in an inner corner (3D case)

Definition at line 1289 of file elements.h.

Member Function Documentation

◆ compute()

template<int normalX, int normalY, int normalZ>
template<typename TYPE , typename CELL , typename RHO , typename U , typename PI , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::InnerCornerStress3D< normalX, normalY, normalZ >::compute ( CELL & cell,
const RHO & rho,
const U & u,
PI & pi )
inline

Definition at line 1291 of file elements.h.

1292 {
1293 auto newCell = cell.template getField<descriptors::POPULATION>();
1294 int v[DESCRIPTOR::d] = { -normalX, -normalY, -normalZ };
1295 int unknownF = util::findVelocity<DESCRIPTOR >(v);
1296
1297 if (unknownF != DESCRIPTOR::q) {
1298 int oppositeF = descriptors::opposite<DESCRIPTOR>(unknownF);
1299
1300 V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
1301
1302 newCell[unknownF] = newCell[oppositeF]
1303 - equilibrium<DESCRIPTOR>::secondOrder(oppositeF, rho, u, uSqr)
1304 + equilibrium<DESCRIPTOR>::secondOrder(unknownF, rho, u, uSqr);
1305 }
1306
1307 lbm<DESCRIPTOR>::computeStress(newCell, rho, u, pi);
1308 }
static V secondOrder(int iPop, const RHO &rho, const U &u, const USQR &uSqr) any_platform
Computation of equilibrium distribution, second order in u.
Definition lbm.h:51
static void computeStress(CELL &cell, const RHO &rho, const U &u, PI &pi) any_platform
Computation of stress tensor.
Definition lbm.h:229

References olb::lbm< DESCRIPTOR >::computeStress(), and olb::equilibrium< DESCRIPTOR >::secondOrder().

+ Here is the call graph for this function:

◆ getName()

template<int normalX, int normalY, int normalZ>
static std::string olb::momenta::InnerCornerStress3D< normalX, normalY, normalZ >::getName ( )
inlinestatic

Definition at line 1310 of file elements.h.

1310 {
1311 return "InnerCornerStress3D";
1312 }

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