diff --git a/src/blockforest/BlockForest.cpp b/src/blockforest/BlockForest.cpp index 3137ee19a1687e766d71a40d825dbefbcf069c3d..654d7789db996e0a55a2c75127762ad86ea601ae 100644 --- a/src/blockforest/BlockForest.cpp +++ b/src/blockforest/BlockForest.cpp @@ -405,8 +405,8 @@ BlockForest::BlockForest( const uint_t process, const char* const filename, cons std::array< real_t, 6 > domain; - for(double & i : domain) { - i = byteArrayToReal< real_t >( buffer, offset ); + for(real_t & dom : domain) { + dom = byteArrayToReal< real_t >( buffer, offset ); offset += sizeof( real_t ) + 1 + 2; } @@ -3005,8 +3005,8 @@ void BlockForest::storeFileHeader( std::vector< uint8_t > & data, uint_t & offse // number of coarse/root blocks in each direction - for(unsigned long i : size_) { - uintToByteArray( i, data, offset, 4 ); + for(uint_t s : size_) { + uintToByteArray( s, data, offset, 4 ); offset += 4; } diff --git a/src/blockforest/GlobalLoadBalancing.h b/src/blockforest/GlobalLoadBalancing.h index 87382c185de6953ba26eb782521981bea0ba38e0..c011e1bc24e2826de5d8aa6fbd059d0b059e7a98 100644 --- a/src/blockforest/GlobalLoadBalancing.h +++ b/src/blockforest/GlobalLoadBalancing.h @@ -386,7 +386,7 @@ uint_t GlobalLoadBalancing::balanceSorted( const std::vector< BLOCK* >& blocks, minWorkload = std::max( minWorkload, sortedBlocks[l][i]->getWorkload() ); WALBERLA_ASSERT_LESS_EQUAL( sortedBlocks[l][i]->getMemory(), memoryLimit ); } - for(double i : processesWork) + for(workload_t i : processesWork) minWorkload = std::max( minWorkload, i ); // check min - potentially nothing more to do @@ -696,7 +696,7 @@ void GlobalLoadBalancing::reorderProcessesByBFS( std::vector< BLOCK* > & blocks, reorderMap[p] = process++; - for(unsigned long neighbor : processNeighbors[p]) { + for(uint_t neighbor : processNeighbors[p]) { if( !processed[neighbor] ) { processList.push_back( neighbor ); processed[neighbor] = true; diff --git a/src/blockforest/loadbalancing/DynamicDiffusive.h b/src/blockforest/loadbalancing/DynamicDiffusive.h index 1885265c448c5abf94e5b614467a7dee67ff7ffe..d896508a14f9378e37a5288994308b1b67c1052e 100644 --- a/src/blockforest/loadbalancing/DynamicDiffusive.h +++ b/src/blockforest/loadbalancing/DynamicDiffusive.h @@ -769,7 +769,7 @@ bool DynamicDiffusionBalance< PhantomData_T >::operator()( std::vector< std::pai assigned.insert(index); } } - for(unsigned long & index : allBlocks[l]) + for(uint_t & index : allBlocks[l]) { if( assigned.find(index) == assigned.end() ) { diff --git a/src/core/math/DistributedSample.cpp b/src/core/math/DistributedSample.cpp index 965ab81692dbdc74d6a58814d0c8ff7329c89490..a2746a0586b4649bf8b1cc8d50d69d27b094547d 100644 --- a/src/core/math/DistributedSample.cpp +++ b/src/core/math/DistributedSample.cpp @@ -45,11 +45,11 @@ void DistributedSample::mpiAllGather() max_ = -std::numeric_limits< real_t >::max(); size_ = uint_c( data_.size() ); - for( auto it = data_.begin(); it != data_.end(); ++it ) + for(const real_t it : data_) { - sum_ += *it; - min_ = std::min( min_, *it ); - max_ = std::max( max_, *it ); + sum_ += it; + min_ = std::min( min_, it ); + max_ = std::max( max_, it ); } WALBERLA_MPI_SECTION()