diff --git a/CMakeLists.txt b/CMakeLists.txt index 989756388f5d7ced554306a30a19499f675a4d7e..1abce07601403f398cf5c697ff2b85bcf22d5f21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,9 +91,6 @@ option ( WALBERLA_SIMD_FORCE_SCALAR "Do not use SIMD operations even whe option ( WALBERLA_BUFFER_DEBUG "Type checking for BufferSystem ( slow )" OFF ) -option ( WALBERLA_NO_OUTDATED_FEATURES "Show warning/errors when outdated features " - "(i.e. features that will be deprecated) are used" ) - # Profile guided optimization option ( WALBERLA_PROFILE_GENERATE "Generates Profile for Optimization" ) option ( WALBERLA_PROFILE_USE "Uses Profile to optimize" ) diff --git a/src/blockforest/loadbalancing/DynamicCurve.h b/src/blockforest/loadbalancing/DynamicCurve.h index a684bdc7e0630d86a0216169da3d9947b3217128..30724c40f91a67afdcd8781be216a4a44037c0a1 100644 --- a/src/blockforest/loadbalancing/DynamicCurve.h +++ b/src/blockforest/loadbalancing/DynamicCurve.h @@ -938,9 +938,8 @@ void DynamicCurveBalance< PhantomData_T >::finalAssignment( const uint_t index, processesToRecvFrom.insert( uint_c(*s) ) ; } -///This class is deprecated use DynamicCurveBalance instead. template< typename PhantomData_T > -using DynamicLevelwiseCurveBalance [[deprecated]] = DynamicCurveBalance<PhantomData_T> ; +using DynamicLevelwiseCurveBalance [[deprecated("Use DynamicCurveBalance with the corresponding argument!")]] = DynamicCurveBalance<PhantomData_T> ; } // namespace blockforest } // namespace walberla diff --git a/src/blockforest/loadbalancing/DynamicDiffusive.h b/src/blockforest/loadbalancing/DynamicDiffusive.h index 607029633aa55fd1f8c107d085a6b4b942460fec..920e3c309dc7e97eb54f1323a2cdda8ff4d34455 100644 --- a/src/blockforest/loadbalancing/DynamicDiffusive.h +++ b/src/blockforest/loadbalancing/DynamicDiffusive.h @@ -1008,9 +1008,8 @@ bool DynamicDiffusionBalance< PhantomData_T >::operator()( std::vector< std::pai return ( iteration + uint_t(1) ) < maxIterations_; } -///This class is deprecated use DynamicDiffusionBalance instead. template< typename PhantomData_T > -using DynamicLevelwiseDiffusionBalance [[deprecated]] = DynamicDiffusionBalance<PhantomData_T> ; +using DynamicLevelwiseDiffusionBalance [[deprecated("Use DynamicDiffusionBalance with the corresponding argument!")]] = DynamicDiffusionBalance<PhantomData_T> ; } // namespace blockforest } // namespace walberla diff --git a/src/core/Deprecated.h b/src/core/Deprecated.h deleted file mode 100644 index 8e9fb843a77635ddbb853550ed980fe0be065062..0000000000000000000000000000000000000000 --- a/src/core/Deprecated.h +++ /dev/null @@ -1,50 +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 Deprecated.h -//! \ingroup core -//! \author Christian Godenschwager <christian.godenschwager@fau.de> -// -//====================================================================================================================== - -#pragma once - - - -/*******************************************************************************************************************//** - * \brief Macro to mark a function as deprecated - * - * To mark a function as deprecated wrap its signature with the WALBERLA_DEPRECATED macro at the definition. - * E.g. to mark int f(const & foo) const; as deprecated use WALBERLA_DEPRECATED(int f(const & foo) const); - * Note that this won't work for functions with a comma in their return type definition! E.g. to mark - * std::pair<int,int> f(); as deprecated add a typedef std::pair<int, int> PairInt; first an then deprecate - * via WALBERLA_DEPRECATE(PairInt f()); - * Deprecation of a function will produce a compiler warning if the function is used despite it's deprecation. - * - * \param func The function to be marked deprecated. - **********************************************************************************************************************/ - -#ifdef __GNUC__ -# define WALBERLA_DEPRECATED(func) func __attribute__ ((deprecated)) -#elif defined(_MSC_VER) -# define WALBERLA_DEPRECATED(func) __declspec(deprecated) func -#elif defined(__IBMCPP__) -# define WALBERLA_DEPRECATED(func) func // xlc++ (12.1) has no obvious possibility for deprecation -#elif defined(_SX) -# define WALBERLA_DEPRECATED(func) __declspec(deprecated) func -#else -# pragma message("WARNING: You need to implement WALBERLA_DEPRECATED for this compiler!") -# define WALBERLA_DEPRECATED(func) func -#endif diff --git a/src/core/Macros.h b/src/core/Macros.h index ac12f1b7e4994704be60f3fdf902785d689dc3af..cdffc147b70c38df5e21adf682f8bce88c279f4e 100644 --- a/src/core/Macros.h +++ b/src/core/Macros.h @@ -43,20 +43,6 @@ # define WALBERLA_FORCE_INLINE(func) inline func #endif -// pragma in macros (-> https://stackoverflow.com/a/3030312) - -#ifdef WALBERLA_CXX_COMPILER_IS_MSVC -#define WALBERLA_PRAGMA(x) __pragma(x) -#else -#define WALBERLA_PRAGMA(x) _Pragma(#x) -#endif - -#ifndef WALBERLA_CXX_COMPILER_IS_IBM -#define WALBERLA_OVERRIDE -#else -#define WALBERLA_OVERRIDE override -#endif - // macro overloading (-> https://stackoverflow.com/a/24028231) #define WALBERLA_GLUE(x, y) x y diff --git a/src/core/all.h b/src/core/all.h index e15f23d38a366a824984bd1e3536c36ad86c7083..2e804b55a1b2a6ec878d7321612dfe97d56f047d 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 "Deprecated.h" #include "EndianIndependentSerialization.h" #include "Environment.h" #include "FunctionTraits.h" diff --git a/src/mesa_pd/domain/BlockForestDataHandling.h b/src/mesa_pd/domain/BlockForestDataHandling.h index 4df5a2f2c1e7174ad900a0ea910b0743e1d9c9cd..338c6a6495cc6d3ab944e0fa2f5547ae948b285d 100644 --- a/src/mesa_pd/domain/BlockForestDataHandling.h +++ b/src/mesa_pd/domain/BlockForestDataHandling.h @@ -70,20 +70,20 @@ public: BlockForestDataHandling(const std::shared_ptr<data::ParticleStorage>& ps) : ps_(ps) {} virtual ~BlockForestDataHandling() {} - virtual internal::ParticleDeleter* initialize( IBlock * const block ) WALBERLA_OVERRIDE; + virtual internal::ParticleDeleter* initialize( IBlock * const block ) override; - virtual void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) WALBERLA_OVERRIDE; - virtual internal::ParticleDeleter* deserialize( IBlock * const block ) WALBERLA_OVERRIDE; - virtual void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) WALBERLA_OVERRIDE; + virtual void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; + virtual internal::ParticleDeleter* deserialize( IBlock * const block ) override; + virtual void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; - virtual void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) WALBERLA_OVERRIDE; - virtual void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) WALBERLA_OVERRIDE; + virtual void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override; + virtual void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; - virtual internal::ParticleDeleter* deserializeCoarseToFine( Block * const block ) WALBERLA_OVERRIDE; - virtual internal::ParticleDeleter* deserializeFineToCoarse( Block * const block ) WALBERLA_OVERRIDE; + virtual internal::ParticleDeleter* deserializeCoarseToFine( Block * const block ) override; + virtual internal::ParticleDeleter* deserializeFineToCoarse( Block * const block ) override; - virtual void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) WALBERLA_OVERRIDE; - virtual void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) WALBERLA_OVERRIDE; + virtual void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; + virtual void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) override; private: void deserializeImpl( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ); diff --git a/src/pe/cr/DEM.h b/src/pe/cr/DEM.h index dcc19af292c646addf2f0eac477d3c87e5a4218f..f716157ef9f3302bf05195a3a280f534f9c280b1 100644 --- a/src/pe/cr/DEM.h +++ b/src/pe/cr/DEM.h @@ -57,13 +57,13 @@ public: /// Convenience operator to make class a functor. void operator()(const real_t dt) { timestep(dt); } /// Advances the simulation dt seconds. - void timestep( const real_t dt ); + void timestep( const real_t dt ) override; inline Integrator getIntegrator() const { return integrate_; } inline ContactResolver getContactResolver() const { return resolveContact_; } - virtual inline real_t getMaximumPenetration() const WALBERLA_OVERRIDE { return maxPenetration_; } - virtual inline size_t getNumberOfContacts() const WALBERLA_OVERRIDE { return numberOfContacts_; } - virtual inline size_t getNumberOfContactsTreated() const WALBERLA_OVERRIDE { return numberOfContactsTreated_; } + virtual inline real_t getMaximumPenetration() const override { return maxPenetration_; } + virtual inline size_t getNumberOfContacts() const override { return numberOfContacts_; } + virtual inline size_t getNumberOfContactsTreated() const override { return numberOfContactsTreated_; } private: Integrator integrate_; ContactResolver resolveContact_; diff --git a/src/pe/cr/HCSITS.h b/src/pe/cr/HCSITS.h index 67056df71da2ccc3b15a3085517e0529c951d502..742799f0833916273632ea816bfa9ff548c59427 100644 --- a/src/pe/cr/HCSITS.h +++ b/src/pe/cr/HCSITS.h @@ -130,9 +130,9 @@ public: //**Get functions******************************************************************************* /*!\name Get functions */ //@{ - virtual inline real_t getMaximumPenetration() const WALBERLA_OVERRIDE; - virtual inline size_t getNumberOfContacts() const WALBERLA_OVERRIDE; - virtual inline size_t getNumberOfContactsTreated() const WALBERLA_OVERRIDE; + virtual inline real_t getMaximumPenetration() const override; + virtual inline size_t getNumberOfContacts() const override; + virtual inline size_t getNumberOfContactsTreated() const override; inline const std::map<IBlockID::IDType, ContactCache> getContactCache() const { return blockToContactCache_; } inline real_t getSpeedLimitFactor() const; inline size_t getMaxIterations() const { return maxIterations_; } @@ -169,7 +169,7 @@ public: /// Convenience operator to make class a functor. void operator()(const real_t dt) { timestep(dt); } /// Advances the simulation dt seconds. - void timestep( const real_t dt ); + void timestep( const real_t dt ) override; private: diff --git a/src/pe/fcd/SimpleFCDDataHandling.h b/src/pe/fcd/SimpleFCDDataHandling.h index 1fce240e0b3db419f2bb4ede1048d93ec06a22e8..cae895ec3799918ab9a11e49641b778751644e41 100644 --- a/src/pe/fcd/SimpleFCDDataHandling.h +++ b/src/pe/fcd/SimpleFCDDataHandling.h @@ -23,7 +23,6 @@ #include "SimpleFCD.h" #include "blockforest/BlockDataHandling.h" -#include "core/Deprecated.h" namespace walberla{ namespace pe{ @@ -35,9 +34,9 @@ public: SimpleFCD<BodyTypeTuple> * initialize( IBlock * const /*block*/ ) {return new SimpleFCD<BodyTypeTuple>();} }; -/// \attention This function is deprecated. Use createGenericFCDDataHandling<BodyTypeTuple, AnalyticCollideFunctor>() instead! template <typename BodyTypeTuple> -WALBERLA_DEPRECATED(shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling()); +[[deprecated("Use createGenericFCDDataHandling<BodyTypeTuple, AnalyticCollideFunctor>() instead")]] +shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling(); template <typename BodyTypeTuple> shared_ptr<SimpleFCDDataHandling<BodyTypeTuple> > createSimpleFCDDataHandling() diff --git a/src/pe/rigidbody/BodyStorage.h b/src/pe/rigidbody/BodyStorage.h index d8c91adf339abaa0adcc3be355e4bc96dc3d49f0..b6e159f675df8f975e232e30370006b6276f999d 100644 --- a/src/pe/rigidbody/BodyStorage.h +++ b/src/pe/rigidbody/BodyStorage.h @@ -131,7 +131,8 @@ public: //**Add/Remove functions************************************************************************ /*!\name Add/Remove functions */ //@{ - [[deprecated]] inline RigidBody& add ( BodyID body ); + [[deprecated("Please wrap the body into a unique_ptr")]] + inline RigidBody& add ( BodyID body ); inline RigidBody& add ( std::unique_ptr<RigidBody>&& body ); inline iterator remove ( const id_t sid ); inline iterator remove ( BodyID body ); diff --git a/src/pe/rigidbody/Squirmer.h b/src/pe/rigidbody/Squirmer.h index 688894cff8d6f2a9622de3e00247b2f96f106e4b..41a27c9a78474ff82a677d45bb4a5e4af65da3ff 100644 --- a/src/pe/rigidbody/Squirmer.h +++ b/src/pe/rigidbody/Squirmer.h @@ -53,12 +53,12 @@ public: inline real_t getSquirmerVelocity() const; inline real_t getSquirmerBeta() const; - inline Vec3 velFromBF ( real_t px, real_t py, real_t pz ) const WALBERLA_OVERRIDE; - inline Vec3 velFromBF ( const Vec3& rpos ) const WALBERLA_OVERRIDE; - inline Vec3 velFromWF ( real_t px, real_t py, real_t pz ) const WALBERLA_OVERRIDE; - inline Vec3 velFromWF ( const Vec3& gpos ) const WALBERLA_OVERRIDE; + inline Vec3 velFromBF ( real_t px, real_t py, real_t pz ) const override; + inline Vec3 velFromBF ( const Vec3& rpos ) const override; + inline Vec3 velFromWF ( real_t px, real_t py, real_t pz ) const override; + inline Vec3 velFromWF ( const Vec3& gpos ) const override; - static inline id_t getStaticTypeID() WALBERLA_OVERRIDE; + static inline id_t getStaticTypeID(); //@} //********************************************************************************************** @@ -80,7 +80,7 @@ protected: private: static id_t staticTypeID_; //< type id of sphere, will be set by SetBodyTypeIDs - static void setStaticTypeID(id_t typeID) WALBERLA_OVERRIDE {staticTypeID_ = typeID;} + static void setStaticTypeID(id_t typeID) {staticTypeID_ = typeID;} //** friend declaration /// needed to be able to set static type ids with setStaticTypeID diff --git a/src/pe/rigidbody/StorageDataHandling.h b/src/pe/rigidbody/StorageDataHandling.h index dd319398a9bba478d4dcdd92085ab9365041cb0e..12495a01b0b56bd80e1a26d062b9edbd9098c00c 100644 --- a/src/pe/rigidbody/StorageDataHandling.h +++ b/src/pe/rigidbody/StorageDataHandling.h @@ -43,29 +43,29 @@ public: virtual ~StorageDataHandling() {} /// must be thread-safe ! - virtual Storage * initialize( IBlock * const block ) WALBERLA_OVERRIDE; + virtual Storage * initialize( IBlock * const block ) override; /// must be thread-safe ! - virtual void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) WALBERLA_OVERRIDE; + virtual void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; /// must be thread-safe ! - virtual Storage * deserialize( IBlock * const block ) WALBERLA_OVERRIDE; + virtual Storage * deserialize( IBlock * const block ) override; /// must be thread-safe ! - virtual void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) WALBERLA_OVERRIDE; + virtual void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; /// must be thread-safe ! - virtual void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) WALBERLA_OVERRIDE; + virtual void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override; /// must be thread-safe ! - virtual void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) WALBERLA_OVERRIDE; + virtual void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; /// must be thread-safe ! - virtual Storage * deserializeCoarseToFine( Block * const block ) WALBERLA_OVERRIDE; + virtual Storage * deserializeCoarseToFine( Block * const block ) override; /// must be thread-safe ! - virtual Storage * deserializeFineToCoarse( Block * const block ) WALBERLA_OVERRIDE; + virtual Storage * deserializeFineToCoarse( Block * const block ) override; /// must be thread-safe ! - virtual void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) WALBERLA_OVERRIDE; + virtual void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; /// must be thread-safe ! - virtual void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) WALBERLA_OVERRIDE; + virtual void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) override; private: void deserializeImpl( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ); diff --git a/src/pe/rigidbody/Union.h b/src/pe/rigidbody/Union.h index 2f462877ffe5c05beb9d3e6f01268a9f693edae4..e9337e069d82375ffcbc48b605cfb4b8c71fc461 100644 --- a/src/pe/rigidbody/Union.h +++ b/src/pe/rigidbody/Union.h @@ -121,23 +121,23 @@ public: //@} //********************************************************************************************** - virtual inline real_t getVolume() const; + virtual inline real_t getVolume() const override; //**Set functions******************************************************************************* /*!\name Set functions */ //@{ - virtual void setRemote( bool remote ) WALBERLA_OVERRIDE; + virtual void setRemote( bool remote ) override; //@} //********************************************************************************************** - virtual inline bool hasSubBodies() const WALBERLA_OVERRIDE { return true; } + virtual inline bool hasSubBodies() const override { return true; } //**Signal functions*************************************************************************** /*!\name Signal functions */ //@{ - virtual void handleModification() WALBERLA_OVERRIDE; - virtual void handleTranslation() WALBERLA_OVERRIDE; - virtual void handleRotation() WALBERLA_OVERRIDE; + virtual void handleModification() override; + virtual void handleTranslation() override; + virtual void handleRotation() override; //@} //********************************************************************************************** @@ -158,7 +158,7 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + virtual void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** @@ -166,21 +166,21 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual void setPositionImpl ( real_t px, real_t py, real_t pz ) WALBERLA_OVERRIDE; - virtual void setOrientationImpl ( real_t r, real_t i, real_t j, real_t k ) WALBERLA_OVERRIDE; - virtual void translateImpl ( real_t dx, real_t dy, real_t dz ) WALBERLA_OVERRIDE; - virtual void rotateImpl ( const Quat& dq ) WALBERLA_OVERRIDE; - virtual void rotateAroundOriginImpl( const Quat& dq ) WALBERLA_OVERRIDE; - virtual void rotateAroundPointImpl ( const Vec3& point, const Quat& dq ) WALBERLA_OVERRIDE; - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const WALBERLA_OVERRIDE; - virtual bool isSurfaceRelPointImpl ( real_t px, real_t py, real_t pz ) const WALBERLA_OVERRIDE; + virtual void setPositionImpl ( real_t px, real_t py, real_t pz ) override; + virtual void setOrientationImpl ( real_t r, real_t i, real_t j, real_t k ) override; + virtual void translateImpl ( real_t dx, real_t dy, real_t dz ) override; + virtual void rotateImpl ( const Quat& dq ) override; + virtual void rotateAroundOriginImpl( const Quat& dq ) override; + virtual void rotateAroundPointImpl ( const Vec3& point, const Quat& dq ) override; + virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + virtual bool isSurfaceRelPointImpl ( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual void calcBoundingBox() WALBERLA_OVERRIDE; // Calculation of the axis-aligned bounding box + inline virtual void calcBoundingBox() override; // Calculation of the axis-aligned bounding box inline void calcCenterOfMass(); // Compute mass and center of gravity inline void calcInertia(); // Calculation of the moment of inertia //@} diff --git a/src/waLBerlaDefinitions.in.h b/src/waLBerlaDefinitions.in.h index 360eea932f93c3c07f0dce034617142f6bf82cac..496f223b731285a7fe942d29598fe84324c15e3f 100644 --- a/src/waLBerlaDefinitions.in.h +++ b/src/waLBerlaDefinitions.in.h @@ -63,10 +63,6 @@ // SIMD #cmakedefine WALBERLA_SIMD_FORCE_SCALAR -// Deprecated and Outdated -#cmakedefine WARNING_DEPRECATED -#cmakedefine WALBERLA_NO_OUTDATED_FEATURES - // Version Information #define WALBERLA_MAJOR_VERSION ${WALBERLA_MAJOR_VERSION} #define WALBERLA_PATCH_LEVEL ${WALBERLA_PATCH_LEVEL}