1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "processorPointPatch.H"
27 #include "pointBoundaryMesh.H"
28 #include "addToRunTimeSelectionTable.H"
29 #include "pointMesh.H"
31 #include "primitiveFacePatch.H"
32 #include "emptyPolyPatch.H"
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 defineTypeNameAndDebug(processorPointPatch, 0);
39 addToRunTimeSelectionTable
48 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
50 void Foam::processorPointPatch::initGeometry(PstreamBuffers& pBufs)
53 // Depending on whether the patch is a master or a slave, get the primitive
54 // patch points and filter away the points from the global patch.
56 // Create the reversed patch and pick up its points
57 // so that the order is correct
58 const polyPatch& pp = patch();
60 faceList masterFaces(pp.size());
64 masterFaces[faceI] = pp[faceI].reverseFace();
67 reverseMeshPoints_ = primitiveFacePatch
75 void Foam::processorPointPatch::calcGeometry(PstreamBuffers& pBufs)
79 void Foam::processorPointPatch::initMovePoints
87 void Foam::processorPointPatch::movePoints(PstreamBuffers&, const pointField&)
91 void Foam::processorPointPatch::initUpdateMesh(PstreamBuffers& pBufs)
93 facePointPatch::initUpdateMesh(pBufs);
94 processorPointPatch::initGeometry(pBufs);
98 void Foam::processorPointPatch::updateMesh(PstreamBuffers& pBufs)
100 facePointPatch::updateMesh(pBufs);
101 processorPointPatch::calcGeometry(pBufs);
105 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
107 Foam::processorPointPatch::processorPointPatch
109 const polyPatch& patch,
110 const pointBoundaryMesh& bm
113 coupledFacePointPatch(patch, bm),
114 procPolyPatch_(refCast<const processorPolyPatch>(patch))
118 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
120 Foam::processorPointPatch::~processorPointPatch()
124 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
126 const Foam::labelList& Foam::processorPointPatch::reverseMeshPoints() const
128 return reverseMeshPoints_;
132 // ************************************************************************* //