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-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 \*---------------------------------------------------------------------------*/
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::topoChange(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 
160 
162 (
163  const word& name,
164  const label size,
165  const label start,
166  const label index,
167  const polyBoundaryMesh& bm,
168  const word& patchType,
169  const word& nbrPatchName,
170  const cyclicTransform& transform
171 )
172 :
173  coupledPolyPatch(name, size, start, index, bm, patchType),
174  cyclicTransform(transform),
175  nbrPatchName_(nbrPatchName),
176  nbrPatchID_(-1),
177  coupledPointsPtr_(nullptr),
178  coupledEdgesPtr_(nullptr),
179  ownToNbrOrderDataPtr_(nullptr),
180  ownToNbrCyclicOrderDataPtr_(nullptr),
181  ownToNbrDebugOrderDataPtr_(nullptr)
182 {}
183 
184 
186 (
187  const word& name,
188  const dictionary& dict,
189  const label index,
190  const polyBoundaryMesh& bm,
191  const word& patchType,
192  const bool cyclicTransformDefaultIsNone
193 )
194 :
195  coupledPolyPatch(name, dict, index, bm, patchType),
196  cyclicTransform(dict, cyclicTransformDefaultIsNone),
197  nbrPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
198  coupleGroup_(dict),
199  nbrPatchID_(-1),
200  coupledPointsPtr_(nullptr),
201  coupledEdgesPtr_(nullptr),
202  ownToNbrOrderDataPtr_(nullptr),
203  ownToNbrCyclicOrderDataPtr_(nullptr),
204  ownToNbrDebugOrderDataPtr_(nullptr)
205 {
206  if (nbrPatchName_ == word::null && !coupleGroup_.valid())
207  {
209  (
210  dict
211  ) << "No \"neighbourPatch\" provided." << endl
212  << exit(FatalIOError);
213  }
214 
215  if (nbrPatchName_ == name)
216  {
218  << "Neighbour patch name " << nbrPatchName_
219  << " cannot be the same as this patch " << name
220  << exit(FatalIOError);
221  }
222 
223  // Neighbour patch might not be valid yet so no transformation
224  // calculation possible.
225 }
226 
227 
229 (
230  const cyclicPolyPatch& pp,
231  const polyBoundaryMesh& bm
232 )
233 :
234  coupledPolyPatch(pp, bm),
235  cyclicTransform(pp),
236  nbrPatchName_(pp.nbrPatchName_),
237  coupleGroup_(pp.coupleGroup_),
238  nbrPatchID_(-1),
239  coupledPointsPtr_(nullptr),
240  coupledEdgesPtr_(nullptr),
241  ownToNbrOrderDataPtr_(nullptr),
242  ownToNbrCyclicOrderDataPtr_(nullptr),
243  ownToNbrDebugOrderDataPtr_(nullptr)
244 {
245  // Neighbour patch might not be valid yet so no transformation
246  // calculation possible.
247 }
248 
249 
251 (
252  const cyclicPolyPatch& pp,
253  const polyBoundaryMesh& bm,
254  const label index,
255  const label newSize,
256  const label newStart,
257  const word& neiName
258 )
259 :
260  coupledPolyPatch(pp, bm, index, newSize, newStart),
261  cyclicTransform(pp),
262  nbrPatchName_(neiName),
263  coupleGroup_(pp.coupleGroup_),
264  nbrPatchID_(-1),
265  coupledPointsPtr_(nullptr),
266  coupledEdgesPtr_(nullptr),
267  ownToNbrOrderDataPtr_(nullptr),
268  ownToNbrCyclicOrderDataPtr_(nullptr),
269  ownToNbrDebugOrderDataPtr_(nullptr)
270 {
271  if (neiName == name())
272  {
274  << "Neighbour patch name " << neiName
275  << " cannot be the same as this patch " << name()
276  << exit(FatalError);
277  }
278 
279  // Neighbour patch might not be valid yet so no transformation
280  // calculation possible.
281 }
282 
283 
285 (
286  const cyclicPolyPatch& pp,
287  const polyBoundaryMesh& bm,
288  const label index,
289  const labelUList& mapAddressing,
290  const label newStart
291 )
292 :
293  coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
294  cyclicTransform(pp),
295  nbrPatchName_(pp.nbrPatchName_),
296  coupleGroup_(pp.coupleGroup_),
297  nbrPatchID_(-1),
298  coupledPointsPtr_(nullptr),
299  coupledEdgesPtr_(nullptr),
300  ownToNbrOrderDataPtr_(nullptr),
301  ownToNbrCyclicOrderDataPtr_(nullptr),
302  ownToNbrDebugOrderDataPtr_(nullptr)
303 {}
304 
305 
306 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
307 
309 {
310  deleteDemandDrivenData(coupledPointsPtr_);
311  deleteDemandDrivenData(coupledEdgesPtr_);
312 }
313 
314 
315 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
316 
318 {
319  if (nbrPatchName_.empty())
320  {
321  // Try and use patchGroup to find samplePatch and sampleRegion
322  label patchID = coupleGroup_.findOtherPatchID(*this);
323 
324  nbrPatchName_ = boundaryMesh()[patchID].name();
325  }
326  return nbrPatchName_;
327 }
328 
329 
331 {
332  if (nbrPatchID_ == -1)
333  {
334  nbrPatchID_ = this->boundaryMesh().findPatchID(nbrPatchName());
335 
336  if (nbrPatchID_ == -1)
337  {
339  << "Illegal neighbourPatch name " << nbrPatchName()
340  << endl << "Valid patch names are "
341  << this->boundaryMesh().names()
342  << exit(FatalError);
343  }
344 
345  // Check that it is a cyclic
346  const cyclicPolyPatch& nbrPatch = refCast<const cyclicPolyPatch>
347  (
348  this->boundaryMesh()[nbrPatchID_]
349  );
350 
351  if (nbrPatch.nbrPatchName() != name())
352  {
354  << "Patch " << name()
355  << " specifies neighbour patch " << nbrPatchName()
356  << endl << " but that in return specifies "
357  << nbrPatch.nbrPatchName()
358  << endl;
359  }
360  }
361  return nbrPatchID_;
362 }
363 
364 
366 {
367  if (!coupledPointsPtr_)
368  {
369  const faceList& nbrLocalFaces = nbrPatch().localFaces();
370  const labelList& nbrMeshPoints = nbrPatch().meshPoints();
371 
372  // Now all we know is that relative face index in *this is same
373  // as coupled face in nbrPatch and also that the 0th vertex
374  // corresponds.
375 
376  // From local point to nbrPatch or -1.
377  labelList coupledPoint(nPoints(), -1);
378 
379  forAll(*this, patchFacei)
380  {
381  const face& fA = localFaces()[patchFacei];
382  const face& fB = nbrLocalFaces[patchFacei];
383 
384  forAll(fA, indexA)
385  {
386  label patchPointA = fA[indexA];
387 
388  if (coupledPoint[patchPointA] == -1)
389  {
390  label indexB = (fB.size() - indexA) % fB.size();
391 
392  // Filter out points on wedge axis
393  if (meshPoints()[patchPointA] != nbrMeshPoints[fB[indexB]])
394  {
395  coupledPoint[patchPointA] = fB[indexB];
396  }
397  }
398  }
399  }
400 
401  coupledPointsPtr_ = new edgeList(nPoints());
402  edgeList& connected = *coupledPointsPtr_;
403 
404  // Extract coupled points.
405  label connectedI = 0;
406 
407  forAll(coupledPoint, i)
408  {
409  if (coupledPoint[i] != -1)
410  {
411  connected[connectedI++] = edge(i, coupledPoint[i]);
412  }
413  }
414 
415  connected.setSize(connectedI);
416 
417  if (debug)
418  {
419  OFstream str
420  (
421  boundaryMesh().mesh().time().path()
422  /name() + "_coupledPoints.obj"
423  );
424  label vertI = 0;
425 
426  Pout<< "Writing file " << str.name() << " with coordinates of "
427  << "coupled points" << endl;
428 
429  forAll(connected, i)
430  {
431  const point& a = points()[meshPoints()[connected[i][0]]];
432  const point& b = points()[nbrMeshPoints[connected[i][1]]];
433 
434  str<< "v " << a.x() << ' ' << a.y() << ' ' << a.z() << nl;
435  str<< "v " << b.x() << ' ' << b.y() << ' ' << b.z() << nl;
436  vertI += 2;
437 
438  str<< "l " << vertI-1 << ' ' << vertI << nl;
439  }
440  }
441  }
442  return *coupledPointsPtr_;
443 }
444 
445 
447 {
448  if (!coupledEdgesPtr_)
449  {
450  const edgeList& pointCouples = coupledPoints();
451 
452  // Build map from points on *this (A) to points on neighbourpatch (B)
453  Map<label> aToB(2*pointCouples.size());
454 
455  forAll(pointCouples, i)
456  {
457  const edge& e = pointCouples[i];
458 
459  aToB.insert(e[0], e[1]);
460  }
461 
462  // Map from edge on A to points (in B indices)
463  EdgeMap<label> edgeMap(nEdges());
464 
465  forAll(*this, patchFacei)
466  {
467  const labelList& fEdges = faceEdges()[patchFacei];
468 
469  forAll(fEdges, i)
470  {
471  label edgeI = fEdges[i];
472 
473  const edge& e = edges()[edgeI];
474 
475  // Convert edge end points to corresponding points on B side.
476  Map<label>::const_iterator fnd0 = aToB.find(e[0]);
477  if (fnd0 != aToB.end())
478  {
479  Map<label>::const_iterator fnd1 = aToB.find(e[1]);
480  if (fnd1 != aToB.end())
481  {
482  edgeMap.insert(edge(fnd0(), fnd1()), edgeI);
483  }
484  }
485  }
486  }
487 
488  // Use the edgeMap to get the edges on the B side.
489 
490  const cyclicPolyPatch& nbrPatch = this->nbrPatch();
491  const labelList& nbrMp = nbrPatch.meshPoints();
492  const labelList& mp = meshPoints();
493 
494 
495 
496  coupledEdgesPtr_ = new edgeList(edgeMap.size());
497  edgeList& coupledEdges = *coupledEdgesPtr_;
498  label coupleI = 0;
499 
500  forAll(nbrPatch, patchFacei)
501  {
502  const labelList& fEdges = nbrPatch.faceEdges()[patchFacei];
503 
504  forAll(fEdges, i)
505  {
506  label edgeI = fEdges[i];
507 
508  const edge& e = nbrPatch.edges()[edgeI];
509 
510  // Look up A edge from HashTable.
511  EdgeMap<label>::iterator iter = edgeMap.find(e);
512 
513  if (iter != edgeMap.end())
514  {
515  label edgeA = iter();
516  const edge& eA = edges()[edgeA];
517 
518  // Store correspondence. Filter out edges on wedge axis.
519  if
520  (
521  edge(mp[eA[0]], mp[eA[1]])
522  != edge(nbrMp[e[0]], nbrMp[e[1]])
523  )
524  {
525  coupledEdges[coupleI++] = edge(edgeA, edgeI);
526  }
527 
528  // Remove so we build unique list
529  edgeMap.erase(iter);
530  }
531  }
532  }
533  coupledEdges.setSize(coupleI);
534 
535 
536  // Some checks
537 
538  forAll(coupledEdges, i)
539  {
540  const edge& e = coupledEdges[i];
541 
542  if (e[0] < 0 || e[1] < 0)
543  {
545  << "Problem : at position " << i
546  << " illegal couple:" << e
547  << abort(FatalError);
548  }
549  }
550 
551  if (debug)
552  {
553  OFstream str
554  (
555  boundaryMesh().mesh().time().path()
556  /name() + "_coupledEdges.obj"
557  );
558  label vertI = 0;
559 
560  Pout<< "Writing file " << str.name() << " with centres of "
561  << "coupled edges" << endl;
562 
563  forAll(coupledEdges, i)
564  {
565  const edge& e = coupledEdges[i];
566 
567  const point& a = edges()[e[0]].centre(localPoints());
568  const point& b = nbrPatch.edges()[e[1]].centre
569  (
570  nbrPatch.localPoints()
571  );
572 
573  str<< "v " << a.x() << ' ' << a.y() << ' ' << a.z() << nl;
574  str<< "v " << b.x() << ' ' << b.y() << ' ' << b.z() << nl;
575  vertI += 2;
576 
577  str<< "l " << vertI-1 << ' ' << vertI << nl;
578  }
579  }
580  }
581  return *coupledEdgesPtr_;
582 }
583 
584 
586 (
588  const primitivePatch& pp
589 ) const
590 {
591  if (pp.empty())
592  {
593  return;
594  }
595 
596  if (owner())
597  {
598  ownToNbrOrderDataPtr_ = new ownToNbrOrderData();
599  if (coupledPolyPatch::debug)
600  {
601  ownToNbrDebugOrderDataPtr_ = new ownToNbrDebugOrderData();
602  }
603 
605  (
606  ownToNbrOrderDataPtr_(),
607  ownToNbrDebugOrderDataPtr_,
608  pp
609  );
610 
611  const scalarField magAreas(mag(pp.faceAreas()));
612 
613  ownToNbrCyclicOrderDataPtr_ = new ownToNbrCyclicOrderData();
614  ownToNbrCyclicOrderDataPtr_->ctr =
615  sum(pp.faceCentres()*magAreas)/sum(magAreas);
616  ownToNbrCyclicOrderDataPtr_->area = sum(pp.faceAreas());
617  }
618 }
619 
620 
622 (
623  PstreamBuffers& pBufs,
624  const primitivePatch& pp,
625  labelList& faceMap,
626  labelList& rotation
627 ) const
628 {
629  if (pp.empty())
630  {
631  return false;
632  }
633 
634  ownToNbrOrderData ownToNbr;
635  autoPtr<ownToNbrDebugOrderData> ownToNbrDebugPtr(nullptr);
636 
637  if (!owner())
638  {
639  ownToNbr = nbrPatch().ownToNbrOrderDataPtr_();
640  ownToNbrDebugPtr = nbrPatch().ownToNbrDebugOrderDataPtr_;
641 
642  cyclicTransform ct
643  (
644  name(),
645  pp.faceCentres(),
646  pp.faceAreas(),
647  *this,
648  nbrPatchName(),
649  pointField(1, nbrPatch().ownToNbrCyclicOrderDataPtr_->ctr),
650  vectorField(1, nbrPatch().ownToNbrCyclicOrderDataPtr_->area),
651  nbrPatch(),
652  matchTolerance()
653  );
654 
655  ownToNbr.transform(ct.transform());
656  if (ownToNbrDebugPtr.valid())
657  {
658  ownToNbrDebugPtr->transform(ct.transform());
659  }
660  }
661 
662  return
664  (
665  ownToNbr,
666  ownToNbrDebugPtr,
667  pp,
668  faceMap,
669  rotation
670  );
671 }
672 
673 
675 {
677 
678  if (!nbrPatchName_.empty())
679  {
680  writeEntry(os, "neighbourPatch", nbrPatchName_);
681  }
682 
683  coupleGroup_.write(os);
684 
686 }
687 
688 
689 // ************************************************************************* //
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
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
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:306
const Field< PointType > & faceCentres() const
Return face centres for patch.
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 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.
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
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).
fvMesh & mesh
const fileName & name() const
Return the name of the stream.
Definition: OFstream.H:120
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
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
bool insert(const edge &, 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
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
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:82
static const word null
An empty word.
Definition: word.H:77
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
Definition: polyPatch.C:88
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.
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
Map from edge (expressed as its endpoints) to value.
Definition: EdgeMap.H:47
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
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:69
void setSize(const label)
Reset size of List.
Definition: List.C:281
Template functions to aid in the implementation of demand driven data.
virtual void movePoints(const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
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:318
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:97
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 transformation.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
void deleteDemandDrivenData(DataPtr &dataPtr)
virtual label nbrPatchID() const
Neighbour patchID.
Namespace for OpenFOAM.
IOerror FatalIOError