processorCyclicPointPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::processorCyclicPointPatch
28 
29 Description
30  Processor patch boundary needs to be such that the ordering of
31  points in the patch is the same on both sides.
32 
33  Looking at the creation of the faces on both sides of the processor
34  patch they need to be identical on both sides with the normals pointing
35  in opposite directions. This is achieved by calling the reverseFace
36  function in the decomposition. It is therefore possible to re-create
37  the ordering of patch points on the neighbour side by reversing all the
38  patch faces of the owner.
39 
40 SourceFiles
41  processorCyclicPointPatch.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef Foam_processorCyclicPointPatch_H
46 #define Foam_processorCyclicPointPatch_H
47 
48 #include "processorPointPatch.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class processorCyclicPointPatch Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public processorPointPatch
63 {
64  // Private Data
65 
66  const processorCyclicPolyPatch& procCycPolyPatch_;
67 
68 
69  // Private Member Functions
70 
71  //- No copy construct
73 
74  //- No copy assignment
75  void operator=(const processorCyclicPointPatch&) = delete;
76 
77 public:
78 
79  //- Runtime type information
80  TypeName(processorCyclicPolyPatch::typeName_());
81 
82 
83  // Constructors
84 
85  //- Construct from components
87  (
88  const polyPatch& patch,
89  const pointBoundaryMesh& bm
90  );
91 
92  //- Construct given the original patch and a map
94  (
96  const pointBoundaryMesh& bm,
97  const label index,
98  const labelUList& mapAddressing,
99  const labelUList& reversePointMap
100  );
101 
102  //- Construct and return a subset clone,
103  //- resetting the point list and boundary mesh
104  virtual autoPtr<pointPatch> clone
105  (
106  const pointBoundaryMesh& bm,
107  const label index,
108  const labelUList& mapAddressing,
109  const labelUList& reversePointMap
110  ) const
111  {
113  (
114  *this,
115  bm,
116  index,
117  mapAddressing,
118  reversePointMap
119  );
120  }
121 
122 
123  //- Destructor
124  virtual ~processorCyclicPointPatch();
125 
126 
127  // Member Functions
128 
129  //- Return message tag to use for communication
130  virtual int tag() const
131  {
132  return procCycPolyPatch_.tag();
133  }
134 
135  //- Return the underlying processorCyclicPolyPatch
136  const processorCyclicPolyPatch& procCyclicPolyPatch() const
137  {
138  return procCycPolyPatch_;
139  }
140 };
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #endif
150 
151 // ************************************************************************* //
virtual autoPtr< pointPatch > clone(const pointBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const labelUList &reversePointMap) const
Construct and return a subset clone, resetting the point list and boundary mesh.
Foam::pointBoundaryMesh.
virtual ~processorCyclicPointPatch()
Destructor.
Processor patch boundary needs to be such that the ordering of points in the patch is the same on bot...
virtual const polyPatch & patch() const
Return the polyPatch.
TypeName(processorCyclicPolyPatch::typeName_())
Runtime type information.
Processor patch boundary needs to be such that the ordering of points in the patch is the same on bot...
const processorCyclicPolyPatch & procCyclicPolyPatch() const
Return the underlying processorCyclicPolyPatch.
virtual label index() const
Return the index of this patch in the pointBoundaryMesh.
virtual int tag() const
Return message tag to use for communication.
virtual int tag() const
Return message tag to use for communication.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:69
Namespace for OpenFOAM.