24#ifndef BLOCK_ROUNDING_F_2D_HH
25#define BLOCK_ROUNDING_F_2D_HH
35 :
BlockF2D<T>(f.getBlockStructure(),f.getTargetDim()),_f(f),_rounding(rounding)
37 this->
getName() =
"Rounding(" + _f.getName() +
")";
47 switch ( _rounding ) {
49 for (
int i=0; i < _f.getTargetDim(); i++ ) {
50 output[i] = std::nearbyint(output[i]);
54 for (
int i=0; i < _f.getTargetDim(); i++ ) {
55 output[i] = output[i];
59 for (
int i=0; i < _f.getTargetDim(); i++ ) {
64 for (
int i=0; i < _f.getTargetDim(); i++ ) {
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
bool operator()(T output[], const int input[])
has to be implemented for 'every' derived class
BlockRoundingF2D(BlockF2D< T > &f, RoundingMode rounding=RoundingMode::NearestInteger)
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.