From 4e3bcc08e0dc94992cb0e26494435a34e78cfee2 Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:16:34 +0200 Subject: [PATCH 1/8] containers: optimize header inclusion --- src/containers/piercedStorageIterator.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/containers/piercedStorageIterator.hpp b/src/containers/piercedStorageIterator.hpp index a27a0c28cf..438a164da1 100644 --- a/src/containers/piercedStorageIterator.hpp +++ b/src/containers/piercedStorageIterator.hpp @@ -30,8 +30,6 @@ #include #include -#include "piercedKernel.hpp" - #define __PSI_REFERENCE__ typename PiercedStorageIterator::reference #define __PSI_POINTER__ typename PiercedStorageIterator::pointer From 692f85c418f9a9a34aecb9f3fd6da31f76342f28 Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:16:46 +0200 Subject: [PATCH 2/8] containers: add missing virtual destructor --- src/containers/piercedSync.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/containers/piercedSync.hpp b/src/containers/piercedSync.hpp index 8d5dd9c8d6..1de241c04e 100644 --- a/src/containers/piercedSync.hpp +++ b/src/containers/piercedSync.hpp @@ -105,6 +105,9 @@ class PiercedSyncSlave { friend class PiercedSyncMaster; +public: + virtual ~PiercedSyncSlave() = default; + protected: PiercedSyncSlave(); From 72d3f9113b779a2516e5beb43d253d790d96adad Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:14:56 +0200 Subject: [PATCH 3/8] RBF: simplify destructor --- src/RBF/rbf.cpp | 8 -------- src/RBF/rbf.hpp | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/RBF/rbf.cpp b/src/RBF/rbf.cpp index 6d91c5c9ba..0679ae23d4 100644 --- a/src/RBF/rbf.cpp +++ b/src/RBF/rbf.cpp @@ -55,14 +55,6 @@ namespace bitpit { * */ -/*! - * Destructor - */ -RBFKernel::~RBFKernel() -{ - m_fPtr = NULL; -} - /*! * Default constructor. RBFBasisFunction is WENDLANDC2 by default. RBFMode is * INTERP, by default. Use setFunction and setMode for changing it. diff --git a/src/RBF/rbf.hpp b/src/RBF/rbf.hpp index fc880a437f..5c9d7bc5c1 100644 --- a/src/RBF/rbf.hpp +++ b/src/RBF/rbf.hpp @@ -81,10 +81,11 @@ class RBFKernel{ int m_nodes; /** Date: Thu, 18 Aug 2022 15:15:35 +0200 Subject: [PATCH 4/8] LA: add missing virtual destructor --- src/LA/system_solvers_large.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LA/system_solvers_large.hpp b/src/LA/system_solvers_large.hpp index ea42b0b1a4..40a5042017 100644 --- a/src/LA/system_solvers_large.hpp +++ b/src/LA/system_solvers_large.hpp @@ -70,6 +70,8 @@ struct KSPStatus { class SystemMatrixAssembler { public: + virtual ~SystemMatrixAssembler() = default; + virtual long getRowCount() const = 0; virtual long getColCount() const = 0; From 596326c62fec70ef1637a13e08a9bc2627373e4d Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:16:12 +0200 Subject: [PATCH 5/8] PABLO: add missing header --- src/PABLO/LocalTree.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PABLO/LocalTree.hpp b/src/PABLO/LocalTree.hpp index 48328d671b..f17aded9e9 100644 --- a/src/PABLO/LocalTree.hpp +++ b/src/PABLO/LocalTree.hpp @@ -31,6 +31,7 @@ #include "tree_constants.hpp" #include "Octant.hpp" #include "Intersection.hpp" +#include "morton.hpp" namespace bitpit { From d972776ad07d8cd11c529b61aa892bb20812e03c Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:16:57 +0200 Subject: [PATCH 6/8] levelset: optimize header inclusion --- src/levelset/levelSetCachedObject.hpp | 1 - src/levelset/levelSetMaskObject.hpp | 2 -- src/levelset/levelSetSegmentationObject.hpp | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/levelset/levelSetCachedObject.hpp b/src/levelset/levelSetCachedObject.hpp index af4afd7f78..70b5b9df37 100644 --- a/src/levelset/levelSetCachedObject.hpp +++ b/src/levelset/levelSetCachedObject.hpp @@ -32,7 +32,6 @@ # include "bitpit_containers.hpp" -# include "levelSetBoundedObject.hpp" # include "levelSetKernel.hpp" # include "levelSetSignedObject.hpp" # include "levelSetStorage.hpp" diff --git a/src/levelset/levelSetMaskObject.hpp b/src/levelset/levelSetMaskObject.hpp index 852976d200..83d2a1257d 100644 --- a/src/levelset/levelSetMaskObject.hpp +++ b/src/levelset/levelSetMaskObject.hpp @@ -32,8 +32,6 @@ # include "bitpit_operators.hpp" # include "bitpit_surfunstructured.hpp" -# include "levelSetCartesianKernel.hpp" -# include "levelSetOctreeKernel.hpp" # include "levelSetSegmentationObject.hpp" namespace bitpit{ diff --git a/src/levelset/levelSetSegmentationObject.hpp b/src/levelset/levelSetSegmentationObject.hpp index 7650a21ae6..a01254173c 100644 --- a/src/levelset/levelSetSegmentationObject.hpp +++ b/src/levelset/levelSetSegmentationObject.hpp @@ -37,6 +37,7 @@ #include "bitpit_voloctree.hpp" #include "levelSetCommon.hpp" +#include "levelSetBoundedObject.hpp" #include "levelSetCachedObject.hpp" #include "levelSetCartesianKernel.hpp" #include "levelSetOctreeKernel.hpp" From e0c4553ee5f89e9685a37b4cd46831fc2fcc8e39 Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:15:16 +0200 Subject: [PATCH 7/8] levelset: add missing virtual destructors --- src/levelset/levelSetBoundedObject.hpp | 2 ++ src/levelset/levelSetObject.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/levelset/levelSetBoundedObject.hpp b/src/levelset/levelSetBoundedObject.hpp index 3226953424..eccab30233 100644 --- a/src/levelset/levelSetBoundedObject.hpp +++ b/src/levelset/levelSetBoundedObject.hpp @@ -32,6 +32,8 @@ namespace bitpit { class LevelSetBoundedObject { public: + virtual ~LevelSetBoundedObject() = default; + virtual void getBoundingBox( std::array &, std::array & )const =0 ; # if BITPIT_ENABLE_MPI virtual void getGlobalBoundingBox( std::array &, std::array & )const =0 ; diff --git a/src/levelset/levelSetObject.hpp b/src/levelset/levelSetObject.hpp index 7089b23efa..31a6e8e381 100644 --- a/src/levelset/levelSetObject.hpp +++ b/src/levelset/levelSetObject.hpp @@ -52,6 +52,8 @@ class LevelSetKernel; class LevelSetObjectInterface { public: + virtual ~LevelSetObjectInterface() = default; + virtual LevelSetKernel * getKernel() = 0; virtual const LevelSetKernel * getKernel() const = 0; virtual void setKernel(LevelSetKernel *) = 0; From 3a57049a71f5398539965ce92a10b5c202622323 Mon Sep 17 00:00:00 2001 From: Andrea Iob Date: Thu, 18 Aug 2022 15:17:11 +0200 Subject: [PATCH 8/8] patchkernel: optimize header inclusion --- src/patchkernel/volume_mapper.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patchkernel/volume_mapper.hpp b/src/patchkernel/volume_mapper.hpp index 00ddfc46dd..ea24e76448 100644 --- a/src/patchkernel/volume_mapper.hpp +++ b/src/patchkernel/volume_mapper.hpp @@ -32,7 +32,7 @@ #include #include -#include "bitpit_patchkernel.hpp" +#include "volume_kernel.hpp" namespace bitpit {