nonConformalProcessorCyclicPolyPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 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 Class
25  Foam::nonConformalProcessorCyclicPolyPatch
26 
27 Description
28  Non-conformal processor cyclic poly patch. As nonConformalCyclicPolyPatch,
29  but the neighbouring patch is on a different processor.
30 
31 See also
32  Foam::nonConformalCyclicPatch
33 
34 SourceFiles
35  nonConformalProcessorCyclicPolyPatch.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef nonConformalProcessorCyclicPolyPatch_H
40 #define nonConformalProcessorCyclicPolyPatch_H
41 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class nonConformalProcessorCyclicPolyPatch Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
58 {
59 protected:
60 
61  // Protected Member Functions
62 
63  //- Reset the patch name
64  virtual void rename(const wordList& newNames);
65 
66  //- Reset the patch index
67  virtual void reorder(const labelUList& newToOldIndex);
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("nonConformalProcessorCyclic");
74 
75 
76  // Constructors
77 
78  //- Construct from components
80  (
81  const label size,
82  const label start,
83  const label index,
84  const polyBoundaryMesh& bm,
85  const int myProcNo,
86  const int neighbProcNo,
87  const word& referPatchName,
88  const word& origPatchName,
89  const word& patchType = typeName
90  );
91 
92  //- Construct from dictionary
94  (
95  const word& name,
96  const dictionary& dict,
97  const label index,
98  const polyBoundaryMesh&,
99  const word& patchType
100  );
101 
102  //- Construct as copy, resetting the boundary mesh
104  (
106  const polyBoundaryMesh&
107  );
108 
109  //- Construct as given the original patch and resetting the
110  // face list and boundary mesh information
112  (
114  const polyBoundaryMesh& bm,
115  const label index,
116  const label newSize,
117  const label newStart
118  );
119 
120  //- Construct and return a clone, resetting the boundary mesh
121  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
122  {
123  return autoPtr<polyPatch>
124  (
126  );
127  }
128 
129  //- Construct and return a clone, resetting the face list
130  // and boundary mesh
131  virtual autoPtr<polyPatch> clone
132  (
133  const polyBoundaryMesh& bm,
134  const label index,
135  const label newSize,
136  const label newStart
137  ) const
138  {
139  return autoPtr<polyPatch>
140  (
142  (
143  *this,
144  bm,
145  index,
146  newSize,
147  newStart
148  )
149  );
150  }
151 
152 
153  // Destructor
155 
156 
157  // Member Functions
158 
159  //- Get the referred patch
161  {
162  const polyPatch& pp = this->boundaryMesh()[referPatchID()];
163  return refCast<const nonConformalCyclicPolyPatch>(pp);
164  }
165 
166  //- Inherit the processor cyclic owner method
168 
169  //- Inherit the processor cyclic neighbour method
171 
172  //- Inherit the processor cyclic transform method
174 
175  //- Is this patch coupled? Returns false. For NCC patches the poly
176  // mesh is considered non-coupled whilst the finite volume mesh is
177  // considered coupled.
178  virtual bool coupled() const;
179 
180  //- Write the polyPatch data as a dictionary
181  virtual void write(Ostream&) const;
182 };
183 
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 } // End namespace Foam
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
autoPtr< PrimitivePatch< FaceList, PointField > > clone() const
Construct and return a clone.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Non-conformal coupled poly patch. As nonConformalPolyPatch, but this patch is coupled to another non-...
Non-conformal cyclic poly patch. As nonConformalCoupledPolyPatch, but the neighbouring patch is local...
const word & origPatchName() const
Original patch name.
Non-conformal processor cyclic poly patch. As nonConformalCyclicPolyPatch, but the neighbouring patch...
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
const nonConformalCyclicPolyPatch & referPatch() const
Get the referred patch.
virtual void rename(const wordList &newNames)
Reset the patch name.
nonConformalProcessorCyclicPolyPatch(const label size, const label start, const label index, const polyBoundaryMesh &bm, const int myProcNo, const int neighbProcNo, const word &referPatchName, const word &origPatchName, const word &patchType=typeName)
Construct from components.
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
virtual bool coupled() const
Is this patch coupled? Returns false. For NCC patches the poly.
TypeName("nonConformalProcessorCyclic")
Runtime type information.
label index() const
Return the index of this patch in the boundaryMesh.
const word & name() const
Return name.
Foam::polyBoundaryMesh.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:280
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: polyPatch.C:270
virtual bool owner() const
Does this side own the patch ?
virtual const transformer & transform() const
Return transformation between the coupled patches.
const word & referPatchName() const
Return name of originating cyclicPolyPatch patch.
label referPatchID() const
Return the referring patchID.
int myProcNo() const
Return processor number.
int neighbProcNo() const
Return neighbour processor number.
bool neighbour() const
Is the processor the patch neighbour ?
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict