OpenLB 1.7
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false > Struct Template Reference

#include <finiteDifference3D.h>

+ Collaboration diagram for olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false >:

Static Public Member Functions

static bool canInterpolateVector (BlockLattice< T, DESCRIPTOR > const &blockLattice, int iX, int iY, int iZ)
 
static void interpolateVector (T velDeriv[DESCRIPTOR::d], BlockLattice< T, DESCRIPTOR > const &blockLattice, int iX, int iY, int iZ)
 
static void interpolateScalar (T &rhoDeriv, BlockLattice< T, DESCRIPTOR > const &blockLattice, int iX, int iY, int iZ)
 
template<typename CELL >
static void interpolateVector (T velDeriv[DESCRIPTOR::d], CELL &cell) any_platform
 

Detailed Description

template<typename T, typename DESCRIPTOR, int direction, int orientation, int deriveDirection>
struct olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false >

Definition at line 157 of file finiteDifference3D.h.

Member Function Documentation

◆ canInterpolateVector()

template<typename T , typename DESCRIPTOR , int direction, int orientation, int deriveDirection>
static bool olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false >::canInterpolateVector ( BlockLattice< T, DESCRIPTOR > const & blockLattice,
int iX,
int iY,
int iZ )
inlinestatic

Definition at line 159 of file finiteDifference3D.h.

161 {
162 return blockLattice.isInside(iX+(deriveDirection==0 ? 1:0),
163 iY+(deriveDirection==1 ? 1:0),
164 iZ+(deriveDirection==2 ? 1:0))
165 && blockLattice.isInside(iX+(deriveDirection==0 ? (-1):0),
166 iY+(deriveDirection==1 ? (-1):0),
167 iZ+(deriveDirection==2 ? (-1):0));
168 }

References olb::BlockStructureD< D >::isInside().

+ Here is the call graph for this function:

◆ interpolateScalar()

template<typename T , typename DESCRIPTOR , int direction, int orientation, int deriveDirection>
static void olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false >::interpolateScalar ( T & rhoDeriv,
BlockLattice< T, DESCRIPTOR > const & blockLattice,
int iX,
int iY,
int iZ )
inlinestatic

Definition at line 193 of file finiteDifference3D.h.

196 {
197 using namespace fd;
198
199 T rho_p1 = blockLattice.get (
200 iX+(deriveDirection==0 ? 1:0),
201 iY+(deriveDirection==1 ? 1:0),
202 iZ+(deriveDirection==2 ? 1:0) ).computeRho();
203
204 T rho_m1 = blockLattice.get (
205 iX+(deriveDirection==0 ? (-1):0),
206 iY+(deriveDirection==1 ? (-1):0),
207 iZ+(deriveDirection==2 ? (-1):0) ).computeRho();
208
209 rhoDeriv = centralGradient(rho_p1, rho_m1);
210
211 }
constexpr T centralGradient(T u_p1, T u_m1) any_platform
Second-order central gradient (u_p1 = u(x+1))

References olb::fd::centralGradient(), and olb::BlockLattice< T, DESCRIPTOR >::get().

+ Here is the call graph for this function:

◆ interpolateVector() [1/2]

template<typename T , typename DESCRIPTOR , int direction, int orientation, int deriveDirection>
static void olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false >::interpolateVector ( T velDeriv[DESCRIPTOR::d],
BlockLattice< T, DESCRIPTOR > const & blockLattice,
int iX,
int iY,
int iZ )
inlinestatic

Definition at line 170 of file finiteDifference3D.h.

173 {
174 using namespace fd;
175
176 T u_p1[DESCRIPTOR::d], u_m1[DESCRIPTOR::d];
177
178 blockLattice.get (
179 iX+(deriveDirection==0 ? 1:0),
180 iY+(deriveDirection==1 ? 1:0),
181 iZ+(deriveDirection==2 ? 1:0) ).computeU(u_p1);
182
183 blockLattice.get (
184 iX+(deriveDirection==0 ? (-1):0),
185 iY+(deriveDirection==1 ? (-1):0),
186 iZ+(deriveDirection==2 ? (-1):0) ).computeU(u_m1);
187
188 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
189 velDeriv[iD] = centralGradient(u_p1[iD],u_m1[iD]);
190 }
191 }

References olb::fd::centralGradient(), and olb::BlockLattice< T, DESCRIPTOR >::get().

+ Here is the call graph for this function:

◆ interpolateVector() [2/2]

template<typename T , typename DESCRIPTOR , int direction, int orientation, int deriveDirection>
template<typename CELL >
static void olb::fd::DirectedGradients3D< T, DESCRIPTOR, direction, orientation, deriveDirection, false >::interpolateVector ( T velDeriv[DESCRIPTOR::d],
CELL & cell )
inlinestatic

Definition at line 214 of file finiteDifference3D.h.

216 {
217 using namespace fd;
218
219 T u_p1[DESCRIPTOR::d], u_m1[DESCRIPTOR::d];
220
221 cell.neighbor({(deriveDirection==0 ? 1:0),
222 (deriveDirection==1 ? 1:0),
223 (deriveDirection==2 ? 1:0)}).computeU(u_p1);
224 cell.neighbor({(deriveDirection==0 ? (-1):0),
225 (deriveDirection==1 ? (-1):0),
226 (deriveDirection==2 ? (-1):0)}).computeU(u_m1);
227
228 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
229 velDeriv[iD] = centralGradient(u_p1[iD],u_m1[iD]);
230 }
231 }

References olb::fd::centralGradient().

+ Here is the call graph for this function:

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