cyclicPolyPatch.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) 2011-2020 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 "cyclicPolyPatch.H"
28 #include "polyBoundaryMesh.H"
29 #include "polyMesh.H"
30 #include "demandDrivenData.H"
31 #include "OFstream.H"
32 #include "matchPoints.H"
33 #include "EdgeMap.H"
34 #include "Time.H"
35 #include "transformField.H"
36 #include "SubField.H"
37 #include "unitConversion.H"
38 
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43  defineTypeNameAndDebug(cyclicPolyPatch, 0);
44 
45  addToRunTimeSelectionTable(polyPatch, cyclicPolyPatch, word);
46  addToRunTimeSelectionTable(polyPatch, cyclicPolyPatch, dictionary);
47 }
48 
49 
50 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
51 
53 {
55 }
56 
57 
59 (
60  const primitivePatch& referPatch,
61  pointField& nbrCtrs,
62  vectorField& nbrAreas,
63  pointField& nbrCc
64 )
65 {}
66 
67 
69 {
70  static_cast<cyclicTransform&>(*this) =
72  (
73  name(),
74  faceCentres(),
75  faceAreas(),
76  *this,
77  nbrPatchName(),
78  nbrPatch().faceCentres(),
79  nbrPatch().faceAreas(),
80  nbrPatch(),
81  matchTolerance()
82  );
83 }
84 
85 
87 (
88  PstreamBuffers& pBufs,
89  const pointField& p
90 )
91 {
92  polyPatch::initMovePoints(pBufs, p);
93 }
94 
95 
97 (
98  PstreamBuffers& pBufs,
99  const pointField& p
100 )
101 {
102  polyPatch::movePoints(pBufs, p);
103 }
104 
105 
107 {
109 }
110 
111 
113 {
114  polyPatch::updateMesh(pBufs);
115  deleteDemandDrivenData(coupledPointsPtr_);
116  deleteDemandDrivenData(coupledEdgesPtr_);
117 }
118 
119 
121 {
122  polyPatch::rename(newNames);
123  nbrPatch().nbrPatchName_ = newNames[index()];
124 }
125 
126 
127 void Foam::cyclicPolyPatch::reorder(const labelUList& newToOldIndex)
128 {
129  polyPatch::reorder(newToOldIndex);
130  if (nbrPatchID_ != -1)
131  {
132  nbrPatchID_ = findIndex(newToOldIndex, nbrPatchID_);
133  }
134 }
135 
136 
137 // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
138 
140 (
141  const word& name,
142  const label size,
143  const label start,
144  const label index,
145  const polyBoundaryMesh& bm,
146  const word& patchType
147 )
148 :
149  coupledPolyPatch(name, size, start, index, bm, patchType),
150  cyclicTransform(false),
151  nbrPatchName_(word::null),
152  nbrPatchID_(-1),
153  coupledPointsPtr_(nullptr),
154  coupledEdgesPtr_(nullptr),
155  ownToNbrOrderDataPtr_(nullptr),
156  ownToNbrCyclicOrderDataPtr_(nullptr),
157  ownToNbrDebugOrderDataPtr_(nullptr)
158 {
159  // Neighbour patch might not be valid yet so no transformation
160  // calculation possible.
161 }
162 
163 
165 (
166  const word& name,
167  const label size,
168  const label start,
169  const label index,
170  const polyBoundaryMesh& bm,
171  const word& patchType,
172  const word& nbrPatchName
173 )
174 :
175  coupledPolyPatch(name, size, start, index, bm, patchType),
176  cyclicTransform(false),
177  nbrPatchName_(nbrPatchName),
178  nbrPatchID_(-1),
179  coupledPointsPtr_(nullptr),
180  coupledEdgesPtr_(nullptr),
181  ownToNbrOrderDataPtr_(nullptr),
182  ownToNbrCyclicOrderDataPtr_(nullptr),
183  ownToNbrDebugOrderDataPtr_(nullptr)
184 {
185  // Neighbour patch might not be valid yet so no transformation
186  // calculation possible.
187 }
188 
189 
191 (
192  const word& name,
193  const dictionary& dict,
194  const label index,
195  const polyBoundaryMesh& bm,
196  const word& patchType
197 )
198 :
199  coupledPolyPatch(name, dict, index, bm, patchType),
200  cyclicTransform(dict, false),
201  nbrPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
202  coupleGroup_(dict),
203  nbrPatchID_(-1),
204  coupledPointsPtr_(nullptr),
205  coupledEdgesPtr_(nullptr),
206  ownToNbrOrderDataPtr_(nullptr),
207  ownToNbrCyclicOrderDataPtr_(nullptr),
208  ownToNbrDebugOrderDataPtr_(nullptr)
209 {
210  if (nbrPatchName_ == word::null && !coupleGroup_.valid())
211  {
213  (
214  dict
215  ) << "No \"neighbourPatch\" provided." << endl
216  << exit(FatalIOError);
217  }
218 
219  if (nbrPatchName_ == name)
220  {
222  << "Neighbour patch name " << nbrPatchName_
223  << " cannot be the same as this patch " << name
224  << exit(FatalIOError);
225  }
226 
227  // Neighbour patch might not be valid yet so no transformation
228  // calculation possible.
229 }
230 
231 
233 (
234  const cyclicPolyPatch& pp,
235  const polyBoundaryMesh& bm
236 )
237 :
238  coupledPolyPatch(pp, bm),
239  cyclicTransform(pp),
240  nbrPatchName_(pp.nbrPatchName_),
241  coupleGroup_(pp.coupleGroup_),
242  nbrPatchID_(-1),
243  coupledPointsPtr_(nullptr),
244  coupledEdgesPtr_(nullptr),
245  ownToNbrOrderDataPtr_(nullptr),
246  ownToNbrCyclicOrderDataPtr_(nullptr),
247  ownToNbrDebugOrderDataPtr_(nullptr)
248 {
249  // Neighbour patch might not be valid yet so no transformation
250  // calculation possible.
251 }
252 
253 
255 (
256  const cyclicPolyPatch& pp,
257  const polyBoundaryMesh& bm,
258  const label index,
259  const label newSize,
260  const label newStart,
261  const word& neiName
262 )
263 :
264  coupledPolyPatch(pp, bm, index, newSize, newStart),
265  cyclicTransform(pp),
266  nbrPatchName_(neiName),
267  coupleGroup_(pp.coupleGroup_),
268  nbrPatchID_(-1),
269  coupledPointsPtr_(nullptr),
270  coupledEdgesPtr_(nullptr),
271  ownToNbrOrderDataPtr_(nullptr),
272  ownToNbrCyclicOrderDataPtr_(nullptr),
273  ownToNbrDebugOrderDataPtr_(nullptr)
274 {
275  if (neiName == name())
276  {
278  << "Neighbour patch name " << neiName
279  << " cannot be the same as this patch " << name()
280  << exit(FatalError);
281  }
282 
283  // Neighbour patch might not be valid yet so no transformation
284  // calculation possible.
285 }
286 
287 
289 (
290  const cyclicPolyPatch& pp,
291  const polyBoundaryMesh& bm,
292  const label index,
293  const labelUList& mapAddressing,
294  const label newStart
295 )
296 :
297  coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
298  cyclicTransform(pp),
299  nbrPatchName_(pp.nbrPatchName_),
300  coupleGroup_(pp.coupleGroup_),
301  nbrPatchID_(-1),
302  coupledPointsPtr_(nullptr),
303  coupledEdgesPtr_(nullptr),
304  ownToNbrOrderDataPtr_(nullptr),
305  ownToNbrCyclicOrderDataPtr_(nullptr),
306  ownToNbrDebugOrderDataPtr_(nullptr)
307 {}
308 
309 
310 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
311 
313 {
314  deleteDemandDrivenData(coupledPointsPtr_);
315  deleteDemandDrivenData(coupledEdgesPtr_);
316 }
317 
318 
319 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
320 
322 {
323  if (nbrPatchName_.empty())
324  {
325  // Try and use patchGroup to find samplePatch and sampleRegion
326  label patchID = coupleGroup_.findOtherPatchID(*this);
327 
328  nbrPatchName_ = boundaryMesh()[patchID].name();
329  }
330  return nbrPatchName_;
331 }
332 
333 
335 {
336  if (nbrPatchID_ == -1)
337  {
338  nbrPatchID_ = this->boundaryMesh().findPatchID(nbrPatchName());
339 
340  if (nbrPatchID_ == -1)
341  {
343  << "Illegal neighbourPatch name " << nbrPatchName()
344  << endl << "Valid patch names are "
345  << this->boundaryMesh().names()
346  << exit(FatalError);
347  }
348 
349  // Check that it is a cyclic
350  const cyclicPolyPatch& nbrPatch = refCast<const cyclicPolyPatch>
351  (
352  this->boundaryMesh()[nbrPatchID_]
353  );
354 
355  if (nbrPatch.nbrPatchName() != name())
356  {
358  << "Patch " << name()
359  << " specifies neighbour patch " << nbrPatchName()
360  << endl << " but that in return specifies "
361  << nbrPatch.nbrPatchName()
362  << endl;
363  }
364  }
365  return nbrPatchID_;
366 }
367 
368 
370 {
371  if (!coupledPointsPtr_)
372  {
373  const faceList& nbrLocalFaces = nbrPatch().localFaces();
374  const labelList& nbrMeshPoints = nbrPatch().meshPoints();
375 
376  // Now all we know is that relative face index in *this is same
377  // as coupled face in nbrPatch and also that the 0th vertex
378  // corresponds.
379 
380  // From local point to nbrPatch or -1.
381  labelList coupledPoint(nPoints(), -1);
382 
383  forAll(*this, patchFacei)
384  {
385  const face& fA = localFaces()[patchFacei];
386  const face& fB = nbrLocalFaces[patchFacei];
387 
388  forAll(fA, indexA)
389  {
390  label patchPointA = fA[indexA];
391 
392  if (coupledPoint[patchPointA] == -1)
393  {
394  label indexB = (fB.size() - indexA) % fB.size();
395 
396  // Filter out points on wedge axis
397  if (meshPoints()[patchPointA] != nbrMeshPoints[fB[indexB]])
398  {
399  coupledPoint[patchPointA] = fB[indexB];
400  }
401  }
402  }
403  }
404 
405  coupledPointsPtr_ = new edgeList(nPoints());
406  edgeList& connected = *coupledPointsPtr_;
407 
408  // Extract coupled points.
409  label connectedI = 0;
410 
411  forAll(coupledPoint, i)
412  {
413  if (coupledPoint[i] != -1)
414  {
415  connected[connectedI++] = edge(i, coupledPoint[i]);
416  }
417  }
418 
419  connected.setSize(connectedI);
420 
421  if (debug)
422  {
423  OFstream str
424  (
425  boundaryMesh().mesh().time().path()
426  /name() + "_coupledPoints.obj"
427  );
428  label vertI = 0;
429 
430  Pout<< "Writing file " << str.name() << " with coordinates of "
431  << "coupled points" << endl;
432 
433  forAll(connected, i)
434  {
435  const point& a = points()[meshPoints()[connected[i][0]]];
436  const point& b = points()[nbrMeshPoints[connected[i][1]]];
437 
438  str<< "v " << a.x() << ' ' << a.y() << ' ' << a.z() << nl;
439  str<< "v " << b.x() << ' ' << b.y() << ' ' << b.z() << nl;
440  vertI += 2;
441 
442  str<< "l " << vertI-1 << ' ' << vertI << nl;
443  }
444  }
445  }
446  return *coupledPointsPtr_;
447 }
448 
449 
451 {
452  if (!coupledEdgesPtr_)
453  {
454  const edgeList& pointCouples = coupledPoints();
455 
456  // Build map from points on *this (A) to points on neighbourpatch (B)
457  Map<label> aToB(2*pointCouples.size());
458 
459  forAll(pointCouples, i)
460  {
461  const edge& e = pointCouples[i];
462 
463  aToB.insert(e[0], e[1]);
464  }
465 
466  // Map from edge on A to points (in B indices)
467  EdgeMap<label> edgeMap(nEdges());
468 
469  forAll(*this, patchFacei)
470  {
471  const labelList& fEdges = faceEdges()[patchFacei];
472 
473  forAll(fEdges, i)
474  {
475  label edgeI = fEdges[i];
476 
477  const edge& e = edges()[edgeI];
478 
479  // Convert edge end points to corresponding points on B side.
480  Map<label>::const_iterator fnd0 = aToB.find(e[0]);
481  if (fnd0 != aToB.end())
482  {
483  Map<label>::const_iterator fnd1 = aToB.find(e[1]);
484  if (fnd1 != aToB.end())
485  {
486  edgeMap.insert(edge(fnd0(), fnd1()), edgeI);
487  }
488  }
489  }
490  }
491 
492  // Use the edgeMap to get the edges on the B side.
493 
494  const cyclicPolyPatch& nbrPatch = this->nbrPatch();
495  const labelList& nbrMp = nbrPatch.meshPoints();
496  const labelList& mp = meshPoints();
497 
498 
499 
500  coupledEdgesPtr_ = new edgeList(edgeMap.size());
501  edgeList& coupledEdges = *coupledEdgesPtr_;
502  label coupleI = 0;
503 
504  forAll(nbrPatch, patchFacei)
505  {
506  const labelList& fEdges = nbrPatch.faceEdges()[patchFacei];
507 
508  forAll(fEdges, i)
509  {
510  label edgeI = fEdges[i];
511 
512  const edge& e = nbrPatch.edges()[edgeI];
513 
514  // Look up A edge from HashTable.
515  EdgeMap<label>::iterator iter = edgeMap.find(e);
516 
517  if (iter != edgeMap.end())
518  {
519  label edgeA = iter();
520  const edge& eA = edges()[edgeA];
521 
522  // Store correspondence. Filter out edges on wedge axis.
523  if
524  (
525  edge(mp[eA[0]], mp[eA[1]])
526  != edge(nbrMp[e[0]], nbrMp[e[1]])
527  )
528  {
529  coupledEdges[coupleI++] = edge(edgeA, edgeI);
530  }
531 
532  // Remove so we build unique list
533  edgeMap.erase(iter);
534  }
535  }
536  }
537  coupledEdges.setSize(coupleI);
538 
539 
540  // Some checks
541 
542  forAll(coupledEdges, i)
543  {
544  const edge& e = coupledEdges[i];
545 
546  if (e[0] < 0 || e[1] < 0)
547  {
549  << "Problem : at position " << i
550  << " illegal couple:" << e
551  << abort(FatalError);
552  }
553  }
554 
555  if (debug)
556  {
557  OFstream str
558  (
559  boundaryMesh().mesh().time().path()
560  /name() + "_coupledEdges.obj"
561  );
562  label vertI = 0;
563 
564  Pout<< "Writing file " << str.name() << " with centres of "
565  << "coupled edges" << endl;
566 
567  forAll(coupledEdges, i)
568  {
569  const edge& e = coupledEdges[i];
570 
571  const point& a = edges()[e[0]].centre(localPoints());
572  const point& b = nbrPatch.edges()[e[1]].centre
573  (
574  nbrPatch.localPoints()
575  );
576 
577  str<< "v " << a.x() << ' ' << a.y() << ' ' << a.z() << nl;
578  str<< "v " << b.x() << ' ' << b.y() << ' ' << b.z() << nl;
579  vertI += 2;
580 
581  str<< "l " << vertI-1 << ' ' << vertI << nl;
582  }
583  }
584  }
585  return *coupledEdgesPtr_;
586 }
587 
588 
590 (
592  const primitivePatch& pp
593 ) const
594 {
595  if (pp.empty())
596  {
597  return;
598  }
599 
600  if (owner())
601  {
602  ownToNbrOrderDataPtr_ = new ownToNbrOrderData();
603  if (coupledPolyPatch::debug)
604  {
605  ownToNbrDebugOrderDataPtr_ = new ownToNbrDebugOrderData();
606  }
607 
609  (
610  ownToNbrOrderDataPtr_(),
611  ownToNbrDebugOrderDataPtr_,
612  pp
613  );
614 
615  const scalarField magAreas(mag(pp.faceAreas()));
616 
617  ownToNbrCyclicOrderDataPtr_ = new ownToNbrCyclicOrderData();
618  ownToNbrCyclicOrderDataPtr_->ctr =
619  sum(pp.faceCentres()*magAreas)/sum(magAreas);
620  ownToNbrCyclicOrderDataPtr_->area = sum(pp.faceAreas());
621  }
622 }
623 
624 
626 (
627  PstreamBuffers& pBufs,
628  const primitivePatch& pp,
629  labelList& faceMap,
630  labelList& rotation
631 ) const
632 {
633  if (pp.empty())
634  {
635  return false;
636  }
637 
638  ownToNbrOrderData ownToNbr;
639  autoPtr<ownToNbrDebugOrderData> ownToNbrDebugPtr(nullptr);
640 
641  if (!owner())
642  {
643  ownToNbr = nbrPatch().ownToNbrOrderDataPtr_();
644  ownToNbrDebugPtr = nbrPatch().ownToNbrDebugOrderDataPtr_;
645 
646  cyclicTransform ct
647  (
648  name(),
649  pp.faceCentres(),
650  pp.faceAreas(),
651  *this,
652  nbrPatchName(),
653  pointField(1, nbrPatch().ownToNbrCyclicOrderDataPtr_->ctr),
654  vectorField(1, nbrPatch().ownToNbrCyclicOrderDataPtr_->area),
655  nbrPatch(),
656  matchTolerance()
657  );
658 
659  ownToNbr.transform(ct.transform());
660  if (ownToNbrDebugPtr.valid())
661  {
662  ownToNbrDebugPtr->transform(ct.transform());
663  }
664  }
665 
666  return
668  (
669  ownToNbr,
670  ownToNbrDebugPtr,
671  pp,
672  faceMap,
673  rotation
674  );
675 }
676 
677 
679 {
681 
682  if (!nbrPatchName_.empty())
683  {
684  writeEntry(os, "neighbourPatch", nbrPatchName_);
685  }
686 
687  coupleGroup_.write(os);
688 
690 }
691 
692 
693 // ************************************************************************* //
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
static bool valid(char)
Is this character valid for a word.
Definition: wordI.H:115
virtual bool order(const ownToNbrOrderData &ownToNbr, const autoPtr< ownToNbrDebugOrderData > &ownToNbrDebugPtr, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for the given primitivePatch.
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
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
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
const edgeList & coupledPoints() const
Return connected points (from patch local to neighbour patch local)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
Definition: HashTable.H:112
A face is a list of labels corresponding to mesh vertices.
Definition: face.H:75
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:323
const Field< PointType > & faceCentres() const
Return face centres for patch.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
Unit conversion functions.
void transform(const transformer &tr)
Output to file stream.
Definition: OFstream.H:82
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Definition: createFields.H:27
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
const word & nbrPatchName() const
Neighbour patch name.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
const Cmpt & z() const
Definition: VectorI.H:87
cyclicPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:108
const edgeList & coupledEdges() const
Return connected edges (from patch local to neighbour patch local).
const fileName & name() const
Return the name of the stream.
Definition: OFstream.H:120
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
Determine correspondence between points. See below.
const Field< PointType > & faceAreas() const
Return face areas for patch.
Macros for easy insertion into run-time selection tables.
void write(Ostream &os) const
Write the data to a dictionary.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const Cmpt & y() const
Definition: VectorI.H:81
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
Definition: HashTable.C:371
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
Definition: HashTableI.H:80
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
Definition: HashTable.C:142
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
const Vector< Cmpt > & centre(const Foam::List< Vector< Cmpt >> &) const
Return *this (used for point which is a typedef to Vector<scalar>.
Definition: VectorI.H:116
virtual void initOrder(ownToNbrOrderData &ownToNbr, autoPtr< ownToNbrDebugOrderData > &ownToNbrDebugPtr, const primitivePatch &) const
Initialise ordering for the given primitivePatch. Fills the.
virtual void rename(const wordList &newNames)
Reset the patch name.
Data to pass from owner.initOrder to nbr.order if debugging.
Spatial transformation functions for primitive fields.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
dynamicFvMesh & mesh
const pointField & points
List< edge > edgeList
Definition: edgeList.H:38
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:58
A class for handling words, derived from string.
Definition: word.H:59
label nPoints
Cyclic plane patch.
Data to pass from owner.initOrder to nbr.order.
virtual void rename(const wordList &newNames)
Reset the patch name.
Definition: polyPatch.C:76
static const word null
An empty word.
Definition: word.H:77
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
Definition: polyPatch.C:82
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
const dimensionedScalar mp
Proton mass.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:63
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
Definition: autoPtrI.H:83
errorManip< error > abort(error &err)
Definition: errorManip.H:131
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
const Cmpt & x() const
Definition: VectorI.H:75
Foam::polyBoundaryMesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
static const char nl
Definition: Ostream.H:260
defineTypeNameAndDebug(combustionModel, 0)
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
void setSize(const label)
Reset size of List.
Definition: List.C:281
Template functions to aid in the implementation of demand driven data.
virtual ~cyclicPolyPatch()
Destructor.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:335
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:100
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
const labelListList & faceEdges() const
Return face-edge addressing.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialise ordering for primitivePatch. Does not.
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
Cyclic plane tranformation.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
void deleteDemandDrivenData(DataPtr &dataPtr)
virtual label nbrPatchID() const
Neighbour patchID.
Namespace for OpenFOAM.
fileName path(UMean.rootPath()/UMean.caseName()/functionObjects::writeFile::outputPrefix/"graphs"/UMean.instance())
IOerror FatalIOError