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-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 "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 
180 
182 (
183  PstreamBuffers& pBufs,
184  const pointField& p
185 )
186 {
187  polyPatch::movePoints(pBufs, p);
188 }
189 
190 
192 {
193  // Clear the invalid AMIs and transforms
194  AMIs_.clear();
195  AMITransforms_.clear();
196 
198 }
199 
200 
202 {
203  polyPatch::topoChange(pBufs);
204 }
205 
206 
208 {
209  // Clear the invalid AMIs and transforms
210  AMIs_.clear();
211  AMITransforms_.clear();
212 
214 }
215 
216 
218 {
219  polyPatch::rename(newNames);
220  nbrPatch().nbrPatchName_ = newNames[index()];
221 }
222 
223 
225 {
226  polyPatch::reorder(newToOldIndex);
227  if (nbrPatchID_ != -1)
228  {
229  nbrPatchID_ = findIndex(newToOldIndex, nbrPatchID_);
230  }
231 }
232 
233 
234 // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
235 
237 (
238  const word& name,
239  const label size,
240  const label start,
241  const label index,
242  const polyBoundaryMesh& bm,
243  const word& patchType,
244  const bool AMIRequireMatch,
245  const word& AMIMethod
246 )
247 :
248  coupledPolyPatch(name, size, start, index, bm, patchType),
249  cyclicTransform(true),
250  nbrPatchName_(word::null),
251  nbrPatchID_(-1),
252  AMIs_(),
253  AMITransforms_(),
254  AMIReverse_(false),
255  AMIRequireMatch_(AMIRequireMatch),
256  AMILowWeightCorrection_(-1.0),
257  AMIMethod_(AMIMethod),
258  surfPtr_(nullptr),
259  surfDict_(fileName("surface"))
260 {
261  // Neighbour patch might not be valid yet so no transformation
262  // calculation possible
263 }
264 
265 
267 (
268  const word& name,
269  const dictionary& dict,
270  const label index,
271  const polyBoundaryMesh& bm,
272  const word& patchType,
273  const bool AMIRequireMatch,
274  const word& AMIMethod
275 )
276 :
277  coupledPolyPatch(name, dict, index, bm, patchType),
278  cyclicTransform(dict, true),
279  nbrPatchName_(dict.lookupOrDefault<word>("neighbourPatch", "")),
280  coupleGroup_(dict),
281  nbrPatchID_(-1),
282  AMIs_(),
283  AMITransforms_(),
284  AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
285  AMIRequireMatch_(AMIRequireMatch),
286  AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
287  AMIMethod_(dict.lookupOrDefault("method", AMIMethod)),
288  surfPtr_(nullptr),
289  surfDict_(dict.subOrEmptyDict("surface"))
290 {
291  if (nbrPatchName_ == word::null && !coupleGroup_.valid())
292  {
294  (
295  dict
296  ) << "No \"neighbourPatch\" or \"coupleGroup\" provided."
297  << exit(FatalIOError);
298  }
299 
300  if (nbrPatchName_ == name)
301  {
303  (
304  dict
305  ) << "Neighbour patch name " << nbrPatchName_
306  << " cannot be the same as this patch " << name
307  << exit(FatalIOError);
308  }
309 
310  // Neighbour patch might not be valid yet so no transformation
311  // calculation possible
312 }
313 
314 
316 (
317  const cyclicAMIPolyPatch& pp,
318  const polyBoundaryMesh& bm
319 )
320 :
321  coupledPolyPatch(pp, bm),
322  cyclicTransform(pp),
323  nbrPatchName_(pp.nbrPatchName_),
324  coupleGroup_(pp.coupleGroup_),
325  nbrPatchID_(-1),
326  AMIs_(),
327  AMITransforms_(),
328  AMIReverse_(pp.AMIReverse_),
329  AMIRequireMatch_(pp.AMIRequireMatch_),
330  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
331  AMIMethod_(pp.AMIMethod_),
332  surfPtr_(nullptr),
333  surfDict_(pp.surfDict_)
334 {
335  // Neighbour patch might not be valid yet so no transformation
336  // calculation possible
337 }
338 
339 
341 (
342  const cyclicAMIPolyPatch& pp,
343  const polyBoundaryMesh& bm,
344  const label index,
345  const label newSize,
346  const label newStart,
347  const word& nbrPatchName
348 )
349 :
350  coupledPolyPatch(pp, bm, index, newSize, newStart),
351  cyclicTransform(pp),
352  nbrPatchName_(nbrPatchName),
353  coupleGroup_(pp.coupleGroup_),
354  nbrPatchID_(-1),
355  AMIs_(),
356  AMITransforms_(),
357  AMIReverse_(pp.AMIReverse_),
358  AMIRequireMatch_(pp.AMIRequireMatch_),
359  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
360  AMIMethod_(pp.AMIMethod_),
361  surfPtr_(nullptr),
362  surfDict_(pp.surfDict_)
363 {
364  if (nbrPatchName_ == name())
365  {
367  << "Neighbour patch name " << nbrPatchName_
368  << " cannot be the same as this patch " << name()
369  << exit(FatalError);
370  }
371 
372  // Neighbour patch might not be valid yet so no transformation
373  // calculation possible
374 }
375 
376 
378 (
379  const cyclicAMIPolyPatch& pp,
380  const polyBoundaryMesh& bm,
381  const label index,
382  const labelUList& mapAddressing,
383  const label newStart
384 )
385 :
386  coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
387  cyclicTransform(pp),
388  nbrPatchName_(pp.nbrPatchName_),
389  coupleGroup_(pp.coupleGroup_),
390  nbrPatchID_(-1),
391  AMIs_(),
392  AMITransforms_(),
393  AMIReverse_(pp.AMIReverse_),
394  AMIRequireMatch_(pp.AMIRequireMatch_),
395  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
396  AMIMethod_(pp.AMIMethod_),
397  surfPtr_(nullptr),
398  surfDict_(pp.surfDict_)
399 {}
400 
401 
402 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
403 
405 {}
406 
407 
408 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
409 
411 {
412  if (nbrPatchID_ == -1)
413  {
414  nbrPatchID_ = this->boundaryMesh().findPatchID(nbrPatchName());
415 
416  if (nbrPatchID_ == -1)
417  {
419  << "Illegal neighbourPatch name " << nbrPatchName()
420  << nl << "Valid patch names are "
421  << this->boundaryMesh().names()
422  << exit(FatalError);
423  }
424 
425  // Check that it is a cyclic AMI patch
426  const cyclicAMIPolyPatch& nbrPatch =
427  refCast<const cyclicAMIPolyPatch>
428  (
429  this->boundaryMesh()[nbrPatchID_]
430  );
431 
432  if (nbrPatch.nbrPatchName() != name())
433  {
435  << "Patch " << name()
436  << " specifies neighbour patch " << nbrPatchName()
437  << nl << " but that in return specifies "
438  << nbrPatch.nbrPatchName() << endl;
439  }
440  }
441 
442  return nbrPatchID_;
443 }
444 
445 
447 {
448  return index() < nbrPatchID();
449 }
450 
451 
453 {
454  const polyPatch& pp = this->boundaryMesh()[nbrPatchID()];
455  return refCast<const cyclicAMIPolyPatch>(pp);
456 }
457 
458 
461 {
462  const word surfType(surfDict_.lookupOrDefault<word>("type", "none"));
463 
464  if (!surfPtr_.valid() && owner() && surfType != "none")
465  {
466  word surfName(surfDict_.lookupOrDefault("name", name()));
467 
468  const polyMesh& mesh = boundaryMesh().mesh();
469 
470  surfPtr_ =
472  (
473  surfType,
474  IOobject
475  (
476  surfName,
477  mesh.time().constant(),
478  searchableSurface::geometryDir(mesh.time()),
479  mesh,
482  ),
483  surfDict_
484  );
485  }
486 
487  return surfPtr_;
488 }
489 
490 
493 {
494  if (!owner())
495  {
497  << "AMI interpolators only available to owner patch"
498  << abort(FatalError);
499  }
500 
501  if (AMIs_.empty())
502  {
503  resetAMI();
504  }
505 
506  return AMIs_;
507 }
508 
509 
512 {
513  if (!owner())
514  {
516  << "AMI transforms only available to owner patch"
517  << abort(FatalError);
518  }
519 
520  if (AMIs_.empty())
521  {
522  resetAMI();
523  }
524 
525  return AMITransforms_;
526 }
527 
528 
530 {
531  if (owner())
532  {
533  return AMILowWeightCorrection_ > 0;
534  }
535  else
536  {
537  return nbrPatch().AMILowWeightCorrection_ > 0;
538  }
539 }
540 
541 
543 {
544  if (owner())
545  {
546  return AMIs()[0].srcWeightsSum();
547  }
548  else
549  {
550  return nbrPatch().AMIs()[0].tgtWeightsSum();
551  }
552 }
553 
554 
556 {
557  if (owner())
558  {
559  return AMIs()[0].tgtWeightsSum();
560  }
561  else
562  {
563  return nbrPatch().AMIs()[0].srcWeightsSum();
564  }
565 }
566 
567 
569 (
570  const scalarField& fld,
571  const direction cmpt,
572  const direction rank,
573  const scalarUList& defaultValues
574 ) const
575 {
576  const cyclicAMIPolyPatch& nei = nbrPatch();
577 
578  tmp<scalarField> result(new scalarField(size(), Zero));
579 
580  if (owner())
581  {
582  forAll(AMIs(), i)
583  {
584  const scalar r =
585  pow(inv(AMITransforms()[i]).T()(cmpt, cmpt), rank);
586 
587  result.ref() +=
588  AMIs()[i].interpolateToSource(r*fld, defaultValues);
589  }
590  }
591  else
592  {
593  forAll(nei.AMIs(), i)
594  {
595  const scalar r =
596  pow(nei.AMITransforms()[i].T()(cmpt, cmpt), rank);
597 
598  result.ref() +=
599  nei.AMIs()[i].interpolateToTarget(r*fld, defaultValues);
600  }
601  }
602 
603  return result;
604 }
605 
606 
608 (
609  PstreamBuffers& pBufs,
610  const primitivePatch& pp
611 ) const
612 {}
613 
614 
616 (
617  PstreamBuffers& pBufs,
618  const primitivePatch& pp,
619  labelList& faceMap,
620  labelList& rotation
621 ) const
622 {
623  faceMap.setSize(pp.size());
624  faceMap = -1;
625 
626  rotation.setSize(pp.size());
627  rotation = 0;
628 
629  return false;
630 }
631 
632 
634 (
635  const label facei,
636  const vector& n,
637  point& p
638 ) const
639 {
640  point pt(transform().invTransformPosition(p));
641  vector nt(transform().invTransform(n));
642 
643  if (owner())
644  {
645  forAll(AMIs(), i)
646  {
647  point ptt = AMITransforms()[i].transformPosition(pt);
648  const vector ntt = AMITransforms()[i].transform(nt);
649 
650  const label nbrFacei =
651  AMIs()[i].tgtPointFace(*this, nbrPatch(), ntt, facei, ptt);
652 
653  if (nbrFacei >= 0)
654  {
655  p = ptt;
656  return labelPair(i, nbrFacei);
657  }
658  }
659  }
660  else
661  {
662  forAll(nbrPatch().AMIs(), i)
663  {
664  point ptt =
665  nbrPatch().AMITransforms()[i].invTransformPosition(pt);
666  const vector ntt =
667  nbrPatch().AMITransforms()[i].invTransform(nt);
668 
669  const label nbrFacei =
670  nbrPatch().AMIs()[i].srcPointFace
671  (
672  nbrPatch(),
673  *this,
674  ntt,
675  facei,
676  ptt
677  );
678 
679  if (nbrFacei >= 0)
680  {
681  p = ptt;
682  return labelPair(i, nbrFacei);
683  }
684  }
685  }
686 
687  return labelPair(-1, -1);
688 }
689 
690 
692 {
693  const cyclicAMIPolyPatch& patch = owner() ? *this : nbrPatch();
694 
695  const label proc = patch.AMIs()[0].singlePatchProc();
696 
697  for (label i = 1; i < patch.AMIs().size(); ++ i)
698  {
699  if (patch.AMIs()[i].singlePatchProc() != proc)
700  {
701  return -1;
702  }
703  }
704 
705  return proc;
706 }
707 
708 
710 {
712  if (!nbrPatchName_.empty())
713  {
714  writeEntry(os, "neighbourPatch", nbrPatchName_);
715  }
716  coupleGroup_.write(os);
717 
719 
720  if (AMIReverse_)
721  {
722  writeEntry(os, "flipNormals", AMIReverse_);
723  }
724 
725  if (AMILowWeightCorrection_ > 0)
726  {
727  writeEntry(os, "lowWeightCorrection", AMILowWeightCorrection_);
728  }
729 
730  writeEntry
731  (
732  os,
733  "method",
734  AMIMethod_
735  );
736 
737  if (!surfDict_.empty())
738  {
739  writeKeyword(os, surfDict_.dictName());
740  os << surfDict_;
741  }
742 }
743 
744 
745 // ************************************************************************* //
virtual void clearGeom()
Clear geometry.
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
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
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
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
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 initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
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...
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
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
fvMesh & mesh
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
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:76
const word AMIMethod_
AMI Method.
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.
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
const pointField & points
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: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
Pair< label > labelPair
Label pair.
Definition: labelPair.H:48
static const zero Zero
Definition: zero.H:97
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
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:69
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 movePoints(const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
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:318
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:97
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.
cyclicAMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const bool AMIRequireMatch=true, const word &AMIMethod=faceAreaWeightAMI::typeName)
Construct from (base couped patch) components.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
Cyclic plane transformation.
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:98
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:1033
Namespace for OpenFOAM.
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:483
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