From 136893f495fec786477005e8e00e19d7814c4fa5 Mon Sep 17 00:00:00 2001 From: Nils Kohl <nils.kohl@fau.de> Date: Wed, 20 Mar 2019 13:45:45 +0100 Subject: [PATCH] Replaced boost::array with std::array in various places --- src/core/math/GenericAABB.h | 3 +-- src/core/math/GenericAABB.impl.h | 4 ++-- src/field/FlagField.h | 4 ++-- src/lbm/boundary/Curved.h | 9 ++++----- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/core/math/GenericAABB.h b/src/core/math/GenericAABB.h index 309d16f94..9a11d2928 100644 --- a/src/core/math/GenericAABB.h +++ b/src/core/math/GenericAABB.h @@ -27,7 +27,6 @@ #include "core/mpi/RecvBuffer.h" #include "core/mpi/SendBuffer.h" -#include <boost/array.hpp> #include <boost/type_traits/is_floating_point.hpp> #include <random> @@ -148,7 +147,7 @@ public: inline value_type sqDistance( const GenericAABB & other ) const; inline value_type sqMaxDistance( const GenericAABB & other ) const; - inline boost::array< vector_type, 8 > corners() const; + inline std::array< vector_type, 8 > corners() const; // Modifiers inline void init(); diff --git a/src/core/math/GenericAABB.impl.h b/src/core/math/GenericAABB.impl.h index 00503076f..7d24f164f 100644 --- a/src/core/math/GenericAABB.impl.h +++ b/src/core/math/GenericAABB.impl.h @@ -1270,9 +1270,9 @@ inline typename GenericAABB< T >::value_type GenericAABB< T >::sqMaxDistance( co * \returns An array of size eight containing the corner points. Indices match those of the stencil::D3CornerStencil */ template< typename T > -inline boost::array< typename GenericAABB< T >::vector_type, 8 > GenericAABB< T >::corners() const +inline std::array< typename GenericAABB< T >::vector_type, 8 > GenericAABB< T >::corners() const { - boost::array< vector_type, 8 > cornerArray; + std::array< vector_type, 8 > cornerArray; // TNE cornerArray[0][0] = maxCorner_[0]; diff --git a/src/field/FlagField.h b/src/field/FlagField.h index 2785dd199..147ab5783 100644 --- a/src/field/FlagField.h +++ b/src/field/FlagField.h @@ -31,9 +31,9 @@ #include "core/debug/Debug.h" #include "core/math/Uint.h" -#include <boost/array.hpp> #include <boost/type_traits/is_same.hpp> +#include <array> #include <iostream> #include <map> #include <sstream> @@ -214,7 +214,7 @@ protected: {} /// Maps bitNr's to strings - boost::array<FlagUID, sizeof(flag_t)*8> flagToUID; + std::array<FlagUID, sizeof(flag_t)*8> flagToUID; /// Maps strings to bit-masks std::map<FlagUID, flag_t> uidToFlag; diff --git a/src/lbm/boundary/Curved.h b/src/lbm/boundary/Curved.h index a3d47ccbc..d5f7aa08f 100644 --- a/src/lbm/boundary/Curved.h +++ b/src/lbm/boundary/Curved.h @@ -35,8 +35,7 @@ #include "stencil/Directions.h" -#include <boost/array.hpp> - +#include <array> #include <vector> namespace walberla { @@ -53,7 +52,7 @@ class Curved : public Boundary< typename FlagField_T::flag_t > typedef typename LatticeModel_T::Stencil Stencil; typedef typename FlagField_T::flag_t flag_t; - typedef GhostLayerField< shared_ptr< boost::array<real_t, Stencil::Size> >, 1 > WeightField; + typedef GhostLayerField< shared_ptr< std::array<real_t, Stencil::Size> >, 1 > WeightField; public: @@ -105,9 +104,9 @@ public: private: inline static real_t deltaToWeight( const real_t delta ) { return ( real_t( 1 ) - real_t( 2 ) * delta ) / ( real_t( 1 ) + real_t( 2 ) * delta ); } - inline static shared_ptr< boost::array<real_t, Stencil::Size> > makeDeltaArray() + inline static shared_ptr< std::array<real_t, Stencil::Size> > makeDeltaArray() { - return walberla::shared_ptr< boost::array<real_t, Stencil::Size> >( new boost::array<real_t, Stencil::Size> ); + return walberla::shared_ptr< std::array<real_t, Stencil::Size> >( new std::array<real_t, Stencil::Size> ); } const FlagUID uid_; -- GitLab