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

#include <latticeInterpPhysVelocity3D.h>

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

Public Member Functions

 BlockLatticeInterpPhysVelocity3D (BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &conv, const Cuboid3D< T > &c)
 
 BlockLatticeInterpPhysVelocity3D (const BlockLatticeInterpPhysVelocity3D< T, DESCRIPTOR > &rhs)
 
bool operator() (T output[3], const int input[3]) override
 
void operator() (T output[3], 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
 
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 Cuboid3D< T > & _cuboid
 
- Protected Attributes inherited from olb::BlockLatticePhysF3D< T, DESCRIPTOR >
const UnitConverter< T, DESCRIPTOR > & _converter
 
- 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::BlockLatticePhysF3D< T, DESCRIPTOR >
 BlockLatticePhysF3D (BlockLattice< T, DESCRIPTOR > &blockLattice, const UnitConverter< T, DESCRIPTOR > &converter, int targetDim)
 
- 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::BlockLatticeInterpPhysVelocity3D< T, DESCRIPTOR >

Definition at line 58 of file latticeInterpPhysVelocity3D.h.

Constructor & Destructor Documentation

◆ BlockLatticeInterpPhysVelocity3D() [1/2]

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

Definition at line 82 of file latticeInterpPhysVelocity3D.hh.

84 : BlockLatticePhysF3D<T, DESCRIPTOR>(blockLattice, converter, 3),
85 _cuboid(c)
86{
87 this->getName() = "BlockLatticeInterpVelocity3D";
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:

◆ BlockLatticeInterpPhysVelocity3D() [2/2]

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

Definition at line 91 of file latticeInterpPhysVelocity3D.hh.

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

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 65 of file latticeInterpPhysVelocity3D.h.

66 {
67 return false;
68 }

◆ operator()() [2/2]

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

Definition at line 99 of file latticeInterpPhysVelocity3D.hh.

100{
101 T u[3], rho, volume;
102 T d[3], e[3];
103 int latIntPos[3] = {0};
104 T latPhysPos[3] = {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 d[2] = (input[2] - latPhysPos[2]) * deltaRinv;
112
113 e[0] = 1. - d[0];
114 e[1] = 1. - d[1];
115 e[2] = 1. - d[2];
116
117 this->_blockLattice.get(latIntPos[0], latIntPos[1],
118 latIntPos[2]).computeRhoU(rho, u);
119 volume = e[0] * e[1] * e[2];
120 output[0] = u[0] * volume;
121 output[1] = u[1] * volume;
122 output[2] = u[2] * volume;
123
124 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1,
125 latIntPos[2]).computeRhoU(rho, u);
126 volume = e[0] * d[1] * e[2];
127 output[0] += u[0] * volume;
128 output[1] += u[1] * volume;
129 output[2] += u[2] * volume;
130
131 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1],
132 latIntPos[2]).computeRhoU(rho, u);
133 volume = d[0] * e[1] * e[2];
134 output[0] += u[0] * volume;
135 output[1] += u[1] * volume;
136 output[2] += u[2] * volume;
137
138 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1,
139 latIntPos[2]).computeRhoU(rho, u);
140 volume = d[0] * d[1] * e[2];
141 output[0] += u[0] * volume;
142 output[1] += u[1] * volume;
143 output[2] += u[2] * volume;
144
145 this->_blockLattice.get(latIntPos[0], latIntPos[1],
146 latIntPos[2] + 1).computeRhoU(rho,
147 u);
148 volume = e[0] * e[1] * d[2];
149 output[0] += u[0] * volume;
150 output[1] += u[1] * volume;
151 output[2] += u[2] * volume;
152
153 this->_blockLattice.get(latIntPos[0], latIntPos[1] + 1,
154 latIntPos[2] + 1).computeRhoU(rho,
155 u);
156 volume = e[0] * d[1] * d[2];
157 output[0] += u[0] * volume;
158 output[1] += u[1] * volume;
159 output[2] += u[2] * volume;
160
161 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1],
162 latIntPos[2] + 1).computeRhoU(rho,
163 u);
164 volume = d[0] * e[1] * d[2];
165 output[0] += u[0] * volume;
166 output[1] += u[1] * volume;
167 output[2] += u[2] * volume;
168
169 this->_blockLattice.get(latIntPos[0] + 1, latIntPos[1] + 1,
170 latIntPos[2] + 1).computeRhoU(rho,
171 u);
172 volume = d[0] * d[1] * d[2];
173 output[0] += u[0] * volume;
174 output[1] += u[1] * volume;
175 output[2] += u[2] * volume;
176
177 output[0] = this->_converter.getPhysVelocity(output[0]);
178 output[1] = this->_converter.getPhysVelocity(output[1]);
179 output[2] = this->_converter.getPhysVelocity(output[2]);
180}
BlockLattice< T, DESCRIPTOR > & _blockLattice
const UnitConverter< T, DESCRIPTOR > & _converter
constexpr int d() any_platform

Member Data Documentation

◆ _cuboid

template<typename T , typename DESCRIPTOR >
const Cuboid3D<T>& olb::BlockLatticeInterpPhysVelocity3D< T, DESCRIPTOR >::_cuboid
protected

Definition at line 60 of file latticeInterpPhysVelocity3D.h.


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