diff --git a/src/blockforest/BlockForest.h b/src/blockforest/BlockForest.h index 58df1ba4cfa8d99f7a5c1b437c67dfec61109d4e..c000ecff5f8fd484857b06ebda0bed7be79e4907 100644 --- a/src/blockforest/BlockForest.h +++ b/src/blockforest/BlockForest.h @@ -27,6 +27,7 @@ #include "PhantomBlockForest.h" #include "Types.h" +#include "core/EndianIndependentSerialization.h" #include "core/debug/Debug.h" #include "core/math/Uint.h" #include "core/timing/TimingPool.h" diff --git a/src/blockforest/CMakeLists.txt b/src/blockforest/CMakeLists.txt index 5be89206166c2e638975e3f41265de0fe43cbb44..0c4e8f8bcf26d9fad475aada504f7a8ff088f9a1 100644 --- a/src/blockforest/CMakeLists.txt +++ b/src/blockforest/CMakeLists.txt @@ -45,7 +45,6 @@ target_sources( blockforest SetupBlock.cpp SetupBlockForest.cpp StructuredBlockForest.cpp - Utility.cpp ) add_subdirectory( communication ) diff --git a/src/blockforest/Utility.cpp b/src/blockforest/Utility.cpp deleted file mode 100644 index b31f4147532ecd719773fde8c343348f3f3fd9ec..0000000000000000000000000000000000000000 --- a/src/blockforest/Utility.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//====================================================================================================================== -// -// This file is part of waLBerla. waLBerla is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// waLBerla is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file Utility.cpp -//! \ingroup blockforest -//! \author Florian Schornbaum <florian.schornbaum@fau.de> -// -//====================================================================================================================== - -#include "Utility.h" - -#include <iomanip> -#include <sstream> -#include <stack> - - -namespace walberla { -namespace blockforest { - - - -std::string naturalNumberToGroupedThousandsString( uint_t number, const char separator ) { // for the documentation see the header file - - std::ostringstream oss; - - std::stack< uint_t > numbers; - - while( true ) { - - numbers.push( number % 1000 ); - - if( number <= 999 ) break; - - number /= 1000; - } - - oss << numbers.top(); - numbers.pop(); - - while( !numbers.empty() ) { - - oss << separator << std::setfill( '0' ) << std::setw( 3 ) << numbers.top(); - oss << std::setw( 0 ); - numbers.pop(); - } - - return oss.str(); -} - - - -} // namespace blockforest -} // namespace walberla diff --git a/src/blockforest/Utility.h b/src/blockforest/Utility.h index 8a6f304619e83a1f3cfad138b81e8124f60f50ab..842b916629cdc6ce4fe32891c4b9bae229d83b99 100644 --- a/src/blockforest/Utility.h +++ b/src/blockforest/Utility.h @@ -28,9 +28,7 @@ #include "core/math/Uint.h" #include <limits> -#include <ostream> #include <string> -#include <vector> namespace walberla { @@ -110,27 +108,5 @@ inline memory_t bytesToMiB( memory_t bytes ) { } - -//********************************************************************************************************************** -/*! -* \brief Returns the string representation of 'number', every three digits the character 'separator' is inserted -* (172408725 -> "172 408 725") -*/ -//********************************************************************************************************************** -std::string naturalNumberToGroupedThousandsString( const uint_t number, const char separator = ' ' ); - -inline std::string naturalNumberToGroupedThousandsString( const real_t number, const char separator = ' ' ) { - - return naturalNumberToGroupedThousandsString( static_cast< uint_t >( 0.5 + number ), separator ); -} - - - -inline void fillStream( std::ostream& ostream, const char fill, uint_t length ) { - while( length-- > 0 ) ostream << fill; -} - - - } // namespace blockforest } // namespace walberla diff --git a/src/core/all.h b/src/core/all.h index 2e804b55a1b2a6ec878d7321612dfe97d56f047d..0315463dac86c2de50c01b292df89e088b8d4771 100644 --- a/src/core/all.h +++ b/src/core/all.h @@ -26,7 +26,6 @@ #include "AllSet.h" #include "Array.h" #include "DataTypes.h" -#include "EndianIndependentSerialization.h" #include "Environment.h" #include "FunctionTraits.h" #include "GetPID.h"