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

#include <latticeInterpPhysVelocity2D.h>

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

Public Member Functions

 BlockLatticeInterpPhysVelocity2D (BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &conv, const Cuboid2D< T > &c)
 
 BlockLatticeInterpPhysVelocity2D (const BlockLatticeInterpPhysVelocity2D< T, DESCRIPTOR > &rhs)
 
bool operator() (T output[2], const int input[2]) override
 
void operator() (T output[2], const T input[2])
 
- Public Member Functions inherited from olb::BlockLatticeF2D< T, DESCRIPTOR >
BlockLattice< T, DESCRIPTOR > & getBlock ()
 Copy Constructor.
 
- Public Member Functions inherited from olb::BlockF2D< T >
virtual BlockStructureD< 2 > & getBlockStructure ()
 virtual destructor for defined behaviour
 
void setBlockStructure (BlockStructureD< 2 > *blockStructure)
 
BlockF2D< T > & operator- (BlockF2D< T > &rhs)
 
BlockF2D< T > & operator+ (BlockF2D< T > &rhs)
 
BlockF2D< T > & operator* (BlockF2D< T > &rhs)
 
BlockF2D< T > & operator/ (BlockF2D< 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
 
virtual bool operator() (T output[], const int input[])=0
 has to be implemented for 'every' derived class
 
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

const Cuboid2D< T > & _cuboid
 
- Protected Attributes inherited from olb::BlockLatticePhysF2D< T, DESCRIPTOR >
const UnitConverter< T, DESCRIPTOR > & _converter
 
- Protected Attributes inherited from olb::BlockLatticeF2D< T, DESCRIPTOR >
BlockLattice< T, DESCRIPTOR > & _blockLattice
 
- Protected Attributes inherited from olb::BlockF2D< T >
BlockStructureD< 2 > * _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::BlockLatticePhysF2D< T, DESCRIPTOR >
 BlockLatticePhysF2D (BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &converter, int targetDim)
 
- Protected Member Functions inherited from olb::BlockLatticeF2D< T, DESCRIPTOR >
 BlockLatticeF2D (BlockLattice< T, DESCRIPTOR > &blockLattice, int targetDim)
 
- Protected Member Functions inherited from olb::BlockF2D< T >
 BlockF2D (BlockStructureD< 2 > &blockStructure, int targetDim)
 
 BlockF2D (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::BlockLatticeInterpPhysVelocity2D< T, DESCRIPTOR >

Definition at line 58 of file latticeInterpPhysVelocity2D.h.

Constructor & Destructor Documentation

◆ BlockLatticeInterpPhysVelocity2D() [1/2]

template<typename T , typename DESCRIPTOR >
olb::BlockLatticeInterpPhysVelocity2D< T, DESCRIPTOR >::BlockLatticeInterpPhysVelocity2D ( BlockLattice< T, DESCRIPTOR > & blockLattice,
const UnitConverter< T, DESCRIPTOR > & conv,
const Cuboid2D< T > & c )

Definition at line 82 of file latticeInterpPhysVelocity2D.hh.

84 : BlockLatticePhysF2D<T, DESCRIPTOR>(blockLattice, converter, 2),
85 _cuboid(c)
86{
87 this->getName() = "BlockLatticeInterpVelocity2D";
88}
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:

◆ BlockLatticeInterpPhysVelocity2D() [2/2]

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

Definition at line 91 of file latticeInterpPhysVelocity2D.hh.

92 :
93 BlockLatticePhysF2D<T, DESCRIPTOR>(rhs._blockLattice, rhs._converter, 2),
94 _cuboid(rhs._cuboid)
95{
96}

Member Function Documentation

◆ operator()() [1/2]

template<typename T , typename DESCRIPTOR >
bool olb::BlockLatticeInterpPhysVelocity2D< T, DESCRIPTOR >::operator() ( T output[2],
const int input[2] )
inlineoverride

Definition at line 65 of file latticeInterpPhysVelocity2D.h.

66 {
67 return false;
68 }

◆ operator()() [2/2]

template<typename T , typename DESCRIPTOR >
void olb::BlockLatticeInterpPhysVelocity2D< T, DESCRIPTOR >::operator() ( T output[2],
const T input[2] )

Definition at line 99 of file latticeInterpPhysVelocity2D.hh.

100{
101 T u[2], rho, volume;
102 T d[2], e[2];
103 int latIntPos[2] = {0};
104 T latPhysPos[2] = {T()};
105 _cuboid.getFloorLatticeR(latIntPos, &input[0]);
106 _cuboid.getPhysR(latPhysPos, latIntPos);
107
108 T deltaRinv = 1. / _cuboid.getDeltaR();
109 d[0] = (input[0] - latPhysPos[0]) * deltaRinv;
110 d[1] = (input[1] - latPhysPos[1]) * deltaRinv;
111
112 e[0] = 1. - d[0];
113 e[1] = 1. - d[1];
114
115 this->_blockLattice.get(latIntPos[0], latIntPos[1]).computeRhoU(rho, u);
116 volume = e[0] * e[1];
117 output[0] = u[0] * volume;
118 output[1] = u[1] * volume;
119
120 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1).computeRhoU(rho, u);
121 volume = e[0] * d[1];
122 output[0] += u[0] * volume;
123 output[1] += u[1] * volume;
124
125 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1]).computeRhoU(rho, u);
126 volume = d[0] * e[1];
127 output[0] += u[0] * volume;
128 output[1] += u[1] * volume;
129
130 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1).computeRhoU(rho, u);
131 volume = d[0] * d[1];
132 output[0] += u[0] * volume;
133 output[1] += u[1] * volume;
134
135 output[0] = this->_converter.getPhysVelocity(output[0]);
136 output[1] = this->_converter.getPhysVelocity(output[1]);
137}
BlockLattice< T, DESCRIPTOR > & _blockLattice
const UnitConverter< T, DESCRIPTOR > & _converter
constexpr int d() any_platform

Member Data Documentation

◆ _cuboid

template<typename T , typename DESCRIPTOR >
const Cuboid2D<T>& olb::BlockLatticeInterpPhysVelocity2D< T, DESCRIPTOR >::_cuboid
protected

Definition at line 60 of file latticeInterpPhysVelocity2D.h.


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