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-2026 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  );
90 
91  //- Construct from dictionary
93  (
94  const word& name,
95  const dictionary& dict,
96  const label index,
97  const polyBoundaryMesh&
98  );
99 
100  //- Construct as copy, resetting the boundary mesh
102  (
104  const polyBoundaryMesh&
105  );
106 
107  //- Construct as given the original patch and resetting the
108  // face list and boundary mesh information
110  (
112  const polyBoundaryMesh& bm,
113  const label index,
114  const label newSize,
115  const label newStart
116  );
117 
118  //- Construct and return a clone, resetting the boundary mesh
119  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
120  {
121  return autoPtr<polyPatch>
122  (
124  );
125  }
126 
127  //- Construct and return a clone, resetting the face list
128  // and boundary mesh
129  virtual autoPtr<polyPatch> clone
130  (
131  const polyBoundaryMesh& bm,
132  const label index,
133  const label newSize,
134  const label newStart
135  ) const
136  {
137  return autoPtr<polyPatch>
138  (
140  (
141  *this,
142  bm,
143  index,
144  newSize,
145  newStart
146  )
147  );
148  }
149 
150 
151  // Destructor
153 
154 
155  // Member Functions
156 
157  //- Return true as this patch is a constraint type
158  virtual bool constraint() const
159  {
160  return true;
161  }
162 
163  //- Get the referred patch
165  {
166  const polyPatch& pp = this->boundaryMesh()[referPatchIndex()];
167  return refCast<const nonConformalCyclicPolyPatch>(pp);
168  }
169 
170  //- Inherit the processor cyclic owner method
172 
173  //- Inherit the processor cyclic neighbour method
175 
176  //- Inherit the processor cyclic transform method
178 
179  //- Is this patch coupled? Returns false. For NCC patches the poly
180  // mesh is considered non-coupled whilst the finite volume mesh is
181  // considered coupled.
182  virtual bool coupled() const;
183 
184  //- Write the polyPatch data as a dictionary
185  virtual void write(Ostream&) const;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
autoPtr< PrimitivePatch< SubList< face >, const pointField & > > clone() const
Construct and return a clone.
label size() const
Return the number of elements in the UList.
Definition: UListI.H:311
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
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.
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
virtual bool constraint() const
Return true as this patch is a constraint type.
virtual bool coupled() const
Is this patch coupled? Returns false. For NCC patches the poly.
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)
Construct from components.
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:71
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:277
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: polyPatch.C:215
label referPatchIndex() const
Return the referring patchID.
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.
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:63
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