From b72caa65b7da17b8dfc7185a0b9e58c24742c5ef Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 4 Dec 2018 10:32:25 +0000 Subject: [PATCH] Formatting --- src/lduSolvers/amg/amgMatrix.H | 71 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/lduSolvers/amg/amgMatrix.H b/src/lduSolvers/amg/amgMatrix.H index 8ce63ac1c..6996f12e4 100644 --- a/src/lduSolvers/amg/amgMatrix.H +++ b/src/lduSolvers/amg/amgMatrix.H @@ -112,51 +112,50 @@ public: {} - // Destructor + //- Destructor + ~amgMatrix() + { + deleteDemandDrivenData(addrPtr_); - ~amgMatrix() + // Clear the interface storage by hand. It is a list of ptrs + // not a PtrList for consistency of the interface + if (interfacesPtr_) { - deleteDemandDrivenData(addrPtr_); + lduInterfacePtrsList& curLevel = *interfacesPtr_; - // Clear the interface storage by hand. It is a list of ptrs - // not a PtrList for consistency of the interface - if (interfacesPtr_) + forAll (curLevel, i) { - lduInterfacePtrsList& curLevel = *interfacesPtr_; - - forAll (curLevel, i) + if (curLevel.set(i)) { - if (curLevel.set(i)) - { - delete curLevel(i); - } + delete curLevel(i); } } - - deleteDemandDrivenData(interfacesPtr_); - - deleteDemandDrivenData(matrixPtr_); - - // Clear the interface field storage by hand. It is a list of ptrs - // not a PtrList for consistency of the interface - if (interfaceFieldsPtr_) - { - lduInterfaceFieldPtrsList& curLevelField = *interfaceFieldsPtr_; - - forAll (curLevelField, i) - { - if (curLevelField.set(i)) - { - delete curLevelField(i); - } - } - } - - deleteDemandDrivenData(interfaceFieldsPtr_); - deleteDemandDrivenData(coupleBouCoeffsPtr_); - deleteDemandDrivenData(coupleIntCoeffsPtr_); } + deleteDemandDrivenData(interfacesPtr_); + + deleteDemandDrivenData(matrixPtr_); + + // Clear the interface field storage by hand. It is a list of ptrs + // not a PtrList for consistency of the interface + if (interfaceFieldsPtr_) + { + lduInterfaceFieldPtrsList& curLevelField = *interfaceFieldsPtr_; + + forAll (curLevelField, i) + { + if (curLevelField.set(i)) + { + delete curLevelField(i); + } + } + } + + deleteDemandDrivenData(interfaceFieldsPtr_); + deleteDemandDrivenData(coupleBouCoeffsPtr_); + deleteDemandDrivenData(coupleIntCoeffsPtr_); + } + // Member Functions