OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR > Class Template Referencefinal

#include <reductionF3D.h>

+ Inheritance diagram for olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >:
+ Collaboration diagram for olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >:

Public Member Functions

 BlockLatticeInterpDensity3Degree3D (BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, UnitConverter< T, DESCRIPTOR > &conv, Cuboid3D< T > *c, int range)
 
 BlockLatticeInterpDensity3Degree3D (const BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR > &rhs)
 
bool operator() (T output[], const int input[]) override
 has to be implemented for 'every' derived class
 
void operator() (T output[DESCRIPTOR::q], const T input[3])
 
- Public Member Functions inherited from olb::BlockLatticeF3D< T, DESCRIPTOR >
BlockLattice< T, DESCRIPTOR > & getBlock ()
 Copy Constructor.
 
- Public Member Functions inherited from olb::BlockF3D< T >
 ~BlockF3D () override
 virtual destructor for defined behaviour
 
virtual BlockStructureD< 3 > & getBlockStructure () const
 
BlockF3D< T > & operator- (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator+ (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator* (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator/ (BlockF3D< T > &rhs)
 
- Public Member Functions inherited from olb::GenericF< T, int >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], int input0)
 
bool operator() (T output[], int input0, int input1)
 
bool operator() (T output[], int input0, int input1, int input2)
 
bool operator() (T output[], int input0, int input1, int input2, int input3)
 

Protected Attributes

BlockGeometry< T, 3 > & _blockGeometry
 
UnitConverter< T, DESCRIPTOR > & _conv
 
Cuboid3D< T > * _cuboid
 
int _range
 
- Protected Attributes inherited from olb::BlockLatticeF3D< T, DESCRIPTOR >
BlockLattice< T, DESCRIPTOR > & _blockLattice
 
- Protected Attributes inherited from olb::BlockF3D< T >
BlockStructureD< 3 > & _blockStructure
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< T, int >
using targetType
 
using sourceType
 
- Public Attributes inherited from olb::GenericF< T, int >
std::shared_ptr< GenericF< T, int > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Protected Member Functions inherited from olb::BlockLatticeF3D< T, DESCRIPTOR >
 BlockLatticeF3D (BlockLattice< T, DESCRIPTOR > &blockLattice, int targetDim)
 
- Protected Member Functions inherited from olb::BlockF3D< T >
 BlockF3D (BlockStructureD< 3 > &blockStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, int >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >

Definition at line 147 of file reductionF3D.h.

Constructor & Destructor Documentation

◆ BlockLatticeInterpDensity3Degree3D() [1/2]

template<typename T , typename DESCRIPTOR >
olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::BlockLatticeInterpDensity3Degree3D ( BlockLattice< T, DESCRIPTOR > & blockLattice,
BlockGeometry< T, 3 > & blockGeometry,
UnitConverter< T, DESCRIPTOR > & conv,
Cuboid3D< T > * c,
int range )

Definition at line 345 of file reductionF3D.hh.

348 :
349 BlockLatticeF3D<T, DESCRIPTOR>(blockLattice, 3), _blockGeometry(blockGeometry),
350 _conv(conv), _cuboid(c), _range(range)
351{
352 this->getName() = "BlockLatticeInterpDensity3Degree3D";
353}
UnitConverter< T, DESCRIPTOR > & _conv
BlockGeometry< T, 3 > & _blockGeometry
std::string & getName()
read and write access to name
Definition genericF.hh:51

References olb::GenericF< T, int >::getName().

+ Here is the call graph for this function:

◆ BlockLatticeInterpDensity3Degree3D() [2/2]

template<typename T , typename DESCRIPTOR >
olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::BlockLatticeInterpDensity3Degree3D ( const BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR > & rhs)

Definition at line 356 of file reductionF3D.hh.

357 :
358 BlockLatticeF3D<T, DESCRIPTOR>(rhs._blockLattice, 3),
359 _blockGeometry(rhs._blockGeometry),_conv(rhs._conv), _cuboid(
360 rhs._cuboid), _range(rhs._range)
361{
362}

Member Function Documentation

◆ operator()() [1/2]

template<typename T , typename DESCRIPTOR >
bool olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::operator() ( T output[],
const int input[] )
inlineoverridevirtual

has to be implemented for 'every' derived class

Implements olb::GenericF< T, int >.

Definition at line 161 of file reductionF3D.h.

162 {
163 return false;
164 }

◆ operator()() [2/2]

template<typename T , typename DESCRIPTOR >
void olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::operator() ( T output[DESCRIPTOR::q],
const T input[3] )

neighbor position on grid of input value in lattice units referred to local cuboid

Definition at line 365 of file reductionF3D.hh.

367{
368 T volume = T(1);
369 T f_iPop = 0.;
373 int latIntPos[3] = { 0 };
374 // neighbor position on grid of input value in physical units
375 T latPhysPos[3] = { T() };
376 // input is physical position on grid
377 _cuboid->getFloorLatticeR(latIntPos, input);
378 // latPhysPos is global physical position on geometry
379 _cuboid->getPhysR(latPhysPos, latIntPos);
380
381 for (unsigned iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
382 output[iPop] = T(0);
383 for (int i = -_range; i <= _range + 1; ++i) {
384 for (int j = -_range; j <= _range + 1; ++j) {
385 for (int k = -_range; k <= _range + 1; ++k) {
386 f_iPop = 0.;
387 // just if material of cell != 1 there may be information of fluid density
388 if (_blockGeometry.getMaterial({latIntPos[0] + i, latIntPos[1] + j,
389 latIntPos[2] + k}) != 0) {
390 // because of communication it is possible to get density information
391 // from neighboring cuboid
392 f_iPop = this->_blockLattice.get(latIntPos[0] + i, latIntPos[1] + j,
393 latIntPos[2] + k)[iPop];
394 }
395 for (int l = -_range; l <= _range + 1; ++l) {
396 if (l != i) {
397 volume *= (input[0] - (latPhysPos[0] + l * _cuboid->getDeltaR()))
398 / (latPhysPos[0] + i * _cuboid->getDeltaR()
399 - (latPhysPos[0] + l * _cuboid->getDeltaR()));
400 }
401 }
402 for (int m = -_range; m <= _range + 1; ++m) {
403 if (m != j) {
404 volume *= (input[1] - (latPhysPos[1] + m * _cuboid->getDeltaR()))
405 / (latPhysPos[1] + j * _cuboid->getDeltaR()
406 - (latPhysPos[1] + m * _cuboid->getDeltaR()));
407 }
408 }
409 for (int n = -_range; n <= _range + 1; ++n) {
410 if (n != k) {
411 volume *= (input[2] - (latPhysPos[2] + n * _cuboid->getDeltaR()))
412 / (latPhysPos[2] + k * _cuboid->getDeltaR()
413 - (latPhysPos[2] + n * _cuboid->getDeltaR()));
414 }
415 }
416 output[iPop] += f_iPop * volume;
417 volume = T(1);
418 }
419 }
420 }
421 }
422}
int getMaterial(LatticeR< D > latticeR) const
returns the (iX,iY) entry in the 2D scalar field
BlockLattice< T, DESCRIPTOR > & _blockLattice
constexpr T m(unsigned iPop, unsigned jPop, tag::MRT)

Member Data Documentation

◆ _blockGeometry

template<typename T , typename DESCRIPTOR >
BlockGeometry<T,3>& olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::_blockGeometry
protected

Definition at line 150 of file reductionF3D.h.

◆ _conv

template<typename T , typename DESCRIPTOR >
UnitConverter<T,DESCRIPTOR>& olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::_conv
protected

Definition at line 151 of file reductionF3D.h.

◆ _cuboid

template<typename T , typename DESCRIPTOR >
Cuboid3D<T>* olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::_cuboid
protected

Definition at line 152 of file reductionF3D.h.

◆ _range

template<typename T , typename DESCRIPTOR >
int olb::BlockLatticeInterpDensity3Degree3D< T, DESCRIPTOR >::_range
protected

Definition at line 153 of file reductionF3D.h.


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