processorPointPatch.C
Go to the documentation of this file.
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.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "processorPointPatch.H"
27 #include "pointBoundaryMesh.H"
29 #include "pointMesh.H"
30 #include "faceList.H"
31 #include "primitiveFacePatch.H"
32 #include "emptyPolyPatch.H"
33 
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38  defineTypeNameAndDebug(processorPointPatch, 0);
40  (
41  facePointPatch,
42  processorPointPatch,
43  polyPatch
44  );
45 }
46 
47 
48 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
49 
51 {
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.
55 
56  // Create the reversed patch and pick up its points
57  // so that the order is correct
58  const polyPatch& pp = patch();
59 
60  faceList masterFaces(pp.size());
61 
62  forAll(pp, faceI)
63  {
64  masterFaces[faceI] = pp[faceI].reverseFace();
65  }
66 
68  (
69  masterFaces,
70  pp.points()
71  ).meshPoints();
72 }
73 
74 
76 {}
77 
78 
80 (
82  const pointField&
83 )
84 {}
85 
86 
88 {}
89 
90 
92 {
95 }
96 
97 
99 {
102 }
103 
104 
105 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
106 
108 (
109  const polyPatch& patch,
110  const pointBoundaryMesh& bm
111 )
112 :
113  coupledFacePointPatch(patch, bm),
114  procPolyPatch_(refCast<const processorPolyPatch>(patch))
115 {}
116 
117 
118 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
119 
121 {}
122 
123 
124 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
125 
127 {
128  return reverseMeshPoints_;
129 }
130 
131 
132 // ************************************************************************* //
processorPointPatch.H
Foam::processorPointPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: processorPointPatch.C:98
Foam::facePointPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: facePointPatch.C:69
Foam::PrimitivePatch::points
const Field< PointType > & points() const
Return reference to global points.
Definition: PrimitivePatchTemplate.H:282
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:85
Foam::processorPointPatch::reverseMeshPoints
const labelList & reverseMeshPoints() const
Return mesh points in the correct order for the receiving side.
Definition: processorPointPatch.C:126
Foam::processorPointPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: processorPointPatch.C:80
faceList.H
Foam::primitiveFacePatch
PrimitivePatch< face, List, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
Definition: primitiveFacePatch.H:45
pointBoundaryMesh.H
Foam::processorPointPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: processorPointPatch.C:50
Foam::processorPointPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
Definition: processorPointPatch.C:87
Foam::facePointPatch::processorPointPatch
friend class processorPointPatch
Definition: facePointPatch.H:102
Foam::processorPointPatch::reverseMeshPoints_
labelList reverseMeshPoints_
Definition: processorPointPatch.H:65
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Foam::facePointPatch::patch
const polyPatch & patch() const
Return the polyPatch.
Definition: facePointPatch.H:150
Foam::coupledFacePointPatch
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches
Definition: coupledFacePointPatch.H:53
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::processorPointPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: processorPointPatch.C:91
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::facePointPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: facePointPatch.C:75
emptyPolyPatch.H
Foam::pointBoundaryMesh
Foam::pointBoundaryMesh.
Definition: pointBoundaryMesh.H:52
Foam::processorPointPatch::~processorPointPatch
virtual ~processorPointPatch()
Destructor.
Definition: processorPointPatch.C:120
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::processorPointPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: processorPointPatch.C:75
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
pointMesh.H