diff --git a/src/field/interpolators/NearestNeighborFieldInterpolator.h b/src/field/interpolators/NearestNeighborFieldInterpolator.h index 975c55edb4c52d0ea197391a88b271588bbf7729..43279021302d6cac0a1bdd930eb0870d8fbfba6a 100644 --- a/src/field/interpolators/NearestNeighborFieldInterpolator.h +++ b/src/field/interpolators/NearestNeighborFieldInterpolator.h @@ -60,13 +60,13 @@ public: inline bool operator==( const OwnType & other ){ return baseField_ == other.baseField_; } template< typename ForwardIterator_T > - inline void get( const Vector3<real_t> & position, ForwardIterator_T interpolationResultBegin ) + inline void get( const Vector3<real_t> & position, ForwardIterator_T interpolationResultBegin ) const { get( position[0], position[1], position[2], interpolationResultBegin ); } template< typename ForwardIterator_T > - inline void get( const real_t & x, const real_t & y, const real_t & z, ForwardIterator_T interpolationResultBegin ) + inline void get( const real_t & x, const real_t & y, const real_t & z, ForwardIterator_T interpolationResultBegin ) const { WALBERLA_ASSERT(block_.getAABB().contains(x,y,z), diff --git a/src/field/interpolators/TrilinearFieldInterpolator.h b/src/field/interpolators/TrilinearFieldInterpolator.h index bdac4ff1a6d752b6d5d898139de421fb5793f43b..ff9625644844f1a473a9fb7d18587cb956c696fe 100644 --- a/src/field/interpolators/TrilinearFieldInterpolator.h +++ b/src/field/interpolators/TrilinearFieldInterpolator.h @@ -62,16 +62,16 @@ public: } - inline bool operator==( const OwnType & other ){ return baseField_ == other.baseField_; } + inline bool operator==( const OwnType & other ) const { return baseField_ == other.baseField_; } template< typename ForwardIterator_T > - inline void get( const Vector3<real_t> & position, ForwardIterator_T interpolationResultBegin ) + inline void get( const Vector3<real_t> & position, ForwardIterator_T interpolationResultBegin ) const { get( position[0], position[1], position[2], interpolationResultBegin ); } template< typename ForwardIterator_T > - inline void get( const real_t & x, const real_t & y, const real_t & z, ForwardIterator_T interpolationResultBegin ) + inline void get( const real_t & x, const real_t & y, const real_t & z, ForwardIterator_T interpolationResultBegin ) const { WALBERLA_ASSERT(block_.getAABB().contains(x,y,z), "Interpolation position <" << x << ", " << y << ", " << z << "> is not contained inside the block of this interpolator with AABB " << block_.getAABB() << " !"); @@ -166,7 +166,7 @@ public: private: template< typename ForwardIterator_T > - void addWeightedCellValue( ForwardIterator_T interpolationResultBegin, const Cell & curCell, const real_t & weighting ) + void addWeightedCellValue( ForwardIterator_T interpolationResultBegin, const Cell & curCell, const real_t & weighting ) const { for( uint_t f = uint_t(0); f < F_SIZE; ++f ) {