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-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 "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 
220 // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
221 
223 (
224  const word& name,
225  const label size,
226  const label start,
227  const label index,
228  const polyBoundaryMesh& bm,
229  const word& patchType,
230  const bool AMIRequireMatch,
232 )
233 :
234  coupledPolyPatch(name, size, start, index, bm, patchType),
235  cyclicTransform(true),
236  nbrPatchName_(word::null),
237  nbrPatchID_(-1),
238  AMIs_(),
239  AMITransforms_(),
240  AMIReverse_(false),
241  AMIRequireMatch_(AMIRequireMatch),
242  AMILowWeightCorrection_(-1.0),
243  AMIMethod_(AMIMethod),
244  surfPtr_(nullptr),
245  surfDict_(fileName("surface"))
246 {
247  // Neighbour patch might not be valid yet so no transformation
248  // calculation possible
249 }
250 
251 
253 (
254  const word& name,
255  const dictionary& dict,
256  const label index,
257  const polyBoundaryMesh& bm,
258  const word& patchType,
259  const bool AMIRequireMatch,
261 )
262 :
263  coupledPolyPatch(name, dict, index, bm, patchType),
264  cyclicTransform(dict, true),
265  nbrPatchName_(dict.lookupOrDefault<word>("neighbourPatch", "")),
266  coupleGroup_(dict),
267  nbrPatchID_(-1),
268  AMIs_(),
269  AMITransforms_(),
270  AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
271  AMIRequireMatch_(AMIRequireMatch),
272  AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
273  AMIMethod_
274  (
275  dict.found("method")
277  (
278  dict.lookup("method")
279  )
280  : AMIMethod
281  ),
282  surfPtr_(nullptr),
283  surfDict_(dict.subOrEmptyDict("surface"))
284 {
285  if (nbrPatchName_ == word::null && !coupleGroup_.valid())
286  {
288  (
289  dict
290  ) << "No \"neighbourPatch\" or \"coupleGroup\" provided."
291  << exit(FatalIOError);
292  }
293 
294  if (nbrPatchName_ == name)
295  {
297  (
298  dict
299  ) << "Neighbour patch name " << nbrPatchName_
300  << " cannot be the same as this patch " << name
301  << exit(FatalIOError);
302  }
303 
304  // Neighbour patch might not be valid yet so no transformation
305  // calculation possible
306 }
307 
308 
310 (
311  const cyclicAMIPolyPatch& pp,
312  const polyBoundaryMesh& bm
313 )
314 :
315  coupledPolyPatch(pp, bm),
316  cyclicTransform(pp),
317  nbrPatchName_(pp.nbrPatchName_),
318  coupleGroup_(pp.coupleGroup_),
319  nbrPatchID_(-1),
320  AMIs_(),
321  AMITransforms_(),
322  AMIReverse_(pp.AMIReverse_),
323  AMIRequireMatch_(pp.AMIRequireMatch_),
324  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
325  AMIMethod_(pp.AMIMethod_),
326  surfPtr_(nullptr),
327  surfDict_(pp.surfDict_)
328 {
329  // Neighbour patch might not be valid yet so no transformation
330  // calculation possible
331 }
332 
333 
335 (
336  const cyclicAMIPolyPatch& pp,
337  const polyBoundaryMesh& bm,
338  const label index,
339  const label newSize,
340  const label newStart,
341  const word& nbrPatchName
342 )
343 :
344  coupledPolyPatch(pp, bm, index, newSize, newStart),
345  cyclicTransform(pp),
346  nbrPatchName_(nbrPatchName),
347  coupleGroup_(pp.coupleGroup_),
348  nbrPatchID_(-1),
349  AMIs_(),
350  AMITransforms_(),
351  AMIReverse_(pp.AMIReverse_),
352  AMIRequireMatch_(pp.AMIRequireMatch_),
353  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
354  AMIMethod_(pp.AMIMethod_),
355  surfPtr_(nullptr),
356  surfDict_(pp.surfDict_)
357 {
358  if (nbrPatchName_ == name())
359  {
361  << "Neighbour patch name " << nbrPatchName_
362  << " cannot be the same as this patch " << name()
363  << exit(FatalError);
364  }
365 
366  // Neighbour patch might not be valid yet so no transformation
367  // calculation possible
368 }
369 
370 
372 (
373  const cyclicAMIPolyPatch& pp,
374  const polyBoundaryMesh& bm,
375  const label index,
376  const labelUList& mapAddressing,
377  const label newStart
378 )
379 :
380  coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
381  cyclicTransform(pp),
382  nbrPatchName_(pp.nbrPatchName_),
383  coupleGroup_(pp.coupleGroup_),
384  nbrPatchID_(-1),
385  AMIs_(),
386  AMITransforms_(),
387  AMIReverse_(pp.AMIReverse_),
388  AMIRequireMatch_(pp.AMIRequireMatch_),
389  AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
390  AMIMethod_(pp.AMIMethod_),
391  surfPtr_(nullptr),
392  surfDict_(pp.surfDict_)
393 {}
394 
395 
396 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
397 
399 {}
400 
401 
402 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
403 
405 {
406  if (nbrPatchID_ == -1)
407  {
408  nbrPatchID_ = this->boundaryMesh().findPatchID(nbrPatchName());
409 
410  if (nbrPatchID_ == -1)
411  {
413  << "Illegal neighbourPatch name " << nbrPatchName()
414  << nl << "Valid patch names are "
415  << this->boundaryMesh().names()
416  << exit(FatalError);
417  }
418 
419  // Check that it is a cyclic AMI patch
420  const cyclicAMIPolyPatch& nbrPatch =
421  refCast<const cyclicAMIPolyPatch>
422  (
423  this->boundaryMesh()[nbrPatchID_]
424  );
425 
426  if (nbrPatch.nbrPatchName() != name())
427  {
429  << "Patch " << name()
430  << " specifies neighbour patch " << nbrPatchName()
431  << nl << " but that in return specifies "
432  << nbrPatch.nbrPatchName() << endl;
433  }
434  }
435 
436  return nbrPatchID_;
437 }
438 
439 
441 {
442  return index() < nbrPatchID();
443 }
444 
445 
447 {
448  const polyPatch& pp = this->boundaryMesh()[nbrPatchID()];
449  return refCast<const cyclicAMIPolyPatch>(pp);
450 }
451 
452 
455 {
456  const word surfType(surfDict_.lookupOrDefault<word>("type", "none"));
457 
458  if (!surfPtr_.valid() && owner() && surfType != "none")
459  {
460  word surfName(surfDict_.lookupOrDefault("name", name()));
461 
462  const polyMesh& mesh = boundaryMesh().mesh();
463 
464  surfPtr_ =
466  (
467  surfType,
468  IOobject
469  (
470  surfName,
471  mesh.time().constant(),
472  "triSurface",
473  mesh,
476  ),
477  surfDict_
478  );
479  }
480 
481  return surfPtr_;
482 }
483 
484 
487 {
488  if (!owner())
489  {
491  << "AMI interpolators only available to owner patch"
492  << abort(FatalError);
493  }
494 
495  if (AMIs_.empty())
496  {
497  resetAMI();
498  }
499 
500  return AMIs_;
501 }
502 
503 
506 {
507  if (!owner())
508  {
510  << "AMI transforms only available to owner patch"
511  << abort(FatalError);
512  }
513 
514  if (AMIs_.empty())
515  {
516  resetAMI();
517  }
518 
519  return AMITransforms_;
520 }
521 
522 
524 {
525  if (owner())
526  {
527  return AMILowWeightCorrection_ > 0;
528  }
529  else
530  {
531  return nbrPatch().AMILowWeightCorrection_ > 0;
532  }
533 }
534 
535 
537 {
538  if (owner())
539  {
540  return AMIs()[0].srcWeightsSum();
541  }
542  else
543  {
544  return nbrPatch().AMIs()[0].tgtWeightsSum();
545  }
546 }
547 
548 
550 {
551  if (owner())
552  {
553  return AMIs()[0].tgtWeightsSum();
554  }
555  else
556  {
557  return nbrPatch().AMIs()[0].srcWeightsSum();
558  }
559 }
560 
561 
563 (
564  const scalarField& fld,
565  const direction cmpt,
566  const direction rank,
567  const scalarUList& defaultValues
568 ) const
569 {
570  const cyclicAMIPolyPatch& nei = nbrPatch();
571 
572  tmp<scalarField> result(new scalarField(size(), Zero));
573 
574  if (owner())
575  {
576  forAll(AMIs(), i)
577  {
578  const scalar r =
579  pow(inv(AMITransforms()[i]).T()(cmpt, cmpt), rank);
580 
581  result.ref() +=
582  AMIs()[i].interpolateToSource(r*fld, defaultValues);
583  }
584  }
585  else
586  {
587  forAll(nei.AMIs(), i)
588  {
589  const scalar r =
590  pow(nei.AMITransforms()[i].T()(cmpt, cmpt), rank);
591 
592  result.ref() +=
593  nei.AMIs()[i].interpolateToTarget(r*fld, defaultValues);
594  }
595  }
596 
597  return result;
598 }
599 
600 
602 (
603  PstreamBuffers& pBufs,
604  const primitivePatch& pp
605 ) const
606 {}
607 
608 
610 (
611  PstreamBuffers& pBufs,
612  const primitivePatch& pp,
613  labelList& faceMap,
614  labelList& rotation
615 ) const
616 {
617  faceMap.setSize(pp.size());
618  faceMap = -1;
619 
620  rotation.setSize(pp.size());
621  rotation = 0;
622 
623  return false;
624 }
625 
626 
628 (
629  const label facei,
630  const vector& n,
631  point& p
632 ) const
633 {
634  point pt(transform().invTransformPosition(p));
635  vector nt(transform().invTransform(n));
636 
637  if (owner())
638  {
639  forAll(AMIs(), i)
640  {
641  point ptt = AMITransforms()[i].transformPosition(pt);
642  const vector ntt = AMITransforms()[i].transform(nt);
643 
644  const label nbrFacei =
645  AMIs()[i].tgtPointFace(*this, nbrPatch(), ntt, facei, ptt);
646 
647  if (nbrFacei >= 0)
648  {
649  p = ptt;
650  return labelPair(i, nbrFacei);
651  }
652  }
653  }
654  else
655  {
656  forAll(nbrPatch().AMIs(), i)
657  {
658  point ptt =
659  nbrPatch().AMITransforms()[i].invTransformPosition(pt);
660  const vector ntt =
661  nbrPatch().AMITransforms()[i].invTransform(nt);
662 
663  const label nbrFacei =
664  nbrPatch().AMIs()[i].srcPointFace
665  (
666  nbrPatch(),
667  *this,
668  ntt,
669  facei,
670  ptt
671  );
672 
673  if (nbrFacei >= 0)
674  {
675  p = ptt;
676  return labelPair(i, nbrFacei);
677  }
678  }
679  }
680 
681  return labelPair(-1, -1);
682 }
683 
684 
686 {
687  const cyclicAMIPolyPatch& patch = owner() ? *this : nbrPatch();
688 
689  const label proc = patch.AMIs()[0].singlePatchProc();
690 
691  for (label i = 1; i < patch.AMIs().size(); ++ i)
692  {
693  if (patch.AMIs()[i].singlePatchProc() != proc)
694  {
695  return -1;
696  }
697  }
698 
699  return proc;
700 }
701 
702 
704 {
706  if (!nbrPatchName_.empty())
707  {
708  writeEntry(os, "neighbourPatch", nbrPatchName_);
709  }
710  coupleGroup_.write(os);
711 
713 
714  if (AMIReverse_)
715  {
716  writeEntry(os, "flipNormals", AMIReverse_);
717  }
718 
719  if (AMILowWeightCorrection_ > 0)
720  {
721  writeEntry(os, "lowWeightCorrection", AMILowWeightCorrection_);
722  }
723 
724  writeEntry
725  (
726  os,
727  "method",
729  );
730 
731  if (!surfDict_.empty())
732  {
733  writeKeyword(os, surfDict_.dictName());
734  os << surfDict_;
735  }
736 }
737 
738 
739 // ************************************************************************* //
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:667
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
fileName path() const
Return path.
Definition: Time.H:265
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:158
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
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:174
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
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Definition: boundaryMesh.H:59
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:69
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.
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 updateMesh(PstreamBuffers &)
Update of the patch topology.
static const word null
An empty word.
Definition: word.H:77
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:62
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
defineTypeNameAndDebug(combustionModel, 0)
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
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
Initialize 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:331
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
const bMesh & mesh() const
Definition: boundaryMesh.H:199
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
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.
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
Definition: dictionary.C:969
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:812
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