25#ifndef BLOCK_LATTICE_INTEGRAL_F_2D_HH
26#define BLOCK_LATTICE_INTEGRAL_F_2D_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 if (this->_blockGeometry.getMaterial(iX, iY) == _material) {
59 T tmp = fabs(outputTmp[i]);
60 if (tmp > output[i]) {
71template <
typename T,
typename DESCRIPTOR>
75 _f(f), _blockGeometry(blockGeometry), _material(material)
81template <
typename T,
typename DESCRIPTOR>
117template <
typename T,
typename DESCRIPTOR>
123 _indicatorF(indicatorF),
124 _facesF(indicatorF, converter.getConversionFactorLength()),
125 _pBoundForceF(blockLattice, indicatorF, converter),
126 _sumF(_pBoundForceF, indicatorF),
127 _factor(2./( converter.getPhysDensity()*converter.getCharPhysVelocity()*converter.getCharPhysVelocity() ))
132template <
typename T,
typename DESCRIPTOR>
138 _facesF(faces, input);
140 output[0] = _factor * sum[0] / faces[0];
141 output[1] = _factor * sum[1] / faces[1];
146template <
typename T,
typename DESCRIPTOR>
152 _indicatorF(indicatorF),
153 _facesF(indicatorF, converter.getConversionFactorLength()),
154 _pBoundForceF(blockLattice, indicatorF, converter),
155 _sumF(_pBoundForceF, indicatorF),
156 _factor(2./( converter.getPhysDensity()*converter.getCharPhysVelocity()*converter.getCharPhysVelocity() ))
158 this->
getName() =
"physCorrDrag";
161template <
typename T,
typename DESCRIPTOR>
166 _facesF(faces, input);
169 output[0] = _factor * sum[0] / faces[0];
170 output[1] = _factor * sum[1] / faces[1];
Representation of a block geometry.
Base block indicator functor (discrete)
BlockLatticeF2D< T, DESCRIPTOR > & _f
BlockL1Norm2D(BlockLatticeF2D< T, DESCRIPTOR > &f, BlockGeometry< T, 2 > &blockGeometry, int material)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockL222D(BlockLatticeF2D< T, DESCRIPTOR > &f, BlockGeometry< T, 2 > &blockGeometry, int material)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
BlockLatticePhysCorrDrag2D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockIndicatorF2D< T > &indicatorF, const UnitConverter< T, DESCRIPTOR > &converter)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticePhysDrag2D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockIndicatorF2D< 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.
Top level namespace for all of OpenLB.