From f437daa974a1ffa87c783162307b008e16908574 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 17 Mar 2016 11:34:54 +0000 Subject: [PATCH] Make clearInterfaces a function --- src/foam/meshes/lduMesh/lduPrimitiveMesh.H | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/foam/meshes/lduMesh/lduPrimitiveMesh.H b/src/foam/meshes/lduMesh/lduPrimitiveMesh.H index f001de9d4..29b507a68 100644 --- a/src/foam/meshes/lduMesh/lduPrimitiveMesh.H +++ b/src/foam/meshes/lduMesh/lduPrimitiveMesh.H @@ -116,18 +116,7 @@ public: // Destructor virtual ~lduPrimitiveMesh() - { - // Clear interface pointers: they are not deleted - // by the lduInterfacePtrsList (derived from UPtrList) - // HJ, 5/Feb/2016 - forAll (interfaces_, i) - { - if (interfaces_.set(i)) - { - delete interfaces_(i); - } - } - } + {} // Member Functions @@ -145,6 +134,21 @@ public: patchSchedule_ = ps; } + //- Clear interfaces + void clearInterfaces() + { + // Clear interface pointers: they are not deleted + // by the lduInterfacePtrsList (derived from UPtrList) + // HJ, 5/Feb/2016 + forAll (interfaces_, i) + { + if (interfaces_.set(i)) + { + delete interfaces_(i); + } + } + } + //- Return number of interfaces virtual label nPatches() const {