24#ifndef BLOCK_ROUNDING_F_3D_HH
25#define BLOCK_ROUNDING_F_3D_HH
35 :
BlockF3D<T>(f.getBlockStructure(),f.getTargetDim()),_f(f),_rounding(rounding)
37 this->
getName() =
"Rounding(" + _f.getName() +
")";
46 switch ( _rounding ) {
48 for (
int i=0; i < _f.getTargetDim(); i++ ) {
49 output[i] = std::nearbyint(output[i]);
53 for (
int i=0; i < _f.getTargetDim(); i++ ) {
54 output[i] = output[i];
58 for (
int i=0; i < _f.getTargetDim(); i++ ) {
63 for (
int i=0; i < _f.getTargetDim(); i++ ) {
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
BlockRoundingF3D(BlockF3D< T > &f, RoundingMode rounding=RoundingMode::NearestInteger)
bool operator()(T output[], const int input[])
has to be implemented for 'every' derived class
std::string & getName()
read and write access to name
ADf< T, DIM > ceil(const ADf< T, DIM > &a)
ADf< T, DIM > floor(const ADf< T, DIM > &a)
Top level namespace for all of OpenLB.
RoundingMode
Mode of how to decide Quality of Grid.
@ NearestInteger
Rounds to nearest Integer.