ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / meshes / pointMesh / pointPatches / constraint / processor / processorPointPatch.C
blobe010752abfce2c15dfbe8f3f37e6407204a646c7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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"
30 #include "faceList.H"
31 #include "primitiveFacePatch.H"
32 #include "emptyPolyPatch.H"
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 namespace Foam
38     defineTypeNameAndDebug(processorPointPatch, 0);
39     addToRunTimeSelectionTable
40     (
41         facePointPatch,
42         processorPointPatch,
43         polyPatch
44     );
48 // * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
50 void Foam::processorPointPatch::initGeometry(PstreamBuffers& pBufs)
52     // Algorithm:
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());
62     forAll(pp, faceI)
63     {
64         masterFaces[faceI] = pp[faceI].reverseFace();
65     }
67     reverseMeshPoints_ = primitiveFacePatch
68     (
69         masterFaces,
70         pp.points()
71     ).meshPoints();
75 void Foam::processorPointPatch::calcGeometry(PstreamBuffers& pBufs)
79 void Foam::processorPointPatch::initMovePoints
81     PstreamBuffers&,
82     const pointField&
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 // ************************************************************************* //