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-2024 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::vectorField&
183 Foam::nonConformalBoundary::ownerOrigBoundaryPointNormals() const
184 {
185  if (!ownerOrigBoundaryPointNormalsPtr_.valid())
186  {
187  const faceList& faces = ownerOrigBoundary_.localFaces();
188  const vectorField faceNormals = ownerOrigBoundary_.faceNormals();
189 
190  vectorField pointNormals(ownerOrigBoundary_.nPoints(), Zero);
191 
192  forAll(faces, facei)
193  {
194  forAll(faces[facei], facePointi)
195  {
196  pointNormals[faces[facei][facePointi]] += faceNormals[facei];
197  }
198  }
199 
201  (
202  mesh(),
203  ownerOrigBoundary_.meshPoints(),
204  pointNormals,
205  plusEqOp<vector>(),
207  );
208 
209  ownerOrigBoundaryPointNormalsPtr_.set
210  (
211  (pointNormals/(mag(pointNormals) + vSmall)).ptr()
212  );
213  }
214 
215  return ownerOrigBoundaryPointNormalsPtr_();
216 }
217 
218 
219 const Foam::vectorField&
220 Foam::nonConformalBoundary::ownerOrigBoundaryPointNormals0() const
221 {
222  if (!ownerOrigBoundaryPointNormals0Ptr_.valid())
223  {
224  const faceList& faces = ownerOrigBoundary_.localFaces();
225 
226  vectorField pointNormals(ownerOrigBoundary_.nPoints(), Zero);
227 
228  forAll(faces, facei)
229  {
230  forAll(faces[facei], facePointi)
231  {
232  pointNormals[faces[facei][facePointi]] +=
233  faces[facei].normal(mesh().oldPoints());
234  }
235  }
236 
238  (
239  mesh(),
240  ownerOrigBoundary_.meshPoints(),
241  pointNormals,
242  plusEqOp<vector>(),
244  );
245 
246  ownerOrigBoundaryPointNormals0Ptr_.set
247  (
248  (pointNormals/(mag(pointNormals) + vSmall)).ptr()
249  );
250  }
251 
252  return ownerOrigBoundaryPointNormals0Ptr_();
253 }
254 
255 
256 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
257 
259 :
261  <
262  polyMesh,
265  >(mesh),
266  ownerOrigBoundary_(boundary(ownerOrigPatchIndices())),
267  meshPointOwnerOrigBoundaryPointPtr_(nullptr),
268  ownerOrigBoundaryPointMeshPointPtr_(nullptr),
269  ownerOrigBoundaryEdgeMeshEdgePtr_(nullptr),
270  ownerOrigBoundaryEdgesPtr_(nullptr),
271  ownerOrigBoundaryMeshEdgesPtr_(nullptr),
272  patchPointOwnerOrigBoundaryPointsPtr_(mesh.boundaryMesh().size()),
273  patchEdgeOwnerOrigBoundaryEdgesPtr_(mesh.boundaryMesh().size()),
274  ownerOrigBoundaryPointNormalsPtr_(nullptr)
275 {
276 }
277 
278 
279 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
280 
282 {}
283 
284 
285 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
286 
288 {
289  ownerOrigBoundary_.clearGeom();
290 
291  ownerOrigBoundaryPointNormalsPtr_.clear();
292 
293  return true;
294 }
295 
296 
297 #define TYPE_METHOD(Type, Method) typeMethod<Type>(&Type::Method)
298 
299 
301 {
302  return
303  nonConformalOtherPatchIndices
304  (
305  0,
306  TYPE_METHOD(nonConformalCoupledPolyPatch, origPatchIndex),
308  );
309 }
310 
311 
313 {
314  return
315  nonConformalOtherPatchIndices
316  (
317  0,
318  TYPE_METHOD(nonConformalCoupledPolyPatch, errorPatchIndex)
319  );
320 }
321 
322 
324 {
325  return
326  nonConformalOtherPatchIndices
327  (
328  1,
329  TYPE_METHOD(nonConformalCoupledPolyPatch, origPatchIndex),
331  );
332 }
333 
334 
336 {
337  return
338  nonConformalOtherPatchIndices
339  (
340  1,
341  TYPE_METHOD(nonConformalCoupledPolyPatch, errorPatchIndex)
342  );
343 }
344 
345 
346 #undef TYPE_METHOD
347 
348 
349 const Foam::labelList&
351 {
352  if (!ownerOrigBoundaryPointMeshPointPtr_.valid())
353  {
354  // Construct the local maps using the owner-orig primitive patch
355  ownerOrigBoundaryPointMeshPointPtr_.set
356  (
357  new labelList(ownerOrigBoundary_.meshPoints())
358  );
359 
360  meshPointOwnerOrigBoundaryPointPtr_.set
361  (
362  new labelList(mesh().nPoints(), -1)
363  );
364 
365  labelList& meshPointOwnerOrigBoundaryPoint =
366  meshPointOwnerOrigBoundaryPointPtr_();
367 
368  forAll(ownerOrigBoundary_.meshPoints(), ownerOrigBoundaryPointi)
369  {
370  meshPointOwnerOrigBoundaryPoint
371  [ownerOrigBoundary_.meshPoints()[ownerOrigBoundaryPointi]] =
372  ownerOrigBoundaryPointi;
373  }
374 
375  // Construct the remote map by enumerating newly identified points
376  label ownerOrigBoundaryPointi = ownerOrigBoundary_.nPoints();
377  DynamicList<label> remoteMeshPoints;
378  for
379  (
380  label ownerOrigBoundaryEdgei = ownerOrigBoundary_.nEdges();
381  ownerOrigBoundaryEdgei < ownerOrigBoundaryEdgeMeshEdge().size();
382  ++ ownerOrigBoundaryEdgei
383  )
384  {
385  const label meshEdgei =
386  ownerOrigBoundaryEdgeMeshEdge()[ownerOrigBoundaryEdgei];
387 
388  const edge& e = mesh().edges()[meshEdgei];
389 
390  forAll(e, i)
391  {
392  const label meshPointi = e[i];
393 
394  if (meshPointOwnerOrigBoundaryPoint[meshPointi] == -1)
395  {
396  meshPointOwnerOrigBoundaryPoint[meshPointi] =
397  ownerOrigBoundaryPointi ++;
398  remoteMeshPoints.append(meshPointi);
399  }
400  }
401  }
402 
403  // Append to the point-mesh-point map
404  ownerOrigBoundaryPointMeshPointPtr_->append(remoteMeshPoints);
405  }
406 
407  return ownerOrigBoundaryPointMeshPointPtr_();
408 }
409 
410 
411 const Foam::labelList&
413 {
414  if (!ownerOrigBoundaryEdgeMeshEdgePtr_.valid())
415  {
416  // Create boundary of all owner-orig and proc patches
417  labelList ownerOrigAndProcPatchIndices = this->ownerOrigPatchIndices();
418  forAll(mesh().boundaryMesh(), patchi)
419  {
420  if (isA<processorPolyPatch>(mesh().boundaryMesh()[patchi]))
421  {
422  ownerOrigAndProcPatchIndices.append(patchi);
423  }
424  }
425  const indirectPrimitivePatch ownerOrigAndProcBoundary
426  (
427  boundary(ownerOrigAndProcPatchIndices)
428  );
429 
430  // Create the mesh edge mapping for the owner-orig-and-proc boundary
431  labelList ownerOrigAndProcBoundaryMeshEdges
432  (
433  ownerOrigAndProcBoundary.meshEdges
434  (
435  mesh().edges(),
436  mesh().pointEdges()
437  )
438  );
439 
440  // Map from owner-orig to owner-orig-and-proc edge
441  const labelList map =
443  (
445  (
446  ownerOrigAndProcBoundary.localFaces(),
447  ownerOrigBoundary_.size()
448  ),
449  ownerOrigAndProcBoundary.localPoints()
450  )
451  .meshEdges
452  (
453  ownerOrigAndProcBoundary.edges(),
454  ownerOrigAndProcBoundary.pointEdges()
455  );
456 
457  // Initialise the mapping for the owner-orig boundary. Note, this only
458  // connects edges that are part of the local owner-orig boundary. Edges
459  // that are connected to the owner-orig boundary on a different process
460  // are added below.
461  ownerOrigBoundaryEdgeMeshEdgePtr_.set
462  (
463  new labelList
464  (
465  labelField(ownerOrigAndProcBoundaryMeshEdges, map)
466  )
467  );
468 
469  // Create a reverse map from owner-orig-and-proc to owner-orig edge
470  labelList rMap(ownerOrigAndProcBoundary.nEdges(), -1);
471  forAll(map, i)
472  {
473  rMap[map[i]] = i;
474  }
475 
476  // Synchronise
478  (
479  mesh(),
480  ownerOrigAndProcBoundaryMeshEdges,
481  rMap,
482  maxEqOp<label>(),
483  label(-1)
484  );
485 
486  // Remove all local indexing from the map
487  forAll(map, i)
488  {
489  rMap[map[i]] = -1;
490  }
491 
492  // Any valid rMap entries now refer to edges that are remotely
493  // connected to the owner-orig boundary. Append them to the addressing.
494  DynamicList<label> remoteMeshEdges;
495  forAll(rMap, i)
496  {
497  if (rMap[i] != -1)
498  {
499  remoteMeshEdges.append(ownerOrigAndProcBoundaryMeshEdges[i]);
500  }
501  }
502 
503  ownerOrigBoundaryEdgeMeshEdgePtr_->append(remoteMeshEdges);
504  }
505 
506  return ownerOrigBoundaryEdgeMeshEdgePtr_();
507 }
508 
509 
510 const Foam::edgeList&
512 {
513  if (!ownerOrigBoundaryEdgesPtr_.valid())
514  {
515  ownerOrigBoundaryEdgesPtr_.set
516  (
517  new edgeList(ownerOrigBoundary_.edges())
518  );
519 
520  ownerOrigBoundaryPointMeshPoint();
521  const labelList& meshPointOwnerOrigBoundaryPoint =
522  meshPointOwnerOrigBoundaryPointPtr_();
523 
524  DynamicList<edge> remoteEdges;
525  for
526  (
527  label ownerOrigBoundaryEdgei = ownerOrigBoundary_.nEdges();
528  ownerOrigBoundaryEdgei < ownerOrigBoundaryEdgeMeshEdge().size();
529  ++ ownerOrigBoundaryEdgei
530  )
531  {
532  const label meshEdgei =
533  ownerOrigBoundaryEdgeMeshEdge()[ownerOrigBoundaryEdgei];
534 
535  const edge& e = mesh().edges()[meshEdgei];
536 
537  remoteEdges.append
538  (
539  edge
540  (
541  meshPointOwnerOrigBoundaryPoint[e.start()],
542  meshPointOwnerOrigBoundaryPoint[e.end()]
543  )
544  );
545  }
546 
547  ownerOrigBoundaryEdgesPtr_->append(remoteEdges);
548  }
549 
550  return ownerOrigBoundaryEdgesPtr_();
551 }
552 
553 
554 const Foam::edgeList&
556 {
557  if (!ownerOrigBoundaryMeshEdgesPtr_.valid())
558  {
559  const edgeList& edges = ownerOrigBoundaryEdges();
560 
561  const labelList& pointMeshPoint =
562  ownerOrigBoundaryPointMeshPoint();
563 
564  ownerOrigBoundaryMeshEdgesPtr_.set
565  (
566  new edgeList(edges.size())
567  );
568 
569  forAll(edges, edgei)
570  {
571  ownerOrigBoundaryMeshEdgesPtr_()[edgei] =
572  edge
573  (
574  pointMeshPoint[edges[edgei].start()],
575  pointMeshPoint[edges[edgei].end()]
576  );
577  }
578  }
579 
580  return ownerOrigBoundaryMeshEdgesPtr_();
581 }
582 
583 
584 const Foam::labelList&
586 (
587  const label patchi
588 ) const
589 {
590  if (!patchPointOwnerOrigBoundaryPointsPtr_.set(patchi))
591  {
592  const polyPatch& pp = mesh().boundaryMesh()[patchi];
593 
594  ownerOrigBoundaryPointMeshPoint();
595  const labelList& meshPointOwnerOrigBoundaryPoint =
596  meshPointOwnerOrigBoundaryPointPtr_();
597 
598  const faceList patchOwnerOrigBoundaryLocalFaces
599  (
600  renumber
601  (
602  meshPointOwnerOrigBoundaryPoint,
603  static_cast<const faceList&>(pp)
604  )
605  );
606 
607  const primitivePatch ownerOrigBoundaryLocalPatch
608  (
609  SubList<face>(patchOwnerOrigBoundaryLocalFaces, pp.size()),
610  ownerOrigBoundary_.localPoints()
611  );
612 
613  patchPointOwnerOrigBoundaryPointsPtr_.set
614  (
615  patchi,
616  new labelList(ownerOrigBoundaryLocalPatch.meshPoints())
617  );
618 
619  patchEdgeOwnerOrigBoundaryEdgesPtr_.set
620  (
621  patchi,
622  new labelList
623  (
624  ownerOrigBoundaryLocalPatch.meshEdges
625  (
626  ownerOrigBoundary_.edges(),
627  ownerOrigBoundary_.pointEdges()
628  )
629  )
630  );
631 
632  // Check the addressing is valid
633  if (debug)
634  {
635  const labelList& ppPointOwnerOrigBoundaryPoints =
636  patchPointOwnerOrigBoundaryPointsPtr_[patchi];
637 
638  forAll(pp.meshPoints(), ppPointi)
639  {
640  const label ownerOrigBoundaryPointi =
641  ppPointOwnerOrigBoundaryPoints[ppPointi];
642 
643  if
644  (
645  pp.meshPoints()[ppPointi]
646  != ownerOrigBoundary_.meshPoints()[ownerOrigBoundaryPointi]
647  )
648  {
650  << "Patch point does not match all boundary point"
651  << exit(FatalError);
652  }
653  }
654 
655  const labelList& ppEdgeOwnerOrigBoundaryEdges =
656  patchEdgeOwnerOrigBoundaryEdgesPtr_[patchi];
657 
658  forAll(pp.edges(), ppEdgei)
659  {
660  const label ownerOrigBoundaryEdgei =
661  ppEdgeOwnerOrigBoundaryEdges[ppEdgei];
662 
663  if
664  (
665  meshEdge(pp, ppEdgei)
666  != meshEdge(ownerOrigBoundary_, ownerOrigBoundaryEdgei)
667  )
668  {
670  << "Patch edge does not match all boundary edge"
671  << exit(FatalError);
672  }
673  }
674  }
675  }
676 
677  return patchPointOwnerOrigBoundaryPointsPtr_[patchi];
678 }
679 
680 
681 const Foam::labelList&
683 (
684  const label patchi
685 ) const
686 {
687  if (!patchEdgeOwnerOrigBoundaryEdgesPtr_.set(patchi))
688  {
689  patchPointOwnerOrigBoundaryPoints(patchi);
690  }
691 
692  return patchEdgeOwnerOrigBoundaryEdgesPtr_[patchi];
693 }
694 
695 
698 {
699  return
701  (
702  new vectorField
703  (
705  (
706  ownerOrigBoundaryPointNormals(),
707  patchPointOwnerOrigBoundaryPoints(patchi)
708  )
709  )
710  );
711 }
712 
713 
716 {
717  return
719  (
720  new vectorField
721  (
723  (
724  ownerOrigBoundaryPointNormals0(),
725  patchPointOwnerOrigBoundaryPoints(patchi)
726  )
727  )
728  );
729 }
730 
731 
732 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:433
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:401
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
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
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
Addressing for a faceList slice.
edge meshEdge(const PrimitivePatch< FaceList, PointField > &p, const label edgei)
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.