From 1ea4b95e045aa122ad765577d5bc2da681041a6d Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Mon, 25 Jan 2021 12:05:27 +0100 Subject: [PATCH] [CLANG-TIDY] modernize-use-override --- .clang-tidy | 2 +- src/blockforest/Block.h | 6 +- src/blockforest/BlockDataHandling.h | 50 +- src/blockforest/BlockForest.h | 50 +- src/blockforest/BlockID.h | 10 +- src/blockforest/StructuredBlockForest.h | 24 +- src/boundary/communication/HandlingPackInfo.h | 12 +- src/core/Optional.h | 2 +- src/core/math/equation_system/Operator.h | 16 +- src/core/math/extern/exprtk.h | 856 +++++++++--------- src/core/mpi/BufferSystemHelper.h | 40 +- src/core/selectable/SetSelectableObject.h | 4 +- src/domain_decomposition/BlockDataHandling.h | 26 +- src/domain_decomposition/IBlock.h | 6 +- .../StructuredBlockStorage.h | 2 +- src/field/FlagField.h | 4 +- src/field/GhostLayerField.h | 12 +- src/field/StabilityChecker.h | 12 +- src/field/adaptors/AdaptorCreators.h | 2 +- src/field/allocation/FieldAllocator.h | 18 +- src/field/blockforest/BlockDataHandling.h | 28 +- src/field/communication/PackInfo.h | 12 +- src/field/communication/ReducePackInfo.h | 10 +- .../StencilRestrictedMPIDatatypeInfo.h | 10 +- .../communication/StencilRestrictedPackInfo.h | 12 +- .../communication/UniformMPIDatatypeInfo.h | 10 +- .../UniformPullReductionPackInfo.h | 12 +- src/field/distributors/DistributorCreators.h | 2 +- .../interpolators/FieldInterpolatorCreators.h | 2 +- src/field/refinement/PackInfo.h | 24 +- src/field/vtk/FlagFieldMapping.h | 4 +- src/field/vtk/VTKWriter.h | 4 +- src/geometry/bodies/DynamicBody.h | 6 +- src/geometry/containment_octree/BranchNode.h | 16 +- .../IndeterminateLeafNode.h | 8 +- .../containment_octree/InsideLeafNode.h | 8 +- src/geometry/containment_octree/LeafNode.h | 10 +- .../containment_octree/OutsideLeafNode.h | 8 +- src/geometry/initializer/BoundaryFromBody.h | 2 +- .../initializer/BoundaryFromCellInterval.h | 2 +- .../initializer/BoundaryFromDomainBorder.h | 2 +- src/geometry/initializer/BoundaryFromImage.h | 2 +- .../initializer/BoundaryFromVoxelFile.h | 2 +- .../initializer/OverlapFieldFromBody.h | 2 +- .../initializer/ScalarFieldFromBody.h | 2 +- .../ScalarFieldFromGrayScaleImage.h | 2 +- src/geometry/structured/extern/lodepng.h | 2 +- src/lbm/blockforest/PostProcessing.h | 22 +- .../communication/SparsePdfFieldPackInfo.h | 12 +- src/lbm/field/AddToStorage.h | 16 +- src/lbm/field/PdfField.h | 4 +- .../initializer/PoiseuilleInitializer.h | 2 +- src/lbm/lattice_model/D2Q9.h | 4 +- src/lbm/lattice_model/D3Q15.h | 4 +- src/lbm/lattice_model/D3Q19.h | 4 +- src/lbm/lattice_model/D3Q27.h | 4 +- src/lbm/refinement/PdfFieldPackInfo.h | 32 +- src/lbm/vtk/Density.h | 4 +- src/lbm/vtk/NonEquilibrium.h | 4 +- src/lbm/vtk/Velocity.h | 8 +- src/mesa_pd/data/ParticleAccessor.h | 4 +- src/mesa_pd/domain/BlockForestDataHandling.h | 22 +- .../data_sources/DataSourceAdapters.h | 8 +- .../OutputSelectorFaceDataSource.h | 6 +- .../SurfaceVelocityVertexDataSource.h | 6 +- src/mesh/boundary/BoundaryUIDFaceDataSource.h | 4 +- src/mesh/pe/rigid_body/ConvexPolyhedron.h | 16 +- src/mesh_common/QHull.h | 10 +- src/mesh_common/distance_octree/BranchNode.h | 28 +- src/mesh_common/distance_octree/LeafNode.h | 30 +- src/mesh_common/vtk/CommonDataSources.h | 8 +- src/mesh_common/vtk/VTKMeshWriter.h | 4 +- src/pe/bg/SimpleBGDataHandling.h | 2 +- src/pe/ccd/HashGrids.h | 8 +- src/pe/ccd/HashGridsDataHandling.h | 2 +- src/pe/ccd/SimpleCCD.h | 6 +- src/pe/cr/DEM.h | 6 +- src/pe/cr/HCSITS.h | 8 +- src/pe/fcd/GenericFCD.h | 2 +- src/pe/rigidbody/Box.h | 16 +- src/pe/rigidbody/Capsule.h | 14 +- src/pe/rigidbody/CylindricalBoundary.h | 10 +- src/pe/rigidbody/Ellipsoid.h | 14 +- src/pe/rigidbody/GeomPrimitive.h | 2 +- src/pe/rigidbody/Plane.h | 24 +- src/pe/rigidbody/Sphere.h | 14 +- src/pe/rigidbody/Squirmer.h | 2 +- src/pe/rigidbody/StorageDataHandling.h | 22 +- src/pe/rigidbody/Union.h | 34 +- src/pe/vtk/BodyVtkOutput.h | 10 +- src/pe/vtk/EllipsoidVtkOutput.h | 10 +- src/pe/vtk/SphereVtkOutput.h | 10 +- src/timeloop/SweepTimeloop.h | 6 +- src/timeloop/Timeloop.h | 20 +- src/vtk/BlockCellDataWriter.h | 14 +- src/vtk/DumpBlockStructureLevel.h | 4 +- src/vtk/DumpBlockStructureProcess.h | 4 +- 97 files changed, 944 insertions(+), 944 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 00ffd56f0..aecc43a61 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -65,7 +65,7 @@ readability-use-anyofallof ' WarningsAsErrors: '*' -HeaderFilterRegex: '' +HeaderFilterRegex: '.*' AnalyzeTemporaryDtors: false ... diff --git a/src/blockforest/Block.h b/src/blockforest/Block.h index 39d958b7e..0d2d1f281 100644 --- a/src/blockforest/Block.h +++ b/src/blockforest/Block.h @@ -79,14 +79,14 @@ public: Block( BlockForest & forest, const BlockID & id, const AABB & aabb, const uint_t level, mpi::RecvBuffer & buffer, const std::function< uint_t ( const uint_t ) > & processMapping = std::function< uint_t ( const uint_t ) >() ); - virtual ~Block() {} + ~Block() override {} void toBuffer( mpi::SendBuffer & buffer ) const; const BlockForest & getForest() const { return forest_; } BlockForest & getForest() { return forest_; } - const BlockID & getId() const { return id_; } + const BlockID & getId() const override { return id_; } uint_t getProcess() const; uint_t getLevel() const { return level_; } @@ -135,7 +135,7 @@ public: protected: - bool equal( const IBlock* rhs ) const; + bool equal( const IBlock* rhs ) const override; private: diff --git a/src/blockforest/BlockDataHandling.h b/src/blockforest/BlockDataHandling.h index c947b3e03..4005215e3 100644 --- a/src/blockforest/BlockDataHandling.h +++ b/src/blockforest/BlockDataHandling.h @@ -36,7 +36,7 @@ template< typename T > class BlockDataHandling : public domain_decomposition::BlockDataHandling<T> { public: - virtual ~BlockDataHandling() {} + ~BlockDataHandling() override {} /// must be thread-safe ! virtual void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) = 0; @@ -60,19 +60,19 @@ template< typename T > class AlwaysInitializeBlockDataHandling : public BlockDataHandling<T> { public: - ~AlwaysInitializeBlockDataHandling() {} + ~AlwaysInitializeBlockDataHandling() override {} - void serialize( IBlock * const, const BlockDataID &, mpi::SendBuffer & ) {} - void serializeCoarseToFine( Block * const, const BlockDataID &, mpi::SendBuffer &, const uint_t ) {} - void serializeFineToCoarse( Block * const, const BlockDataID &, mpi::SendBuffer & ) {} + void serialize( IBlock * const, const BlockDataID &, mpi::SendBuffer & ) override {} + void serializeCoarseToFine( Block * const, const BlockDataID &, mpi::SendBuffer &, const uint_t ) override {} + void serializeFineToCoarse( Block * const, const BlockDataID &, mpi::SendBuffer & ) override {} - T * deserialize( IBlock * const block ) { return this->initialize( block ); } - T * deserializeCoarseToFine( Block * const block ) { return this->initialize( block ); } - T * deserializeFineToCoarse( Block * const block ) { return this->initialize( block ); } + T * deserialize( IBlock * const block ) override { return this->initialize( block ); } + T * deserializeCoarseToFine( Block * const block ) override { return this->initialize( block ); } + T * deserializeFineToCoarse( Block * const block ) override { return this->initialize( block ); } - void deserialize( IBlock * const, const BlockDataID &, mpi::RecvBuffer & ) {} - void deserializeCoarseToFine( Block * const, const BlockDataID &, mpi::RecvBuffer & ) {} - void deserializeFineToCoarse( Block * const, const BlockDataID &, mpi::RecvBuffer &, const uint_t ) {} + void deserialize( IBlock * const, const BlockDataID &, mpi::RecvBuffer & ) override {} + void deserializeCoarseToFine( Block * const, const BlockDataID &, mpi::RecvBuffer & ) override {} + void deserializeFineToCoarse( Block * const, const BlockDataID &, mpi::RecvBuffer &, const uint_t ) override {} }; @@ -81,9 +81,9 @@ template< typename T > class AlwaysCreateBlockDataHandling : public AlwaysInitializeBlockDataHandling<T> { public: - ~AlwaysCreateBlockDataHandling() {} + ~AlwaysCreateBlockDataHandling() override {} - T * initialize( IBlock * const /*block*/ ) {return new T();} + T * initialize( IBlock * const /*block*/ ) override {return new T();} }; @@ -97,7 +97,7 @@ class BlockDataHandlingWrapper : public domain_decomposition::internal::BlockDat public: typedef domain_decomposition::internal::BlockData BlockData; - virtual ~BlockDataHandlingWrapper() {} + ~BlockDataHandlingWrapper() override {} virtual void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) = 0; virtual void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) = 0; @@ -118,67 +118,67 @@ public: typedef domain_decomposition::internal::BlockData BlockData; BlockDataHandlingHelper( const shared_ptr< BlockDataHandling<T> > & dataHandling ) : dataHandling_( dataHandling ) {} - ~BlockDataHandlingHelper() {} + ~BlockDataHandlingHelper() override {} - BlockData * initialize( IBlock * const block ) + BlockData * initialize( IBlock * const block ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); T * ptr = dataHandling_->initialize( block ); return ptr ? new BlockData( ptr ) : NULL; } - void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) + void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->serialize( block, id, buffer ); } - void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) + void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->serializeCoarseToFine( block, id, buffer, child ); } - void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) + void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->serializeFineToCoarse( block, id, buffer ); } - BlockData * deserialize( IBlock * const block ) + BlockData * deserialize( IBlock * const block ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); T * ptr = dataHandling_->deserialize( block ); return ptr ? new BlockData( ptr ) : NULL; } - BlockData * deserializeCoarseToFine( Block * const block ) + BlockData * deserializeCoarseToFine( Block * const block ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); T * ptr = dataHandling_->deserializeCoarseToFine( block ); return ptr ? new BlockData( ptr ) : NULL; } - BlockData * deserializeFineToCoarse( Block * const block ) + BlockData * deserializeFineToCoarse( Block * const block ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); T * ptr = dataHandling_->deserializeFineToCoarse( block ); return ptr ? new BlockData( ptr ) : NULL; } - void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) + void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->deserialize( block, id, buffer ); } - void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) + void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->deserializeCoarseToFine( block, id, buffer ); } - void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) + void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->deserializeFineToCoarse( block, id, buffer, child ); diff --git a/src/blockforest/BlockForest.h b/src/blockforest/BlockForest.h index b0731c115..d4d53ffff 100644 --- a/src/blockforest/BlockForest.h +++ b/src/blockforest/BlockForest.h @@ -223,7 +223,7 @@ public: BlockForest( const uint_t process, const SetupBlockForest& forest, const bool keepGlobalBlockInformation = false ); BlockForest( const uint_t process, const char* const filename, const bool broadcastFile = true, const bool keepGlobalBlockInformation = false ); - ~BlockForest() {} + ~BlockForest() override {} uint_t getProcess() const { return process_; } uint_t getProcessIdBytes() const { return processIdBytes_; } @@ -277,45 +277,45 @@ public: inline void getBlocks( std::vector< const Block* >& blocks, const uint_t level ) const; inline void getBlocks( std::vector< Block* >& blocks, const uint_t level ); - inline void getBlocksContainedWithinAABB( std::vector< const IBlock* >& blocks, const AABB& aabb ) const; - inline void getBlocksContainedWithinAABB( std::vector< IBlock* >& blocks, const AABB& aabb ); + inline void getBlocksContainedWithinAABB( std::vector< const IBlock* >& blocks, const AABB& aabb ) const override; + inline void getBlocksContainedWithinAABB( std::vector< IBlock* >& blocks, const AABB& aabb ) override; - inline void getBlocksOverlappedByAABB( std::vector< const IBlock* >& blocks, const AABB& aabb ) const; - inline void getBlocksOverlappedByAABB( std::vector< IBlock* >& blocks, const AABB& aabb ); + inline void getBlocksOverlappedByAABB( std::vector< const IBlock* >& blocks, const AABB& aabb ) const override; + inline void getBlocksOverlappedByAABB( std::vector< IBlock* >& blocks, const AABB& aabb ) override; using BlockStorage::getBlock; - inline const Block* getBlock( const IBlockID& id ) const; - inline Block* getBlock( const IBlockID& id ); + inline const Block* getBlock( const IBlockID& id ) const override; + inline Block* getBlock( const IBlockID& id ) override; - inline const Block* getBlock( const real_t x, const real_t y, const real_t z ) const; - inline Block* getBlock( const real_t x, const real_t y, const real_t z ); + inline const Block* getBlock( const real_t x, const real_t y, const real_t z ) const override; + inline Block* getBlock( const real_t x, const real_t y, const real_t z ) override; inline const Block* getRootBlock( const uint_t x, const uint_t y, const uint_t z ) const; inline Block* getRootBlock( const uint_t x, const uint_t y, const uint_t z ); - bool containsGlobalBlockInformation() const { return blockInformation_->active(); } + bool containsGlobalBlockInformation() const override { return blockInformation_->active(); } - inline void getAllBlocks( std::vector< shared_ptr< IBlockID > >& blocks ) const; + inline void getAllBlocks( std::vector< shared_ptr< IBlockID > >& blocks ) const override; - inline bool blockExists ( const real_t x, const real_t y, const real_t z ) const; - inline bool blockExistsLocally ( const real_t x, const real_t y, const real_t z ) const; - inline bool blockExistsRemotely( const real_t x, const real_t y, const real_t z ) const; + inline bool blockExists ( const real_t x, const real_t y, const real_t z ) const override; + inline bool blockExistsLocally ( const real_t x, const real_t y, const real_t z ) const override; + inline bool blockExistsRemotely( const real_t x, const real_t y, const real_t z ) const override; - inline bool blockExists ( const IBlockID& id ) const; - inline bool blockExistsLocally ( const IBlockID& id ) const; - inline bool blockExistsRemotely( const IBlockID& id ) const; + inline bool blockExists ( const IBlockID& id ) const override; + inline bool blockExistsLocally ( const IBlockID& id ) const override; + inline bool blockExistsRemotely( const IBlockID& id ) const override; inline bool rootBlockExists ( const uint_t x, const uint_t y, const uint_t z ) const; inline bool rootBlockExistsLocally ( const uint_t x, const uint_t y, const uint_t z ) const; inline bool rootBlockExistsRemotely( const uint_t x, const uint_t y, const uint_t z ) const; - void getBlockID( IBlockID& id, const real_t x, const real_t y, const real_t z ) const; - void getAABB ( AABB& aabb, const IBlockID& id ) const; - void getState ( Set<SUID>& state, const IBlockID& id ) const; - void getProcessRank( uint_t& rank, const IBlockID& id ) const; + void getBlockID( IBlockID& id, const real_t x, const real_t y, const real_t z ) const override; + void getAABB ( AABB& aabb, const IBlockID& id ) const override; + void getState ( Set<SUID>& state, const IBlockID& id ) const override; + void getProcessRank( uint_t& rank, const IBlockID& id ) const override; void getRootBlockAABB ( AABB& aabb, const uint_t x, const uint_t y, const uint_t z ) const; void getRootBlockState ( Set<SUID>& state, const uint_t x, const uint_t y, const uint_t z ) const; @@ -324,7 +324,7 @@ public: const BlockInformation & getBlockInformation() const { return *blockInformation_; } - inline uint_t getLevel( const IBlock& block ) const; + inline uint_t getLevel( const IBlock& block ) const override; inline uint_t getLevelFromBlockId( const BlockID& id ) const; inline uint_t getAABBFromBlockId( AABB& aabb, const BlockID& id ) const; inline AABB getAABBFromBlockId( const BlockID& id ) const; @@ -338,9 +338,9 @@ public: bool insertBuffersIntoProcessNetwork() const { return insertBuffersIntoProcessNetwork_; } const std::vector< uint_t > & getNeighborhood() const { return neighborhood_; } - const std::vector< uint_t > & getNeighboringProcesses() const { return getNeighborhood(); } + const std::vector< uint_t > & getNeighboringProcesses() const override { return getNeighborhood(); } - std::map< uint_t, std::vector< Vector3<real_t> > > getNeighboringProcessOffsets() const; + std::map< uint_t, std::vector< Vector3<real_t> > > getNeighboringProcessOffsets() const override; @@ -484,7 +484,7 @@ public: protected: - bool equal( const BlockStorage* rhs ) const; + bool equal( const BlockStorage* rhs ) const override; void addBlockData( IBlock * const block, const BlockDataID & index, domain_decomposition::internal::BlockData * const data ) { BlockStorage::addBlockData( block, index, data ); } diff --git a/src/blockforest/BlockID.h b/src/blockforest/BlockID.h index ff64a5b19..b46fff7c8 100644 --- a/src/blockforest/BlockID.h +++ b/src/blockforest/BlockID.h @@ -283,18 +283,18 @@ public: void removeBranchId() { WALBERLA_ASSERT_GREATER_EQUAL( getUsedBits(), uint_c(4) ); id_ >>= 3; } uint_t getBranchId() const { WALBERLA_ASSERT_GREATER_EQUAL( getUsedBits(), uint_c(4) ); return id_ & uint_c(7); } - bool operator< ( const IBlockID& rhs ) const + bool operator< ( const IBlockID& rhs ) const override override { WALBERLA_ASSERT_EQUAL( dynamic_cast< const BlockID* >( &rhs ), &rhs ); return id_ < static_cast< const BlockID* >( &rhs )->id_; } bool operator> ( const IBlockID& rhs ) const { WALBERLA_ASSERT_EQUAL( dynamic_cast< const BlockID* >( &rhs ), &rhs ); return id_ > static_cast< const BlockID* >( &rhs )->id_; } - bool operator==( const IBlockID& rhs ) const + bool operator==( const IBlockID& rhs ) const override override { WALBERLA_ASSERT_EQUAL( dynamic_cast< const BlockID* >( &rhs ), &rhs ); return id_ == static_cast< const BlockID* >( &rhs )->id_; } - bool operator!=( const IBlockID& rhs ) const + bool operator!=( const IBlockID& rhs ) const override override { WALBERLA_ASSERT_EQUAL( dynamic_cast< const BlockID* >( &rhs ), &rhs ); return id_ != static_cast< const BlockID* >( &rhs )->id_; } - inline IDType getID() const; + inline IDType getID() const override override; - inline std::ostream& toStream( std::ostream& os ) const; + inline std::ostream& toStream( std::ostream& os ) const override override; void toByteArray( std::vector< uint8_t >& array, const uint_t offset, const uint_t bytes ) const { uintToByteArray( id_, array, offset, bytes ); } diff --git a/src/blockforest/StructuredBlockForest.h b/src/blockforest/StructuredBlockForest.h index ac021fe66..c0aa7d5b2 100644 --- a/src/blockforest/StructuredBlockForest.h +++ b/src/blockforest/StructuredBlockForest.h @@ -50,13 +50,13 @@ public: using StructuredBlockStorage::blockExistsLocally; using StructuredBlockStorage::blockExistsRemotely; - bool blockExists ( const Cell& cell, const uint_t level = 0 ) const; - inline bool blockExistsLocally ( const Cell& cell, const uint_t level = 0 ) const; - inline bool blockExistsRemotely( const Cell& cell, const uint_t level = 0 ) const; + bool blockExists ( const Cell& cell, const uint_t level = 0 ) const override; + inline bool blockExistsLocally ( const Cell& cell, const uint_t level = 0 ) const override; + inline bool blockExistsRemotely( const Cell& cell, const uint_t level = 0 ) const override; - void getBlockID( IBlockID& id, const Cell& cell, const uint_t level = 0 ) const; + void getBlockID( IBlockID& id, const Cell& cell, const uint_t level = 0 ) const override; - inline uint_t getLevel( const IBlock& block ) const; + inline uint_t getLevel( const IBlock& block ) const override; using StructuredBlockStorage::getNumberOfXCells; using StructuredBlockStorage::getNumberOfYCells; @@ -67,14 +67,14 @@ public: uint_t getNumberOfYCells( const IBlock& /*block*/ ) const { return blockCells_[1]; } uint_t getNumberOfZCells( const IBlock& /*block*/ ) const { return blockCells_[2]; } #else - uint_t getNumberOfXCells( const IBlock& block ) const { WALBERLA_ASSERT_EQUAL( &(getBlockStorage()), &(block.getBlockStorage()) ); return blockCells_[0]; } - uint_t getNumberOfYCells( const IBlock& block ) const { WALBERLA_ASSERT_EQUAL( &(getBlockStorage()), &(block.getBlockStorage()) ); return blockCells_[1]; } - uint_t getNumberOfZCells( const IBlock& block ) const { WALBERLA_ASSERT_EQUAL( &(getBlockStorage()), &(block.getBlockStorage()) ); return blockCells_[2]; } + uint_t getNumberOfXCells( const IBlock& block ) const override { WALBERLA_ASSERT_EQUAL( &(getBlockStorage()), &(block.getBlockStorage()) ); return blockCells_[0]; } + uint_t getNumberOfYCells( const IBlock& block ) const override { WALBERLA_ASSERT_EQUAL( &(getBlockStorage()), &(block.getBlockStorage()) ); return blockCells_[1]; } + uint_t getNumberOfZCells( const IBlock& block ) const override { WALBERLA_ASSERT_EQUAL( &(getBlockStorage()), &(block.getBlockStorage()) ); return blockCells_[2]; } #endif using StructuredBlockStorage::getNumberOfCells; - inline uint_t getNumberOfCells( const IBlock& block, const uint_t index ) const; + inline uint_t getNumberOfCells( const IBlock& block, const uint_t index ) const override; // direct access to all member functions which are special to of BlockForest (-> for documentation of these functions see class BlockForest) @@ -164,21 +164,21 @@ public: protected: - inline bool equal( const StructuredBlockStorage* rhs ) const; + inline bool equal( const StructuredBlockStorage* rhs ) const override; // helper class for 'StructuredBlockForest::addCellBoundingBoxesAsBlockData' class CellBoundingBoxHandling : public AlwaysInitializeBlockDataHandling< CellInterval > { public: CellBoundingBoxHandling( const StructuredBlockForest & forest ) : forest_( forest ) {} - CellInterval * initialize( IBlock * const block ) { return forest_.initializeCellBoundingBox( block ); } + CellInterval * initialize( IBlock * const block ) override { return forest_.initializeCellBoundingBox( block ); } private: const StructuredBlockForest & forest_; }; friend class CellBoundingBoxHandling; //using StructuredBlockStorage::initializeCellBoundingBox; - inline BlockDataID addCellBoundingBoxesAsBlockData( const std::string & identifier ); + inline BlockDataID addCellBoundingBoxesAsBlockData( const std::string & identifier ) override; private: diff --git a/src/boundary/communication/HandlingPackInfo.h b/src/boundary/communication/HandlingPackInfo.h index d730bf2ad..e85de43a5 100644 --- a/src/boundary/communication/HandlingPackInfo.h +++ b/src/boundary/communication/HandlingPackInfo.h @@ -39,18 +39,18 @@ public: HandlingPackInfo( const BlockDataID & bdId, const bool assumeIdenticalFlagMapping = true, const uint_t numberOfLayers = 0 ) : bdId_( bdId ), numberOfLayers_( numberOfLayers ), assumeIdenticalFlagMapping_( assumeIdenticalFlagMapping ) {} - ~HandlingPackInfo() {} + ~HandlingPackInfo() override {} - bool constantDataExchange() const { return false; } - bool threadsafeReceiving() const { return false; } + bool constantDataExchange() const override { return false; } + bool threadsafeReceiving() const override { return false; } - void unpackData( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ); + void unpackData( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; - void communicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ); + void communicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ) override; protected: - void packDataImpl( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & buffer ) const; + void packDataImpl( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; diff --git a/src/core/Optional.h b/src/core/Optional.h index 5c31a1ec0..c05a1f1f6 100644 --- a/src/core/Optional.h +++ b/src/core/Optional.h @@ -29,7 +29,7 @@ namespace walberla { -using std::optional; +using boost::optional; using std::nullopt; } diff --git a/src/core/math/equation_system/Operator.h b/src/core/math/equation_system/Operator.h index b0dcd809b..710cb294b 100644 --- a/src/core/math/equation_system/Operator.h +++ b/src/core/math/equation_system/Operator.h @@ -68,56 +68,56 @@ namespace math { public: OpNo( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double &, const double & ) { WALBERLA_ABORT( "NO OPERATION" ); return 0; } + double operator() ( const double &, const double & ) override { WALBERLA_ABORT( "NO OPERATION" ); return 0; } }; class OpPlus : public OpType{ public: OpPlus( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {}; - double operator() ( const double & a, const double & b ) { return a + b; } + double operator() ( const double & a, const double & b ) override { return a + b; } }; class OpMinus : public OpType{ public: OpMinus( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double & a, const double & b ) { return a - b; } + double operator() ( const double & a, const double & b ) override { return a - b; } }; class OpMult : public OpType{ public: OpMult( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double & a, const double & b ) { return a * b; } + double operator() ( const double & a, const double & b ) override { return a * b; } }; class OpDiv : public OpType{ public: OpDiv( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double & a, const double & b ) { return a / b; } + double operator() ( const double & a, const double & b ) override { return a / b; } }; class OpProd : public OpType{ public: OpProd( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double & a, const double & b ) { return pow( a, b ); } + double operator() ( const double & a, const double & b ) override { return pow( a, b ); } }; class OpRoot : public OpType{ public: OpRoot( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double & a, const double & b ) { return pow( a, 1/b ); } + double operator() ( const double & a, const double & b ) override { return pow( a, 1/b ); } }; class OpLog : public OpType{ public: OpLog( const char& sign, const std::string& name, const unsigned int strength ) : OpType( sign, name, strength ) {} - double operator() ( const double & a, const double & b ) { return log10(a) / log10(b); } + double operator() ( const double & a, const double & b ) override { return log10(a) / log10(b); } }; diff --git a/src/core/math/extern/exprtk.h b/src/core/math/extern/exprtk.h index 4c88bbdf6..6320da561 100644 --- a/src/core/math/extern/exprtk.h +++ b/src/core/math/extern/exprtk.h @@ -2874,7 +2874,7 @@ namespace exprtk { public: - virtual ~token_scanner() + ~token_scanner() override {} explicit token_scanner(const std::size_t& stride) @@ -2886,7 +2886,7 @@ namespace exprtk } } - inline std::size_t process(generator& g) + inline std::size_t process(generator& g) override { if (g.token_list_.size() >= stride_) { @@ -2981,7 +2981,7 @@ namespace exprtk { public: - inline std::size_t process(generator& g) + inline std::size_t process(generator& g) override { std::size_t changes = 0; @@ -3009,7 +3009,7 @@ namespace exprtk } } - inline std::size_t process(generator& g) + inline std::size_t process(generator& g) override { if (g.token_list_.empty()) return 0; @@ -3090,7 +3090,7 @@ namespace exprtk : stride_(stride) {} - inline std::size_t process(generator& g) + inline std::size_t process(generator& g) override { if (g.token_list_.empty()) return 0; @@ -3200,7 +3200,7 @@ namespace exprtk ignore_set_.insert(symbol); } - inline int insert(const lexer::token& t0, const lexer::token& t1, lexer::token& new_token) + inline int insert(const lexer::token& t0, const lexer::token& t1, lexer::token& new_token) override { bool match = false; new_token.type = lexer::token::e_mul; @@ -3255,7 +3255,7 @@ namespace exprtk : token_joiner(stride) {} - inline bool join(const lexer::token& t0, const lexer::token& t1, lexer::token& t) + inline bool join(const lexer::token& t0, const lexer::token& t1, lexer::token& t) override { // ': =' --> ':=' if ((t0.type == lexer::token::e_colon) && (t1.type == lexer::token::e_eq)) @@ -3400,7 +3400,7 @@ namespace exprtk return false; } - inline bool join(const lexer::token& t0, const lexer::token& t1, const lexer::token& t2, lexer::token& t) + inline bool join(const lexer::token& t0, const lexer::token& t1, const lexer::token& t2, lexer::token& t) override { // '[ * ]' --> '[*]' if ( @@ -3431,7 +3431,7 @@ namespace exprtk state_(true) {} - bool result() + bool result() override { if (!stack_.empty()) { @@ -3452,7 +3452,7 @@ namespace exprtk return error_token_; } - void reset() + void reset() override { // Why? because msvc doesn't support swap properly. stack_ = std::stack<std::pair<char,std::size_t> >(); @@ -3460,7 +3460,7 @@ namespace exprtk error_token_.clear(); } - bool operator() (const lexer::token& t) + bool operator() (const lexer::token& t) override { if ( !t.value.empty() && @@ -3516,18 +3516,18 @@ namespace exprtk current_index_(0) {} - bool result() + bool result() override { return error_list_.empty(); } - void reset() + void reset() override { error_list_.clear(); current_index_ = 0; } - bool operator() (const lexer::token& t) + bool operator() (const lexer::token& t) override { if (token::e_number == t.type) { @@ -3611,7 +3611,7 @@ namespace exprtk private: - bool modify(lexer::token& t) + bool modify(lexer::token& t) override { if (lexer::token::e_symbol == t.type) { @@ -3673,12 +3673,12 @@ namespace exprtk add_invalid_set1(lexer::token::e_ternary); } - bool result() + bool result() override { return error_list_.empty(); } - bool operator() (const lexer::token& t0, const lexer::token& t1) + bool operator() (const lexer::token& t0, const lexer::token& t1) override { const set_t::value_type p = std::make_pair(t0.type,t1.type); @@ -3840,12 +3840,12 @@ namespace exprtk add_invalid(lexer::token::e_pow ,lexer::token::e_mod , lexer::token::e_pow); } - bool result() + bool result() override { return error_list_.empty(); } - bool operator() (const lexer::token& t0, const lexer::token& t1, const lexer::token& t2) + bool operator() (const lexer::token& t0, const lexer::token& t1, const lexer::token& t2) override { const set_t::value_type p = std::make_pair(t0.type,std::make_pair(t1.type,t2.type)); @@ -5401,7 +5401,7 @@ namespace exprtk protected: - value_ptr value_at(const std::size_t& index) const + value_ptr value_at(const std::size_t& index) const override { if (index < size_) return const_cast<const_value_ptr>(vec_ + index); @@ -5409,7 +5409,7 @@ namespace exprtk return const_value_ptr(0); } - std::size_t vector_size() const + std::size_t vector_size() const override { return size_; } @@ -5549,12 +5549,12 @@ namespace exprtk { public: - inline T value() const + inline T value() const override { return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_null; } @@ -5573,7 +5573,7 @@ namespace exprtk equality_(equality) {} - ~null_eq_node() + ~null_eq_node() override { if (branch_ && branch_deletable_) { @@ -5581,7 +5581,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { const T v = branch_->value(); const bool result = details::numeric::is_nan(v); @@ -5592,7 +5592,7 @@ namespace exprtk return (equality_) ? T(0) : T(1); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_nulleq; } @@ -5602,7 +5602,7 @@ namespace exprtk return details::e_eq; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_; } @@ -5623,17 +5623,17 @@ namespace exprtk : value_(v) {} - inline T value() const + inline T value() const override { return value_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_constant; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return reinterpret_cast<expression_node<T>*>(0); } @@ -5703,42 +5703,42 @@ namespace exprtk rp_.cache.second = rp_.n1_c.second; } - inline T value() const + inline T value() const override { return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_stringconst; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return reinterpret_cast<expression_node<T>*>(0); } - std::string str() const + std::string str() const override { return value_; } - char_cptr base() const + char_cptr base() const override { return value_.data(); } - std::size_t size() const + std::size_t size() const override { return value_.size(); } - range_t& range_ref() + range_t& range_ref() override { return rp_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return rp_; } @@ -5767,7 +5767,7 @@ namespace exprtk branch_deletable_(branch_deletable(branch_)) {} - ~unary_node() + ~unary_node() override { if (branch_ && branch_deletable_) { @@ -5775,14 +5775,14 @@ namespace exprtk } } - inline T value() const + inline T value() const override { const T arg = branch_->value(); return numeric::process<T>(operation_,arg); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_unary; } @@ -5792,7 +5792,7 @@ namespace exprtk return operation_; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_; } @@ -5900,12 +5900,12 @@ namespace exprtk init_branches<2>(branch_, branch0, branch1); } - ~binary_node() + ~binary_node() override { cleanup_branches::execute<T,2>(branch_); } - inline T value() const + inline T value() const override { const T arg0 = branch_[0].first->value(); const T arg1 = branch_[1].first->value(); @@ -5913,7 +5913,7 @@ namespace exprtk return numeric::process<T>(operation_,arg0,arg1); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_binary; } @@ -5923,7 +5923,7 @@ namespace exprtk return operation_; } - inline expression_node<T>* branch(const std::size_t& index = 0) const + inline expression_node<T>* branch(const std::size_t& index = 0) const override { if (0 == index) return branch_[0].first; @@ -5952,12 +5952,12 @@ namespace exprtk init_branches<2>(branch_, branch0, branch1); } - ~binary_ext_node() + ~binary_ext_node() override { cleanup_branches::execute<T,2>(branch_); } - inline T value() const + inline T value() const override { const T arg0 = branch_[0].first->value(); const T arg1 = branch_[1].first->value(); @@ -5965,7 +5965,7 @@ namespace exprtk return Operation::process(arg0,arg1); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_binary_ext; } @@ -5975,7 +5975,7 @@ namespace exprtk return Operation::operation(); } - inline expression_node<T>* branch(const std::size_t& index = 0) const + inline expression_node<T>* branch(const std::size_t& index = 0) const override { if (0 == index) return branch_[0].first; @@ -6007,12 +6007,12 @@ namespace exprtk init_branches<3>(branch_, branch0, branch1, branch2); } - ~trinary_node() + ~trinary_node() override { cleanup_branches::execute<T,3>(branch_); } - inline T value() const + inline T value() const override { const T arg0 = branch_[0].first->value(); const T arg1 = branch_[1].first->value(); @@ -6034,7 +6034,7 @@ namespace exprtk } } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_trinary; } @@ -6063,17 +6063,17 @@ namespace exprtk init_branches<4>(branch_, branch0, branch1, branch2, branch3); } - ~quaternary_node() + ~quaternary_node() override { cleanup_branches::execute<T,4>(branch_); } - inline T value() const + inline T value() const override { return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_quaternary; } @@ -6102,7 +6102,7 @@ namespace exprtk alternative_deletable_(branch_deletable(alternative_)) {} - ~conditional_node() + ~conditional_node() override { if (test_ && test_deletable_) { @@ -6120,7 +6120,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (is_true(test_)) return consequent_->value(); @@ -6128,7 +6128,7 @@ namespace exprtk return alternative_->value(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_conditional; } @@ -6159,7 +6159,7 @@ namespace exprtk consequent_deletable_(branch_deletable(consequent_)) {} - ~cons_conditional_node() + ~cons_conditional_node() override { if (test_ && test_deletable_) { @@ -6172,7 +6172,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (is_true(test_)) return consequent_->value(); @@ -6180,7 +6180,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_conditional; } @@ -6221,7 +6221,7 @@ namespace exprtk return_deletable_(branch_deletable(return_)) {} - ~break_node() + ~break_node() override { if (return_deletable_) { @@ -6229,7 +6229,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { throw break_exception<T>(return_ ? return_->value() : std::numeric_limits<T>::quiet_NaN()); #ifndef _MSC_VER @@ -6237,7 +6237,7 @@ namespace exprtk #endif } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_break; } @@ -6253,7 +6253,7 @@ namespace exprtk { public: - inline T value() const + inline T value() const override { throw continue_exception(); #ifndef _MSC_VER @@ -6261,7 +6261,7 @@ namespace exprtk #endif } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_break; } @@ -6282,7 +6282,7 @@ namespace exprtk loop_body_deletable_(branch_deletable(loop_body_)) {} - ~while_loop_node() + ~while_loop_node() override { if (condition_ && condition_deletable_) { @@ -6295,7 +6295,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6307,7 +6307,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_while; } @@ -6334,7 +6334,7 @@ namespace exprtk loop_body_deletable_(branch_deletable(loop_body_)) {} - ~repeat_until_loop_node() + ~repeat_until_loop_node() override { if (condition_ && condition_deletable_) { @@ -6347,7 +6347,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6360,7 +6360,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_repeat; } @@ -6394,7 +6394,7 @@ namespace exprtk loop_body_deletable_ (branch_deletable(loop_body_ )) {} - ~for_loop_node() + ~for_loop_node() override { if (initialiser_ && initialiser_deletable_) { @@ -6417,7 +6417,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6443,7 +6443,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_for; } @@ -6475,7 +6475,7 @@ namespace exprtk loop_body_deletable_(branch_deletable(loop_body_)) {} - ~while_loop_bc_node() + ~while_loop_bc_node() override { if (condition_ && condition_deletable_) { @@ -6488,7 +6488,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6509,7 +6509,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_while; } @@ -6536,7 +6536,7 @@ namespace exprtk loop_body_deletable_(branch_deletable(loop_body_)) {} - ~repeat_until_loop_bc_node() + ~repeat_until_loop_bc_node() override { if (condition_ && condition_deletable_) { @@ -6549,7 +6549,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6571,7 +6571,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_repeat; } @@ -6605,7 +6605,7 @@ namespace exprtk loop_body_deletable_ (branch_deletable(loop_body_ )) {} - ~for_loop_bc_node() + ~for_loop_bc_node() override { if (initialiser_ && initialiser_deletable_) { @@ -6628,7 +6628,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6673,7 +6673,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_for; } @@ -6724,7 +6724,7 @@ namespace exprtk } } - ~switch_node() + ~switch_node() override { for (std::size_t i = 0; i < arg_list_.size(); ++i) { @@ -6735,7 +6735,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (!arg_list_.empty()) { @@ -6758,7 +6758,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_switch; } @@ -6782,7 +6782,7 @@ namespace exprtk : switch_node<T>(arg_list) {} - inline T value() const + inline T value() const override { return Switch_N::process(switch_node<T>::arg_list_); } @@ -6821,7 +6821,7 @@ namespace exprtk } } - ~multi_switch_node() + ~multi_switch_node() override { for (std::size_t i = 0; i < arg_list_.size(); ++i) { @@ -6832,7 +6832,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = T(0); @@ -6857,7 +6857,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_mswitch; } @@ -6901,22 +6901,22 @@ namespace exprtk return this < (&v); } - inline T value() const + inline T value() const override { return (*value_); } - inline T& ref() + inline T& ref() override { return (*value_); } - inline const T& ref() const + inline const T& ref() const override { return (*value_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_variable; } @@ -7127,37 +7127,37 @@ namespace exprtk vds_(vds) {} - inline T value() const + inline T value() const override { return vds().data()[0]; } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return const_cast<vector_node_ptr>(this); } - vector_node_ptr vec() + vector_node_ptr vec() override { return this; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vector; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -7190,7 +7190,7 @@ namespace exprtk index_deletable_(branch_deletable(index_)) {} - ~vector_elem_node() + ~vector_elem_node() override { if (index_ && index_deletable_) { @@ -7198,22 +7198,22 @@ namespace exprtk } } - inline T value() const + inline T value() const override { return *(vector_base_ + static_cast<std::size_t>(details::numeric::to_int64(index_->value()))); } - inline T& ref() + inline T& ref() override { return *(vector_base_ + static_cast<std::size_t>(details::numeric::to_int64(index_->value()))); } - inline const T& ref() const + inline const T& ref() const override { return *(vector_base_ + static_cast<std::size_t>(details::numeric::to_int64(index_->value()))); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecelem; } @@ -7251,7 +7251,7 @@ namespace exprtk vector_holder_->set_ref(&vds_.ref()); } - ~rebasevector_elem_node() + ~rebasevector_elem_node() override { if (index_ && index_deletable_) { @@ -7259,22 +7259,22 @@ namespace exprtk } } - inline T value() const + inline T value() const override { return *(vds_.data() + static_cast<std::size_t>(details::numeric::to_int64(index_->value()))); } - inline T& ref() + inline T& ref() override { return *(vds_.data() + static_cast<std::size_t>(details::numeric::to_int64(index_->value()))); } - inline const T& ref() const + inline const T& ref() const override { return *(vds_.data() + static_cast<std::size_t>(details::numeric::to_int64(index_->value()))); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_rbvecelem; } @@ -7311,22 +7311,22 @@ namespace exprtk vector_holder_->set_ref(&vds_.ref()); } - inline T value() const + inline T value() const override { return *(vds_.data() + index_); } - inline T& ref() + inline T& ref() override { return *(vds_.data() + index_); } - inline const T& ref() const + inline const T& ref() const override { return *(vds_.data() + index_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_rbveccelem; } @@ -7360,7 +7360,7 @@ namespace exprtk single_value_initialse_(single_value_initialse) {} - ~vector_assignment_node() + ~vector_assignment_node() override { for (std::size_t i = 0; i < initialiser_list_.size(); ++i) { @@ -7371,7 +7371,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (single_value_initialse_) { @@ -7401,7 +7401,7 @@ namespace exprtk return *(vector_base_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecdefass; } @@ -7429,13 +7429,13 @@ namespace exprtk var1_(var1) {} - inline T value() const + inline T value() const override { std::swap(var0_->ref(),var1_->ref()); return var1_->ref(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_swap; } @@ -7460,13 +7460,13 @@ namespace exprtk var1_(dynamic_cast<ivariable_ptr>(var1)) {} - inline T value() const + inline T value() const override { std::swap(var0_->ref(),var1_->ref()); return var1_->ref(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_swap; } @@ -7525,7 +7525,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (initialised_) { @@ -7546,32 +7546,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return vec0_node_ptr_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return vec0_node_ptr_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecvecswap; } - std::size_t size() const + std::size_t size() const override { return vec_size_; } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -7615,7 +7615,7 @@ namespace exprtk return this < (&v); } - inline T value() const + inline T value() const override { rp_.n1_c.second = (*value_).size() - 1; rp_.cache.second = rp_.n1_c.second; @@ -7623,17 +7623,17 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return ref(); } - char_cptr base() const + char_cptr base() const override { return &(*value_)[0]; } - std::size_t size() const + std::size_t size() const override { return ref().size(); } @@ -7648,17 +7648,17 @@ namespace exprtk return (*value_); } - range_t& range_ref() + range_t& range_ref() override { return rp_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return rp_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_stringvar; } @@ -7688,7 +7688,7 @@ namespace exprtk rp_(rp) {} - virtual ~string_range_node() + ~string_range_node() override { rp_.free(); } @@ -7698,22 +7698,22 @@ namespace exprtk return this < (&v); } - inline T value() const + inline T value() const override { return std::numeric_limits<T>::quiet_NaN(); } - inline std::string str() const + inline std::string str() const override { return (*value_); } - char_cptr base() const + char_cptr base() const override { return &(*value_)[0]; } - std::size_t size() const + std::size_t size() const override { return ref().size(); } @@ -7733,17 +7733,17 @@ namespace exprtk return (*value_); } - inline range_t& range_ref() + inline range_t& range_ref() override { return rp_; } - inline const range_t& range_ref() const + inline const range_t& range_ref() const override { return rp_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_stringvarrng; } @@ -7771,27 +7771,27 @@ namespace exprtk rp_(rp) {} - ~const_string_range_node() + ~const_string_range_node() override { rp_.free(); } - inline T value() const + inline T value() const override { return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return value_; } - char_cptr base() const + char_cptr base() const override { return value_.data(); } - std::size_t size() const + std::size_t size() const override { return value_.size(); } @@ -7801,17 +7801,17 @@ namespace exprtk return rp_; } - range_t& range_ref() + range_t& range_ref() override { return rp_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return rp_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_cstringvarrng; } @@ -7868,7 +7868,7 @@ namespace exprtk initialised_ = (str_base_ptr_ && str_range_ptr_); } - ~generic_string_range_node() + ~generic_string_range_node() override { base_range_.free(); @@ -7878,7 +7878,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (initialised_) { @@ -7911,32 +7911,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return value_; } - char_cptr base() const + char_cptr base() const override { return &value_[0]; } - std::size_t size() const + std::size_t size() const override { return value_.size(); } - range_t& range_ref() + range_t& range_ref() override { return range_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return range_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strgenrange; } @@ -8015,7 +8015,7 @@ namespace exprtk str1_range_ptr_ ; } - inline T value() const + inline T value() const override { if (initialised_) { @@ -8050,32 +8050,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return value_; } - char_cptr base() const + char_cptr base() const override { return &value_[0]; } - std::size_t size() const + std::size_t size() const override { return value_.size(); } - range_t& range_ref() + range_t& range_ref() override { return range_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return range_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strconcat; } @@ -8125,7 +8125,7 @@ namespace exprtk initialised_ = (str0_node_ptr_ && str1_node_ptr_); } - inline T value() const + inline T value() const override { if (initialised_) { @@ -8138,32 +8138,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return str0_node_ptr_->str(); } - char_cptr base() const + char_cptr base() const override { return str0_node_ptr_->base(); } - std::size_t size() const + std::size_t size() const override { return str0_node_ptr_->size(); } - range_t& range_ref() + range_t& range_ref() override { return str0_node_ptr_->range_ref(); } - const range_t& range_ref() const + const range_t& range_ref() const override { return str0_node_ptr_->range_ref(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strswap; } @@ -8232,7 +8232,7 @@ namespace exprtk str1_range_ptr_ ; } - inline T value() const + inline T value() const override { if (initialised_) { @@ -8312,7 +8312,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strswap; } @@ -8344,12 +8344,12 @@ namespace exprtk : value_(&v) {} - inline T value() const + inline T value() const override { return T((*value_).size()); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_stringvarsize; } @@ -8384,7 +8384,7 @@ namespace exprtk } } - ~string_size_node() + ~string_size_node() override { if (branch_ && branch_deletable_) { @@ -8392,7 +8392,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { T result = std::numeric_limits<T>::quiet_NaN(); @@ -8405,7 +8405,7 @@ namespace exprtk return result; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_stringsize; } @@ -8482,7 +8482,7 @@ namespace exprtk str1_range_ptr_ ; } - inline T value() const + inline T value() const override { if (initialised_) { @@ -8506,32 +8506,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return str0_node_ptr_->str(); } - char_cptr base() const + char_cptr base() const override { return str0_node_ptr_->base(); } - std::size_t size() const + std::size_t size() const override { return str0_node_ptr_->size(); } - range_t& range_ref() + range_t& range_ref() override { return str0_node_ptr_->range_ref(); } - const range_t& range_ref() const + const range_t& range_ref() const override { return str0_node_ptr_->range_ref(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strass; } @@ -8607,7 +8607,7 @@ namespace exprtk str1_range_ptr_ ; } - inline T value() const + inline T value() const override { if (initialised_) { @@ -8639,32 +8639,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return str0_node_ptr_->str(); } - char_cptr base() const + char_cptr base() const override { return str0_node_ptr_->base(); } - std::size_t size() const + std::size_t size() const override { return str0_node_ptr_->size(); } - range_t& range_ref() + range_t& range_ref() override { return str0_node_ptr_->range_ref(); } - const range_t& range_ref() const + const range_t& range_ref() const override { return str0_node_ptr_->range_ref(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strass; } @@ -8745,7 +8745,7 @@ namespace exprtk } - inline T value() const + inline T value() const override { if (initialised_) { @@ -8793,32 +8793,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return value_; } - char_cptr base() const + char_cptr base() const override { return &value_[0]; } - std::size_t size() const + std::size_t size() const override { return value_.size(); } - range_t& range_ref() + range_t& range_ref() override { return range_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return range_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strcondition; } @@ -9019,7 +9019,7 @@ namespace exprtk } } - ~str_vararg_node() + ~str_vararg_node() override { if (final_node_ && final_deletable_) { @@ -9035,7 +9035,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (!arg_list_.empty()) { @@ -9047,32 +9047,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - std::string str() const + std::string str() const override { return str_base_ptr_->str(); } - char_cptr base() const + char_cptr base() const override { return str_base_ptr_->base(); } - std::size_t size() const + std::size_t size() const override { return str_base_ptr_->size(); } - range_t& range_ref() + range_t& range_ref() override { return str_range_ptr_->range_ref(); } - const range_t& range_ref() const + const range_t& range_ref() const override { return str_range_ptr_->range_ref(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_stringvararg; } @@ -9324,7 +9324,7 @@ namespace exprtk : trinary_node<T>(opr, branch0, branch1, branch2) {} - inline T value() const + inline T value() const override { const T x = trinary_node<T>::branch_[0].first->value(); const T y = trinary_node<T>::branch_[1].first->value(); @@ -9349,7 +9349,7 @@ namespace exprtk : quaternary_node<T>(opr, branch0, branch1, branch2, branch3) {} - inline T value() const + inline T value() const override { const T x = quaternary_node<T>::branch_[0].first->value(); const T y = quaternary_node<T>::branch_[1].first->value(); @@ -9373,12 +9373,12 @@ namespace exprtk v2_(v2) {} - inline T value() const + inline T value() const override { return SpecialFunction::process(v0_, v1_, v2_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_trinary; } @@ -9407,12 +9407,12 @@ namespace exprtk v3_(v3) {} - inline T value() const + inline T value() const override { return SpecialFunction::process(v0_, v1_, v2_, v3_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_trinary; } @@ -9458,7 +9458,7 @@ namespace exprtk } } - ~vararg_node() + ~vararg_node() override { for (std::size_t i = 0; i < arg_list_.size(); ++i) { @@ -9469,7 +9469,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (!arg_list_.empty()) return VarArgFunction::process(arg_list_); @@ -9477,7 +9477,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vararg; } @@ -9516,7 +9516,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (!arg_list_.empty()) return VarArgFunction::process(arg_list_); @@ -9524,7 +9524,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vararg; } @@ -9554,7 +9554,7 @@ namespace exprtk ivec_ptr_ = 0; } - ~vectorize_node() + ~vectorize_node() override { if (v_ && v_deletable_) { @@ -9562,7 +9562,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (ivec_ptr_) { @@ -9573,7 +9573,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecfunc; } @@ -9604,7 +9604,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (var_node_ptr_) { @@ -9642,7 +9642,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (vec_node_ptr_) { @@ -9680,7 +9680,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (rbvec_node_ptr_) { @@ -9718,7 +9718,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (rbvec_node_ptr_) { @@ -9760,7 +9760,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (vec_node_ptr_) { @@ -9818,32 +9818,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return vec_node_ptr_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return vec_node_ptr_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecvalass; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -9905,7 +9905,7 @@ namespace exprtk initialised_ = (vec0_node_ptr_ && vec1_node_ptr_); } - inline T value() const + inline T value() const override { if (initialised_) { @@ -9968,32 +9968,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return vec0_node_ptr_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return vec0_node_ptr_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecvecass; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -10026,7 +10026,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (var_node_ptr_) { @@ -10063,7 +10063,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (vec_node_ptr_) { @@ -10100,7 +10100,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (rbvec_node_ptr_) { @@ -10137,7 +10137,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (rbvec_node_ptr_) { @@ -10178,7 +10178,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if (vec_node_ptr_) { @@ -10237,37 +10237,37 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return vec_node_ptr_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return vec_node_ptr_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecopvalass; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } - bool side_effect() const + bool side_effect() const override { return true; } @@ -10323,7 +10323,7 @@ namespace exprtk initialised_ = (vec0_node_ptr_ && vec1_node_ptr_); } - inline T value() const + inline T value() const override { if (initialised_) { @@ -10386,37 +10386,37 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return vec0_node_ptr_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return vec0_node_ptr_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecopvecass; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } - bool side_effect() const + bool side_effect() const override { return true; } @@ -10502,13 +10502,13 @@ namespace exprtk } } - ~vec_binop_vecvec_node() + ~vec_binop_vecvec_node() override { delete temp_; delete temp_vec_node_; } - inline T value() const + inline T value() const override { if (initialised_) { @@ -10573,32 +10573,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return temp_vec_node_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return temp_vec_node_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecvecarith; } - std::size_t size() const + std::size_t size() const override { return vds_.size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -10661,13 +10661,13 @@ namespace exprtk } } - ~vec_binop_vecval_node() + ~vec_binop_vecval_node() override { delete temp_; delete temp_vec_node_; } - inline T value() const + inline T value() const override { if (vec0_node_ptr_) { @@ -10730,32 +10730,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return temp_vec_node_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return temp_vec_node_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecvalarith; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -10816,13 +10816,13 @@ namespace exprtk } } - ~vec_binop_valvec_node() + ~vec_binop_valvec_node() override { delete temp_; delete temp_vec_node_; } - inline T value() const + inline T value() const override { if (vec1_node_ptr_) { @@ -10885,32 +10885,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return temp_vec_node_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return temp_vec_node_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecvalarith; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -10969,13 +10969,13 @@ namespace exprtk } } - ~unary_vector_node() + ~unary_vector_node() override { delete temp_; delete temp_vec_node_; } - inline T value() const + inline T value() const override { unary_node<T>::branch_->value(); @@ -11037,32 +11037,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - vector_node_ptr vec() const + vector_node_ptr vec() const override { return temp_vec_node_; } - vector_node_ptr vec() + vector_node_ptr vec() override { return temp_vec_node_; } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vecunaryop; } - std::size_t size() const + std::size_t size() const override { return vds().size(); } - vds_t& vds() + vds_t& vds() override { return vds_; } - const vds_t& vds() const + const vds_t& vds() const override { return vds_; } @@ -11088,7 +11088,7 @@ namespace exprtk : binary_node<T>(opr, branch0, branch1) {} - inline T value() const + inline T value() const override { return ( std::not_equal_to<T>() @@ -11112,7 +11112,7 @@ namespace exprtk : binary_node<T>(opr, branch0, branch1) {} - inline T value() const + inline T value() const override { return ( std::not_equal_to<T>() @@ -11138,7 +11138,7 @@ namespace exprtk parameter_count_(func->param_count) {} - ~function_N_node() + ~function_N_node() override { cleanup_branches::execute<T,N>(branch_); } @@ -11174,7 +11174,7 @@ namespace exprtk return this < (&fn); } - inline T value() const + inline T value() const override { // Needed for incompetent and broken msvc compiler versions #ifdef _MSC_VER @@ -11404,7 +11404,7 @@ namespace exprtk { return f(v[0]); } }; - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_function; } @@ -11433,7 +11433,7 @@ namespace exprtk return this < (&fn); } - inline T value() const + inline T value() const override { if (function_) return (*function_)(); @@ -11441,7 +11441,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_function; } @@ -11466,7 +11466,7 @@ namespace exprtk value_list_.resize(arg_list.size(),std::numeric_limits<T>::quiet_NaN()); } - ~vararg_function_node() + ~vararg_function_node() override { for (std::size_t i = 0; i < arg_list_.size(); ++i) { @@ -11482,7 +11482,7 @@ namespace exprtk return this < (&fn); } - inline T value() const + inline T value() const override { if (function_) { @@ -11493,7 +11493,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_vafunction; } @@ -11539,7 +11539,7 @@ namespace exprtk arg_list_(arg_list) {} - virtual ~generic_function_node() + ~generic_function_node() override { cleanup_branches::execute(branch_); } @@ -11635,7 +11635,7 @@ namespace exprtk return this < (&fn); } - inline T value() const + inline T value() const override { if (function_) { @@ -11650,7 +11650,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_genfunction; } @@ -11731,7 +11731,7 @@ namespace exprtk return this < (&fn); } - inline T value() const + inline T value() const override { if (gen_function_t::function_) { @@ -11752,32 +11752,32 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strfunction; } - std::string str() const + std::string str() const override { return ret_string_; } - char_cptr base() const + char_cptr base() const override { return &ret_string_[0]; } - std::size_t size() const + std::size_t size() const override { return ret_string_.size(); } - range_t& range_ref() + range_t& range_ref() override { return range_; } - const range_t& range_ref() const + const range_t& range_ref() const override { return range_; } @@ -11804,7 +11804,7 @@ namespace exprtk param_seq_index_(param_seq_index) {} - inline T value() const + inline T value() const override { if (gen_function_t::function_) { @@ -11820,7 +11820,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_genfunction; } @@ -11846,7 +11846,7 @@ namespace exprtk param_seq_index_(param_seq_index) {} - inline T value() const + inline T value() const override { if (str_function_t::function_) { @@ -11868,7 +11868,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_strfunction; } @@ -11916,7 +11916,7 @@ namespace exprtk results_context_(&rc) {} - inline T value() const + inline T value() const override { if ( (0 != results_context_) && @@ -11934,7 +11934,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_return; } @@ -11959,7 +11959,7 @@ namespace exprtk body_deletable_ (branch_deletable(body_)) {} - ~return_envelope_node() + ~return_envelope_node() override { if (body_ && body_deletable_) { @@ -11967,7 +11967,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { try { @@ -11983,7 +11983,7 @@ namespace exprtk } } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_retenv; } @@ -13220,7 +13220,7 @@ namespace exprtk { public: - virtual ~vov_base_node() + ~vov_base_node() override {} inline virtual operator_type operation() const @@ -13238,7 +13238,7 @@ namespace exprtk { public: - virtual ~cov_base_node() + ~cov_base_node() override {} inline virtual operator_type operation() const @@ -13256,7 +13256,7 @@ namespace exprtk { public: - virtual ~voc_base_node() + ~voc_base_node() override {} inline virtual operator_type operation() const @@ -13274,7 +13274,7 @@ namespace exprtk { public: - virtual ~vob_base_node() + ~vob_base_node() override {} virtual const T& v() const = 0; @@ -13285,7 +13285,7 @@ namespace exprtk { public: - virtual ~bov_base_node() + ~bov_base_node() override {} virtual const T& v() const = 0; @@ -13296,7 +13296,7 @@ namespace exprtk { public: - virtual ~cob_base_node() + ~cob_base_node() override {} inline virtual operator_type operation() const @@ -13316,7 +13316,7 @@ namespace exprtk { public: - virtual ~boc_base_node() + ~boc_base_node() override {} inline virtual operator_type operation() const @@ -13336,7 +13336,7 @@ namespace exprtk { public: - virtual ~uv_base_node() + ~uv_base_node() override {} inline virtual operator_type operation() const @@ -13352,7 +13352,7 @@ namespace exprtk { public: - virtual ~sos_base_node() + ~sos_base_node() override {} inline virtual operator_type operation() const @@ -13366,7 +13366,7 @@ namespace exprtk { public: - virtual ~sosos_base_node() + ~sosos_base_node() override {} inline virtual operator_type operation() const @@ -13380,7 +13380,7 @@ namespace exprtk { public: - virtual ~T0oT1oT2_base_node() + ~T0oT1oT2_base_node() override {} virtual std::string type_id() const = 0; @@ -13391,7 +13391,7 @@ namespace exprtk { public: - virtual ~T0oT1oT2oT3_base_node() + ~T0oT1oT2oT3_base_node() override {} virtual std::string type_id() const = 0; @@ -13409,22 +13409,22 @@ namespace exprtk : v_(var) {} - inline T value() const + inline T value() const override { return Operation::process(v_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } - inline const T& v() const + inline const T& v() const override { return v_; } @@ -13458,12 +13458,12 @@ namespace exprtk f_ (bf ) {} - inline T value() const + inline T value() const override { return f_(u0_(v0_),u1_(v1_)); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_uvouv; } @@ -13523,7 +13523,7 @@ namespace exprtk branch_deletable_(branch_deletable(branch_)) {} - ~unary_branch_node() + ~unary_branch_node() override { if (branch_ && branch_deletable_) { @@ -13531,12 +13531,12 @@ namespace exprtk } } - inline T value() const + inline T value() const override { return Operation::process(branch_->value()); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } @@ -13546,7 +13546,7 @@ namespace exprtk return Operation::operation(); } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_; } @@ -13897,7 +13897,7 @@ namespace exprtk f1_(p4) {} - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { static const typename expression_node<T>::node_type result = nodetype_T0oT1oT2<T,T0,T1,T2>::result; return result; @@ -13908,7 +13908,7 @@ namespace exprtk return e_default; } - inline T value() const + inline T value() const override { return ProcessMode::process(t0_, t1_, t2_, f0_, f1_); } @@ -13938,7 +13938,7 @@ namespace exprtk return f1_; } - std::string type_id() const + std::string type_id() const override { return id(); } @@ -13993,7 +13993,7 @@ namespace exprtk f2_(p6) {} - inline T value() const + inline T value() const override { return ProcessMode::process(t0_, t1_, t2_, t3_, f0_, f1_, f2_); } @@ -14033,7 +14033,7 @@ namespace exprtk return f2_; } - inline std::string type_id() const + inline std::string type_id() const override { return id(); } @@ -14154,7 +14154,7 @@ namespace exprtk { public: - virtual ~sf3ext_type_node() + ~sf3ext_type_node() override {} virtual T0 t0() const = 0; @@ -14180,7 +14180,7 @@ namespace exprtk t2_(p2) {} - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { static const typename expression_node<T>::node_type result = nodetype_T0oT1oT2<T,T0,T1,T2>::result; return result; @@ -14191,27 +14191,27 @@ namespace exprtk return e_default; } - inline T value() const + inline T value() const override { return SF3Operation::process(t0_, t1_, t2_); } - T0 t0() const + T0 t0() const override { return t0_; } - T1 t1() const + T1 t1() const override { return t1_; } - T2 t2() const + T2 t2() const override { return t2_; } - std::string type_id() const + std::string type_id() const override { return id(); } @@ -14359,7 +14359,7 @@ namespace exprtk t3_(p3) {} - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { static const typename expression_node<T>::node_type result = nodetype_T0oT1oT2oT3<T,T0,T1,T2,T3>::result; return result; @@ -14370,7 +14370,7 @@ namespace exprtk return e_default; } - inline T value() const + inline T value() const override { return SF4Operation::process(t0_, t1_, t2_, t3_); } @@ -14395,7 +14395,7 @@ namespace exprtk return t2_; } - std::string type_id() const + std::string type_id() const override { return id(); } @@ -14482,27 +14482,27 @@ namespace exprtk v1_(var1) {} - inline T value() const + inline T value() const override { return Operation::process(v0_,v1_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } - inline const T& v0() const + inline const T& v0() const override { return v0_; } - inline const T& v1() const + inline const T& v1() const override { return v1_; } @@ -14532,27 +14532,27 @@ namespace exprtk v_(var) {} - inline T value() const + inline T value() const override { return Operation::process(c_,v_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } - inline const T c() const + inline const T c() const override { return c_; } - inline const T& v() const + inline const T& v() const override { return v_; } @@ -14582,22 +14582,22 @@ namespace exprtk c_(const_var) {} - inline T value() const + inline T value() const override { return Operation::process(v_,c_); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } - inline const T c() const + inline const T c() const override { return c_; } - inline const T& v() const + inline const T& v() const override { return v_; } @@ -14629,12 +14629,12 @@ namespace exprtk init_branches<1>(branch_,brnch); } - ~vob_node() + ~vob_node() override { cleanup_branches::execute<T,1>(branch_); } - inline T value() const + inline T value() const override { return Operation::process(v_,branch_[0].first->value()); } @@ -14644,12 +14644,12 @@ namespace exprtk return Operation::operation(); } - inline const T& v() const + inline const T& v() const override { return v_; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_[0].first; } @@ -14679,12 +14679,12 @@ namespace exprtk init_branches<1>(branch_,brnch); } - ~bov_node() + ~bov_node() override { cleanup_branches::execute<T,1>(branch_); } - inline T value() const + inline T value() const override { return Operation::process(branch_[0].first->value(),v_); } @@ -14694,12 +14694,12 @@ namespace exprtk return Operation::operation(); } - inline const T& v() const + inline const T& v() const override { return v_; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_[0].first; } @@ -14729,37 +14729,37 @@ namespace exprtk init_branches<1>(branch_,brnch); } - ~cob_node() + ~cob_node() override { cleanup_branches::execute<T,1>(branch_); } - inline T value() const + inline T value() const override { return Operation::process(c_,branch_[0].first->value()); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } - inline const T c() const + inline const T c() const override { return c_; } - inline void set_c(const T new_c) + inline void set_c(const T new_c) override { (*const_cast<T*>(&c_)) = new_c; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_[0].first; } - inline expression_node<T>* move_branch(const std::size_t&) + inline expression_node<T>* move_branch(const std::size_t&) override { branch_[0].second = false; return branch_[0].first; @@ -14790,37 +14790,37 @@ namespace exprtk init_branches<1>(branch_,brnch); } - ~boc_node() + ~boc_node() override { cleanup_branches::execute<T,1>(branch_); } - inline T value() const + inline T value() const override { return Operation::process(branch_[0].first->value(),c_); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } - inline const T c() const + inline const T c() const override { return c_; } - inline void set_c(const T new_c) + inline void set_c(const T new_c) override { (*const_cast<T*>(&c_)) = new_c; } - inline expression_node<T>* branch(const std::size_t&) const + inline expression_node<T>* branch(const std::size_t&) const override { return branch_[0].first; } - inline expression_node<T>* move_branch(const std::size_t&) + inline expression_node<T>* move_branch(const std::size_t&) override { branch_[0].second = false; return branch_[0].first; @@ -14850,17 +14850,17 @@ namespace exprtk s1_(p1) {} - inline T value() const + inline T value() const override { return Operation::process(s0_,s1_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } @@ -14901,12 +14901,12 @@ namespace exprtk rp0_(rp0) {} - ~str_xrox_node() + ~str_xrox_node() override { rp0_.free(); } - inline T value() const + inline T value() const override { std::size_t r0 = 0; std::size_t r1 = 0; @@ -14917,12 +14917,12 @@ namespace exprtk return T(0); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } @@ -14964,12 +14964,12 @@ namespace exprtk rp1_(rp1) {} - ~str_xoxr_node() + ~str_xoxr_node() override { rp1_.free(); } - inline T value() const + inline T value() const override { std::size_t r0 = 0; std::size_t r1 = 0; @@ -14980,12 +14980,12 @@ namespace exprtk return T(0); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } @@ -15028,13 +15028,13 @@ namespace exprtk rp1_(rp1) {} - ~str_xroxr_node() + ~str_xroxr_node() override { rp0_.free(); rp1_.free(); } - inline T value() const + inline T value() const override { std::size_t r0_0 = 0; std::size_t r0_1 = 0; @@ -15055,12 +15055,12 @@ namespace exprtk return T(0); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } @@ -15140,7 +15140,7 @@ namespace exprtk } } - inline T value() const + inline T value() const override { if ( str0_base_ptr_ && @@ -15176,7 +15176,7 @@ namespace exprtk return std::numeric_limits<T>::quiet_NaN(); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } @@ -15212,17 +15212,17 @@ namespace exprtk s2_(p2) {} - inline T value() const + inline T value() const override { return Operation::process(s0_,s1_,s2_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return Operation::type(); } - inline operator_type operation() const + inline operator_type operation() const override { return Operation::operation(); } @@ -15267,12 +15267,12 @@ namespace exprtk : v_(v) {} - inline T value() const + inline T value() const override { return PowOp::result(v_); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_ipow; } @@ -15299,17 +15299,17 @@ namespace exprtk init_branches<1>(branch_, brnch); } - ~bipow_node() + ~bipow_node() override { cleanup_branches::execute<T,1>(branch_); } - inline T value() const + inline T value() const override { return PowOp::result(branch_[0].first->value()); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_ipow; } @@ -15334,12 +15334,12 @@ namespace exprtk : v_(v) {} - inline T value() const + inline T value() const override { return (T(1) / PowOp::result(v_)); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_ipowinv; } @@ -15366,17 +15366,17 @@ namespace exprtk init_branches<1>(branch_, brnch); } - ~bipowninv_node() + ~bipowninv_node() override { cleanup_branches::execute<T,1>(branch_); } - inline T value() const + inline T value() const override { return (T(1) / PowOp::result(branch_[0].first->value())); } - inline typename expression_node<T>::node_type type() const + inline typename expression_node<T>::node_type type() const override { return expression_node<T>::e_ipowinv; } diff --git a/src/core/mpi/BufferSystemHelper.h b/src/core/mpi/BufferSystemHelper.h index 661e46358..c811580ff 100644 --- a/src/core/mpi/BufferSystemHelper.h +++ b/src/core/mpi/BufferSystemHelper.h @@ -110,15 +110,15 @@ namespace internal { KnownSizeCommunication( const MPI_Comm & communicator, int tag = 0 ) : AbstractCommunication<RecvBuffer_T, SendBuffer_T>( communicator, tag ), sending_(false), receiving_(false) {} - virtual ~KnownSizeCommunication() {} + ~KnownSizeCommunication() override {} - virtual void send( MPIRank receiver, const SendBuffer_T & sendBuffer ); - virtual void waitForSends(); + void send( MPIRank receiver, const SendBuffer_T & sendBuffer ) override; + void waitForSends() override; - virtual void scheduleReceives ( std::map<MPIRank, ReceiveInfo> & recvInfos ); + void scheduleReceives ( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; /// size field of recvInfos is expected to be valid - virtual MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ); + MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; private: bool sending_; @@ -138,15 +138,15 @@ namespace internal { UnknownSizeCommunication( const MPI_Comm & communicator, int tag = 0 ) : AbstractCommunication<RecvBuffer_T, SendBuffer_T>( communicator, tag ), sending_(false), receiving_(false) {} - virtual ~UnknownSizeCommunication() {} + ~UnknownSizeCommunication() override {} - virtual void send( MPIRank receiver, const SendBuffer_T & sendBuffer ); - virtual void waitForSends(); + void send( MPIRank receiver, const SendBuffer_T & sendBuffer ) override; + void waitForSends() override; - virtual void scheduleReceives( std::map<MPIRank, ReceiveInfo> & recvInfos ); + void scheduleReceives( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; /// size field of recvInfos can be invalid, is filled in with the actual message size - virtual MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ); + MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; private: bool sending_; @@ -170,15 +170,15 @@ namespace internal { UnknownSizeCommunicationIProbe( const MPI_Comm & communicator, int tag = 0 ) : AbstractCommunication<RecvBuffer_T, SendBuffer_T>( communicator, tag ), sending_(false), receiving_(false) {} - virtual ~UnknownSizeCommunicationIProbe() {} + ~UnknownSizeCommunicationIProbe() override {} - virtual void send( MPIRank receiver, const SendBuffer_T & sendBuffer ); - virtual void waitForSends(); + void send( MPIRank receiver, const SendBuffer_T & sendBuffer ) override; + void waitForSends() override; - virtual void scheduleReceives( std::map<MPIRank, ReceiveInfo> & recvInfos ); + void scheduleReceives( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; /// size field of recvInfos can be invalid, is filled in with the actual message size - virtual MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ); + MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; private: bool sending_; @@ -198,15 +198,15 @@ namespace internal { NoMPICommunication( const MPI_Comm & communicator, int tag = 0 ) : AbstractCommunication<RecvBuffer_T, SendBuffer_T>( communicator, tag ), received_( false ) {} - virtual ~NoMPICommunication() {} + ~NoMPICommunication() override {} - virtual void send( MPIRank receiver, const SendBuffer_T & sendBuffer ); - virtual void waitForSends(); + void send( MPIRank receiver, const SendBuffer_T & sendBuffer ) override; + void waitForSends() override; - virtual void scheduleReceives( std::map<MPIRank, ReceiveInfo> & recvInfos ); + void scheduleReceives( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; /// size field of recvInfos can be invalid, is filled in with the actual message size - virtual MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ); + MPIRank waitForNextReceive( std::map<MPIRank, ReceiveInfo> & recvInfos ) override; private: bool received_; diff --git a/src/core/selectable/SetSelectableObject.h b/src/core/selectable/SetSelectableObject.h index 8c88a3f23..a84975823 100644 --- a/src/core/selectable/SetSelectableObject.h +++ b/src/core/selectable/SetSelectableObject.h @@ -56,7 +56,7 @@ public: add( object, include, exclude, identifier ); } - virtual ~SetSelectableObject() {} + ~SetSelectableObject() override {} void add( const T& object, const Set<U>& include, const Set<U>& exclude, const std::string& identifier = std::string() ) { @@ -73,7 +73,7 @@ private: }; // added inline qualifier to suppress unjustified MSVC warning C4505 - virtual inline void select( std::vector< size_t >& index, const Set<U>& selector ) const; + inline void select( std::vector< size_t >& index, const Set<U>& selector ) const override; }; // SetSelectableObject diff --git a/src/domain_decomposition/BlockDataHandling.h b/src/domain_decomposition/BlockDataHandling.h index 4bd96dae0..e9e47ad4d 100644 --- a/src/domain_decomposition/BlockDataHandling.h +++ b/src/domain_decomposition/BlockDataHandling.h @@ -66,11 +66,11 @@ template< typename T > class AlwaysInitializeBlockDataHandling : public BlockDataHandling<T> { public: - ~AlwaysInitializeBlockDataHandling() {} + ~AlwaysInitializeBlockDataHandling() override {} - void serialize( IBlock * const, const BlockDataID &, mpi::SendBuffer & ) {} - T * deserialize( IBlock * const block ) { return this->initialize( block ); } - void deserialize( IBlock * const, const BlockDataID &, mpi::RecvBuffer & ) {} + void serialize( IBlock * const, const BlockDataID &, mpi::SendBuffer & ) override {} + T * deserialize( IBlock * const block ) override { return this->initialize( block ); } + void deserialize( IBlock * const, const BlockDataID &, mpi::RecvBuffer & ) override {} }; @@ -86,25 +86,25 @@ public: BlockDataHandlingFunctionAdaptor( const Function & function ) : function_( function ) {} - ~BlockDataHandlingFunctionAdaptor() {} + ~BlockDataHandlingFunctionAdaptor() override {} - T * initialize( IBlock * const block ) { return function_( block ); } + T * initialize( IBlock * const block ) override { return function_( block ); } - void serialize( IBlock * const, const BlockDataID &, mpi::SendBuffer & ) + void serialize( IBlock * const, const BlockDataID &, mpi::SendBuffer & ) override { WALBERLA_ABORT( "You are trying to serialize a block data item for which only an initialization function was registered" ); #ifdef __IBMCPP__ return NULL; // never reached, helps to suppress a warning from the IBM compiler #endif } - T * deserialize( IBlock * const ) + T * deserialize( IBlock * const ) override { WALBERLA_ABORT( "You are trying to deserialize a block data item for which only an initialization function was registered" ); #ifdef __IBMCPP__ return NULL; // never reached, helps to suppress a warning from the IBM compiler #endif } - void deserialize( IBlock * const, const BlockDataID &, mpi::RecvBuffer & ) + void deserialize( IBlock * const, const BlockDataID &, mpi::RecvBuffer & ) override { WALBERLA_ABORT( "You are trying to deserialize a block data item for which only an initialization function was registered" ); } @@ -173,27 +173,27 @@ public: BlockDataHandlingHelper( const shared_ptr< BlockDataHandling<T> > & dataHandling ) : dataHandling_( dataHandling ) {} - BlockData * initialize( IBlock * const block ) + BlockData * initialize( IBlock * const block ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); T * ptr = dataHandling_->initialize( block ); return ptr ? new BlockData( ptr ) : NULL; } - void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) + void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->serialize( block, id, buffer ); } - BlockData * deserialize( IBlock * const block ) + BlockData * deserialize( IBlock * const block ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); T * ptr = dataHandling_->deserialize( block ); return ptr ? new BlockData( ptr ) : NULL; } - void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) + void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override { WALBERLA_ASSERT_NOT_NULLPTR( block ); dataHandling_->deserialize( block, id, buffer ); diff --git a/src/domain_decomposition/IBlock.h b/src/domain_decomposition/IBlock.h index c25c55ee9..b8148b302 100644 --- a/src/domain_decomposition/IBlock.h +++ b/src/domain_decomposition/IBlock.h @@ -59,13 +59,13 @@ private: class Data : public DataBase { public: Data( T* data ) : data_( data ) {} - ~Data() { delete data_; } - bool operator==( const DataBase& rhs ) const { + ~Data() override { delete data_; } + bool operator==( const DataBase& rhs ) const override { const Data<T>* rhsData = dynamic_cast< const Data<T>* >( &rhs ); return ( rhsData == &rhs ) && ( *data_ == *(rhsData->data_) ); // every object that is registered as block data // must be comparable with "==" ! } - bool isOfSameType( const DataBase& rhs ) const { return dynamic_cast< const Data<T>* >( &rhs ) == &rhs; } + bool isOfSameType( const DataBase& rhs ) const override { return dynamic_cast< const Data<T>* >( &rhs ) == &rhs; } private: T* data_; }; diff --git a/src/domain_decomposition/StructuredBlockStorage.h b/src/domain_decomposition/StructuredBlockStorage.h index 752107f47..2a6a93790 100644 --- a/src/domain_decomposition/StructuredBlockStorage.h +++ b/src/domain_decomposition/StructuredBlockStorage.h @@ -437,7 +437,7 @@ protected: { public: CellBoundingBoxHandling( const StructuredBlockStorage & storage ) : storage_( storage ) {} - CellInterval * initialize( IBlock * const block ) { return storage_.initializeCellBoundingBox( block ); } + CellInterval * initialize( IBlock * const block ) override { return storage_.initializeCellBoundingBox( block ); } private: const StructuredBlockStorage & storage_; }; diff --git a/src/field/FlagField.h b/src/field/FlagField.h index 62f9deef5..ebf17fb39 100644 --- a/src/field/FlagField.h +++ b/src/field/FlagField.h @@ -111,7 +111,7 @@ public: FlagField( uint_t xSize, uint_t ySize, uint_t zSize, uint_t gl, const shared_ptr<FieldAllocator<T> > &alloc = make_shared<StdFieldAlloc<T> >()); - virtual ~FlagField(); + ~FlagField() override; inline FlagField<T> * clone() const; inline FlagField<T> * cloneUninitialized() const; @@ -196,7 +196,7 @@ protected: /*! \name Shallow Copy */ //@{ FlagField(const FlagField<T> & other); - virtual Field<T,1> * cloneShallowCopyInternal() const; + Field<T,1> * cloneShallowCopyInternal() const override; //@} //******************************************************************************************************************* diff --git a/src/field/GhostLayerField.h b/src/field/GhostLayerField.h index e6c8b454c..93b024b2b 100644 --- a/src/field/GhostLayerField.h +++ b/src/field/GhostLayerField.h @@ -90,7 +90,7 @@ namespace field { const std::vector<T> & fValues, const Layout & layout = zyxf, const shared_ptr<FieldAllocator<T> > &alloc = shared_ptr<FieldAllocator<T> >() ); - virtual ~GhostLayerField() {} + ~GhostLayerField() override {} @@ -102,7 +102,7 @@ namespace field { const shared_ptr<FieldAllocator<T> > &alloc = shared_ptr<FieldAllocator<T> >() ); - virtual void resize( uint_t xSize, uint_t ySize, uint_t zSize ); + void resize( uint_t xSize, uint_t ySize, uint_t zSize ) override; void resize( uint_t xSize, uint_t ySize, uint_t zSize, uint_t gl ); using Field<T,fSize_>::resize; @@ -200,8 +200,8 @@ namespace field { /*! \name Slicing */ //@{ GhostLayerField<T,fSize_> * getSlicedField( const CellInterval & interval ) const; - virtual void slice ( const CellInterval & interval ); - virtual void shiftCoordinates( cell_idx_t cx, cell_idx_t cy, cell_idx_t cz ); + void slice ( const CellInterval & interval ) override; + void shiftCoordinates( cell_idx_t cx, cell_idx_t cy, cell_idx_t cz ) override; //@} //**************************************************************************************************************** @@ -214,8 +214,8 @@ namespace field { //** Shallow Copy ************************************************************************************************ /*! \name Shallow Copy */ //@{ - virtual Field<T,fSize_> * cloneShallowCopyInternal() const; - virtual typename Field<T,fSize_>::FlattenedField * flattenedShallowCopyInternal() const; + Field<T,fSize_> * cloneShallowCopyInternal() const override; + typename Field<T,fSize_>::FlattenedField * flattenedShallowCopyInternal() const override; GhostLayerField(const GhostLayerField<T,fSize_> & other); template <typename T2, uint_t fSize2> GhostLayerField(const GhostLayerField<T2, fSize2> & other); diff --git a/src/field/StabilityChecker.h b/src/field/StabilityChecker.h index 8a6e80b28..85a29e725 100644 --- a/src/field/StabilityChecker.h +++ b/src/field/StabilityChecker.h @@ -184,9 +184,9 @@ private: protected: - void configure() {} + void configure() override {} - uint8_t evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + uint8_t evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { WALBERLA_ASSERT( map_.find( this->block_ ) != map_.end() ); WALBERLA_ASSERT( map_[ this->block_ ].find( Cell(x,y,z) ) != map_[ this->block_ ].end() ); @@ -205,8 +205,8 @@ private: public: LocalCoordVTKWriter( const std::string & id ) : vtk::BlockCellDataWriter< cell_idx_t, 3 >( id ) {} protected: - void configure() {} - cell_idx_t evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + void configure() override {} + cell_idx_t evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { return ( f == cell_idx_t(0) ) ? x : ( ( f == cell_idx_t(1) ) ? y : z ); } @@ -218,8 +218,8 @@ private: public: GlobalCoordVTKWriter( const std::string & id ) : vtk::BlockCellDataWriter< cell_idx_t, 3 >( id ) {} protected: - void configure() {} - cell_idx_t evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + void configure() override {} + cell_idx_t evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { Cell cell(x,y,z); this->blockStorage_->transformBlockLocalToGlobalCell( cell, *(this->block_) ); diff --git a/src/field/adaptors/AdaptorCreators.h b/src/field/adaptors/AdaptorCreators.h index 1c410ca91..56bfff201 100644 --- a/src/field/adaptors/AdaptorCreators.h +++ b/src/field/adaptors/AdaptorCreators.h @@ -43,7 +43,7 @@ public: AdaptorHandling( const ConstBlockDataID & adaptedFieldId, const AdaptionFunction_T & function ) : adaptedFieldId_( adaptedFieldId ), function_( function ) {} - Adaptor_T * initialize( IBlock * const block ) + Adaptor_T * initialize( IBlock * const block ) override { typedef typename Adaptor_T::basefield_t AdaptedField_T; const AdaptedField_T * adaptedField = block->getData< AdaptedField_T >( adaptedFieldId_ ); diff --git a/src/field/allocation/FieldAllocator.h b/src/field/allocation/FieldAllocator.h index f78771e15..a3be90a56 100644 --- a/src/field/allocation/FieldAllocator.h +++ b/src/field/allocation/FieldAllocator.h @@ -238,8 +238,8 @@ namespace field { protected: - virtual T * allocateMemory ( uint_t size0, uint_t size1, uint_t size2, uint_t size3, - uint_t & allocSize1, uint_t & allocSize2, uint_t & allocSize3) + T * allocateMemory ( uint_t size0, uint_t size1, uint_t size2, uint_t size3, + uint_t & allocSize1, uint_t & allocSize2, uint_t & allocSize3) override { allocSize1=size1; allocSize2=size2; @@ -254,7 +254,7 @@ namespace field { return allocateMemory ( size0 * allocSize1 * allocSize2 * allocSize3 ); } - virtual T * allocateMemory ( uint_t size ) + T * allocateMemory ( uint_t size ) override { void * ptr = aligned_malloc_with_offset(size * sizeof(T) + alignment, alignment, offset_ % alignment ); if(!ptr) @@ -274,11 +274,11 @@ namespace field { return ret; } - virtual void setInnerGhostLayerSize( uint_t innerGhostLayerSize ) { + void setInnerGhostLayerSize( uint_t innerGhostLayerSize ) override { offset_ = sizeof(T) * innerGhostLayerSize; } - virtual void deallocate(T *& values ) + void deallocate(T *& values ) override { WALBERLA_ASSERT ( nrOfElements_.find(values) != nrOfElements_.end() ); @@ -328,8 +328,8 @@ namespace field { class StdFieldAlloc : public FieldAllocator<T> { public: - virtual T * allocateMemory ( uint_t size0, uint_t size1, uint_t size2, uint_t size3, - uint_t & allocSize1, uint_t & allocSize2, uint_t & allocSize3) + T * allocateMemory ( uint_t size0, uint_t size1, uint_t size2, uint_t size3, + uint_t & allocSize1, uint_t & allocSize2, uint_t & allocSize3) override { allocSize1=size1; allocSize2=size2; @@ -337,12 +337,12 @@ namespace field { return new T[size0*size1*size2*size3]; } - virtual T * allocateMemory ( uint_t size ) + T * allocateMemory ( uint_t size ) override { return new T[size]; } - virtual void deallocate(T *& values) { + void deallocate(T *& values) override { delete[] values; values = 0; } diff --git a/src/field/blockforest/BlockDataHandling.h b/src/field/blockforest/BlockDataHandling.h index dc6328a66..4966c37a1 100644 --- a/src/field/blockforest/BlockDataHandling.h +++ b/src/field/blockforest/BlockDataHandling.h @@ -45,11 +45,11 @@ public: typedef typename Field_T::value_type Value_T; typedef std::function< void ( Field_T * field, IBlock * const block ) > InitializationFunction_T; - virtual ~BlockDataHandling() {} + ~BlockDataHandling() override {} void addInitializationFunction( const InitializationFunction_T & initFunction ) { initFunction_ = initFunction; } - Field_T * initialize( IBlock * const block ) + Field_T * initialize( IBlock * const block ) override { Field_T * field = allocate( block ); @@ -59,20 +59,20 @@ public: return field; } - inline void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ); + inline void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; - void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ); - void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ); + void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override; + void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; - Field_T * deserialize( IBlock * const block ) { return reallocate( block ); } + Field_T * deserialize( IBlock * const block ) override { return reallocate( block ); } - Field_T * deserializeCoarseToFine( Block * const block ) { return reallocate( block ); } - Field_T * deserializeFineToCoarse( Block * const block ) { return reallocate( block ); } + Field_T * deserializeCoarseToFine( Block * const block ) override { return reallocate( block ); } + Field_T * deserializeFineToCoarse( Block * const block ) override { return reallocate( block ); } - void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ); + void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; - void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ); - void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ); + void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; + void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) override; protected: @@ -421,7 +421,7 @@ public: protected: - GhostLayerField_T * allocate( IBlock * const block ) + GhostLayerField_T * allocate( IBlock * const block ) override { auto blocks = blocks_.lock(); WALBERLA_CHECK_NOT_NULLPTR( blocks, "Trying to access 'DefaultBlockDataHandling' for a block storage object that doesn't exist anymore" ); @@ -430,7 +430,7 @@ protected: nrOfGhostLayers_, initValue_, layout_ ); } - GhostLayerField_T * reallocate( IBlock * const block ) + GhostLayerField_T * reallocate( IBlock * const block ) override { auto blocks = blocks_.lock(); WALBERLA_CHECK_NOT_NULLPTR( blocks, "Trying to access 'DefaultBlockDataHandling' for a block storage object that doesn't exist anymore" ); @@ -484,7 +484,7 @@ public: void addInitializationFunction( const InitializationFunction_T & initFunction ) { initFunction_ = initFunction; } - GhostLayerField_T * initialize( IBlock * const block ) + GhostLayerField_T * initialize( IBlock * const block ) override { auto blocks = blocks_.lock(); WALBERLA_CHECK_NOT_NULLPTR( blocks, "Trying to access 'AlwaysInitializeBlockDataHandling' for a block storage object that doesn't exist anymore" ); diff --git a/src/field/communication/PackInfo.h b/src/field/communication/PackInfo.h index 0c74f604f..846877805 100644 --- a/src/field/communication/PackInfo.h +++ b/src/field/communication/PackInfo.h @@ -50,17 +50,17 @@ public: PackInfo( const BlockDataID & bdId, const uint_t numberOfGhostLayers ) : bdId_( bdId ), communicateAllGhostLayers_( false ), numberOfGhostLayers_( numberOfGhostLayers ) {} - virtual ~PackInfo() {} + ~PackInfo() override {} - bool constantDataExchange() const { return mpi::BufferSizeTrait<T>::constantSize; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return mpi::BufferSizeTrait<T>::constantSize; } + bool threadsafeReceiving() const override { return true; } - void unpackData(IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer); + void unpackData(IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer) override; - void communicateLocal(const IBlock * sender, IBlock * receiver, stencil::Direction dir); + void communicateLocal(const IBlock * sender, IBlock * receiver, stencil::Direction dir) override; protected: - void packDataImpl(const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer) const; + void packDataImpl(const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer) const override; uint_t numberOfGhostLayersToCommunicate( const GhostLayerField_T * const field ) const; diff --git a/src/field/communication/ReducePackInfo.h b/src/field/communication/ReducePackInfo.h index 81a142612..0a5ca88ac 100644 --- a/src/field/communication/ReducePackInfo.h +++ b/src/field/communication/ReducePackInfo.h @@ -50,19 +50,19 @@ public: op_() {} - virtual ~ReducePackInfo() {} + ~ReducePackInfo() override {} bool constantDataExchange() const { return false; } bool threadsafeReceiving() const { return false; } - virtual void safeCommunicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ); - virtual void packData ( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer ); - virtual void safeUnpackData ( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ); + void safeCommunicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ) override; + void packData ( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer ) override; + void safeUnpackData ( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; size_t getDataSize() const { return getSize() * sizeof(T); } protected: - virtual size_t initData( IBlock * receiver, stencil::Direction dir ); + size_t initData( IBlock * receiver, stencil::Direction dir ) override; const BlockDataID bdId_; const T init_; diff --git a/src/field/communication/StencilRestrictedMPIDatatypeInfo.h b/src/field/communication/StencilRestrictedMPIDatatypeInfo.h index 1150c76ff..118773540 100644 --- a/src/field/communication/StencilRestrictedMPIDatatypeInfo.h +++ b/src/field/communication/StencilRestrictedMPIDatatypeInfo.h @@ -39,26 +39,26 @@ class StencilRestrictedMPIDatatypeInfo : public walberla::communication::Uniform public: StencilRestrictedMPIDatatypeInfo( BlockDataID fieldID ) : fieldID_( fieldID ) {} - virtual ~StencilRestrictedMPIDatatypeInfo() {} + ~StencilRestrictedMPIDatatypeInfo() override {} - virtual shared_ptr<mpi::Datatype> getSendDatatype ( IBlock * block, const stencil::Direction dir ) + shared_ptr<mpi::Datatype> getSendDatatype ( IBlock * block, const stencil::Direction dir ) override { return make_shared<mpi::Datatype>( field::communication::mpiDatatypeSliceBeforeGhostlayerXYZ( *getField( block ), dir, uint_t( 1 ), getOptimizedCommunicationIndices( dir ), false ) ); } - virtual shared_ptr<mpi::Datatype> getRecvDatatype ( IBlock * block, const stencil::Direction dir ) + shared_ptr<mpi::Datatype> getRecvDatatype ( IBlock * block, const stencil::Direction dir ) override { return make_shared<mpi::Datatype>( field::communication::mpiDatatypeGhostLayerOnlyXYZ( *getField( block ), dir, false, getOptimizedCommunicationIndices( stencil::inverseDir[dir] ) ) ); } - virtual void * getSendPointer( IBlock * block, const stencil::Direction ) + void * getSendPointer( IBlock * block, const stencil::Direction ) override { return getField(block)->data(); } - virtual void * getRecvPointer( IBlock * block, const stencil::Direction ) + void * getRecvPointer( IBlock * block, const stencil::Direction ) override { return getField(block)->data(); } diff --git a/src/field/communication/StencilRestrictedPackInfo.h b/src/field/communication/StencilRestrictedPackInfo.h index 72e405845..824dd2bd1 100644 --- a/src/field/communication/StencilRestrictedPackInfo.h +++ b/src/field/communication/StencilRestrictedPackInfo.h @@ -47,18 +47,18 @@ class StencilRestrictedPackInfo : public walberla::communication::UniformPackInf { public: StencilRestrictedPackInfo( const BlockDataID & fieldId ) : fieldId_( fieldId ) {} - virtual ~StencilRestrictedPackInfo() {} + ~StencilRestrictedPackInfo() override {} - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } - void unpackData( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ); + void unpackData( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; - void communicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ); + void communicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ) override; protected: - void packDataImpl( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer ) const; + void packDataImpl( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer ) const override; const BlockDataID fieldId_; diff --git a/src/field/communication/UniformMPIDatatypeInfo.h b/src/field/communication/UniformMPIDatatypeInfo.h index 4734344c1..a586c04f5 100644 --- a/src/field/communication/UniformMPIDatatypeInfo.h +++ b/src/field/communication/UniformMPIDatatypeInfo.h @@ -39,26 +39,26 @@ public: UniformMPIDatatypeInfo( BlockDataID blockDataID, const uint_t numberOfGhostLayers ) : blockDataID_( blockDataID ), communicateAllGhostLayers_( false ), numberOfGhostLayers_( numberOfGhostLayers ) {} - virtual ~UniformMPIDatatypeInfo() {} + ~UniformMPIDatatypeInfo() override {} - virtual shared_ptr<mpi::Datatype> getSendDatatype ( IBlock * block, const stencil::Direction dir ) + shared_ptr<mpi::Datatype> getSendDatatype ( IBlock * block, const stencil::Direction dir ) override { auto numGl = numberOfGhostLayersToCommunicate( block ); return make_shared<mpi::Datatype>( mpiDatatypeSliceBeforeGhostlayer( *getField( block ), dir, numGl ) ); } - virtual shared_ptr<mpi::Datatype> getRecvDatatype ( IBlock * block, const stencil::Direction dir ) + shared_ptr<mpi::Datatype> getRecvDatatype ( IBlock * block, const stencil::Direction dir ) override { auto numGl = numberOfGhostLayersToCommunicate( block ); return make_shared<mpi::Datatype>( mpiDatatypeGhostLayerOnly( *getField(block), numGl, dir ) ); } - virtual void * getSendPointer( IBlock * block, const stencil::Direction ) + void * getSendPointer( IBlock * block, const stencil::Direction ) override { return getField(block)->data(); } - virtual void * getRecvPointer( IBlock * block, const stencil::Direction ) + void * getRecvPointer( IBlock * block, const stencil::Direction ) override { return getField(block)->data(); } diff --git a/src/field/communication/UniformPullReductionPackInfo.h b/src/field/communication/UniformPullReductionPackInfo.h index 71ceb7e8e..db8d21e6d 100644 --- a/src/field/communication/UniformPullReductionPackInfo.h +++ b/src/field/communication/UniformPullReductionPackInfo.h @@ -57,17 +57,17 @@ public: UniformPullReductionPackInfo( const BlockDataID & bdID, const uint_t numberOfGhostLayers ) : bdID_( bdID ), communicateAllGhostLayers_( false ), numberOfGhostLayers_( numberOfGhostLayers ) {} - virtual ~UniformPullReductionPackInfo() {} + ~UniformPullReductionPackInfo() override {} - bool constantDataExchange() const { return mpi::BufferSizeTrait<T>::constantSize; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return mpi::BufferSizeTrait<T>::constantSize; } + bool threadsafeReceiving() const override { return true; } - void unpackData(IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer); + void unpackData(IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer) override; - void communicateLocal(const IBlock * sender, IBlock * receiver, stencil::Direction dir); + void communicateLocal(const IBlock * sender, IBlock * receiver, stencil::Direction dir) override; protected: - void packDataImpl(const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer) const; + void packDataImpl(const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer) const override; uint_t numberOfGhostLayersToCommunicate( const GhostLayerField_T * const field ) const; diff --git a/src/field/distributors/DistributorCreators.h b/src/field/distributors/DistributorCreators.h index e87b907ce..ab555911c 100644 --- a/src/field/distributors/DistributorCreators.h +++ b/src/field/distributors/DistributorCreators.h @@ -65,7 +65,7 @@ public: blockStorage_( blockStorage ), distributionDestinationFieldID_( distributionDestinationFieldID ), flagFieldID_( flagFieldID ), cellsToEvaluate_( cellsToEvaluate ) {} - Distributor_T * initialize( IBlock * const block ) + Distributor_T * initialize( IBlock * const block ) override { typedef typename Distributor_T::BaseField_T DistributionDestinationField_T; typedef typename FlagField_T::flag_t flag_t; diff --git a/src/field/interpolators/FieldInterpolatorCreators.h b/src/field/interpolators/FieldInterpolatorCreators.h index 560df7879..760db9b7c 100644 --- a/src/field/interpolators/FieldInterpolatorCreators.h +++ b/src/field/interpolators/FieldInterpolatorCreators.h @@ -64,7 +64,7 @@ public: blockStorage_( blockStorage ), interpolatedFieldID_( interpolatedFieldID ), flagFieldID_( flagFieldID ), cellsToEvaluate_( cellsToEvaluate ) {} - Interpolator_T * initialize( IBlock * const block ) + Interpolator_T * initialize( IBlock * const block ) override { typedef typename Interpolator_T::BaseField_T InterpolatedField_T; typedef typename FlagField_T::flag_t flag_t; diff --git a/src/field/refinement/PackInfo.h b/src/field/refinement/PackInfo.h index bfc485289..5eff92966 100644 --- a/src/field/refinement/PackInfo.h +++ b/src/field/refinement/PackInfo.h @@ -39,25 +39,25 @@ class PackInfo : public blockforest::communication::NonUniformPackInfo public: PackInfo( const BlockDataID & fieldId ) : fieldId_( fieldId ) {} - virtual ~PackInfo() {} + ~PackInfo() override {} - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } - void unpackDataEqualLevel( Block * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ); - void communicateLocalEqualLevel( const Block * sender, Block * receiver, stencil::Direction dir ); + void unpackDataEqualLevel( Block * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; + void communicateLocalEqualLevel( const Block * sender, Block * receiver, stencil::Direction dir ) override; - void unpackDataCoarseToFine( Block * fineReceiver, const BlockID & coarseSender, stencil::Direction dir, mpi::RecvBuffer & buffer ); - void communicateLocalCoarseToFine( const Block * coarseSender, Block * fineReceiver, stencil::Direction dir ); + void unpackDataCoarseToFine( Block * fineReceiver, const BlockID & coarseSender, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; + void communicateLocalCoarseToFine( const Block * coarseSender, Block * fineReceiver, stencil::Direction dir ) override; - void unpackDataFineToCoarse( Block * coarseReceiver, const BlockID & fineSender, stencil::Direction dir, mpi::RecvBuffer & buffer ); - void communicateLocalFineToCoarse( const Block * fineSender, Block * coarseReceiver, stencil::Direction dir ); + void unpackDataFineToCoarse( Block * coarseReceiver, const BlockID & fineSender, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; + void communicateLocalFineToCoarse( const Block * fineSender, Block * coarseReceiver, stencil::Direction dir ) override; protected: - void packDataEqualLevelImpl( const Block * sender, stencil::Direction dir, mpi::SendBuffer & buffer ) const; - void packDataCoarseToFineImpl( const Block * coarseSender, const BlockID & fineReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const; - void packDataFineToCoarseImpl( const Block * fineSender, const BlockID & coarseReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const; + void packDataEqualLevelImpl( const Block * sender, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; + void packDataCoarseToFineImpl( const Block * coarseSender, const BlockID & fineReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; + void packDataFineToCoarseImpl( const Block * fineSender, const BlockID & coarseReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; /////////////////////////////////////////////////////////////////////// // Helper functions for determining packing/unpacking cell intervals // diff --git a/src/field/vtk/FlagFieldMapping.h b/src/field/vtk/FlagFieldMapping.h index 8b25ce58e..5bec31fbc 100644 --- a/src/field/vtk/FlagFieldMapping.h +++ b/src/field/vtk/FlagFieldMapping.h @@ -51,7 +51,7 @@ public: protected: - void configure() + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); flagField_ = this->block_->template getData< FlagField_T >( flagId_ ); @@ -64,7 +64,7 @@ protected: } } - T evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t /*f*/ ) + T evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t /*f*/ ) override { WALBERLA_ASSERT_NOT_NULLPTR( flagField_ ); T result = 0; diff --git a/src/field/vtk/VTKWriter.h b/src/field/vtk/VTKWriter.h index c83033fe8..2d6d5a769 100644 --- a/src/field/vtk/VTKWriter.h +++ b/src/field/vtk/VTKWriter.h @@ -112,12 +112,12 @@ public: protected: - void configure() { + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); field_ = this->block_->template getData< Field_T >( bdid_ ); } - OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { WALBERLA_ASSERT_NOT_NULLPTR( field_ ); diff --git a/src/geometry/bodies/DynamicBody.h b/src/geometry/bodies/DynamicBody.h index 8a0ecfd52..1ebd1670e 100644 --- a/src/geometry/bodies/DynamicBody.h +++ b/src/geometry/bodies/DynamicBody.h @@ -45,15 +45,15 @@ public: : body_(b) {} - virtual bool contains (const Vector3<real_t> & point ) const + bool contains (const Vector3<real_t> & point ) const override { return geometry::contains( body_, point ); } - virtual FastOverlapResult fastOverlapCheck ( const Vector3<real_t> & cellMidpoint, const Vector3<real_t> & dx ) const + FastOverlapResult fastOverlapCheck ( const Vector3<real_t> & cellMidpoint, const Vector3<real_t> & dx ) const override { return geometry::fastOverlapCheck( body_, cellMidpoint, dx ); } - virtual FastOverlapResult fastOverlapCheck ( const AABB & box ) const + FastOverlapResult fastOverlapCheck ( const AABB & box ) const override { return geometry::fastOverlapCheck( body_, box); } diff --git a/src/geometry/containment_octree/BranchNode.h b/src/geometry/containment_octree/BranchNode.h index fd5d95077..6246ba066 100644 --- a/src/geometry/containment_octree/BranchNode.h +++ b/src/geometry/containment_octree/BranchNode.h @@ -46,18 +46,18 @@ public: inline BranchNode( const shared_ptr<const DistanceObject> & distanceObject, const AABB & aabb, const Scalar epsilon, const uint_t maxDepth, const Scalar minAABBVolume ); - virtual ~BranchNode() { for( int i = 0; i < 8; ++i ) delete children_[i]; } + ~BranchNode() override { for( int i = 0; i < 8; ++i ) delete children_[i]; } - virtual inline bool contains( const Point & p ) const; + inline bool contains( const Point & p ) const override; - virtual inline uint_t height() const; - virtual inline uint_t numNodes() const; - virtual inline void numNodes( uint_t & numInside, uint_t & numOutside, uint_t & numIndeterminate, uint_t & numBranch ) const; - virtual void volumes( KahanAccumulator & insideVolume, KahanAccumulator & outsideVolume, KahanAccumulator & indeterminateVolume, Scalar volume ) const; - virtual uint_t numChildren() const { return 8; } + inline uint_t height() const override; + inline uint_t numNodes() const override; + inline void numNodes( uint_t & numInside, uint_t & numOutside, uint_t & numIndeterminate, uint_t & numBranch ) const override; + void volumes( KahanAccumulator & insideVolume, KahanAccumulator & outsideVolume, KahanAccumulator & indeterminateVolume, Scalar volume ) const override; + uint_t numChildren() const override { return 8; } const Point & center() const { return center_; } - virtual const Node<ContainmentOctreeT> * getChild( const uint_t idx ) const { WALBERLA_ASSERT_LESS( idx, 8 ); return children_[idx]; } + const Node<ContainmentOctreeT> * getChild( const uint_t idx ) const override { WALBERLA_ASSERT_LESS( idx, 8 ); return children_[idx]; } private: BranchNode( const BranchNode & other ); diff --git a/src/geometry/containment_octree/IndeterminateLeafNode.h b/src/geometry/containment_octree/IndeterminateLeafNode.h index 349d18369..252541b54 100644 --- a/src/geometry/containment_octree/IndeterminateLeafNode.h +++ b/src/geometry/containment_octree/IndeterminateLeafNode.h @@ -44,12 +44,12 @@ public: IndeterminateLeafNode( const shared_ptr<const DistanceObject> & distanceObject, const Scalar epsilon ) : distanceObject_( distanceObject ), sqEpsilon_( epsilon * epsilon ) { } - virtual ~IndeterminateLeafNode() {} + ~IndeterminateLeafNode() override {} - virtual bool contains( const Point & p ) const { return distanceObject_->sqSignedDistance(p) <= sqEpsilon_; } + bool contains( const Point & p ) const override { return distanceObject_->sqSignedDistance(p) <= sqEpsilon_; } - virtual void numNodes( uint_t & /*numInside*/, uint_t & /*numOutside*/, uint_t & numIndeterminate, uint_t & /*numBranch*/ ) const { ++numIndeterminate; } - virtual void volumes( KahanAccumulator & /*insideVolume*/, KahanAccumulator & /*outsideVolume*/, KahanAccumulator & indeterminateVolume, Scalar volume ) const { indeterminateVolume += volume; } + void numNodes( uint_t & /*numInside*/, uint_t & /*numOutside*/, uint_t & numIndeterminate, uint_t & /*numBranch*/ ) const override { ++numIndeterminate; } + void volumes( KahanAccumulator & /*insideVolume*/, KahanAccumulator & /*outsideVolume*/, KahanAccumulator & indeterminateVolume, Scalar volume ) const override { indeterminateVolume += volume; } protected: shared_ptr<const DistanceObject> distanceObject_; diff --git a/src/geometry/containment_octree/InsideLeafNode.h b/src/geometry/containment_octree/InsideLeafNode.h index f291a5c37..37ab61189 100644 --- a/src/geometry/containment_octree/InsideLeafNode.h +++ b/src/geometry/containment_octree/InsideLeafNode.h @@ -41,12 +41,12 @@ public: typedef typename LeafNode<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; - virtual ~InsideLeafNode() {} + ~InsideLeafNode() override {} - virtual bool contains( const Point & /*p*/ ) const { return true; } + bool contains( const Point & /*p*/ ) const override { return true; } - virtual void numNodes( uint_t & numInside, uint_t & /*numOutside*/, uint_t & /*numIndeterminate*/, uint_t & /*numBranch*/ ) const { ++numInside; } - virtual void volumes( KahanAccumulator & insideVolume, KahanAccumulator & /*outsideVolume*/, KahanAccumulator & /*indeterminateVolume*/, Scalar volume ) const { insideVolume += volume; } + void numNodes( uint_t & numInside, uint_t & /*numOutside*/, uint_t & /*numIndeterminate*/, uint_t & /*numBranch*/ ) const override { ++numInside; } + void volumes( KahanAccumulator & insideVolume, KahanAccumulator & /*outsideVolume*/, KahanAccumulator & /*indeterminateVolume*/, Scalar volume ) const override { insideVolume += volume; } }; diff --git a/src/geometry/containment_octree/LeafNode.h b/src/geometry/containment_octree/LeafNode.h index 57c1b6553..5adf0002c 100644 --- a/src/geometry/containment_octree/LeafNode.h +++ b/src/geometry/containment_octree/LeafNode.h @@ -42,13 +42,13 @@ public: typedef typename Node<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; - virtual ~LeafNode() {} + ~LeafNode() override {} - virtual uint_t height() const { return uint_t(0); } - virtual uint_t numNodes() const { return uint_t(0); } - virtual uint_t numChildren() const { return uint_t(0); } + uint_t height() const override { return uint_t(0); } + uint_t numNodes() const override { return uint_t(0); } + uint_t numChildren() const override { return uint_t(0); } - virtual const Node<ContainmentOctreeT> * getChild( const uint_t ) const { WALBERLA_ABORT("ContainmentOctree: You are requesting access to children of a Leaf Node!"); return 0; } + const Node<ContainmentOctreeT> * getChild( const uint_t ) const override { WALBERLA_ABORT("ContainmentOctree: You are requesting access to children of a Leaf Node!"); return 0; } }; diff --git a/src/geometry/containment_octree/OutsideLeafNode.h b/src/geometry/containment_octree/OutsideLeafNode.h index 2144b4e4d..cd7c03483 100644 --- a/src/geometry/containment_octree/OutsideLeafNode.h +++ b/src/geometry/containment_octree/OutsideLeafNode.h @@ -42,12 +42,12 @@ public: typedef typename LeafNode<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; - virtual ~OutsideLeafNode() {} + ~OutsideLeafNode() override {} - virtual bool contains( const Point & /*p*/ ) const { return false; } + bool contains( const Point & /*p*/ ) const override { return false; } - virtual void numNodes( uint_t & /*numInside*/, uint_t & numOutside, uint_t & /*numIndeterminate*/, uint_t & /*numBranch*/ ) const { ++numOutside; } - virtual void volumes( KahanAccumulator & /*insideVolume*/, KahanAccumulator & outsideVolume, KahanAccumulator & /*indeterminateVolume*/, Scalar volume ) const { outsideVolume += volume; } + void numNodes( uint_t & /*numInside*/, uint_t & numOutside, uint_t & /*numIndeterminate*/, uint_t & /*numBranch*/ ) const override { ++numOutside; } + void volumes( KahanAccumulator & /*insideVolume*/, KahanAccumulator & outsideVolume, KahanAccumulator & /*indeterminateVolume*/, Scalar volume ) const override { outsideVolume += volume; } }; diff --git a/src/geometry/initializer/BoundaryFromBody.h b/src/geometry/initializer/BoundaryFromBody.h index 0c5c696a9..1eb9e06b7 100644 --- a/src/geometry/initializer/BoundaryFromBody.h +++ b/src/geometry/initializer/BoundaryFromBody.h @@ -79,7 +79,7 @@ public: * The body parameters and the parameters for the boundary are read from configuration. * *****************************************************************************************************************/ - virtual void init( BlockStorage & , const Config::BlockHandle & blockHandle ) { return init(blockHandle); } + void init( BlockStorage & , const Config::BlockHandle & blockHandle ) override { return init(blockHandle); } void init( const Config::BlockHandle & blockHandle ); diff --git a/src/geometry/initializer/BoundaryFromCellInterval.h b/src/geometry/initializer/BoundaryFromCellInterval.h index 80355b49f..f2245274c 100644 --- a/src/geometry/initializer/BoundaryFromCellInterval.h +++ b/src/geometry/initializer/BoundaryFromCellInterval.h @@ -84,7 +84,7 @@ public: * The cell interval and the parameters for the boundary are read from configuration. * *****************************************************************************************************************/ - virtual void init( BlockStorage & , const Config::BlockHandle & blockHandle ) { return init(blockHandle); } + void init( BlockStorage & , const Config::BlockHandle & blockHandle ) override { return init(blockHandle); } void init( const Config::BlockHandle & blockHandle ); diff --git a/src/geometry/initializer/BoundaryFromDomainBorder.h b/src/geometry/initializer/BoundaryFromDomainBorder.h index 9fa993781..9329a72ad 100644 --- a/src/geometry/initializer/BoundaryFromDomainBorder.h +++ b/src/geometry/initializer/BoundaryFromDomainBorder.h @@ -80,7 +80,7 @@ public: void init ( const Config::BlockHandle & blockHandle ); - virtual void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ); + void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ) override; void init( FlagUID flagUID, stencil::Direction direction, diff --git a/src/geometry/initializer/BoundaryFromImage.h b/src/geometry/initializer/BoundaryFromImage.h index 9db375940..d19f4dcbe 100644 --- a/src/geometry/initializer/BoundaryFromImage.h +++ b/src/geometry/initializer/BoundaryFromImage.h @@ -97,7 +97,7 @@ namespace initializer { * Initializes the scalar field using parameters of config block * for syntax see class documentation *****************************************************************************************************************/ - virtual void init ( BlockStorage & , const Config::BlockHandle & block ) { init(block); } + void init ( BlockStorage & , const Config::BlockHandle & block ) override { init(block); } void init( const Config::BlockHandle & block ); diff --git a/src/geometry/initializer/BoundaryFromVoxelFile.h b/src/geometry/initializer/BoundaryFromVoxelFile.h index 6bef2c8c3..3b0640e33 100644 --- a/src/geometry/initializer/BoundaryFromVoxelFile.h +++ b/src/geometry/initializer/BoundaryFromVoxelFile.h @@ -88,7 +88,7 @@ class BoundaryFromVoxelFile : public Initializer public: BoundaryFromVoxelFile( const StructuredBlockStorage & structuredBlockStorage, BlockDataID & boundaryHandlerID ); - virtual void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ); + void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ) override; protected: diff --git a/src/geometry/initializer/OverlapFieldFromBody.h b/src/geometry/initializer/OverlapFieldFromBody.h index b12b9e2bc..0438b85e8 100644 --- a/src/geometry/initializer/OverlapFieldFromBody.h +++ b/src/geometry/initializer/OverlapFieldFromBody.h @@ -101,7 +101,7 @@ namespace initializer { * Interface implementation for Initializer - sets a body on a scalar field with options from configuration file * *****************************************************************************************************************/ - virtual void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ); + void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ) override; diff --git a/src/geometry/initializer/ScalarFieldFromBody.h b/src/geometry/initializer/ScalarFieldFromBody.h index ba8b72f9b..97ef3cc95 100644 --- a/src/geometry/initializer/ScalarFieldFromBody.h +++ b/src/geometry/initializer/ScalarFieldFromBody.h @@ -97,7 +97,7 @@ namespace initializer { * Interface implementation for Initializer - sets a body on a scalar field with options from configuration file * *****************************************************************************************************************/ - virtual void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ); + void init( BlockStorage & blockStorage, const Config::BlockHandle & blockHandle ) override; diff --git a/src/geometry/initializer/ScalarFieldFromGrayScaleImage.h b/src/geometry/initializer/ScalarFieldFromGrayScaleImage.h index f570c0f11..2664fba72 100644 --- a/src/geometry/initializer/ScalarFieldFromGrayScaleImage.h +++ b/src/geometry/initializer/ScalarFieldFromGrayScaleImage.h @@ -64,7 +64,7 @@ namespace initializer { * Initializes the scalar field using parameters of config block * for syntax see class documentation *****************************************************************************************************************/ - virtual void init ( BlockStorage & blockStorage, const Config::BlockHandle & block ); + void init ( BlockStorage & blockStorage, const Config::BlockHandle & block ) override; /*************************************************************************************************************//** diff --git a/src/geometry/structured/extern/lodepng.h b/src/geometry/structured/extern/lodepng.h index 404ae1ec4..bdc6e9465 100644 --- a/src/geometry/structured/extern/lodepng.h +++ b/src/geometry/structured/extern/lodepng.h @@ -808,7 +808,7 @@ class State : public LodePNGState public: State(); State(const State& other); - virtual ~State(); + ~State() override; State& operator=(const State& other); }; diff --git a/src/lbm/blockforest/PostProcessing.h b/src/lbm/blockforest/PostProcessing.h index 23644cddc..2cf49b9d9 100644 --- a/src/lbm/blockforest/PostProcessing.h +++ b/src/lbm/blockforest/PostProcessing.h @@ -377,24 +377,24 @@ public: pdfFieldId_( pdfFieldId ), filter_( filter ) {} - virtual ~MarkerData() {} + ~MarkerData() override {} - internal::MarkerField_T * initialize( IBlock * const ) { return allocate(); } + internal::MarkerField_T * initialize( IBlock * const ) override { return allocate(); } - void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ); + void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; - void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ); - void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ); + void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override; + void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; - internal::MarkerField_T * deserialize( IBlock * const ) { return allocate(); } + internal::MarkerField_T * deserialize( IBlock * const ) override { return allocate(); } - internal::MarkerField_T * deserializeCoarseToFine( Block * const ) { return allocate(); } - internal::MarkerField_T * deserializeFineToCoarse( Block * const ) { return allocate(); } + internal::MarkerField_T * deserializeCoarseToFine( Block * const ) override { return allocate(); } + internal::MarkerField_T * deserializeFineToCoarse( Block * const ) override { return allocate(); } - void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ); + void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; - void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ); - void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ); + void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; + void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) override; protected: diff --git a/src/lbm/communication/SparsePdfFieldPackInfo.h b/src/lbm/communication/SparsePdfFieldPackInfo.h index 6b4a86af6..d1fb17a88 100644 --- a/src/lbm/communication/SparsePdfFieldPackInfo.h +++ b/src/lbm/communication/SparsePdfFieldPackInfo.h @@ -68,18 +68,18 @@ public: SparsePdfFieldPackInfo( const BlockDataID & pdfFieldId, const BlockDataID & flagFieldId, FlagUID flag, bool flagFieldConstant ) : pdfFieldId_( pdfFieldId ), flagFieldId_( flagFieldId ), flag_( flag ), flagFieldConstant_( flagFieldConstant ) {} - virtual ~SparsePdfFieldPackInfo() {} + ~SparsePdfFieldPackInfo() override {} - bool constantDataExchange() const { return flagFieldConstant_; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return flagFieldConstant_; } + bool threadsafeReceiving() const override { return true; } - void unpackData( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ); + void unpackData( IBlock * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; - void communicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ); + void communicateLocal( const IBlock * sender, IBlock * receiver, stencil::Direction dir ) override; protected: - void packDataImpl( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer ) const; + void packDataImpl( const IBlock * sender, stencil::Direction dir, mpi::SendBuffer & outBuffer ) const override; BlockDataID pdfFieldId_; diff --git a/src/lbm/field/AddToStorage.h b/src/lbm/field/AddToStorage.h index 3cf80dc43..287673ad4 100644 --- a/src/lbm/field/AddToStorage.h +++ b/src/lbm/field/AddToStorage.h @@ -50,37 +50,37 @@ public: initialize_( _initialize ), initialVelocity_( initialVelocity ), initialDensity_( initialDensity ), nrOfGhostLayers_( nrOfGhostLayers ), layout_( layout ) {} - inline void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) + inline void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override { packLatticeModel( block, id, buffer ); Base_T::serialize( block, id, buffer ); } - void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) + void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override { packLatticeModel( block, id, buffer ); Base_T::serializeCoarseToFine( block, id, buffer, child ); } - void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) + void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override { packLatticeModel( block, id, buffer ); Base_T::serializeFineToCoarse( block, id, buffer ); } - void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) + void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override { unpackLatticeModel( block, id, buffer ); Base_T::deserialize( block, id, buffer ); } - void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) + void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override { unpackLatticeModel( block, id, buffer ); Base_T::deserializeCoarseToFine( block, id, buffer ); } - void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) + void deserializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer, const uint_t child ) override { unpackLatticeModel( block, id, buffer ); Base_T::deserializeFineToCoarse( block, id, buffer, child ); @@ -88,12 +88,12 @@ public: protected: - PdfField<LatticeModel_T> * allocate( IBlock * const block ) + PdfField<LatticeModel_T> * allocate( IBlock * const block ) override { return allocateDispatch( block, initialize_, initialDensity_ ); } - PdfField<LatticeModel_T> * reallocate( IBlock * const block ) + PdfField<LatticeModel_T> * reallocate( IBlock * const block ) override { #ifdef NDEBUG return allocateDispatch( block, false, initialDensity_ ); diff --git a/src/lbm/field/PdfField.h b/src/lbm/field/PdfField.h index 5b4429877..5c84593f4 100644 --- a/src/lbm/field/PdfField.h +++ b/src/lbm/field/PdfField.h @@ -104,7 +104,7 @@ public: const uint_t ghostLayers = uint_t(1), const field::Layout & _layout = field::zyxf, const shared_ptr< field::FieldAllocator<real_t> > & alloc = shared_ptr< field::FieldAllocator<real_t> >() ); - virtual ~PdfField() {} + ~PdfField() override {} @@ -282,7 +282,7 @@ protected: /*! \name Shallow Copy */ //@{ inline PdfField( const PdfField< LatticeModel_T > & other ); - Field< real_t, Stencil::Size > * cloneShallowCopyInternal() const { return new PdfField< LatticeModel_T >( *this ); } + Field< real_t, Stencil::Size > * cloneShallowCopyInternal() const override { return new PdfField< LatticeModel_T >( *this ); } //@} //******************************************************************************************************************* diff --git a/src/lbm/geometry/initializer/PoiseuilleInitializer.h b/src/lbm/geometry/initializer/PoiseuilleInitializer.h index 4315bed9c..8f8898556 100644 --- a/src/lbm/geometry/initializer/PoiseuilleInitializer.h +++ b/src/lbm/geometry/initializer/PoiseuilleInitializer.h @@ -93,7 +93,7 @@ namespace initializer { field::FlagUID pressureFlag1, field::FlagUID pressureFlag2 ); - virtual void init( BlockStorage & , const Config::BlockHandle & blockHandle ) { init( blockHandle ); } + void init( BlockStorage & , const Config::BlockHandle & blockHandle ) override { init( blockHandle ); } void init( const Config::BlockHandle & blockHandle ); void init( Scenario scenario, BoundaryType boundaryType, real_t pressureDiff, Axis flowAxis, Axis parabolaAxis = INVALID_AXIS ); diff --git a/src/lbm/lattice_model/D2Q9.h b/src/lbm/lattice_model/D2Q9.h index a4080f3bc..8cb9a2d7d 100644 --- a/src/lbm/lattice_model/D2Q9.h +++ b/src/lbm/lattice_model/D2Q9.h @@ -63,11 +63,11 @@ public: static_assert( (std::is_same< ForceModel_T, force_model::None >::value), "This constructor is only available if the force model is equal to force_model::None!" ); } - virtual ~D2Q9() {} + ~D2Q9() override {} protected: - virtual void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) {} + void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) override {} }; template< typename CM, bool C, typename FM, int EAO > const char* D2Q9<CM,C,FM,EAO>::NAME = "D2Q9"; diff --git a/src/lbm/lattice_model/D3Q15.h b/src/lbm/lattice_model/D3Q15.h index e969749a4..d900451dc 100644 --- a/src/lbm/lattice_model/D3Q15.h +++ b/src/lbm/lattice_model/D3Q15.h @@ -62,11 +62,11 @@ public: static_assert( (std::is_same< ForceModel_T, force_model::None >::value), "This constructor is only available if the force model is equal to force_model::None!" ); } - virtual ~D3Q15() {} + ~D3Q15() override {} protected: - virtual void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) {} + void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) override {} }; template< typename CM, bool C, typename FM, int EAO > const char* D3Q15<CM,C,FM,EAO>::NAME = "D3Q15"; diff --git a/src/lbm/lattice_model/D3Q19.h b/src/lbm/lattice_model/D3Q19.h index e196e4ede..8005ab3a9 100644 --- a/src/lbm/lattice_model/D3Q19.h +++ b/src/lbm/lattice_model/D3Q19.h @@ -61,11 +61,11 @@ public: static_assert( (std::is_same< ForceModel_T, force_model::None >::value), "This constructor is only available if the force model is equal to force_model::None!" ); } - virtual ~D3Q19() {} + ~D3Q19() override {} protected: - virtual void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) {} + void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) override {} }; template< typename CM, bool C, typename FM, int EAO > const char* D3Q19<CM,C,FM,EAO>::NAME = "D3Q19"; diff --git a/src/lbm/lattice_model/D3Q27.h b/src/lbm/lattice_model/D3Q27.h index 72b5188f5..fbf9b0db4 100644 --- a/src/lbm/lattice_model/D3Q27.h +++ b/src/lbm/lattice_model/D3Q27.h @@ -64,11 +64,11 @@ public: static_assert( (std::is_same< ForceModel_T, force_model::None >::value), "This constructor is only available if the force model is equal to force_model::None!" ); } - virtual ~D3Q27() {} + ~D3Q27() override {} protected: - virtual void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) {} + void config( IBlock & /*block*/, StructuredBlockStorage & /*sbs*/ ) override {} }; template< typename CM, bool C, typename FM, int EAO > const char* D3Q27<CM,C,FM,EAO>::NAME = "D3Q27"; diff --git a/src/lbm/refinement/PdfFieldPackInfo.h b/src/lbm/refinement/PdfFieldPackInfo.h index 6fbfb9221..a423888c9 100644 --- a/src/lbm/refinement/PdfFieldPackInfo.h +++ b/src/lbm/refinement/PdfFieldPackInfo.h @@ -60,31 +60,31 @@ public: equalLevelCells_( equalLevelCells() ) {} #endif - virtual ~PdfFieldPackInfo() {} + ~PdfFieldPackInfo() override {} - bool optimizedEqualLevelCommunication() const { return optimizedEqualLevelCommunication_; } - void optimizeEqualLevelCommunication( const bool value = true ) { optimizedEqualLevelCommunication_ = value; } + bool optimizedEqualLevelCommunication() const override { return optimizedEqualLevelCommunication_; } + void optimizeEqualLevelCommunication( const bool value = true ) override { optimizedEqualLevelCommunication_ = value; } - bool optimizedForLinearExplosion() const { return optimizedForLinearExplosion_; } - void optimizeForLinearExplosion( const bool value = true ) { optimizedForLinearExplosion_ = value; } + bool optimizedForLinearExplosion() const override { return optimizedForLinearExplosion_; } + void optimizeForLinearExplosion( const bool value = true ) override { optimizedForLinearExplosion_ = value; } - bool constantDataExchange() const { return true; } - bool threadsafeReceiving() const { return true; } + bool constantDataExchange() const override { return true; } + bool threadsafeReceiving() const override { return true; } - void unpackDataEqualLevel( Block * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ); - void communicateLocalEqualLevel( const Block * sender, Block * receiver, stencil::Direction dir ); + void unpackDataEqualLevel( Block * receiver, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; + void communicateLocalEqualLevel( const Block * sender, Block * receiver, stencil::Direction dir ) override; - void unpackDataCoarseToFine( Block * fineReceiver, const BlockID & coarseSender, stencil::Direction dir, mpi::RecvBuffer & buffer ); - void communicateLocalCoarseToFine( const Block * coarseSender, Block * fineReceiver, stencil::Direction dir ); + void unpackDataCoarseToFine( Block * fineReceiver, const BlockID & coarseSender, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; + void communicateLocalCoarseToFine( const Block * coarseSender, Block * fineReceiver, stencil::Direction dir ) override; - void unpackDataFineToCoarse( Block * coarseReceiver, const BlockID & fineSender, stencil::Direction dir, mpi::RecvBuffer & buffer ); - void communicateLocalFineToCoarse( const Block * fineSender, Block * coarseReceiver, stencil::Direction dir ); + void unpackDataFineToCoarse( Block * coarseReceiver, const BlockID & fineSender, stencil::Direction dir, mpi::RecvBuffer & buffer ) override; + void communicateLocalFineToCoarse( const Block * fineSender, Block * coarseReceiver, stencil::Direction dir ) override; protected: - void packDataEqualLevelImpl( const Block * sender, stencil::Direction dir, mpi::SendBuffer & buffer ) const; - void packDataCoarseToFineImpl( const Block * coarseSender, const BlockID & fineReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const; - void packDataFineToCoarseImpl( const Block * fineSender, const BlockID & coarseReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const; + void packDataEqualLevelImpl( const Block * sender, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; + void packDataCoarseToFineImpl( const Block * coarseSender, const BlockID & fineReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; + void packDataFineToCoarseImpl( const Block * fineSender, const BlockID & coarseReceiver, stencil::Direction dir, mpi::SendBuffer & buffer ) const override; /////////////////////////////////////////////////////////////////////// // Helper functions for determining packing/unpacking cell intervals // diff --git a/src/lbm/vtk/Density.h b/src/lbm/vtk/Density.h index 387086fe6..6180e5918 100644 --- a/src/lbm/vtk/Density.h +++ b/src/lbm/vtk/Density.h @@ -43,9 +43,9 @@ public: protected: - void configure() { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } - OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t /*f*/ ) + OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t /*f*/ ) override { WALBERLA_ASSERT_NOT_NULLPTR( pdf_ ); return numeric_cast< OutputType >( pdf_->getDensity(x,y,z) ); diff --git a/src/lbm/vtk/NonEquilibrium.h b/src/lbm/vtk/NonEquilibrium.h index c8699c43e..d137553b3 100644 --- a/src/lbm/vtk/NonEquilibrium.h +++ b/src/lbm/vtk/NonEquilibrium.h @@ -49,9 +49,9 @@ public: protected: - void configure() { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } - OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { WALBERLA_ASSERT_NOT_NULLPTR( pdf_ ); diff --git a/src/lbm/vtk/Velocity.h b/src/lbm/vtk/Velocity.h index 6fb513745..d7e24acf3 100644 --- a/src/lbm/vtk/Velocity.h +++ b/src/lbm/vtk/Velocity.h @@ -43,9 +43,9 @@ public: protected: - void configure() { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } - OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { WALBERLA_ASSERT_NOT_NULLPTR( pdf_ ); return numeric_cast< OutputType >( (pdf_->getVelocity(x,y,z))[ uint_c(f) ] ); @@ -70,9 +70,9 @@ public: protected: - void configure() { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); pdf_ = this->block_->template getData< PdfField_T >( bdid_ ); } - OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t /*f*/ ) + OutputType evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t /*f*/ ) override { WALBERLA_ASSERT_NOT_NULLPTR( pdf_ ); return numeric_cast< OutputType >( pdf_->getVelocity(x,y,z).length() ); diff --git a/src/mesa_pd/data/ParticleAccessor.h b/src/mesa_pd/data/ParticleAccessor.h index 4ebdcd135..62c61f6f7 100644 --- a/src/mesa_pd/data/ParticleAccessor.h +++ b/src/mesa_pd/data/ParticleAccessor.h @@ -47,7 +47,7 @@ class ParticleAccessor : public IAccessor { public: ParticleAccessor(const std::shared_ptr<data::ParticleStorage>& ps) : ps_(ps) {} - virtual ~ParticleAccessor() = default; + ~ParticleAccessor() override = default; walberla::id_t const & getUid(const size_t p_idx) const {return ps_->getUid(p_idx);} walberla::id_t& getUidRef(const size_t p_idx) {return ps_->getUidRef(p_idx);} void setUid(const size_t p_idx, walberla::id_t const & v) { ps_->setUid(p_idx, v);} @@ -220,7 +220,7 @@ inline size_t ParticleAccessor::find(const id_t& uid) class SingleParticleAccessor : public IAccessor { public: - virtual ~SingleParticleAccessor() = default; + ~SingleParticleAccessor() override = default; walberla::id_t const & getUid(const size_t /*p_idx*/) const {return uid_;} void setUid(const size_t /*p_idx*/, walberla::id_t const & v) { uid_ = v;} walberla::id_t& getUidRef(const size_t /*p_idx*/) {return uid_;} diff --git a/src/mesa_pd/domain/BlockForestDataHandling.h b/src/mesa_pd/domain/BlockForestDataHandling.h index 2fae4d119..26eba6625 100644 --- a/src/mesa_pd/domain/BlockForestDataHandling.h +++ b/src/mesa_pd/domain/BlockForestDataHandling.h @@ -68,22 +68,22 @@ class BlockForestDataHandling: public blockforest::BlockDataHandling<internal::P { public: BlockForestDataHandling(const std::shared_ptr<data::ParticleStorage>& ps) : ps_(ps) {} - virtual ~BlockForestDataHandling() {} + ~BlockForestDataHandling() override {} - virtual internal::ParticleDeleter* initialize( IBlock * const block ) override; + internal::ParticleDeleter* initialize( IBlock * const block ) 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; + void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; + internal::ParticleDeleter* deserialize( IBlock * const block ) override; + 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 ) override; - virtual void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; + void serializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer, const uint_t child ) override; + void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; - virtual internal::ParticleDeleter* deserializeCoarseToFine( Block * const block ) override; - virtual internal::ParticleDeleter* deserializeFineToCoarse( Block * const block ) override; + internal::ParticleDeleter* deserializeCoarseToFine( Block * const block ) override; + internal::ParticleDeleter* deserializeFineToCoarse( Block * const block ) 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; + void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; + 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/mesa_pd/vtk/ConvexPolyhedron/data_sources/DataSourceAdapters.h b/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/DataSourceAdapters.h index 2db947f38..83ec881c3 100644 --- a/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/DataSourceAdapters.h +++ b/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/DataSourceAdapters.h @@ -46,11 +46,11 @@ public: vertexDataSource_(vertexDataSource), vertexToParticleIdxManager_(vertexToParticleIdxManager), ps_(ps) { } - virtual void getData(const MeshType & mesh, const Vertices & vertices, std::vector<T> & data) { + void getData(const MeshType & mesh, const Vertices & vertices, std::vector<T> & data) override { return vertexDataSource_->getData( mesh, vertices, data, vertexToParticleIdxManager_, ps_ ); }; - virtual uint_t numComponents() { return vertexDataSource_->numComponents(); } + uint_t numComponents() override { return vertexDataSource_->numComponents(); } protected: shared_ptr<VertexDataSource<MeshType, T>> vertexDataSource_; @@ -75,11 +75,11 @@ public: faceDataSource_(faceDataSource), faceToParticleIdxManager_(faceToParticleIdxManager), ps_(std::move(ps)) { } - virtual void getData(const MeshType & mesh, const Faces & faces, std::vector<T> & data) { + void getData(const MeshType & mesh, const Faces & faces, std::vector<T> & data) override { return faceDataSource_->getData( mesh, faces, data, faceToParticleIdxManager_, ps_ ); }; - virtual uint_t numComponents() { return faceDataSource_->numComponents(); } + uint_t numComponents() override { return faceDataSource_->numComponents(); } protected: shared_ptr<FaceDataSource<MeshType, T>> faceDataSource_; diff --git a/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/OutputSelectorFaceDataSource.h b/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/OutputSelectorFaceDataSource.h index 02c5fec6b..9285d7a47 100644 --- a/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/OutputSelectorFaceDataSource.h +++ b/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/OutputSelectorFaceDataSource.h @@ -44,14 +44,14 @@ public: OutputSelectorFaceDataSource(const std::string& name, Selector selector) : Base(name), selector_(selector) { } - virtual uint_t numComponents() { + uint_t numComponents() override { return uint_t(1); } using Base::getData; - virtual void getData( const MeshType &, const Faces & faces, std::vector<Type> & data, + void getData( const MeshType &, const Faces & faces, std::vector<Type> & data, const ParticleIdxFacePropertyManager<MeshType> & faceToParticleIdxManager, - shared_ptr<walberla::mesa_pd::data::ParticleStorage> ps) { + shared_ptr<walberla::mesa_pd::data::ParticleStorage> ps) override { for (const auto & face: faces) { size_t particleIdx = faceToParticleIdxManager[face]; auto p = (*ps)[particleIdx]; diff --git a/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/SurfaceVelocityVertexDataSource.h b/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/SurfaceVelocityVertexDataSource.h index 2b27499a2..821fc269c 100644 --- a/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/SurfaceVelocityVertexDataSource.h +++ b/src/mesa_pd/vtk/ConvexPolyhedron/data_sources/SurfaceVelocityVertexDataSource.h @@ -38,14 +38,14 @@ public: SurfaceVelocityVertexDataSource(const std::string& name, const Accessor & ac) : Base(name), ac_(ac) { } - virtual uint_t numComponents() { + uint_t numComponents() override { return uint_t(3); } using Base::getData; - virtual void getData( const MeshType & mesh, const Vertices & vertices, std::vector<Type> & data, + void getData( const MeshType & mesh, const Vertices & vertices, std::vector<Type> & data, const ParticleIdxVertexPropertyManager<MeshType> & vertexToParticleIdxManager, - shared_ptr<walberla::mesa_pd::data::ParticleStorage>) { + shared_ptr<walberla::mesa_pd::data::ParticleStorage>) override { for (const auto & vertex: vertices) { size_t particleIdx = vertexToParticleIdxManager[vertex]; auto vertexPosition = mesh::toWalberlaNumericCast<real_t>(mesh.point(vertex)); diff --git a/src/mesh/boundary/BoundaryUIDFaceDataSource.h b/src/mesh/boundary/BoundaryUIDFaceDataSource.h index e3159c841..9a5d66187 100644 --- a/src/mesh/boundary/BoundaryUIDFaceDataSource.h +++ b/src/mesh/boundary/BoundaryUIDFaceDataSource.h @@ -43,8 +43,8 @@ public: { } - virtual uint_t numComponents() { return uint_t(1); } - virtual void getData( const MeshType & /*mesh*/, const Faces & faces, std::vector<value_type> & data ) + uint_t numComponents() override { return uint_t(1); } + void getData( const MeshType & /*mesh*/, const Faces & faces, std::vector<value_type> & data ) override { data.reserve( faces.size() ); diff --git a/src/mesh/pe/rigid_body/ConvexPolyhedron.h b/src/mesh/pe/rigid_body/ConvexPolyhedron.h index fcd74b627..539bc78ca 100644 --- a/src/mesh/pe/rigid_body/ConvexPolyhedron.h +++ b/src/mesh/pe/rigid_body/ConvexPolyhedron.h @@ -74,7 +74,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~ConvexPolyhedron(); + ~ConvexPolyhedron() override; //@} //********************************************************************************************** //********************************************************************************************** @@ -86,7 +86,7 @@ public: //**Get functions******************************************************************************* /*!\name Get functions */ //@{ - virtual real_t getVolume() const; + real_t getVolume() const override; real_t getSurfaceArea() const; const TriangleMesh & getMesh() const { return mesh_; } //@} @@ -102,15 +102,15 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual Vec3 support( const Vec3& d ) const; - inline virtual Vec3 supportContactThreshold( const Vec3& d ) const; + inline Vec3 support( const Vec3& d ) const override; + inline Vec3 supportContactThreshold( const Vec3& d ) const override; //@} //********************************************************************************************** @@ -118,15 +118,15 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + void calcBoundingBox() override; // Calculation of the axis-aligned bounding box virtual TriangleMesh::VertexHandle supportVertex( const TriangleMesh::Normal & d, const TriangleMesh::VertexHandle startVertex ) const; //@} //********************************************************************************************** diff --git a/src/mesh_common/QHull.h b/src/mesh_common/QHull.h index 160d3e8a0..c1c41ecf4 100644 --- a/src/mesh_common/QHull.h +++ b/src/mesh_common/QHull.h @@ -164,15 +164,15 @@ public: QHullPointDataSource( const QHull<MeshType> & qhull ) : qhull_( qhull ) {} - virtual std::vector< Attributes > getAttributes() const + std::vector< Attributes > getAttributes() const override { std::vector< Attributes > attributes; attributes.push_back( Attributes("Int32", "index", uint_t(1)) ); return attributes; } - virtual std::vector< Vector3< real_t > > getPoints() { return points_; } - virtual void configure() + std::vector< Vector3< real_t > > getPoints() override { return points_; } + void configure() override { points_.clear(); indices_.clear(); @@ -185,12 +185,12 @@ public: } }; - virtual void push( std::ostream& os, const uint_t /*data*/, const uint_t point, const uint_t /*component*/ ) + void push( std::ostream& os, const uint_t /*data*/, const uint_t point, const uint_t /*component*/ ) override { os << indices_[point]; }; - virtual void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t /*component*/ ) + void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t /*component*/ ) override { b64 << indices_[point]; }; diff --git a/src/mesh_common/distance_octree/BranchNode.h b/src/mesh_common/distance_octree/BranchNode.h index cf2c2b192..90d03d494 100644 --- a/src/mesh_common/distance_octree/BranchNode.h +++ b/src/mesh_common/distance_octree/BranchNode.h @@ -50,24 +50,24 @@ public: BranchNode( const shared_ptr< TriangleDistance<MeshType> > & triDistance, InputIterator beginFh, InputIterator endFh, uint_t maxDepth, uint_t minNumTriangles ); - virtual ~BranchNode() { for( int i = 0; i < 8; ++i ) delete children_[i]; } + ~BranchNode() override { for( int i = 0; i < 8; ++i ) delete children_[i]; } - virtual Scalar sqSignedDistance( const Point & p ) const; - virtual Scalar sqSignedDistance( const Point & p, FaceHandle & closestTriangle ) const; - virtual Scalar sqSignedDistance( const Point & p, Point & closestPoint ) const ; - virtual Scalar sqSignedDistance( const Point & p, Point & closestPoint, Normal & normal ) const; + Scalar sqSignedDistance( const Point & p ) const override; + Scalar sqSignedDistance( const Point & p, FaceHandle & closestTriangle ) const override; + Scalar sqSignedDistance( const Point & p, Point & closestPoint ) const override ; + Scalar sqSignedDistance( const Point & p, Point & closestPoint, Normal & normal ) const override; - virtual Scalar sqDistance( const Point & p ) const; - virtual Scalar sqDistance( const Point & p, FaceHandle & closestTriangle ) const; - virtual Scalar sqDistance( const Point & p, Point & closestPoint ) const; - virtual Scalar sqDistance( const Point & p, Point & closestPoint, Normal & normal ) const; + Scalar sqDistance( const Point & p ) const override; + Scalar sqDistance( const Point & p, FaceHandle & closestTriangle ) const override; + Scalar sqDistance( const Point & p, Point & closestPoint ) const override; + Scalar sqDistance( const Point & p, Point & closestPoint, Normal & normal ) const override; - inline uint_t numTriangles() const; - void numTrianglesToStream( std::ostream & os, const uint_t level ) const; - inline virtual uint_t height() const; - virtual uint_t numChildren() const { return uint_t(8); }; - virtual const Node<MeshType> * getChild( const uint_t idx ) const { WALBERLA_ASSERT_LESS( idx, 8 ); return children_[idx]; }; + inline uint_t numTriangles() const override; + void numTrianglesToStream( std::ostream & os, const uint_t level ) const override; + inline uint_t height() const override; + uint_t numChildren() const override { return uint_t(8); }; + const Node<MeshType> * getChild( const uint_t idx ) const override { WALBERLA_ASSERT_LESS( idx, 8 ); return children_[idx]; }; private: BranchNode( const BranchNode & other ); diff --git a/src/mesh_common/distance_octree/LeafNode.h b/src/mesh_common/distance_octree/LeafNode.h index c5a652775..06d5a15f5 100644 --- a/src/mesh_common/distance_octree/LeafNode.h +++ b/src/mesh_common/distance_octree/LeafNode.h @@ -42,21 +42,21 @@ public: LeafNode( const shared_ptr< TriangleDistance<MeshType> > & triDistance, const std::vector<FaceHandle> & triangles ) : Node<MeshType>( triDistance->getMesh(), triangles.begin(), triangles.end() ), triangles_( triangles ), triDistance_( triDistance ) { } - virtual Scalar sqSignedDistance( const Point & p ) const; - virtual Scalar sqSignedDistance( const Point & p, FaceHandle & closestTriangle ) const; - virtual Scalar sqSignedDistance( const Point & p, Point & closestPoint ) const; - virtual Scalar sqSignedDistance( const Point & p, Point & closestPoint, Normal & normal ) const; - - virtual Scalar sqDistance( const Point & p ) const; - virtual Scalar sqDistance( const Point & p, FaceHandle & closestTriangle ) const; - virtual Scalar sqDistance( const Point & p, Point & closestPoint ) const; - virtual Scalar sqDistance( const Point & p, Point & closestPoint, Normal & normal ) const; - - uint_t numTriangles() const { return uint_c( triangles_.size() ); } - void numTrianglesToStream( std::ostream & os, const uint_t level ) const; - virtual uint_t height() const { return 0; } - virtual uint_t numChildren() const { return 0; }; - virtual const Node<MeshType> * getChild( const uint_t /*idx*/ ) const { WALBERLA_ABORT("DistanceOctree: You are requesting access to children of a Leaf Node!"); return 0; } + Scalar sqSignedDistance( const Point & p ) const override; + Scalar sqSignedDistance( const Point & p, FaceHandle & closestTriangle ) const override; + Scalar sqSignedDistance( const Point & p, Point & closestPoint ) const override; + Scalar sqSignedDistance( const Point & p, Point & closestPoint, Normal & normal ) const override; + + Scalar sqDistance( const Point & p ) const override; + Scalar sqDistance( const Point & p, FaceHandle & closestTriangle ) const override; + Scalar sqDistance( const Point & p, Point & closestPoint ) const override; + Scalar sqDistance( const Point & p, Point & closestPoint, Normal & normal ) const override; + + uint_t numTriangles() const override { return uint_c( triangles_.size() ); } + void numTrianglesToStream( std::ostream & os, const uint_t level ) const override; + uint_t height() const override { return 0; } + uint_t numChildren() const override { return 0; }; + const Node<MeshType> * getChild( const uint_t /*idx*/ ) const override { WALBERLA_ABORT("DistanceOctree: You are requesting access to children of a Leaf Node!"); return 0; } protected: std::vector<FaceHandle> triangles_; diff --git a/src/mesh_common/vtk/CommonDataSources.h b/src/mesh_common/vtk/CommonDataSources.h index 304f425a9..bb8d69766 100644 --- a/src/mesh_common/vtk/CommonDataSources.h +++ b/src/mesh_common/vtk/CommonDataSources.h @@ -183,8 +183,8 @@ public: ColorFaceDataSource( const std::string & _name = "color" ) : VTKMeshWriter<MeshType>::template FaceDataSource< uint8_t >( _name ) {} - virtual uint_t numComponents() { return uint_t(3); } - virtual void getData( const MeshType & mesh, const Faces & faces, std::vector<value_type> & data ) + uint_t numComponents() override { return uint_t(3); } + void getData( const MeshType & mesh, const Faces & faces, std::vector<value_type> & data ) override { WALBERLA_CHECK( mesh.has_face_colors(), "Cannot write face colors, because the faces do not have them!" ); @@ -211,8 +211,8 @@ public: ColorVertexDataSource( const std::string & _name = "color" ) : VTKMeshWriter<MeshType>::template VertexDataSource< uint8_t >( _name ) {} - virtual uint_t numComponents() { return uint_t(3); } - virtual void getData( const MeshType & mesh, const Vertices & vertices, std::vector<value_type> & data ) + uint_t numComponents() override { return uint_t(3); } + void getData( const MeshType & mesh, const Vertices & vertices, std::vector<value_type> & data ) override { WALBERLA_CHECK( mesh.has_vertex_colors(), "Cannot write vertex colors, because the vertices do not have them!" ); diff --git a/src/mesh_common/vtk/VTKMeshWriter.h b/src/mesh_common/vtk/VTKMeshWriter.h index 1cbac3eed..df16ee595 100644 --- a/src/mesh_common/vtk/VTKMeshWriter.h +++ b/src/mesh_common/vtk/VTKMeshWriter.h @@ -68,7 +68,7 @@ public: typedef typename VTKMeshWriter::Vertices Vertices; VertexDataSource( const std::string & _name ) : DataSource<T>( _name ) { } - virtual ~VertexDataSource() = default; + ~VertexDataSource() override = default; virtual void getData( const MeshType &, const Vertices & vertices, std::vector<T> & ) = 0; }; @@ -80,7 +80,7 @@ public: typedef typename VTKMeshWriter::Faces Faces; FaceDataSource( const std::string & _name ) : DataSource<T>( _name ) { } - virtual ~FaceDataSource() = default; + ~FaceDataSource() override = default; virtual void getData( const MeshType &, const Faces & faces, std::vector<T> & ) = 0; }; diff --git a/src/pe/bg/SimpleBGDataHandling.h b/src/pe/bg/SimpleBGDataHandling.h index 7b31e020b..79535c82b 100644 --- a/src/pe/bg/SimpleBGDataHandling.h +++ b/src/pe/bg/SimpleBGDataHandling.h @@ -30,7 +30,7 @@ namespace bg { class SimpleBGDataHandling : public blockforest::AlwaysInitializeBlockDataHandling<SimpleBG>{ public: - SimpleBG * initialize( IBlock * const /*block*/ ) {return new SimpleBG();} + SimpleBG * initialize( IBlock * const /*block*/ ) override {return new SimpleBG();} }; inline diff --git a/src/pe/ccd/HashGrids.h b/src/pe/ccd/HashGrids.h index 24ecec304..e3a7e7f42 100644 --- a/src/pe/ccd/HashGrids.h +++ b/src/pe/ccd/HashGrids.h @@ -277,7 +277,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - ~HashGrids(); + ~HashGrids() override; //@} //********************************************************************************************** @@ -286,7 +286,7 @@ public: //@{ inline void add ( BodyID body ); void remove( BodyID body ); - inline int getObservedBodyCount() const { return observedBodyCount_ + static_cast<int> (globalStorage_.size()); } + inline int getObservedBodyCount() const override { return observedBodyCount_ + static_cast<int> (globalStorage_.size()); } //@} //********************************************************************************************** @@ -294,12 +294,12 @@ public: /*!\name Utility functions */ //@{ void clear (); - void reloadBodies(); + void reloadBodies() override; //@} //********************************************************************************************** //**Implementation of ICCD interface ******************************************************** - virtual PossibleContacts& generatePossibleContacts( WcTimingTree* tt = NULL ); + PossibleContacts& generatePossibleContacts( WcTimingTree* tt = NULL ) override; void update(WcTimingTree* tt = NULL); bool active() const { return gridActive_; } diff --git a/src/pe/ccd/HashGridsDataHandling.h b/src/pe/ccd/HashGridsDataHandling.h index 43aa61863..7190343c3 100644 --- a/src/pe/ccd/HashGridsDataHandling.h +++ b/src/pe/ccd/HashGridsDataHandling.h @@ -33,7 +33,7 @@ namespace ccd { class HashGridsDataHandling : public blockforest::AlwaysInitializeBlockDataHandling<HashGrids>{ public: HashGridsDataHandling(const shared_ptr<BodyStorage>& globalStorage, const BlockDataID& storageID) : globalStorage_(globalStorage), storageID_(storageID) {} - HashGrids * initialize( IBlock * const block ) + HashGrids * initialize( IBlock * const block ) override { Storage* storage = block->getData< Storage >( storageID_ ); return new HashGrids(*globalStorage_, (*storage)[0], (*storage)[1]); diff --git a/src/pe/ccd/SimpleCCD.h b/src/pe/ccd/SimpleCCD.h index 42a54f599..655fe7d6c 100644 --- a/src/pe/ccd/SimpleCCD.h +++ b/src/pe/ccd/SimpleCCD.h @@ -29,11 +29,11 @@ namespace ccd { class SimpleCCD : public ICCD{ public: explicit SimpleCCD(BodyStorage& globalStorage, Storage& storage); - ~SimpleCCD(); + ~SimpleCCD() override; - virtual PossibleContacts& generatePossibleContacts( WcTimingTree* tt = NULL ); + PossibleContacts& generatePossibleContacts( WcTimingTree* tt = NULL ) override; - int getObservedBodyCount() const; + int getObservedBodyCount() const override; private: //**Add/remove functions********************************************************************* /*!\name Add/remove functions */ diff --git a/src/pe/cr/DEM.h b/src/pe/cr/DEM.h index f716157ef..dd279b458 100644 --- a/src/pe/cr/DEM.h +++ b/src/pe/cr/DEM.h @@ -61,9 +61,9 @@ public: inline Integrator getIntegrator() const { return integrate_; } inline ContactResolver getContactResolver() const { return resolveContact_; } - 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_; } + inline real_t getMaximumPenetration() const override { return maxPenetration_; } + inline size_t getNumberOfContacts() const override { return numberOfContacts_; } + 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 742799f08..42521f699 100644 --- a/src/pe/cr/HCSITS.h +++ b/src/pe/cr/HCSITS.h @@ -123,16 +123,16 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - ~HardContactSemiImplicitTimesteppingSolvers(); + ~HardContactSemiImplicitTimesteppingSolvers() override; //@} //********************************************************************************************** //**Get functions******************************************************************************* /*!\name Get functions */ //@{ - virtual inline real_t getMaximumPenetration() const override; - virtual inline size_t getNumberOfContacts() const override; - virtual inline size_t getNumberOfContactsTreated() const override; + inline real_t getMaximumPenetration() const override; + inline size_t getNumberOfContacts() const override; + 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_; } diff --git a/src/pe/fcd/GenericFCD.h b/src/pe/fcd/GenericFCD.h index 27a311f3c..c054ae55c 100644 --- a/src/pe/fcd/GenericFCD.h +++ b/src/pe/fcd/GenericFCD.h @@ -36,7 +36,7 @@ namespace fcd { template <typename BodyTypeTuple, template <typename Container> class CollisionFunctor > class GenericFCD : public IFCD{ public: - virtual Contacts& generateContacts(PossibleContacts& possibleContacts) + Contacts& generateContacts(PossibleContacts& possibleContacts) override { contacts_.clear(); CollisionFunctor<decltype(contacts_)> func(contacts_); diff --git a/src/pe/rigidbody/Box.h b/src/pe/rigidbody/Box.h index 266aead5d..883739868 100644 --- a/src/pe/rigidbody/Box.h +++ b/src/pe/rigidbody/Box.h @@ -74,7 +74,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Box(); + ~Box() override; //@} //********************************************************************************************** @@ -83,7 +83,7 @@ public: /*!\name Get functions */ //@{ inline const Vec3& getLengths() const; - virtual inline real_t getVolume() const; + inline real_t getVolume() const override; //@} //********************************************************************************************** @@ -119,15 +119,15 @@ public: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual Vec3 support( const Vec3& d ) const; - inline virtual Vec3 supportContactThreshold( const Vec3& d ) const; + inline Vec3 support( const Vec3& d ) const override; + inline Vec3 supportContactThreshold( const Vec3& d ) const override; //@} //********************************************************************************************** //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** @@ -135,15 +135,15 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + void calcBoundingBox() override; // Calculation of the axis-aligned bounding box //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/Capsule.h b/src/pe/rigidbody/Capsule.h index 937aadcda..52311a204 100644 --- a/src/pe/rigidbody/Capsule.h +++ b/src/pe/rigidbody/Capsule.h @@ -79,7 +79,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Capsule(); + ~Capsule() override; //@} //********************************************************************************************** @@ -89,14 +89,14 @@ public: //@{ inline real_t getRadius() const; inline real_t getLength() const; - inline real_t getVolume() const; + inline real_t getVolume() const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual Vec3 support( const Vec3& d ) const; + inline Vec3 support( const Vec3& d ) const override; //@} //********************************************************************************************** @@ -128,18 +128,18 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** protected: - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const override; //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + void calcBoundingBox() override; // Calculation of the axis-aligned bounding box //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/CylindricalBoundary.h b/src/pe/rigidbody/CylindricalBoundary.h index c56582c20..0dc9312dc 100644 --- a/src/pe/rigidbody/CylindricalBoundary.h +++ b/src/pe/rigidbody/CylindricalBoundary.h @@ -62,7 +62,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~CylindricalBoundary(); + ~CylindricalBoundary() override; //@} //********************************************************************************************** @@ -85,7 +85,7 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** @@ -93,10 +93,10 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const override; - virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + void calcBoundingBox() override; // Calculation of the axis-aligned bounding box //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/Ellipsoid.h b/src/pe/rigidbody/Ellipsoid.h index 958c78ab3..e9a73305f 100644 --- a/src/pe/rigidbody/Ellipsoid.h +++ b/src/pe/rigidbody/Ellipsoid.h @@ -77,7 +77,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Ellipsoid(); + ~Ellipsoid() override; //@} //********************************************************************************************** //********************************************************************************************** @@ -87,7 +87,7 @@ public: /*!\name Get functions */ //@{ inline const Vec3& getSemiAxes() const; - virtual inline real_t getVolume() const; + inline real_t getVolume() const override; //@} //********************************************************************************************** @@ -99,14 +99,14 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual Vec3 support( const Vec3& d ) const; + inline Vec3 support( const Vec3& d ) const override; //@} //********************************************************************************************** @@ -124,15 +124,15 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + inline void calcBoundingBox() override; // Calculation of the axis-aligned bounding box //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/GeomPrimitive.h b/src/pe/rigidbody/GeomPrimitive.h index 2fa2f059d..359a7856f 100644 --- a/src/pe/rigidbody/GeomPrimitive.h +++ b/src/pe/rigidbody/GeomPrimitive.h @@ -68,7 +68,7 @@ protected: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~GeomPrimitive() = 0; + ~GeomPrimitive() override = 0; //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/Plane.h b/src/pe/rigidbody/Plane.h index 94368f79f..1e8bd0966 100644 --- a/src/pe/rigidbody/Plane.h +++ b/src/pe/rigidbody/Plane.h @@ -79,7 +79,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Plane(); + ~Plane() override; //@} //********************************************************************************************** @@ -87,7 +87,7 @@ public: //**Get functions******************************************************************************* /*!\name Get functions */ //@{ - virtual inline real_t getVolume() const; + inline real_t getVolume() const override; inline const Vec3& getNormal() const; inline real_t getDisplacement() const; //@} @@ -112,7 +112,7 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** @@ -120,21 +120,21 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual void setPositionImpl ( real_t px, real_t py, real_t pz ); - virtual void setOrientationImpl ( real_t r, real_t i, real_t j, real_t k ); - virtual void translateImpl ( real_t dx, real_t dy, real_t dz ); - virtual void rotateImpl ( const Quat& dq ); - virtual void rotateAroundOriginImpl( const Quat& dq ); - virtual void rotateAroundPointImpl ( const Vec3& point, const Quat& dq ); - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl ( real_t px, real_t py, real_t pz ) const; + void setPositionImpl ( real_t px, real_t py, real_t pz ) override; + void setOrientationImpl ( real_t r, real_t i, real_t j, real_t k ) override; + void translateImpl ( real_t dx, real_t dy, real_t dz ) override; + void rotateImpl ( const Quat& dq ) override; + void rotateAroundOriginImpl( const Quat& dq ) override; + void rotateAroundPointImpl ( const Vec3& point, const Quat& dq ) override; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl ( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + void calcBoundingBox() override; // Calculation of the axis-aligned bounding box //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/Sphere.h b/src/pe/rigidbody/Sphere.h index 669cf07bc..a7400fdb7 100644 --- a/src/pe/rigidbody/Sphere.h +++ b/src/pe/rigidbody/Sphere.h @@ -75,7 +75,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Sphere(); + ~Sphere() override; //@} //********************************************************************************************** //********************************************************************************************** @@ -85,7 +85,7 @@ public: /*!\name Get functions */ //@{ inline real_t getRadius() const; - virtual inline real_t getVolume() const; + inline real_t getVolume() const override; //@} //********************************************************************************************** @@ -107,14 +107,14 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const; + void print( std::ostream& os, const char* tab ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual Vec3 support( const Vec3& d ) const; + inline Vec3 support( const Vec3& d ) const override; //@} //********************************************************************************************** @@ -132,15 +132,15 @@ protected: //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - virtual bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const; - virtual bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual void calcBoundingBox(); // Calculation of the axis-aligned bounding box + inline void calcBoundingBox() override; // Calculation of the axis-aligned bounding box //@} //********************************************************************************************** diff --git a/src/pe/rigidbody/Squirmer.h b/src/pe/rigidbody/Squirmer.h index 41a27c9a7..69270d006 100644 --- a/src/pe/rigidbody/Squirmer.h +++ b/src/pe/rigidbody/Squirmer.h @@ -41,7 +41,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Squirmer(); + ~Squirmer() override; //@} //********************************************************************************************** //********************************************************************************************** diff --git a/src/pe/rigidbody/StorageDataHandling.h b/src/pe/rigidbody/StorageDataHandling.h index 12495a01b..b9b6b2fc2 100644 --- a/src/pe/rigidbody/StorageDataHandling.h +++ b/src/pe/rigidbody/StorageDataHandling.h @@ -40,32 +40,32 @@ namespace pe{ template<typename BodyTuple> class StorageDataHandling : public blockforest::BlockDataHandling<Storage>{ public: - virtual ~StorageDataHandling() {} + ~StorageDataHandling() override {} /// must be thread-safe ! - virtual Storage * initialize( IBlock * const block ) override; + Storage * initialize( IBlock * const block ) override; /// must be thread-safe ! - virtual void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; + void serialize( IBlock * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; /// must be thread-safe ! - virtual Storage * deserialize( IBlock * const block ) override; + Storage * deserialize( IBlock * const block ) override; /// must be thread-safe ! - virtual void deserialize( IBlock * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; + 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 ) override; + 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 ) override; + void serializeFineToCoarse( Block * const block, const BlockDataID & id, mpi::SendBuffer & buffer ) override; /// must be thread-safe ! - virtual Storage * deserializeCoarseToFine( Block * const block ) override; + Storage * deserializeCoarseToFine( Block * const block ) override; /// must be thread-safe ! - virtual Storage * deserializeFineToCoarse( Block * const block ) override; + Storage * deserializeFineToCoarse( Block * const block ) override; /// must be thread-safe ! - virtual void deserializeCoarseToFine( Block * const block, const BlockDataID & id, mpi::RecvBuffer & buffer ) override; + 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 ) override; + 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 e9337e069..31a224d26 100644 --- a/src/pe/rigidbody/Union.h +++ b/src/pe/rigidbody/Union.h @@ -87,7 +87,7 @@ public: //**Destructor********************************************************************************** /*!\name Destructor */ //@{ - virtual ~Union(); + ~Union() override; //@} //********************************************************************************************** //********************************************************************************************** @@ -121,23 +121,23 @@ public: //@} //********************************************************************************************** - virtual inline real_t getVolume() const override; + inline real_t getVolume() const override; //**Set functions******************************************************************************* /*!\name Set functions */ //@{ - virtual void setRemote( bool remote ) override; + void setRemote( bool remote ) override; //@} //********************************************************************************************** - virtual inline bool hasSubBodies() const override { return true; } + inline bool hasSubBodies() const override { return true; } //**Signal functions*************************************************************************** /*!\name Signal functions */ //@{ - virtual void handleModification() override; - virtual void handleTranslation() override; - virtual void handleRotation() override; + void handleModification() override; + void handleTranslation() override; + void handleRotation() override; //@} //********************************************************************************************** @@ -158,7 +158,7 @@ public: //**Output functions**************************************************************************** /*!\name Output functions */ //@{ - virtual void print( std::ostream& os, const char* tab ) const override; + 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 ) 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; + void setPositionImpl ( real_t px, real_t py, real_t pz ) override; + void setOrientationImpl ( real_t r, real_t i, real_t j, real_t k ) override; + void translateImpl ( real_t dx, real_t dy, real_t dz ) override; + void rotateImpl ( const Quat& dq ) override; + void rotateAroundOriginImpl( const Quat& dq ) override; + void rotateAroundPointImpl ( const Vec3& point, const Quat& dq ) override; + bool containsRelPointImpl ( real_t px, real_t py, real_t pz ) const override; + bool isSurfaceRelPointImpl ( real_t px, real_t py, real_t pz ) const override; //@} //********************************************************************************************** //**Utility functions*************************************************************************** /*!\name Utility functions */ //@{ - inline virtual void calcBoundingBox() override; // Calculation of the axis-aligned bounding box + inline 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/pe/vtk/BodyVtkOutput.h b/src/pe/vtk/BodyVtkOutput.h index 3898f6f10..4a91a8893 100644 --- a/src/pe/vtk/BodyVtkOutput.h +++ b/src/pe/vtk/BodyVtkOutput.h @@ -42,14 +42,14 @@ public: : storageID_( storageID ) , blockStorage_( blockStorage ) { } - std::vector< Attributes > getAttributes() const; + std::vector< Attributes > getAttributes() const override; - void configure(); + void configure() override; - std::vector< Vector3< real_t > > getPoints(); + std::vector< Vector3< real_t > > getPoints() override; - inline void push( std::ostream& os , const uint_t /*data*/, const uint_t point, const uint_t component ); - inline void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t component ); + inline void push( std::ostream& os , const uint_t /*data*/, const uint_t point, const uint_t component ) override; + inline void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t component ) override; private: diff --git a/src/pe/vtk/EllipsoidVtkOutput.h b/src/pe/vtk/EllipsoidVtkOutput.h index 767c1b978..b4ab6c241 100644 --- a/src/pe/vtk/EllipsoidVtkOutput.h +++ b/src/pe/vtk/EllipsoidVtkOutput.h @@ -46,14 +46,14 @@ public: : storageID_( storageID ) , blockStorage_( blockStorage ) { } - std::vector< Attributes > getAttributes() const; + std::vector< Attributes > getAttributes() const override; - void configure(); + void configure() override; - std::vector< Vector3< real_t > > getPoints(); + std::vector< Vector3< real_t > > getPoints() override; - inline void push( std::ostream& os , const uint_t /*data*/, const uint_t point, const uint_t component ); - inline void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t component ); + inline void push( std::ostream& os , const uint_t /*data*/, const uint_t point, const uint_t component ) override; + inline void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t component ) override; private: diff --git a/src/pe/vtk/SphereVtkOutput.h b/src/pe/vtk/SphereVtkOutput.h index 655faec08..db307c273 100755 --- a/src/pe/vtk/SphereVtkOutput.h +++ b/src/pe/vtk/SphereVtkOutput.h @@ -46,14 +46,14 @@ public: : storageID_( storageID ) , blockStorage_( blockStorage ) { } - std::vector< Attributes > getAttributes() const; + std::vector< Attributes > getAttributes() const override; - void configure(); + void configure() override; - std::vector< Vector3< real_t > > getPoints(); + std::vector< Vector3< real_t > > getPoints() override; - inline void push( std::ostream& os , const uint_t /*data*/, const uint_t point, const uint_t component ); - inline void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t component ); + inline void push( std::ostream& os , const uint_t /*data*/, const uint_t point, const uint_t component ) override; + inline void push( vtk::Base64Writer& b64, const uint_t /*data*/, const uint_t point, const uint_t component ) override; private: diff --git a/src/timeloop/SweepTimeloop.h b/src/timeloop/SweepTimeloop.h index a9b4d6d2a..3bd6c1488 100644 --- a/src/timeloop/SweepTimeloop.h +++ b/src/timeloop/SweepTimeloop.h @@ -129,7 +129,7 @@ namespace timeloop { nextId_(0), firstRun_(true) {} - virtual ~SweepTimeloop() + ~SweepTimeloop() override { for ( auto i = sweeps_.begin(); i != sweeps_.end(); ++i ) delete i->second; @@ -166,8 +166,8 @@ namespace timeloop { sweeps_.erase( *it ); } - virtual void doTimeStep(const Set<SUID> &selectors); - virtual void doTimeStep(const Set<SUID> &selectors, WcTimingPool &tp); + void doTimeStep(const Set<SUID> &selectors) override; + void doTimeStep(const Set<SUID> &selectors, WcTimingPool &tp) override; uint_t nextId_; std::vector<uint_t> sweepsToDelete_; diff --git a/src/timeloop/Timeloop.h b/src/timeloop/Timeloop.h index e2cc55001..38a8f02ff 100644 --- a/src/timeloop/Timeloop.h +++ b/src/timeloop/Timeloop.h @@ -58,7 +58,7 @@ private: { public: LoggingStamp( const Timeloop & timeloop ) : timeloop_( timeloop ) {} - std::string stamp() + std::string stamp() override { std::ostringstream oss; int indention; @@ -74,7 +74,7 @@ private: << std::setfill(' ') << std::right << timeloop_.curTimeStep_; return std::string("[") + oss.str() + std::string("]"); } - uint_t maxStampWidth() + uint_t maxStampWidth() override { if( timeloop_.nrOfTimeSteps_ > 0 ) return uint_c( std::ceil( std::log10( real_c( timeloop_.nrOfTimeSteps_ ) ) ) ) + uint_c(2); @@ -111,7 +111,7 @@ public: //@{ Timeloop( uint_t nrOfTimeSteps ); - virtual ~Timeloop() {} + ~Timeloop() override {} //@} //**************************************************************************************************************** @@ -119,19 +119,19 @@ public: //** Execution Control ******************************************************************************************* /*! \name Execution Control*/ //@{ - virtual void run() { run(true); } + void run() override { run(true); } void run( const bool logTimeStep ); void run( WcTimingPool & timing, const bool logTimeStep = true ); - virtual void singleStep() { singleStep(true); } + void singleStep() override { singleStep(true); } void singleStep( const bool logTimeStep ); void singleStep( WcTimingPool & timing, const bool logTimeStep = true ); - void stop(); - void synchronizedStop( bool stop ); + void stop() override; + void synchronizedStop( bool stop ) override; void setCurrentTimeStepToZero() { curTimeStep_ = 0; } - void setCurrentTimeStep( uint_t ts) { curTimeStep_ = ts; } + void setCurrentTimeStep( uint_t ts) override { curTimeStep_ = ts; } //@} //**************************************************************************************************************** @@ -173,8 +173,8 @@ public: //** Timestep **************************************************************************************************** /*! \name Timestep */ //@{ - uint_t getCurrentTimeStep() const { return curTimeStep_; } - uint_t getNrOfTimeSteps() const { return nrOfTimeSteps_; } + uint_t getCurrentTimeStep() const override { return curTimeStep_; } + uint_t getNrOfTimeSteps() const override { return nrOfTimeSteps_; } //@} //**************************************************************************************************************** diff --git a/src/vtk/BlockCellDataWriter.h b/src/vtk/BlockCellDataWriter.h index d0eabef2c..affdbeaf9 100644 --- a/src/vtk/BlockCellDataWriter.h +++ b/src/vtk/BlockCellDataWriter.h @@ -224,14 +224,14 @@ public: static const uint_t F_SIZE = F_SIZE_ARG; BlockCellDataWriter( const std::string & id ) : BlockCellDataWriterInterface( id ) {} - virtual ~BlockCellDataWriter() {} + ~BlockCellDataWriter() override {} - void push( std::ostream & os, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + void push( std::ostream & os, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { vtk::toStream( os, evaluate( x, y, z, f ) ); } - void push( vtk::Base64Writer & b64, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) + void push( vtk::Base64Writer & b64, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) override { b64 << evaluate( x, y, z, f ); } @@ -239,7 +239,7 @@ public: void push( std::ostream& os, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f, const real_t localXCell, const real_t localYCell, const real_t localZCell, const real_t globalX, const real_t globalY, const real_t globalZ, - const real_t samplingDx, const real_t samplingDy, const real_t samplingDz ) + const real_t samplingDx, const real_t samplingDy, const real_t samplingDz ) override { vtk::toStream( os, evaluate( x, y, z, f, localXCell, localYCell, localZCell, globalX, globalY, globalZ, samplingDx, samplingDy, samplingDz ) ); @@ -248,14 +248,14 @@ public: void push( Base64Writer& b64, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f, const real_t localXCell, const real_t localYCell, const real_t localZCell, const real_t globalX, const real_t globalY, const real_t globalZ, - const real_t samplingDx, const real_t samplingDy, const real_t samplingDz ) + const real_t samplingDx, const real_t samplingDy, const real_t samplingDz ) override { b64 << evaluate( x, y, z, f, localXCell, localYCell, localZCell, globalX, globalY, globalZ, samplingDx, samplingDy, samplingDz ); } - uint_t fSize() const { return F_SIZE; } + uint_t fSize() const override { return F_SIZE; } - std::string typeString() const { return vtk::typeToString< T >(); } + std::string typeString() const override { return vtk::typeToString< T >(); } protected: virtual T evaluate( const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const cell_idx_t f ) = 0; diff --git a/src/vtk/DumpBlockStructureLevel.h b/src/vtk/DumpBlockStructureLevel.h index 5d0b8953b..6c0e8932b 100644 --- a/src/vtk/DumpBlockStructureLevel.h +++ b/src/vtk/DumpBlockStructureLevel.h @@ -37,9 +37,9 @@ public: protected: - void configure() { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); WALBERLA_ASSERT_NOT_NULLPTR( this->blockStorage_ ); level_ = uint8_c( this->blockStorage_->getLevel( *(this->block_) ) ); } + void configure() override { WALBERLA_ASSERT_NOT_NULLPTR( this->block_ ); WALBERLA_ASSERT_NOT_NULLPTR( this->blockStorage_ ); level_ = uint8_c( this->blockStorage_->getLevel( *(this->block_) ) ); } - uint8_t evaluate( const cell_idx_t, const cell_idx_t, const cell_idx_t, const cell_idx_t ) { return level_; } + uint8_t evaluate( const cell_idx_t, const cell_idx_t, const cell_idx_t, const cell_idx_t ) override { return level_; } uint8_t level_; diff --git a/src/vtk/DumpBlockStructureProcess.h b/src/vtk/DumpBlockStructureProcess.h index 3bdd64e6c..0887b8243 100644 --- a/src/vtk/DumpBlockStructureProcess.h +++ b/src/vtk/DumpBlockStructureProcess.h @@ -38,9 +38,9 @@ public: protected: - void configure() {} + void configure() override {} - int evaluate( const cell_idx_t, const cell_idx_t, const cell_idx_t, const cell_idx_t ) { return MPIManager::instance()->rank(); } + int evaluate( const cell_idx_t, const cell_idx_t, const cell_idx_t, const cell_idx_t ) override { return MPIManager::instance()->rank(); } }; // DumpBlockStructureProcess -- GitLab