From 375fd3d9d3012b9f6cf1b9f9576de8c8599d707b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 30 May 2019 17:22:24 +0200 Subject: [PATCH 01/27] STYLE: remove unused overset lduInterfaces code (commit 33db2dd3e2c8767b) --- src/overset/Make/files | 8 - src/overset/oversetPolyPatch/oversetFvPatch.C | 2 - .../oversetPolyPatch/oversetFvPatchField.C | 134 --------- .../oversetPolyPatch/oversetFvPatchField.H | 29 -- .../oversetPolyPatch/oversetGAMGInterface.C | 260 ----------------- .../oversetPolyPatch/oversetGAMGInterface.H | 202 ------------- .../oversetGAMGInterfaceField.C | 152 ---------- .../oversetGAMGInterfaceField.H | 128 -------- .../oversetPolyPatch/oversetLduInterface.C | 42 --- .../oversetPolyPatch/oversetLduInterface.H | 111 ------- .../semiImplicitOversetFvPatchField.C | 274 ------------------ .../semiImplicitOversetFvPatchField.H | 207 ------------- .../semiImplicitOversetFvPatchFields.C | 43 --- .../semiImplicitOversetFvPatchFields.H | 49 ---- .../semiImplicitOversetGAMGInterfaceField.C | 124 -------- .../semiImplicitOversetGAMGInterfaceField.H | 108 ------- 16 files changed, 1873 deletions(-) delete mode 100644 src/overset/oversetPolyPatch/oversetGAMGInterface.C delete mode 100644 src/overset/oversetPolyPatch/oversetGAMGInterface.H delete mode 100644 src/overset/oversetPolyPatch/oversetGAMGInterfaceField.C delete mode 100644 src/overset/oversetPolyPatch/oversetGAMGInterfaceField.H delete mode 100644 src/overset/oversetPolyPatch/oversetLduInterface.C delete mode 100644 src/overset/oversetPolyPatch/oversetLduInterface.H delete mode 100644 src/overset/oversetPolyPatch/semiImplicitOversetFvPatchField.C delete mode 100644 src/overset/oversetPolyPatch/semiImplicitOversetFvPatchField.H delete mode 100644 src/overset/oversetPolyPatch/semiImplicitOversetFvPatchFields.C delete mode 100644 src/overset/oversetPolyPatch/semiImplicitOversetFvPatchFields.H delete mode 100644 src/overset/oversetPolyPatch/semiImplicitOversetGAMGInterfaceField.C delete mode 100644 src/overset/oversetPolyPatch/semiImplicitOversetGAMGInterfaceField.H diff --git a/src/overset/Make/files b/src/overset/Make/files index e3ba8d7f42..70acd1f108 100644 --- a/src/overset/Make/files +++ b/src/overset/Make/files @@ -19,14 +19,6 @@ oversetPolyPatch/oversetFvsPatchFields.C oversetPolyPatch/oversetPointPatch.C oversetPolyPatch/oversetPointPatchFields.C -/* -oversetPolyPatch/semiImplicitOversetFvPatchFields.C -oversetPolyPatch/oversetLduInterface.C -oversetPolyPatch/oversetGAMGInterface.C -oversetPolyPatch/oversetGAMGInterfaceField.C -oversetPolyPatch/semiImplicitOversetGAMGInterfaceField.C -*/ - oversetAdjustPhi/oversetAdjustPhi.C regionsToCell/regionsToCell.C diff --git a/src/overset/oversetPolyPatch/oversetFvPatch.C b/src/overset/oversetPolyPatch/oversetFvPatch.C index f378ec8a17..f4c6b0b078 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatch.C +++ b/src/overset/oversetPolyPatch/oversetFvPatch.C @@ -39,6 +39,4 @@ namespace Foam } -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/src/overset/oversetPolyPatch/oversetFvPatchField.C b/src/overset/oversetPolyPatch/oversetFvPatchField.C index c34e8a3071..a124e2328b 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatchField.C +++ b/src/overset/oversetPolyPatch/oversetFvPatchField.C @@ -216,140 +216,6 @@ void Foam::oversetFvPatchField::initEvaluate } -//template -//void Foam::oversetFvPatchField::initInterfaceMatrixUpdate -//( -// scalarField&, -// const bool add, -// const scalarField& psiInternal, -// const scalarField&, -// const direction, -// const Pstream::commsTypes commsType -//) const -//{ -//// // Add remote values -//// -//// const oversetFvPatch& ovp = this->oversetPatch_; -//// -//// if (ovp.master()) -//// { -//// const fvMesh& mesh = this->patch().boundaryMesh().mesh(); -//// -//// // Try to find out if the solve routine comes from the mesh -//// // TBD. This should be cleaner. -//// if (&mesh.lduAddr() == &mesh.fvMesh::lduAddr()) -//// { -//// return; -//// } -//// -//// const mapDistribute& map = ovp.cellInterpolationMap(); -//// -//// // Transfer the current state (similar to processorFvPatchField). -//// // Note -//// // use of separate tag to avoid clashes with any outstanding -//// // processor exchanges -//// if (this->pBufs_.valid()) -//// { -//// this->pBufs_().clear(); -//// } -//// else -//// { -//// this->pBufs_.set -//// ( -//// new PstreamBuffers -//// ( -//// Pstream::commsTypes::nonBlocking, -//// UPstream::msgType()+1 -//// ) -//// ); -//// } -//// -//// // Start sending -//// map.mapDistributeBase::send(this->pBufs_(), psiInternal); -//// } -//} -// -// -//template -//void Foam::oversetFvPatchField::updateInterfaceMatrix -//( -// scalarField& result, -// const bool add, -// const scalarField& psiInternal, -// const scalarField& coeffs, -// const direction cmpt, -// const Pstream::commsTypes -//) const -//{ -//// // Add remote values -//// -//// const oversetFvPatch& ovp = this->oversetPatch_; -//// -//// if (ovp.master()) -//// { -//// const fvMesh& mesh = this->patch().boundaryMesh().mesh(); -//// -//// // Try to find out if the solve routine comes from the mesh -//// // TBD. This should be cleaner. -//// if (&mesh.lduAddr() == &mesh.fvMesh::lduAddr()) -//// { -//// return; -//// } -//// -//// const labelListList& stencil = ovp.stencil(); -//// -//// if (stencil.size() != psiInternal.size()) -//// { -//// FatalErrorInFunction << "psiInternal:" << psiInternal.size() -//// << " stencil:" << stencil.size() << exit(FatalError); -//// } -//// -//// const mapDistribute& map = ovp.cellInterpolationMap(); -//// const List& wghts = ovp.cellInterpolationWeights(); -//// const labelList& cellIDs = ovp.interpolationCells(); -//// const scalarList& factor = ovp.cellInterpolationWeight(); -//// const scalarField& normalisation = ovp.normalisation(); -//// -//// // Since we're inside initEvaluate/evaluate there might be processor -//// // comms underway. Change the tag we use. -//// //scalarField work(psiInternal); -//// //map.mapDistributeBase::distribute(work, UPstream::msgType()+1); -//// -//// // Receive the outstanding data -//// scalarField work; -//// map.receive(this->pBufs_(), work); -//// -//// forAll(cellIDs, i) -//// { -//// label celli = cellIDs[i]; -//// -//// const scalarList& w = wghts[celli]; -//// const labelList& nbrs = stencil[celli]; -//// -//// scalar f = factor[celli]; -//// const scalar norm = normalisation[celli]; -//// -//// // Add the non-local matrix contribution to psi. Note that the -//// // matrix coefficients are -weights -//// -//// if (add) -//// { -//// f = -1.0*f; -//// } -//// -//// forAll(nbrs, nbrI) -//// { -//// label slotI = nbrs[nbrI]; -//// if (slotI >= psiInternal.size()) -//// { -//// result[celli] += f*norm*w[nbrI]*work[slotI]; -//// } -//// } -//// } -//// } -//} - - template void Foam::oversetFvPatchField::write(Ostream& os) const { diff --git a/src/overset/oversetPolyPatch/oversetFvPatchField.H b/src/overset/oversetPolyPatch/oversetFvPatchField.H index f4ba1b013b..27b6eef034 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatchField.H +++ b/src/overset/oversetPolyPatch/oversetFvPatchField.H @@ -66,9 +66,6 @@ protected: //- Master patch ID mutable label masterPatchID_; - //- Send/receive buffer - //mutable autoPtr pBufs_; - public: @@ -141,32 +138,6 @@ public: //- Initialise the evaluation of the patch field virtual void initEvaluate(const Pstream::commsTypes commsType); -// using LduInterfaceField::initInterfaceMatrixUpdate; -// -// //- Initialise neighbour matrix update. Add -// //- or subtract coupled contributions to matrix -// virtual void initInterfaceMatrixUpdate -// ( -// scalarField&, -// const bool add, -// const scalarField&, -// const scalarField&, -// const direction, -// const Pstream::commsTypes commsType -// ) const; -// -// //- Update result field based on interface functionality -// virtual void updateInterfaceMatrix -// ( -// scalarField& result, -// const bool add, -// const scalarField& psiInternal, -// const scalarField& coeffs, -// const direction cmpt, -// const Pstream::commsTypes commsType -// ) const; - - // I-O //- Write diff --git a/src/overset/oversetPolyPatch/oversetGAMGInterface.C b/src/overset/oversetPolyPatch/oversetGAMGInterface.C deleted file mode 100644 index 968da1bc7c..0000000000 --- a/src/overset/oversetPolyPatch/oversetGAMGInterface.C +++ /dev/null @@ -1,260 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "oversetGAMGInterface.H" -#include "addToRunTimeSelectionTable.H" -#include "Map.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(oversetGAMGInterface, 0); - addToRunTimeSelectionTable - ( - GAMGInterface, - oversetGAMGInterface, - lduInterface - ); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::oversetGAMGInterface::oversetGAMGInterface -( - const label index, - const lduInterfacePtrsList& coarseInterfaces, - const lduInterface& fineInterface, - const labelField& localRestrictAddressing, - const labelField& neighbourRestrictAddressing, - const label fineLevelIndex, - const label coarseComm -) -: - GAMGInterface(index, coarseInterfaces), - fineOversetInterface_ - ( - refCast(fineInterface) - ) -{ - Pout<< "Constructing oversetGAMGInterface index:" << index - << " from:" << fineOversetInterface_.name() - << " size:" << localRestrictAddressing.size() - << endl; - - // From coarse face to coarse cell - DynamicList