25#ifndef BLOCK_LATTICE_INTEGRAL_F_3D_HH
26#define BLOCK_LATTICE_INTEGRAL_F_3D_HH
39template <
typename T,
typename DESCRIPTOR>
43 _f(f), _blockGeometry(blockGeometry), _material(material)
48template <
typename T,
typename DESCRIPTOR>
52 T outputTmp[this->getTargetDim()];
53 for (
int i = 0; i < this->getTargetDim(); ++i) {
55 for (
int iX = 0; iX < _f.getBlock().getNx(); ++iX) {
56 for (
int iY = 0; iY < _f.getBlock().getNy(); ++iY) {
57 for (
int iZ = 0; iZ < _f.getBlock().getNz(); ++iZ) {
58 if (this->_blockGeometry.getMaterial(iX, iY, iZ) == _material) {
59 _f(outputTmp, {iX, iY, iZ});
61 if (tmp > output[i]) {
73template <
typename T,
typename DESCRIPTOR>
77 _f(f), _blockGeometry(blockGeometry), _material(material)
83template <
typename T,
typename DESCRIPTOR>
119template <
typename T,
typename DESCRIPTOR>
125 _indicatorF(indicatorF),
126 _facesF(indicatorF, converter.getConversionFactorLength()),
127 _pBoundForceF(blockLattice, indicatorF, converter),
128 _sumF(_pBoundForceF, indicatorF),
129 _factor(2./( converter.getPhysDensity()*converter.getCharPhysVelocity()*converter.getCharPhysVelocity() ))
134template <
typename T,
typename DESCRIPTOR>
140 _facesF(faces, input);
142 output[0] = _factor * sum[0] / faces[0];
143 output[1] = _factor * sum[1] / faces[1];
144 output[2] = _factor * sum[2] / faces[2];
149template <
typename T,
typename DESCRIPTOR>
155 _indicatorF(indicatorF),
156 _facesF(indicatorF, converter.getConversionFactorLength()),
157 _pBoundForceF(blockLattice, indicatorF, converter),
158 _sumF(_pBoundForceF, indicatorF),
159 _factor(2./( converter.getPhysDensity()*converter.getCharPhysVelocity()*converter.getCharPhysVelocity() ))
161 this->
getName() =
"physCorrDrag";
164template <
typename T,
typename DESCRIPTOR>
169 _facesF(faces, input);
172 output[0] = _factor * sum[0] / faces[0];
173 output[1] = _factor * sum[1] / faces[1];
174 output[2] = _factor * sum[2] / faces[2];
Representation of a block geometry.
Base block indicator functor.
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeF3D< T, DESCRIPTOR > & _f
BlockL1Norm3D(BlockLatticeF3D< T, DESCRIPTOR > &f, BlockGeometry< T, 3 > &blockGeometry, int material)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockL223D(BlockLatticeF3D< T, DESCRIPTOR > &f, BlockGeometry< T, 3 > &blockGeometry, int material)
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
BlockLatticePhysCorrDrag3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockIndicatorF3D< T > &indicatorF, const UnitConverter< T, DESCRIPTOR > &converter)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticePhysDrag3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockIndicatorF3D< T > &indicatorF, const UnitConverter< T, DESCRIPTOR > &converter)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
represents all functors that operate on a DESCRIPTOR with output in Phys, e.g. physVelocity(),...
Platform-abstracted block lattice for external access and inter-block interaction.
std::string & getName()
read and write access to name
Conversion between physical and lattice units, as well as discretization.
cpu::simd::Pack< T > fabs(cpu::simd::Pack< T > value)
Top level namespace for all of OpenLB.