nonConformalBoundary.C
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) 2022-2023 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 "nonConformalBoundary.H"
27 #include "nonConformalPolyPatch.H"
31 #include "syncTools.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 
38 template<class FaceList, class PointField>
39 edge meshEdge
40 (
41  const PrimitivePatch<FaceList, PointField>& p,
42  const label edgei
43 )
44 {
45  return edge
46  (
47  p.meshPoints()[p.edges()[edgei][0]],
48  p.meshPoints()[p.edges()[edgei][1]]
49  );
50 }
51 
52 }
53 
54 
55 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
60 }
61 
62 
63 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
64 
66 Foam::nonConformalBoundary::boundary(const labelList& patches) const
67 {
68  DynamicList<label> faces;
69  forAll(patches, i)
70  {
71  const polyPatch& pp = mesh().boundaryMesh()[patches[i]];
72 
73  faces.append(identityMap(pp.size()) + pp.start());
74  }
75 
76  return
78  (
79  IndirectList<face>(mesh().faces(), faces),
80  mesh().points()
81  );
82 }
83 
84 
85 template<class Type, class Method>
87 {
88  Method method;
89 
90  TypeMethod(const Method& method)
91  :
92  method(method)
93  {}
94 };
95 
96 
97 template<class Type, class Method>
99 Foam::nonConformalBoundary::typeMethod(const Method& method)
100 {
101  return TypeMethod<Type, Method>(method);
102 }
103 
104 
105 template<class ... NcPpTypeMethods>
106 Foam::labelList Foam::nonConformalBoundary::nonConformalOtherPatchIndices
107 (
108  const label side,
109  NcPpTypeMethods ... typeMethods
110 ) const
111 {
112  const polyBoundaryMesh& pbm = mesh().boundaryMesh();
113 
114  labelHashSet origPatchIndexTable;
115  DynamicList<label> nonCoupledPatchIndices(pbm.size());
116 
117  nonConformalOtherPatchIndices
118  (
119  origPatchIndexTable,
120  nonCoupledPatchIndices,
121  side,
122  typeMethods ...
123  );
124 
125  labelList result;
126  result.transfer(nonCoupledPatchIndices);
127  return result;
128 }
129 
130 
131 template<class NcPpType, class NcPpMethod, class ... NcPpTypeMethods>
132 void Foam::nonConformalBoundary::nonConformalOtherPatchIndices
133 (
134  labelHashSet& origPatchIndexTable,
135  DynamicList<label>& nonCoupledPatchIndices,
136  const label side,
137  const TypeMethod<NcPpType, NcPpMethod>& typeMethod,
138  NcPpTypeMethods ... typesAndMethods
139 ) const
140 {
141  const polyBoundaryMesh& pbm = mesh().boundaryMesh();
142 
143  forAll(pbm, nccPatchi)
144  {
145  const polyPatch& pp = pbm[nccPatchi];
146 
147  if (isA<NcPpType>(pp))
148  {
149  const NcPpType& ncPp =
150  refCast<const NcPpType>(pbm[nccPatchi]);
151 
152  if (side == 1 && !ncPp.owner()) continue;
153 
154  if (side == -1 && ncPp.owner()) continue;
155 
156  if (origPatchIndexTable.found(ncPp.origPatchIndex())) continue;
157 
158  origPatchIndexTable.insert(ncPp.origPatchIndex());
159  nonCoupledPatchIndices.append((ncPp.*typeMethod.method)());
160  }
161  }
162 
163  nonConformalOtherPatchIndices
164  (
165  origPatchIndexTable,
166  nonCoupledPatchIndices,
167  side,
168  typesAndMethods ...
169  );
170 }
171 
172 
173 void Foam::nonConformalBoundary::nonConformalOtherPatchIndices
174 (
175  labelHashSet& origPatchIndexTable,
176  DynamicList<label>& nonCoupledPatchIndices,
177  const label side
178 ) const
179 {}
180 
181 
182 const Foam::labelList&
183 Foam::nonConformalBoundary::meshPointOwnerOrigBoundaryPoint() const
184 {
185  if (!meshPointOwnerOrigBoundaryPointPtr_.valid())
186  {
187  meshPointOwnerOrigBoundaryPointPtr_.set
188  (
189  new labelList(mesh().nPoints(), -1)
190  );
191 
192  forAll(ownerOrigBoundary_.meshPoints(), ownerOrigBoundaryPointi)
193  {
194  meshPointOwnerOrigBoundaryPointPtr_()
195  [ownerOrigBoundary_.meshPoints()[ownerOrigBoundaryPointi]] =
196  ownerOrigBoundaryPointi;
197  }
198  }
199 
200  return meshPointOwnerOrigBoundaryPointPtr_();
201 }
202 
203 
204 const Foam::vectorField&
205 Foam::nonConformalBoundary::ownerOrigBoundaryPointNormals() const
206 {
207  if (!ownerOrigBoundaryPointNormalsPtr_.valid())
208  {
209  const faceList& faces = ownerOrigBoundary_.localFaces();
210  const vectorField faceNormals = ownerOrigBoundary_.faceNormals();
211 
212  vectorField pointNormals(ownerOrigBoundary_.nPoints(), Zero);
213 
214  forAll(faces, facei)
215  {
216  forAll(faces[facei], facePointi)
217  {
218  pointNormals[faces[facei][facePointi]] += faceNormals[facei];
219  }
220  }
221 
223  (
224  mesh(),
225  ownerOrigBoundary_.meshPoints(),
226  pointNormals,
227  plusEqOp<vector>(),
229  );
230 
231  ownerOrigBoundaryPointNormalsPtr_.set
232  (
233  (pointNormals/(mag(pointNormals) + vSmall)).ptr()
234  );
235  }
236 
237  return ownerOrigBoundaryPointNormalsPtr_();
238 }
239 
240 
241 const Foam::vectorField&
242 Foam::nonConformalBoundary::ownerOrigBoundaryPointNormals0() const
243 {
244  if (!ownerOrigBoundaryPointNormals0Ptr_.valid())
245  {
246  const faceList& faces = ownerOrigBoundary_.localFaces();
247 
248  vectorField pointNormals(ownerOrigBoundary_.nPoints(), Zero);
249 
250  forAll(faces, facei)
251  {
252  forAll(faces[facei], facePointi)
253  {
254  pointNormals[faces[facei][facePointi]] +=
255  faces[facei].normal(mesh().oldPoints());
256  }
257  }
258 
260  (
261  mesh(),
262  ownerOrigBoundary_.meshPoints(),
263  pointNormals,
264  plusEqOp<vector>(),
266  );
267 
268  ownerOrigBoundaryPointNormals0Ptr_.set
269  (
270  (pointNormals/(mag(pointNormals) + vSmall)).ptr()
271  );
272  }
273 
274  return ownerOrigBoundaryPointNormals0Ptr_();
275 }
276 
277 
278 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
279 
281 :
283  <
284  polyMesh,
287  >(mesh),
288  ownerOrigBoundary_(boundary(ownerOrigPatchIndices())),
289  meshPointOwnerOrigBoundaryPointPtr_(nullptr),
290  ownerOrigBoundaryPointMeshPointPtr_(nullptr),
291  ownerOrigBoundaryEdgeMeshEdgePtr_(nullptr),
292  ownerOrigBoundaryEdgesPtr_(nullptr),
293  ownerOrigBoundaryMeshEdgesPtr_(nullptr),
294  patchPointOwnerOrigBoundaryPointsPtr_(mesh.boundaryMesh().size()),
295  patchEdgeOwnerOrigBoundaryEdgesPtr_(mesh.boundaryMesh().size()),
296  ownerOrigBoundaryPointNormalsPtr_(nullptr)
297 {
298 }
299 
300 
301 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
302 
304 {}
305 
306 
307 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
308 
310 {
311  ownerOrigBoundary_.clearGeom();
312 
313  ownerOrigBoundaryPointNormalsPtr_.clear();
314 
315  return true;
316 }
317 
318 
319 #define TYPE_METHOD(Type, Method) typeMethod<Type>(&Type::Method)
320 
321 
323 {
324  return
325  nonConformalOtherPatchIndices
326  (
327  0,
328  TYPE_METHOD(nonConformalCoupledPolyPatch, origPatchIndex),
330  );
331 }
332 
333 
335 {
336  return
337  nonConformalOtherPatchIndices
338  (
339  0,
340  TYPE_METHOD(nonConformalCoupledPolyPatch, errorPatchIndex)
341  );
342 }
343 
344 
346 {
347  return
348  nonConformalOtherPatchIndices
349  (
350  1,
351  TYPE_METHOD(nonConformalCoupledPolyPatch, origPatchIndex),
353  );
354 }
355 
356 
358 {
359  return
360  nonConformalOtherPatchIndices
361  (
362  1,
363  TYPE_METHOD(nonConformalCoupledPolyPatch, errorPatchIndex)
364  );
365 }
366 
367 
368 #undef TYPE_METHOD
369 
370 
371 const Foam::labelList&
373 {
374  if (!ownerOrigBoundaryPointMeshPointPtr_.valid())
375  {
376  ownerOrigBoundaryPointMeshPointPtr_.set
377  (
378  new labelList(ownerOrigBoundary_.meshPoints())
379  );
380 
381  // ...
382  meshPointOwnerOrigBoundaryPoint();
383  labelList& map = meshPointOwnerOrigBoundaryPointPtr_();
384 
385  // ...
386  label ownerOrigBoundaryPointi = ownerOrigBoundary_.nPoints();
387  DynamicList<label> remotePoints;
388 
389  // ...
390  for
391  (
392  label ownerOrigBoundaryEdgei = ownerOrigBoundary_.nEdges();
393  ownerOrigBoundaryEdgei < ownerOrigBoundaryEdgeMeshEdge().size();
394  ++ ownerOrigBoundaryEdgei
395  )
396  {
397  const label meshEdgei =
398  ownerOrigBoundaryEdgeMeshEdge()[ownerOrigBoundaryEdgei];
399 
400  const edge& e = mesh().edges()[meshEdgei];
401 
402  forAll(e, i)
403  {
404  const label meshPointi = e[i];
405 
406  if (map[meshPointi] == -1)
407  {
408  map[meshPointi] = ownerOrigBoundaryPointi ++;
409  remotePoints.append(meshPointi);
410  }
411  }
412  }
413 
414  // ...
415  ownerOrigBoundaryPointMeshPointPtr_->append(remotePoints);
416  }
417 
418  return ownerOrigBoundaryPointMeshPointPtr_();
419 }
420 
421 
422 const Foam::labelList&
424 {
425  if (!ownerOrigBoundaryEdgeMeshEdgePtr_.valid())
426  {
427  // Create boundary of all owner-orig and proc patches
428  labelList ownerOrigAndProcPatchIndices = this->ownerOrigPatchIndices();
429  forAll(mesh().boundaryMesh(), patchi)
430  {
431  if (isA<processorPolyPatch>(mesh().boundaryMesh()[patchi]))
432  {
433  ownerOrigAndProcPatchIndices.append(patchi);
434  }
435  }
436  const indirectPrimitivePatch ownerOrigAndProcBoundary
437  (
438  boundary(ownerOrigAndProcPatchIndices)
439  );
440 
441  // Create the mesh edge mapping for the owner-orig-and-proc boundary
442  labelList ownerOrigAndProcBoundaryMeshEdges
443  (
444  ownerOrigAndProcBoundary.meshEdges
445  (
446  mesh().edges(),
447  mesh().pointEdges()
448  )
449  );
450 
451  // Map from owner-orig to owner-orig-and-proc edge
452  const labelList map =
454  (
456  (
457  ownerOrigAndProcBoundary.localFaces(),
458  ownerOrigBoundary_.size()
459  ),
460  ownerOrigAndProcBoundary.localPoints()
461  )
462  .meshEdges
463  (
464  ownerOrigAndProcBoundary.edges(),
465  ownerOrigAndProcBoundary.pointEdges()
466  );
467 
468  // Initialise the mapping for the owner-orig boundary. Note, this only
469  // connects edges that are part of the local owner-orig boundary. Edges
470  // that are connected to the owner-orig boundary on a different process
471  // are added below.
472  ownerOrigBoundaryEdgeMeshEdgePtr_.set
473  (
474  new labelList
475  (
476  labelField(ownerOrigAndProcBoundaryMeshEdges, map)
477  )
478  );
479 
480  // Create a reverse map from owner-orig-and-proc to owner-orig edge
481  labelList rMap(ownerOrigAndProcBoundary.nEdges(), -1);
482  forAll(map, i)
483  {
484  rMap[map[i]] = i;
485  }
486 
487  // Synchronise
489  (
490  mesh(),
491  ownerOrigAndProcBoundaryMeshEdges,
492  rMap,
493  maxEqOp<label>(),
494  label(-1)
495  );
496 
497  // Remove all local indexing from the map
498  forAll(map, i)
499  {
500  rMap[map[i]] = -1;
501  }
502 
503  // Any valid rMap entries now refer to edges that are remotely
504  // connected to the owner-orig boundary. Append them to the addressing.
505  DynamicList<label> remoteMeshEdges;
506  forAll(rMap, i)
507  {
508  if (rMap[i] != -1)
509  {
510  remoteMeshEdges.append(ownerOrigAndProcBoundaryMeshEdges[i]);
511  }
512  }
513 
514  ownerOrigBoundaryEdgeMeshEdgePtr_->append(remoteMeshEdges);
515  }
516 
517  return ownerOrigBoundaryEdgeMeshEdgePtr_();
518 }
519 
520 
521 const Foam::edgeList&
523 {
524  if (!ownerOrigBoundaryEdgesPtr_.valid())
525  {
526  ownerOrigBoundaryEdgesPtr_.set
527  (
528  new edgeList(ownerOrigBoundary_.edges())
529  );
530 
531  const labelList& map = meshPointOwnerOrigBoundaryPoint();
532 
533  DynamicList<edge> remoteEdges;
534 
535  for
536  (
537  label ownerOrigBoundaryEdgei = ownerOrigBoundary_.nEdges();
538  ownerOrigBoundaryEdgei < ownerOrigBoundaryEdgeMeshEdge().size();
539  ++ ownerOrigBoundaryEdgei
540  )
541  {
542  const label meshEdgei =
543  ownerOrigBoundaryEdgeMeshEdge()[ownerOrigBoundaryEdgei];
544 
545  const edge& e = mesh().edges()[meshEdgei];
546 
547  remoteEdges.append(edge(map[e.start()], map[e.end()]));
548  }
549 
550  ownerOrigBoundaryEdgesPtr_->append(remoteEdges);
551  }
552 
553  return ownerOrigBoundaryEdgesPtr_();
554 }
555 
556 
557 const Foam::edgeList&
559 {
560  if (!ownerOrigBoundaryMeshEdgesPtr_.valid())
561  {
562  const edgeList& edges = ownerOrigBoundaryEdges();
563 
564  const labelList& pointMeshPoint =
565  ownerOrigBoundaryPointMeshPoint();
566 
567  ownerOrigBoundaryMeshEdgesPtr_.set
568  (
569  new edgeList(edges.size())
570  );
571 
572  forAll(edges, edgei)
573  {
574  ownerOrigBoundaryMeshEdgesPtr_()[edgei] =
575  edge
576  (
577  pointMeshPoint[edges[edgei].start()],
578  pointMeshPoint[edges[edgei].end()]
579  );
580  }
581  }
582 
583  return ownerOrigBoundaryMeshEdgesPtr_();
584 }
585 
586 
587 const Foam::labelList&
589 (
590  const label patchi
591 ) const
592 {
593  if (!patchPointOwnerOrigBoundaryPointsPtr_.set(patchi))
594  {
595  const polyPatch& pp = mesh().boundaryMesh()[patchi];
596 
597  const faceList patchOwnerOrigBoundaryLocalFaces
598  (
599  renumber
600  (
601  meshPointOwnerOrigBoundaryPoint(),
602  static_cast<const faceList&>(pp)
603  )
604  );
605 
606  const primitivePatch ownerOrigBoundaryLocalPatch
607  (
608  SubList<face>(patchOwnerOrigBoundaryLocalFaces, pp.size()),
609  ownerOrigBoundary_.localPoints()
610  );
611 
612  patchPointOwnerOrigBoundaryPointsPtr_.set
613  (
614  patchi,
615  new labelList(ownerOrigBoundaryLocalPatch.meshPoints())
616  );
617 
618  patchEdgeOwnerOrigBoundaryEdgesPtr_.set
619  (
620  patchi,
621  new labelList
622  (
623  ownerOrigBoundaryLocalPatch.meshEdges
624  (
625  ownerOrigBoundary_.edges(),
626  ownerOrigBoundary_.pointEdges()
627  )
628  )
629  );
630 
631  // Check the addressing is valid
632  if (debug)
633  {
634  const labelList& ppPointOwnerOrigBoundaryPoints =
635  patchPointOwnerOrigBoundaryPointsPtr_[patchi];
636 
637  forAll(pp.meshPoints(), ppPointi)
638  {
639  const label ownerOrigBoundaryPointi =
640  ppPointOwnerOrigBoundaryPoints[ppPointi];
641 
642  if
643  (
644  pp.meshPoints()[ppPointi]
645  != ownerOrigBoundary_.meshPoints()[ownerOrigBoundaryPointi]
646  )
647  {
649  << "Patch point does not match all boundary point"
650  << exit(FatalError);
651  }
652  }
653 
654  const labelList& ppEdgeOwnerOrigBoundaryEdges =
655  patchEdgeOwnerOrigBoundaryEdgesPtr_[patchi];
656 
657  forAll(pp.edges(), ppEdgei)
658  {
659  const label ownerOrigBoundaryEdgei =
660  ppEdgeOwnerOrigBoundaryEdges[ppEdgei];
661 
662  if
663  (
664  meshEdge(pp, ppEdgei)
665  != meshEdge(ownerOrigBoundary_, ownerOrigBoundaryEdgei)
666  )
667  {
669  << "Patch edge does not match all boundary edge"
670  << exit(FatalError);
671  }
672  }
673  }
674  }
675 
676  return patchPointOwnerOrigBoundaryPointsPtr_[patchi];
677 }
678 
679 
680 const Foam::labelList&
682 (
683  const label patchi
684 ) const
685 {
686  if (!patchEdgeOwnerOrigBoundaryEdgesPtr_.set(patchi))
687  {
688  patchPointOwnerOrigBoundaryPoints(patchi);
689  }
690 
691  return patchEdgeOwnerOrigBoundaryEdgesPtr_[patchi];
692 }
693 
694 
697 {
698  return
700  (
701  new vectorField
702  (
704  (
705  ownerOrigBoundaryPointNormals(),
706  patchPointOwnerOrigBoundaryPoints(patchi)
707  )
708  )
709  );
710 }
711 
712 
715 {
716  return
718  (
719  new vectorField
720  (
722  (
723  ownerOrigBoundaryPointNormals0(),
724  patchPointOwnerOrigBoundaryPoints(patchi)
725  )
726  )
727  );
728 }
729 
730 
731 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Definition: DynamicListI.H:296
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:109
bool found(const Key &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:138
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Definition: List.C:342
void append(const T &)
Append an element at the end of the list.
Definition: ListI.H:178
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
label nEdges() const
Return number of edges in patch.
const labelListList & pointEdges() const
Return point-edge addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
Return labels of patch edges in the global edge list using.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
void append(T *)
Append an element at the end of the list.
Definition: PtrListI.H:39
A List obtained as a section of another List.
Definition: SubList.H:56
A List with indirect addressing.
Definition: UIndirectList.H:60
label size() const
Return the number of elements in the UList.
Definition: UListI.H:311
label size() const
Return the number of elements in the UPtrList.
Definition: UPtrListI.H:29
static const Form zero
Definition: VectorSpace.H:118
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:61
Mesh object that stores an all boundary patch and mapping to and from it and the mesh and the individ...
labelList ownerOrigPatchIndices() const
Return a list of the owner-orig patch indices.
labelList ownerErrorPatchIndices() const
Return a list of the owner error patch indices.
virtual bool movePoints()
Update for mesh motion.
const edgeList & ownerOrigBoundaryMeshEdges() const
Get the owner-orig boundary edges, referring to mesh points.
tmp< vectorField > patchPointNormals(const label patchi) const
Get parallel consistent point normals for the patch.
labelList allOrigPatchIndices() const
Return a list of the orig patch indices.
const labelList & patchEdgeOwnerOrigBoundaryEdges(const label patchi) const
Get a map from patch edge to owner-orig boundary edge.
nonConformalBoundary(const polyMesh &mesh)
Construct from mesh.
const labelList & ownerOrigBoundaryEdgeMeshEdge() const
Get a map from owner-orig boundary edge to mesh edge.
const labelList & patchPointOwnerOrigBoundaryPoints(const label patchi) const
Get a map from patch point to owner-orig boundary point.
labelList allErrorPatchIndices() const
Return a list of the error patch indices.
tmp< vectorField > patchPointNormals0(const label patchi) const
Get parallel consistent old-time point normals for the patch.
const labelList & ownerOrigBoundaryPointMeshPoint() const
Get a map from owner-orig boundary point to mesh point.
const edgeList & ownerOrigBoundaryEdges() const
Get the owner-orig boundary edges, referring to boundary points.
Non-conformal coupled poly patch. As nonConformalPolyPatch, but this patch is coupled to another non-...
Wall poly patch which can do non-conformal mapping of values from another potentially non-globally co...
Foam::polyBoundaryMesh.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:404
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: polyPatch.C:270
static void syncPointList(const polyMesh &, List< T > &, const CombineOp &cop, const T &nullValue, const TransformOp &top)
Synchronise values on all mesh points.
static void syncEdgeList(const polyMesh &, List< T > &, const CombineOp &cop, const T &nullValue, const TransformOp &top)
Synchronise values on all mesh edges.
A class for managing temporary objects.
Definition: tmp.H:55
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
label patchi
const pointField & points
label nPoints
const fvPatchList & patches
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
static const zero Zero
Definition: zero.H:97
const doubleScalar e
Definition: doubleScalar.H:106
List< label > labelList
A List of labels.
Definition: labelList.H:56
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
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) of a list.
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
Addressing for a faceList slice.
edge meshEdge(const PrimitivePatch< FaceList, PointField > &p, const label edgei)
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< label > labelField
Specialisation of Field<T> for label.
Definition: labelField.H:49
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:213
error FatalError
List< edge > edgeList
Definition: edgeList.H:38
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
Definition: ListOps.C:104
List< face > faceList
Definition: faceListFwd.H:41
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
Foam::indirectPrimitivePatch.
#define TYPE_METHOD(Type, Method)
faceListList boundary(nPatches)
volScalarField & p
Simple wrapper for a type and a method.