/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- 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 "processorPolyPatch.H" #include "addToRunTimeSelectionTable.H" #include "dictionary.H" #include "SubField.H" #include "matchPoints.H" #include "OFstream.H" #include "polyMesh.H" #include "Time.H" #include "transformList.H" #include "PstreamBuffers.H" #include "Circulator.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { defineTypeNameAndDebug(processorPolyPatch, 0); addToRunTimeSelectionTable(polyPatch, processorPolyPatch, dictionary); } // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // Foam::word Foam::processorPolyPatch::newName ( const label myProcNo, const label neighbProcNo ) { return word ( "procBoundary" + std::to_string(myProcNo) + "to" + std::to_string(neighbProcNo), false // No stripping needed ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::processorPolyPatch::processorPolyPatch ( const word& name, const label size, const label start, const label index, const polyBoundaryMesh& bm, const int myProcNo, const int neighbProcNo, const transformType transform, const word& patchType ) : coupledPolyPatch(name, size, start, index, bm, patchType, transform), myProcNo_(myProcNo), neighbProcNo_(neighbProcNo), neighbFaceCentres_(), neighbFaceAreas_(), neighbFaceCellCentres_() {} Foam::processorPolyPatch::processorPolyPatch ( const label size, const label start, const label index, const polyBoundaryMesh& bm, const int myProcNo, const int neighbProcNo, const transformType transform, const word& patchType ) : coupledPolyPatch ( newName(myProcNo, neighbProcNo), size, start, index, bm, patchType, transform ), myProcNo_(myProcNo), neighbProcNo_(neighbProcNo), neighbFaceCentres_(), neighbFaceAreas_(), neighbFaceCellCentres_() {} Foam::processorPolyPatch::processorPolyPatch ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm, const word& patchType ) : coupledPolyPatch(name, dict, index, bm, patchType), myProcNo_(dict.get