cyclicAMIPolyPatch.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-2021 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 "cyclicAMIPolyPatch.H"
27 #include "SubField.H"
28 #include "Time.H"
29 #include "unitConversion.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(cyclicAMIPolyPatch, 0);
37 
38  addToRunTimeSelectionTable(polyPatch, cyclicAMIPolyPatch, word);
39  addToRunTimeSelectionTable(polyPatch, cyclicAMIPolyPatch, dictionary);
40 }
41 
42 
43 // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
44 
46 {
47  if (owner())
48  {
49  const polyPatch& nbr = nbrPatch();
50  pointField nbrPoints
51  (
52  nbrPatch().boundaryMesh().mesh().points(),
53  nbrPatch().meshPoints()
54  );
55 
56  if (debug)
57  {
58  const Time& t = boundaryMesh().mesh().time();
59  OFstream os(t.path()/name() + "_neighbourPatch-org.obj");
60  meshTools::writeOBJ(os, nbrPatch().localFaces(), nbrPoints);
61  }
62 
63  // Transform neighbour patch to local system
64  transform().transformPosition(nbrPoints, nbrPoints);
65 
66  primitivePatch nbrPatch0
67  (
69  (
70  nbr.localFaces(),
71  nbr.size()
72  ),
73  nbrPoints
74  );
75 
76  if (debug)
77  {
78  const Time& t = boundaryMesh().mesh().time();
79  OFstream osN(t.path()/name() + "_neighbourPatch-trans.obj");
80  meshTools::writeOBJ(osN, nbrPatch0.localFaces(), nbrPoints);
81 
82  OFstream osO(t.path()/name() + "_ownerPatch.obj");
83  meshTools::writeOBJ(osO, this->localFaces(), localPoints());
84  }
85 
86  // Construct/apply AMI interpolation to determine addressing and weights
87  AMIs_.resize(1);
88  AMIs_.set
89  (
90  0,
92  (
93  *this,
94  nbrPatch0,
95  surfPtr(),
97  AMIRequireMatch_,
98  AMIMethod_,
99  AMILowWeightCorrection_,
100  AMIReverse_
101  )
102  );
103 
104  AMITransforms_.resize(1, transformer::I);
105 
106  if (debug)
107  {
108  Pout<< "cyclicAMIPolyPatch : " << name()
109  << " constructed AMI with " << nl
110  << " " << "srcAddress:" << AMIs_[0].srcAddress().size()
111  << nl
112  << " " << "tgAddress :" << AMIs_[0].tgtAddress().size()
113  << nl << endl;
114  }
115  }
116 }
117 
118 
120 {
121  // Clear the invalid AMIs and transforms
122  AMIs_.clear();
123  AMITransforms_.clear();
124 
126 }
127 
128 
130 {
131  if
132  (
133  !Pstream::parRun()
134  && !this->boundaryMesh().mesh().time().processorCase()
135  )
136  {
137  static_cast<cyclicTransform&>(*this) =
139  (
140  name(),
141  faceCentres(),
142  faceAreas(),
143  *this,
144  nbrPatchName(),
145  nbrPatch().faceCentres(),
146  nbrPatch().faceAreas(),
147  nbrPatch(),
148  matchTolerance()
149  );
150  }
151  else
152  {
153  static_cast<cyclicTransform&>(*this) =
155  (
156  name(),
157  faceAreas(),
158  *this,
159  nbrPatchName(),
160  nbrPatch(),
161  matchTolerance()
162  );
163  }
164 }
165 
166 
168 (
169  PstreamBuffers& pBufs,
170  const pointField& p
171 )
172 {
173  // Clear the invalid AMIs and transforms
174  AMIs_.clear();
175  AMITransforms_.clear();
176 
177  polyPatch::initMovePoints(pBufs, p);
178 
179  // See below. Clear out any local geometry
181 }
182 
183 
185 (
186  PstreamBuffers& pBufs,
187  const pointField& p
188 )
189 {
190  polyPatch::movePoints(pBufs, p);
191 }
192 
193 
195 {
196  // Clear the invalid AMIs and transforms
197  AMIs_.clear();
198  AMITransforms_.clear();
199 
201 }
202 
203 
205 {
206  polyPatch::updateMesh(pBufs);
207 }
208 
209 
211 {
212  // Clear the invalid AMIs and transforms
213  AMIs_.clear();
214  AMITransforms_.clear();
215 
217 }
218 
219 
221 {
222  polyPatch::rename(newNames);
223  nbrPatch().nbrPatchName_ = newNames[index()];
224 }
225 
226 
228 {
229  polyPatch::reorder(newToOldIndex);
230  if (nbrPatchID_ != -1)
231  {
232  nbrPatchID_ = findIndex(newToOldIndex, nbrPatchID_);
233  }
234 }
235 
236 
237 // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
238 
240 (
241  const word& name,
242  const label size,
243  const label start,
244  const label index,
245  const polyBoundaryMesh& bm,
246  const word& patchType,
247  const bool AMIRequireMatch,
249 )
250 :
251  coupledPolyPatch(name, size, start, index, bm, patchType),
252  cyclicTransform(true),
253  nbrPatchName_(word::null),
254  nbrPatchID_(-1),
255  AMIs_(),
256  AMITransforms_(),
257  AMIReverse_(false),
258  AMIRequireMatch_(AMIRequireMatch),
259  AMILowWeightCorrection_(-1.0),
260  AMIMethod_(AMIMethod),
261  surfPtr_(nullptr),
262  surfDict_(fileName("surface"))
263 {
264  // Neighbour patch might not be valid yet so no transformation
265  // calculation possible
266 }
267 
268 
270 (
271  const word& name,
272  const dictionary& dict,
273  const label index,
274  const polyBoundaryMesh& bm,
275  const word& patchType,
276  const bool AMIRequireMatch,
278 )
279 :
280  coupledPolyPatch(name, dict, index, bm, patchType),
281  cyclicTransform(dict, true),
282  nbrPatchName_(dict.lookupOrDefault<word>("neighbourPatch", "")),
283  coupleGroup_(dict),
284  nbrPatchID_(-1),
285  AMIs_(),
286  AMITransforms_(),
287  AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
288  AMIRequireMatch_(AMIRequireMatch),
289  AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
290  AMIMethod_
291  (
292  dict.found("method")
294  (
295  dict.lookup("method")
296  )
297  : AMIMethod
298  ),
299  surfPtr_(nullptr),
300  surfDict_(dict.subOrEmptyDict("surface"))
301 {
302  if (nbrPatchName_ == word::null && !coupleGroup_.valid())
303  {
305  (
306  dict
307  ) << "No \"neighbourPatch\" or \"coupleGroup\" provided."
308  << exit(FatalIOError);
309  }
310 
311  if (nbrPatchName_ == name)
312  {
314  (
315  dict
316  ) << "Neighbour patch name " << nbrPatchName_
317  << " cannot be the same as this patch " << name
318  << exit(FatalIOError);
319  }
320 
321  // Neighbour patch might not be valid yet so no transformation
322  // calculation possible
323 }
324 
325 
327 (
328  const cyclicAMIPolyPatch& pp,
329  const polyBoundaryMesh& bm
330 )
331 :
332  coupledPolyPatch(pp, bm),
333  cyclicTransform(pp),
334  nbrPatchName_(pp.nbrPatchName_),
335  coupleGroup_(pp.coupleGroup_),
336  nbrPatchID_(-1),
337  AMIs_(),
338  AMITransforms_(),
339  AMIReverse_(pp.AMIReverse_),
340  AMIRequireMatch_(pp.AMIRequireMatch_),
341  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
342  AMIMethod_(pp.AMIMethod_),
343  surfPtr_(nullptr),
344  surfDict_(pp.surfDict_)
345 {
346  // Neighbour patch might not be valid yet so no transformation
347  // calculation possible
348 }
349 
350 
352 (
353  const cyclicAMIPolyPatch& pp,
354  const polyBoundaryMesh& bm,
355  const label index,
356  const label newSize,
357  const label newStart,
358  const word& nbrPatchName
359 )
360 :
361  coupledPolyPatch(pp, bm, index, newSize, newStart),
362  cyclicTransform(pp),
363  nbrPatchName_(nbrPatchName),
364  coupleGroup_(pp.coupleGroup_),
365  nbrPatchID_(-1),
366  AMIs_(),
367  AMITransforms_(),
368  AMIReverse_(pp.AMIReverse_),
369  AMIRequireMatch_(pp.AMIRequireMatch_),
370  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
371  AMIMethod_(pp.AMIMethod_),
372  surfPtr_(nullptr),
373  surfDict_(pp.surfDict_)
374 {
375  if (nbrPatchName_ == name())
376  {
378  << "Neighbour patch name " << nbrPatchName_
379  << " cannot be the same as this patch " << name()
380  << exit(FatalError);
381  }
382 
383  // Neighbour patch might not be valid yet so no transformation
384  // calculation possible
385 }
386 
387 
389 (
390  const cyclicAMIPolyPatch& pp,
391  const polyBoundaryMesh& bm,
392  const label index,
393  const labelUList& mapAddressing,
394  const label newStart
395 )
396 :
397  coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
398  cyclicTransform(pp),
399  nbrPatchName_(pp.nbrPatchName_),
400  coupleGroup_(pp.coupleGroup_),
401  nbrPatchID_(-1),
402  AMIs_(),
403  AMITransforms_(),
404  AMIReverse_(pp.AMIReverse_),
405  AMIRequireMatch_(pp.AMIRequireMatch_),
406  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
407  AMIMethod_(pp.AMIMethod_),
408  surfPtr_(nullptr),
409  surfDict_(pp.surfDict_)
410 {}
411 
412 
413 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
414 
416 {}
417 
418 
419 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
420 
422 {
423  if (nbrPatchID_ == -1)
424  {
425  nbrPatchID_ = this->boundaryMesh().findPatchID(nbrPatchName());
426 
427  if (nbrPatchID_ == -1)
428  {
430  << "Illegal neighbourPatch name " << nbrPatchName()
431  << nl << "Valid patch names are "
432  << this->boundaryMesh().names()
433  << exit(FatalError);
434  }
435 
436  // Check that it is a cyclic AMI patch
437  const cyclicAMIPolyPatch& nbrPatch =
438  refCast<const cyclicAMIPolyPatch>
439  (
440  this->boundaryMesh()[nbrPatchID_]
441  );
442 
443  if (nbrPatch.nbrPatchName() != name())
444  {
446  << "Patch " << name()
447  << " specifies neighbour patch " << nbrPatchName()
448  << nl << " but that in return specifies "
449  << nbrPatch.nbrPatchName() << endl;
450  }
451  }
452 
453  return nbrPatchID_;
454 }
455 
456 
458 {
459  return index() < nbrPatchID();
460 }
461 
462 
464 {
465  const polyPatch& pp = this->boundaryMesh()[nbrPatchID()];
466  return refCast<const cyclicAMIPolyPatch>(pp);
467 }
468 
469 
472 {
473  const word surfType(surfDict_.lookupOrDefault<word>("type", "none"));
474 
475  if (!surfPtr_.valid() && owner() && surfType != "none")
476  {
477  word surfName(surfDict_.lookupOrDefault("name", name()));
478 
479  const polyMesh& mesh = boundaryMesh().mesh();
480 
481  surfPtr_ =
483  (
484  surfType,
485  IOobject
486  (
487  surfName,
488  mesh.time().constant(),
489  searchableSurface::geometryDir(mesh.time()),
490  mesh,
493  ),
494  surfDict_
495  );
496  }
497 
498  return surfPtr_;
499 }
500 
501 
504 {
505  if (!owner())
506  {
508  << "AMI interpolators only available to owner patch"
509  << abort(FatalError);
510  }
511 
512  if (AMIs_.empty())
513  {
514  resetAMI();
515  }
516 
517  return AMIs_;
518 }
519 
520 
523 {
524  if (!owner())
525  {
527  << "AMI transforms only available to owner patch"
528  << abort(FatalError);
529  }
530 
531  if (AMIs_.empty())
532  {
533  resetAMI();
534  }
535 
536  return AMITransforms_;
537 }
538 
539 
541 {
542  if (owner())
543  {
544  return AMILowWeightCorrection_ > 0;
545  }
546  else
547  {
548  return nbrPatch().AMILowWeightCorrection_ > 0;
549  }
550 }
551 
552 
554 {
555  if (owner())
556  {
557  return AMIs()[0].srcWeightsSum();
558  }
559  else
560  {
561  return nbrPatch().AMIs()[0].tgtWeightsSum();
562  }
563 }
564 
565 
567 {
568  if (owner())
569  {
570  return AMIs()[0].tgtWeightsSum();
571  }
572  else
573  {
574  return nbrPatch().AMIs()[0].srcWeightsSum();
575  }
576 }
577 
578 
580 (
581  const scalarField& fld,
582  const direction cmpt,
583  const direction rank,
584  const scalarUList& defaultValues
585 ) const
586 {
587  const cyclicAMIPolyPatch& nei = nbrPatch();
588 
589  tmp<scalarField> result(new scalarField(size(), Zero));
590 
591  if (owner())
592  {
593  forAll(AMIs(), i)
594  {
595  const scalar r =
596  pow(inv(AMITransforms()[i]).T()(cmpt, cmpt), rank);
597 
598  result.ref() +=
599  AMIs()[i].interpolateToSource(r*fld, defaultValues);
600  }
601  }
602  else
603  {
604  forAll(nei.AMIs(), i)
605  {
606  const scalar r =
607  pow(nei.AMITransforms()[i].T()(cmpt, cmpt), rank);
608 
609  result.ref() +=
610  nei.AMIs()[i].interpolateToTarget(r*fld, defaultValues);
611  }
612  }
613 
614  return result;
615 }
616 
617 
619 (
620  PstreamBuffers& pBufs,
621  const primitivePatch& pp
622 ) const
623 {}
624 
625 
627 (
628  PstreamBuffers& pBufs,
629  const primitivePatch& pp,
630  labelList& faceMap,
631  labelList& rotation
632 ) const
633 {
634  faceMap.setSize(pp.size());
635  faceMap = -1;
636 
637  rotation.setSize(pp.size());
638  rotation = 0;
639 
640  return false;
641 }
642 
643 
645 (
646  const label facei,
647  const vector& n,
648  point& p
649 ) const
650 {
651  point pt(transform().invTransformPosition(p));
652  vector nt(transform().invTransform(n));
653 
654  if (owner())
655  {
656  forAll(AMIs(), i)
657  {
658  point ptt = AMITransforms()[i].transformPosition(pt);
659  const vector ntt = AMITransforms()[i].transform(nt);
660 
661  const label nbrFacei =
662  AMIs()[i].tgtPointFace(*this, nbrPatch(), ntt, facei, ptt);
663 
664  if (nbrFacei >= 0)
665  {
666  p = ptt;
667  return labelPair(i, nbrFacei);
668  }
669  }
670  }
671  else
672  {
673  forAll(nbrPatch().AMIs(), i)
674  {
675  point ptt =
676  nbrPatch().AMITransforms()[i].invTransformPosition(pt);
677  const vector ntt =
678  nbrPatch().AMITransforms()[i].invTransform(nt);
679 
680  const label nbrFacei =
681  nbrPatch().AMIs()[i].srcPointFace
682  (
683  nbrPatch(),
684  *this,
685  ntt,
686  facei,
687  ptt
688  );
689 
690  if (nbrFacei >= 0)
691  {
692  p = ptt;
693  return labelPair(i, nbrFacei);
694  }
695  }
696  }
697 
698  return labelPair(-1, -1);
699 }
700 
701 
703 {
704  const cyclicAMIPolyPatch& patch = owner() ? *this : nbrPatch();
705 
706  const label proc = patch.AMIs()[0].singlePatchProc();
707 
708  for (label i = 1; i < patch.AMIs().size(); ++ i)
709  {
710  if (patch.AMIs()[i].singlePatchProc() != proc)
711  {
712  return -1;
713  }
714  }
715 
716  return proc;
717 }
718 
719 
721 {
723  if (!nbrPatchName_.empty())
724  {
725  writeEntry(os, "neighbourPatch", nbrPatchName_);
726  }
727  coupleGroup_.write(os);
728 
730 
731  if (AMIReverse_)
732  {
733  writeEntry(os, "flipNormals", AMIReverse_);
734  }
735 
736  if (AMILowWeightCorrection_ > 0)
737  {
738  writeEntry(os, "lowWeightCorrection", AMILowWeightCorrection_);
739  }
740 
741  writeEntry
742  (
743  os,
744  "method",
746  );
747 
748  if (!surfDict_.empty())
749  {
750  writeKeyword(os, surfDict_.dictName());
751  os << surfDict_;
752  }
753 }
754 
755 
756 // ************************************************************************* //
virtual void clearGeom()
Clear geometry.
static word interpolationMethodToWord(const interpolationMethod &method)
Convert interpolationMethod to word representation.
virtual void resetAMI() const
Reset the AMI interpolator.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
static bool valid(char)
Is this character valid for a word.
Definition: wordI.H:115
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Definition: dictionary.C:643
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
virtual void movePoints(const Field< PointType > &)
Correct patch after moving points.
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
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
A class for handling file names.
Definition: fileName.H:79
Ostream & writeKeyword(Foam::Ostream &os, const keyType &kw)
Write the keyword to the Ostream with the current level of indentation.
Definition: keyType.C:155
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
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
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:181
Unit conversion functions.
Output to file stream.
Definition: OFstream.H:82
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
uint8_t direction
Definition: direction.H:45
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
labelPair pointAMIAndFace(const label facei, const vector &n, point &p) const
Return the transform and face indices on neighbour patch which.
bool applyLowWeightCorrection() const
Return true if applying the low weight correction.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
void writeOBJ(Ostream &os, const point &pt)
Write obj representation of point.
Definition: meshTools.C:203
tmp< Field< Type > > interpolate(const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >()) const
Interpolate field.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:108
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Macros for easy insertion into run-time selection tables.
void write(Ostream &os) const
Write the data to a dictionary.
virtual void clearGeom()
Clear geometry.
Definition: polyPatch.C:70
interpolationMethod
Enumeration specifying interpolation method.
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
const bool AMIRequireMatch_
Flag to indicate that patches should match/overlap.
const dictionary surfDict_
Dictionary used during projection surface construction.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual const scalarField & nbrWeightsSum() const
Return the weights sum for the neighbour patch.
const List< transformer > & AMITransforms() const
Return a reference to the AMI transforms.
virtual label nbrPatchID() const
Neighbour patch ID.
virtual const cyclicAMIPolyPatch & nbrPatch() const
Return a reference to the neighbour patch.
const coupleGroupIdentifier coupleGroup_
Optional patchGroup to find nbrPatch.
cyclicAMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const bool AMIRequireMatch=true, const AMIInterpolation::interpolationMethod AMIMethod=AMIInterpolation::imFaceAreaWeight)
Construct from (base couped patch) components.
A list of faces which address into the list of points.
A List obtained as a section of another List.
Definition: SubList.H:53
const bool AMIReverse_
Flag to indicate that slave patch should be reversed for AMI.
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
dynamicFvMesh & mesh
const pointField & points
const AMIInterpolation::interpolationMethod AMIMethod_
AMI Method.
const PtrList< AMIInterpolation > & AMIs() const
Return a reference to the AMI interpolators.
static const word & geometryDir()
Return the geometry directory name.
A class for handling words, derived from string.
Definition: word.H:59
const autoPtr< searchableSurface > & surfPtr() const
Return a reference to the projection surface.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const scalar AMILowWeightCorrection_
Low weight correction threshold for AMI.
label singlePatchProc() const
Index of processor that holds all of both sides, or -1 if.
virtual void rename(const wordList &newNames)
Reset the patch name.
Definition: polyPatch.C:76
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
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
Pair< label > labelPair
Label pair.
Definition: labelPair.H:48
static const zero Zero
Definition: zero.H:97
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:63
Cyclic patch for Arbitrary Mesh Interface (AMI)
static const transformer I
Definition: transformer.H:125
errorManip< error > abort(error &err)
Definition: errorManip.H:131
virtual const scalarField & weightsSum() const
Return the weights sum for this patch.
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
virtual ~cyclicAMIPolyPatch()
Destructor.
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
const Time & time() const
Return time.
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 T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
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
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void setSize(const label)
Reset size of List.
Definition: List.C:281
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:399
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialise ordering for primitivePatch. Does not.
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
const word & nbrPatchName() const
Neighbour patch name.
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
virtual bool owner() const
Does this side own the patch?
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
static interpolationMethod wordTointerpolationMethod(const word &method)
Convert word to interpolationMethod.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Cyclic plane tranformation.
A class for managing temporary objects.
Definition: PtrList.H:53
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
fileName path() const
Return path.
Definition: TimePaths.H:139
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
word nbrPatchName_
Name of cyclic neighbour patch.
virtual void rename(const wordList &newNames)
Reset the patch name.
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
Definition: dictionary.C:1013
Namespace for OpenFOAM.
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:477
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:844
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
IOerror FatalIOError