cyclicAMIPolyPatch.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2016-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "cyclicAMIPolyPatch.H"
30 #include "SubField.H"
31 #include "Time.H"
32 #include "unitConversion.H"
33 #include "OFstream.H"
34 #include "meshTools.H"
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41  defineTypeNameAndDebug(cyclicAMIPolyPatch, 0);
42 
43  addToRunTimeSelectionTable(polyPatch, cyclicAMIPolyPatch, word);
44  addToRunTimeSelectionTable(polyPatch, cyclicAMIPolyPatch, dictionary);
45 }
46 
47 const Foam::scalar Foam::cyclicAMIPolyPatch::tolerance_ = 1e-10;
48 
49 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
50 
51 Foam::vector Foam::cyclicAMIPolyPatch::findFaceNormalMaxRadius
52 (
53  const pointField& faceCentres
54 ) const
55 {
56  // Determine a face furthest away from the axis
57 
59 
60  const scalarField magRadSqr(magSqr(n));
61 
62  label facei = findMax(magRadSqr);
63 
65  << "Patch: " << name() << nl
66  << " rotFace = " << facei << nl
67  << " point = " << faceCentres[facei] << nl
68  << " distance = " << Foam::sqrt(magRadSqr[facei])
69  << endl;
70 
71  return n[facei];
72 }
73 
74 
76 (
77  const primitivePatch& half0,
78  const pointField& half0Ctrs,
79  const vectorField& half0Areas,
80  const pointField& half1Ctrs,
81  const vectorField& half1Areas
82 )
83 {
84  if (transform() != neighbPatch().transform())
85  {
87  << "Patch " << name()
88  << " has transform type " << transformTypeNames[transform()]
89  << ", neighbour patch " << neighbPatchName()
90  << " has transform type "
91  << neighbPatch().transformTypeNames[neighbPatch().transform()]
92  << exit(FatalError);
93  }
94 
95 
96  // Calculate transformation tensors
97 
98  switch (transform())
99  {
100  case ROTATIONAL:
101  {
102  tensor revT = Zero;
103 
104  if (rotationAngleDefined_)
105  {
106  const tensor T(rotationAxis_*rotationAxis_);
107 
108  const tensor S
109  (
110  0, -rotationAxis_.z(), rotationAxis_.y(),
111  rotationAxis_.z(), 0, -rotationAxis_.x(),
112  -rotationAxis_.y(), rotationAxis_.x(), 0
113  );
114 
115  const tensor revTPos
116  (
117  T
118  + cos(rotationAngle_)*(tensor::I - T)
119  + sin(rotationAngle_)*S
120  );
121 
122  const tensor revTNeg
123  (
124  T
125  + cos(-rotationAngle_)*(tensor::I - T)
126  + sin(-rotationAngle_)*S
127  );
128 
129  // Check - assume correct angle when difference in face areas
130  // is the smallest
131  const vector transformedAreaPos = gSum(half1Areas & revTPos);
132  const vector transformedAreaNeg = gSum(half1Areas & revTNeg);
133  const vector area0 = gSum(half0Areas);
134  const scalar magArea0 = mag(area0) + ROOTVSMALL;
135 
136  // Areas have opposite sign, so sum should be zero when correct
137  // rotation applied
138  const scalar errorPos = mag(transformedAreaPos + area0);
139  const scalar errorNeg = mag(transformedAreaNeg + area0);
140 
141  const scalar normErrorPos = errorPos/magArea0;
142  const scalar normErrorNeg = errorNeg/magArea0;
143 
144  if (errorPos > errorNeg && normErrorNeg < matchTolerance())
145  {
146  revT = revTNeg;
147  rotationAngle_ *= -1;
148  }
149  else
150  {
151  revT = revTPos;
152  }
153 
154  const scalar areaError = min(normErrorPos, normErrorNeg);
155 
156  if (areaError > matchTolerance())
157  {
159  << "Patch areas are not consistent within "
160  << 100*matchTolerance()
161  << " % indicating a possible error in the specified "
162  << "angle of rotation" << nl
163  << " owner patch : " << name() << nl
164  << " neighbour patch : " << neighbPatch().name()
165  << nl
166  << " angle : "
167  << radToDeg(rotationAngle_) << " deg" << nl
168  << " area error : " << 100*areaError << " %"
169  << " match tolerance : " << matchTolerance()
170  << endl;
171  }
172 
173  if (debug)
174  {
175  scalar theta = radToDeg(rotationAngle_);
176 
177  Pout<< "cyclicAMIPolyPatch::calcTransforms: patch:"
178  << name()
179  << " Specified rotation:"
180  << " swept angle: " << theta << " [deg]"
181  << " reverse transform: " << revT
182  << endl;
183  }
184  }
185  else
186  {
187  point n0 = Zero;
188  point n1 = Zero;
189  if (half0Ctrs.size())
190  {
191  n0 = findFaceNormalMaxRadius(half0Ctrs);
192  }
193  if (half1Ctrs.size())
194  {
195  n1 = -findFaceNormalMaxRadius(half1Ctrs);
196  }
197 
198  reduce(n0, maxMagSqrOp<point>());
199  reduce(n1, maxMagSqrOp<point>());
200 
201  n0.normalise();
202  n1.normalise();
203 
204  // Extended tensor from two local coordinate systems calculated
205  // using normal and rotation axis
206  const tensor E0
207  (
208  rotationAxis_,
209  (n0 ^ rotationAxis_),
210  n0
211  );
212  const tensor E1
213  (
214  rotationAxis_,
215  (-n1 ^ rotationAxis_),
216  -n1
217  );
218  revT = E1.T() & E0;
219 
220  if (debug)
221  {
222  scalar theta = radToDeg(acos(-(n0 & n1)));
223 
224  Pout<< "cyclicAMIPolyPatch::calcTransforms: patch:"
225  << name()
226  << " Specified rotation:"
227  << " n0:" << n0 << " n1:" << n1
228  << " swept angle: " << theta << " [deg]"
229  << " reverse transform: " << revT
230  << endl;
231  }
232  }
233 
234  const_cast<tensorField&>(forwardT()) = tensorField(1, revT.T());
235  const_cast<tensorField&>(reverseT()) = tensorField(1, revT);
236  const_cast<vectorField&>(separation()).setSize(0);
237  const_cast<boolList&>(collocated()) = boolList(1, false);
238 
239  break;
240  }
241  case TRANSLATIONAL:
242  {
243  if (debug)
244  {
245  Pout<< "cyclicAMIPolyPatch::calcTransforms : patch:" << name()
246  << " Specified translation : " << separationVector_
247  << endl;
248  }
249 
250  const_cast<tensorField&>(forwardT()).clear();
251  const_cast<tensorField&>(reverseT()).clear();
252  const_cast<vectorField&>(separation()) = vectorField
253  (
254  1,
255  separationVector_
256  );
257  const_cast<boolList&>(collocated()) = boolList(1, false);
258 
259  break;
260  }
261  default:
262  {
263  if (debug)
264  {
265  Pout<< "patch:" << name()
266  << " Assuming cyclic AMI pairs are colocated" << endl;
267  }
268 
269  const_cast<tensorField&>(forwardT()).clear();
270  const_cast<tensorField&>(reverseT()).clear();
271  const_cast<vectorField&>(separation()).setSize(0);
272  const_cast<boolList&>(collocated()) = boolList(1, true);
273 
274  break;
275  }
276  }
277 
278  if (debug)
279  {
280  Pout<< "patch: " << name() << nl
281  << " forwardT = " << forwardT() << nl
282  << " reverseT = " << reverseT() << nl
283  << " separation = " << separation() << nl
284  << " collocated = " << collocated() << nl << endl;
285  }
286 }
287 
288 
289 // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
290 
293 {
294  const word surfType(surfDict_.getOrDefault<word>("type", "none"));
295 
296  if (!surfPtr_ && owner() && surfType != "none")
297  {
298  word surfName(surfDict_.getOrDefault("name", name()));
299 
300  const polyMesh& mesh = boundaryMesh().mesh();
301 
302  surfPtr_ =
304  (
305  surfType,
306  IOobject
307  (
308  surfName,
309  mesh.time().constant(),
310  "triSurface",
311  mesh,
314  ),
315  surfDict_
316  );
317  }
318 
319  return surfPtr_;
320 }
321 
322 
324 {
325  resetAMI(boundaryMesh().mesh().points());
326 }
327 
328 
330 {
332 
333  if (!owner())
334  {
335  return;
336  }
337 
338  const cyclicAMIPolyPatch& nbr = neighbPatch();
339  pointField srcPoints(localPoints());
340  pointField nbrPoints(nbr.localPoints());
341 
342  if (debug)
343  {
344  const Time& t = boundaryMesh().mesh().time();
345  OFstream os(t.path()/name() + "_neighbourPatch-org.obj");
346  meshTools::writeOBJ(os, neighbPatch().localFaces(), nbrPoints);
347  }
348 
349  label patchSize0 = size();
350  label nbrPatchSize0 = nbr.size();
351 
352  if (createAMIFaces_)
353  {
354  // AMI is created based on the original patch faces (non-extended patch)
355  if (srcFaceIDs_.size())
356  {
357  patchSize0 = srcFaceIDs_.size();
358  }
359  if (tgtFaceIDs_.size())
360  {
361  nbrPatchSize0 = tgtFaceIDs_.size();
362  }
363  }
364 
365  // Transform neighbour patch to local system
366  transformPosition(nbrPoints);
367  primitivePatch nbrPatch0
368  (
369  SubList<face>(nbr.localFaces(), nbrPatchSize0),
370  nbrPoints
371  );
372  primitivePatch patch0
373  (
374  SubList<face>(localFaces(), patchSize0),
375  srcPoints
376  );
377 
378 
379  if (debug)
380  {
381  const Time& t = boundaryMesh().mesh().time();
382  OFstream osN(t.path()/name() + "_neighbourPatch-trans.obj");
383  meshTools::writeOBJ(osN, nbrPatch0.localFaces(), nbrPoints);
384 
385  OFstream osO(t.path()/name() + "_ownerPatch.obj");
386  meshTools::writeOBJ(osO, this->localFaces(), localPoints());
387  }
388 
389  // Construct/apply AMI interpolation to determine addressing and weights
390  AMIPtr_->upToDate() = false;
391  AMIPtr_->calculate(patch0, nbrPatch0, surfPtr());
392 
393  if (debug)
394  {
395  AMIPtr_->checkSymmetricWeights(true);
396  }
397 }
398 
399 
401 {
403 
404  const cyclicAMIPolyPatch& half0 = *this;
405  vectorField half0Areas(half0.size());
406  forAll(half0, facei)
407  {
408  half0Areas[facei] = half0[facei].areaNormal(half0.points());
409  }
410 
411  const cyclicAMIPolyPatch& half1 = neighbPatch();
412  vectorField half1Areas(half1.size());
413  forAll(half1, facei)
414  {
415  half1Areas[facei] = half1[facei].areaNormal(half1.points());
416  }
417 
418  calcTransforms
419  (
420  half0,
421  half0.faceCentres(),
422  half0Areas,
423  half1.faceCentres(),
424  half1Areas
425  );
426 
427  DebugPout
428  << "calcTransforms() : patch: " << name() << nl
429  << " forwardT = " << forwardT() << nl
430  << " reverseT = " << reverseT() << nl
431  << " separation = " << separation() << nl
432  << " collocated = " << collocated() << nl << endl;
433 }
434 
435 
437 {
439 
440  // Flag AMI as needing update
441  AMIPtr_->upToDate() = false;
442 
444 
445  // Early calculation of transforms so e.g. cyclicACMI can use them.
446  // Note: also triggers primitiveMesh face centre. Note that cell
447  // centres should -not- be calculated
448  // since e.g. cyclicACMI overrides face areas
449  calcTransforms();
450 }
451 
452 
454 {
456 }
457 
458 
460 (
461  PstreamBuffers& pBufs,
462  const pointField& p
463 )
464 {
466 
467  // See below. Clear out any local geometry
469 
470  // Note: processorPolyPatch::initMovePoints calls
471  // processorPolyPatch::initGeometry which will trigger calculation of
472  // patch faceCentres() and cell volumes...
473 
474  if (createAMIFaces_)
475  {
476  // Note: AMI should have been updated in setTopology
477 
478  // faceAreas() and faceCentres() have been reset and will be
479  // recalculated on-demand using the mesh points and no longer
480  // correspond to the scaled areas!
481  restoreScaledGeometry();
482 
483  // deltas need to be recalculated to use new face centres!
484  }
485  else
486  {
487  AMIPtr_->upToDate() = false;
488  }
489 
490  // Early calculation of transforms. See above.
491  calcTransforms();
492 }
493 
494 
496 (
497  PstreamBuffers& pBufs,
498  const pointField& p
499 )
500 {
502 
503 // Note: not calling movePoints since this will undo our manipulations!
504 // polyPatch::movePoints(pBufs, p);
505 /*
506  polyPatch::movePoints
507  -> primitivePatch::movePoints
508  -> primitivePatch::clearGeom:
509  deleteDemandDrivenData(localPointsPtr_);
510  deleteDemandDrivenData(faceCentresPtr_);
511  deleteDemandDrivenData(faceAreasPtr_);
512  deleteDemandDrivenData(magFaceAreasPtr_);
513  deleteDemandDrivenData(faceNormalsPtr_);
514  deleteDemandDrivenData(pointNormalsPtr_);
515 */
516 }
517 
518 
520 {
522 
524 
525  if (createAMIFaces_ && boundaryMesh().mesh().topoChanging() && owner())
526  {
527  setAMIFaces();
528  }
529 }
530 
531 
533 {
535 
536  // Note: this clears out cellCentres(), faceCentres() and faceAreas()
537  polyPatch::updateMesh(pBufs);
538 }
539 
540 
542 {
544 
545  if (!updatingAMI_)
546  {
547  AMIPtr_->upToDate() = false;
548  }
549 
551 }
552 
553 
554 // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
555 
557 (
558  const word& name,
559  const label size,
560  const label start,
561  const label index,
562  const polyBoundaryMesh& bm,
563  const word& patchType,
564  const transformType transform,
565  const word& defaultAMIMethod
566 )
567 :
568  coupledPolyPatch(name, size, start, index, bm, patchType, transform),
569  nbrPatchName_(word::null),
570  nbrPatchID_(-1),
571  rotationAxis_(Zero),
572  rotationCentre_(Zero),
573  rotationAngleDefined_(false),
574  rotationAngle_(0.0),
575  separationVector_(Zero),
576  AMIPtr_(AMIInterpolation::New(defaultAMIMethod)),
577  surfDict_(fileName("surface")),
578  surfPtr_(nullptr),
579  createAMIFaces_(false),
580  moveFaceCentres_(false),
581  updatingAMI_(true),
582  srcFaceIDs_(),
583  tgtFaceIDs_(),
584  faceAreas0_(),
585  faceCentres0_()
586 {
587  // Neighbour patch might not be valid yet so no transformation
588  // calculation possible
589 }
590 
591 
593 (
594  const word& name,
595  const dictionary& dict,
596  const label index,
597  const polyBoundaryMesh& bm,
598  const word& patchType,
599  const word& defaultAMIMethod
600 )
601 :
602  coupledPolyPatch(name, dict, index, bm, patchType),
603  nbrPatchName_(dict.getOrDefault<word>("neighbourPatch", word::null)),
604  coupleGroup_(dict),
605  nbrPatchID_(-1),
606  rotationAxis_(Zero),
607  rotationCentre_(Zero),
608  rotationAngleDefined_(false),
609  rotationAngle_(0.0),
610  separationVector_(Zero),
611  AMIPtr_
612  (
614  (
615  dict.getOrDefault<word>("AMIMethod", defaultAMIMethod),
616  dict,
617  dict.getOrDefault("flipNormals", false)
618  )
619  ),
620  surfDict_(dict.subOrEmptyDict("surface")),
621  surfPtr_(nullptr),
622  createAMIFaces_(dict.getOrDefault("createAMIFaces", false)),
623  moveFaceCentres_(false),
624  updatingAMI_(true),
625  srcFaceIDs_(),
626  tgtFaceIDs_(),
627  faceAreas0_(),
628  faceCentres0_()
629 {
630  if (nbrPatchName_ == word::null && !coupleGroup_.valid())
631  {
633  << "No \"neighbourPatch\" or \"coupleGroup\" provided."
634  << exit(FatalIOError);
635  }
636 
637  if (nbrPatchName_ == name)
638  {
640  << "Neighbour patch name " << nbrPatchName_
641  << " cannot be the same as this patch " << name
642  << exit(FatalIOError);
643  }
644 
645  switch (transform())
646  {
647  case ROTATIONAL:
648  {
649  dict.readEntry("rotationAxis", rotationAxis_);
650  dict.readEntry("rotationCentre", rotationCentre_);
651  if (dict.readIfPresent("rotationAngle", rotationAngle_))
652  {
653  rotationAngleDefined_ = true;
654  rotationAngle_ = degToRad(rotationAngle_);
655 
656  if (debug)
657  {
658  Info<< "rotationAngle: " << rotationAngle_ << " [rad]"
659  << endl;
660  }
661  }
662 
663  scalar magRot = mag(rotationAxis_);
664  if (magRot < SMALL)
665  {
667  << "Illegal rotationAxis " << rotationAxis_ << endl
668  << "Please supply a non-zero vector."
669  << exit(FatalIOError);
670  }
671  rotationAxis_ /= magRot;
672 
673  break;
674  }
675  case TRANSLATIONAL:
676  {
677  dict.readEntry("separationVector", separationVector_);
678  break;
679  }
680  default:
681  {
682  // No additional info required
683  }
684  }
685 
686  // Neighbour patch might not be valid yet so no transformation
687  // calculation possible
688 
689  // If topology change, recover the sizes of the original patches and
690  // read additional controls
691  if (createAMIFaces_)
692  {
693  srcFaceIDs_.setSize(dict.get<label>("srcSize"));
694  tgtFaceIDs_.setSize(dict.get<label>("tgtSize"));
695  moveFaceCentres_ = dict.getOrDefault("moveFaceCentres", true);
696  }
697 }
698 
699 
701 (
702  const cyclicAMIPolyPatch& pp,
703  const polyBoundaryMesh& bm
704 )
705 :
706  coupledPolyPatch(pp, bm),
707  nbrPatchName_(pp.nbrPatchName_),
708  coupleGroup_(pp.coupleGroup_),
709  nbrPatchID_(-1),
710  rotationAxis_(pp.rotationAxis_),
711  rotationCentre_(pp.rotationCentre_),
712  rotationAngleDefined_(pp.rotationAngleDefined_),
713  rotationAngle_(pp.rotationAngle_),
714  separationVector_(pp.separationVector_),
715  AMIPtr_(pp.AMIPtr_->clone()),
716  surfDict_(pp.surfDict_),
717  surfPtr_(nullptr),
718  createAMIFaces_(pp.createAMIFaces_),
719  moveFaceCentres_(pp.moveFaceCentres_),
720  updatingAMI_(true),
721  srcFaceIDs_(),
722  tgtFaceIDs_(),
723  faceAreas0_(),
724  faceCentres0_()
725 {
726  // Neighbour patch might not be valid yet so no transformation
727  // calculation possible
728 }
729 
730 
732 (
733  const cyclicAMIPolyPatch& pp,
734  const polyBoundaryMesh& bm,
735  const label index,
736  const label newSize,
737  const label newStart,
738  const word& nbrPatchName
739 )
740 :
741  coupledPolyPatch(pp, bm, index, newSize, newStart),
742  nbrPatchName_(nbrPatchName),
743  coupleGroup_(pp.coupleGroup_),
744  nbrPatchID_(-1),
745  rotationAxis_(pp.rotationAxis_),
746  rotationCentre_(pp.rotationCentre_),
747  rotationAngleDefined_(pp.rotationAngleDefined_),
748  rotationAngle_(pp.rotationAngle_),
749  separationVector_(pp.separationVector_),
750  AMIPtr_(pp.AMIPtr_->clone()),
751  surfDict_(pp.surfDict_),
752  surfPtr_(nullptr),
753  createAMIFaces_(pp.createAMIFaces_),
754  moveFaceCentres_(pp.moveFaceCentres_),
755  updatingAMI_(true),
756  srcFaceIDs_(),
757  tgtFaceIDs_(),
758  faceAreas0_(),
759  faceCentres0_()
760 {
761  if (nbrPatchName_ == name())
762  {
764  << "Neighbour patch name " << nbrPatchName_
765  << " cannot be the same as this patch " << name()
766  << exit(FatalError);
767  }
768 
769  // Neighbour patch might not be valid yet so no transformation
770  // calculation possible
771 }
772 
773 
775 (
776  const cyclicAMIPolyPatch& pp,
777  const polyBoundaryMesh& bm,
778  const label index,
779  const labelUList& mapAddressing,
780  const label newStart
781 )
782 :
783  coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
784  nbrPatchName_(pp.nbrPatchName_),
785  coupleGroup_(pp.coupleGroup_),
786  nbrPatchID_(-1),
787  rotationAxis_(pp.rotationAxis_),
788  rotationCentre_(pp.rotationCentre_),
789  rotationAngleDefined_(pp.rotationAngleDefined_),
790  rotationAngle_(pp.rotationAngle_),
791  separationVector_(pp.separationVector_),
792  AMIPtr_(pp.AMIPtr_->clone()),
793  surfDict_(pp.surfDict_),
794  surfPtr_(nullptr),
795  createAMIFaces_(pp.createAMIFaces_),
796  moveFaceCentres_(pp.moveFaceCentres_),
797  updatingAMI_(true),
798  srcFaceIDs_(),
799  tgtFaceIDs_(),
800  faceAreas0_(),
801  faceCentres0_()
802 {}
803 
804 
805 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
806 
808 {
809  if (nbrPatchID_ == -1)
810  {
811  nbrPatchID_ = this->boundaryMesh().findPatchID(neighbPatchName());
812 
813  if (nbrPatchID_ == -1)
814  {
816  << "Illegal neighbourPatch name " << neighbPatchName()
817  << nl << "Valid patch names are "
818  << this->boundaryMesh().names()
819  << exit(FatalError);
820  }
821 
822  // Check that it is a cyclic AMI patch
823  const cyclicAMIPolyPatch& nbrPatch =
824  refCast<const cyclicAMIPolyPatch>
825  (
826  this->boundaryMesh()[nbrPatchID_]
827  );
828 
829  if (nbrPatch.neighbPatchName() != name())
830  {
832  << "Patch " << name()
833  << " specifies neighbour patch " << neighbPatchName()
834  << nl << " but that in return specifies "
835  << nbrPatch.neighbPatchName() << endl;
836  }
837  }
838 
839  return nbrPatchID_;
840 }
841 
842 
844 {
845  return index() < neighbPatchID();
846 }
847 
848 
850 {
851  const polyPatch& pp = this->boundaryMesh()[neighbPatchID()];
852  return refCast<const cyclicAMIPolyPatch>(pp);
853 }
854 
855 
857 {
858  if (!owner())
859  {
861  << "AMI interpolator only available to owner patch"
862  << abort(FatalError);
863  }
864 
865  if (!AMIPtr_->upToDate())
866  {
867  resetAMI();
868  }
869 
870  return *AMIPtr_;
871 }
872 
873 
875 {
876  if (owner())
877  {
878  return AMI().applyLowWeightCorrection();
879  }
880  else
881  {
882  return neighbPatch().AMI().applyLowWeightCorrection();
883  }
884 }
885 
886 
888 {
889  if (!parallel())
890  {
891  if (transform() == ROTATIONAL)
892  {
893  l = Foam::transform(forwardT(), l - rotationCentre_)
894  + rotationCentre_;
895  }
896  else
897  {
898  l = Foam::transform(forwardT(), l);
899  }
900  }
901  else if (separated())
902  {
903  // transformPosition gets called on the receiving side,
904  // separation gets calculated on the sending side so subtract
905 
906  const vectorField& s = separation();
907  if (s.size() == 1)
908  {
909  forAll(l, i)
910  {
911  l[i] -= s[0];
912  }
913  }
914  else
915  {
916  l -= s;
917  }
918  }
919 }
920 
921 
923 (
924  point& l,
925  const label facei
926 ) const
927 {
928  if (!parallel())
929  {
930  const tensor& T =
931  (
932  forwardT().size() == 1
933  ? forwardT()[0]
934  : forwardT()[facei]
935  );
936 
937  if (transform() == ROTATIONAL)
938  {
939  l = Foam::transform(T, l - rotationCentre_) + rotationCentre_;
940  }
941  else
942  {
943  l = Foam::transform(T, l);
944  }
945  }
946  else if (separated())
947  {
948  const vector& s =
949  (
950  separation().size() == 1
951  ? separation()[0]
952  : separation()[facei]
953  );
954 
955  l -= s;
956  }
957 }
958 
959 
961 (
962  point& l,
963  const label facei
964 ) const
965 {
966  if (!parallel())
967  {
968  const tensor& T =
969  (
970  reverseT().size() == 1
971  ? reverseT()[0]
972  : reverseT()[facei]
973  );
974 
975  if (transform() == ROTATIONAL)
976  {
977  l = Foam::transform(T, l - rotationCentre_) + rotationCentre_;
978  }
979  else
980  {
981  l = Foam::transform(T, l);
982  }
983  }
984  else if (separated())
985  {
986  const vector& s =
987  (
988  separation().size() == 1
989  ? separation()[0]
990  : separation()[facei]
991  );
992 
993  l += s;
994  }
995 }
996 
997 
999 (
1000  vector& d,
1001  const label facei
1002 ) const
1003 {
1004  if (!parallel())
1005  {
1006  const tensor& T =
1007  (
1008  reverseT().size() == 1
1009  ? reverseT()[0]
1010  : reverseT()[facei]
1011  );
1012 
1013  d = Foam::transform(T, d);
1014  }
1015 }
1016 
1017 
1020  const primitivePatch& referPatch,
1021  const pointField& thisCtrs,
1022  const vectorField& thisAreas,
1023  const pointField& thisCc,
1024  const pointField& nbrCtrs,
1025  const vectorField& nbrAreas,
1026  const pointField& nbrCc
1027 )
1028 {}
1029 
1030 
1033  PstreamBuffers& pBufs,
1034  const primitivePatch& pp
1035 ) const
1036 {}
1037 
1038 
1041  PstreamBuffers& pBufs,
1042  const primitivePatch& pp,
1043  labelList& faceMap,
1044  labelList& rotation
1045 ) const
1046 {
1047  faceMap.setSize(pp.size());
1048  faceMap = -1;
1049 
1050  rotation.setSize(pp.size());
1051  rotation = 0;
1052 
1053  return false;
1054 }
1055 
1056 
1059  const label facei,
1060  const vector& n,
1061  point& p
1062 ) const
1063 {
1064  point prt(p);
1065  reverseTransformPosition(prt, facei);
1066 
1067  vector nrt(n);
1068  reverseTransformDirection(nrt, facei);
1069 
1070  label nbrFacei = -1;
1071 
1072  if (owner())
1073  {
1074  nbrFacei = AMI().tgtPointFace
1075  (
1076  *this,
1077  neighbPatch(),
1078  nrt,
1079  facei,
1080  prt
1081  );
1082  }
1083  else
1084  {
1085  nbrFacei = neighbPatch().AMI().srcPointFace
1086  (
1087  neighbPatch(),
1088  *this,
1089  nrt,
1090  facei,
1091  prt
1092  );
1093  }
1094 
1095  if (nbrFacei >= 0)
1096  {
1097  p = prt;
1098  }
1099 
1100  return nbrFacei;
1101 }
1102 
1103 
1105 {
1107  if (!nbrPatchName_.empty())
1108  {
1109  os.writeEntry("neighbourPatch", nbrPatchName_);
1110  }
1111  coupleGroup_.write(os);
1112 
1113  switch (transform())
1114  {
1115  case ROTATIONAL:
1116  {
1117  os.writeEntry("rotationAxis", rotationAxis_);
1118  os.writeEntry("rotationCentre", rotationCentre_);
1119 
1120  if (rotationAngleDefined_)
1121  {
1122  os.writeEntry("rotationAngle", radToDeg(rotationAngle_));
1123  }
1124 
1125  break;
1126  }
1127  case TRANSLATIONAL:
1128  {
1129  os.writeEntry("separationVector", separationVector_);
1130  break;
1131  }
1132  case NOORDERING:
1133  {
1134  break;
1135  }
1136  default:
1137  {
1138  // No additional info to write
1139  }
1140  }
1141 
1142  AMIPtr_->write(os);
1143 
1144  if (!surfDict_.empty())
1145  {
1146  surfDict_.writeEntry(surfDict_.dictName(), os);
1147  }
1148 
1149  if (createAMIFaces_)
1150  {
1151  os.writeEntry("createAMIFaces", createAMIFaces_);
1152  os.writeEntry("srcSize", srcFaceIDs_.size());
1153  os.writeEntry("tgtSize", tgtFaceIDs_.size());
1154  os.writeEntry("moveFaceCentres", moveFaceCentres_);
1155  }
1156 }
1157 
1158 
1159 // ************************************************************************* //
Foam::expressions::patchExpr::debug
int debug
Static debugging option.
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::IOobject::NO_WRITE
Definition: IOobject.H:130
Foam::cyclicAMIPolyPatch::order
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
Definition: cyclicAMIPolyPatch.C:1040
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
Foam::boundaryMesh::mesh
const bMesh & mesh() const
Definition: boundaryMesh.H:206
Foam::Tensor< scalar >
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
setSize
points setSize(newPointi)
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
meshTools.H
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::faceMap
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Definition: blockMeshMergeTopological.C:94
Foam::cyclicAMIPolyPatch::resetAMI
virtual void resetAMI() const
Reset the AMI interpolator, use current patch points.
Definition: cyclicAMIPolyPatch.C:323
Foam::cyclicAMIPolyPatch::owner
virtual bool owner() const
Does this side own the patch?
Definition: cyclicAMIPolyPatch.C:843
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
SubField.H
Foam::Tensor< scalar >::I
static const Tensor I
Definition: Tensor.H:85
s
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputSpray.H:25
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::cyclicAMIPolyPatch::nbrPatchName_
word nbrPatchName_
Name of other half.
Definition: cyclicAMIPolyPatch.H:91
Foam::cyclicAMIPolyPatch::initOrder
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Definition: cyclicAMIPolyPatch.C:1032
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::meshTools::writeOBJ
void writeOBJ(Ostream &os, const point &pt)
Write obj representation of a point.
Definition: meshTools.C:203
Foam::cyclicAMIPolyPatch::rotationCentre_
point rotationCentre_
Point on axis of rotation for rotational cyclics.
Definition: cyclicAMIPolyPatch.H:108
Foam::sin
dimensionedScalar sin(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:264
Foam::SubList
A List obtained as a section of another List.
Definition: SubList.H:53
Foam::cyclicAMIPolyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: cyclicAMIPolyPatch.C:436
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:88
Foam::polyPatch::clearGeom
virtual void clearGeom()
Clear geometry.
Definition: polyPatch.C:74
Foam::cyclicAMIPolyPatch::reverseTransformPosition
virtual void reverseTransformPosition(point &l, const label facei) const
Transform a patch-based position from this side to nbr side.
Definition: cyclicAMIPolyPatch.C:961
Foam::cyclicAMIPolyPatch::surfDict_
const dictionary surfDict_
Dictionary used during projection surface construction.
Definition: cyclicAMIPolyPatch.H:127
Foam::tensorField
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
Definition: primitiveFieldsFwd.H:57
Foam::cyclicAMIPolyPatch::surfPtr
const autoPtr< searchableSurface > & surfPtr() const
Create and return pointer to the projection surface.
Definition: cyclicAMIPolyPatch.C:292
unitConversion.H
Unit conversion functions.
Foam::boolList
List< bool > boolList
A List of bools.
Definition: List.H:69
Foam::cyclicAMIPolyPatch::coupleGroup_
const coupleGroupIdentifier coupleGroup_
Optional patchGroup to find neighbPatch.
Definition: cyclicAMIPolyPatch.H:94
Foam::cyclicAMIPolyPatch::tolerance_
static const scalar tolerance_
Tolerance used e.g. for area calculations/limits.
Definition: cyclicAMIPolyPatch.H:328
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::coupledPolyPatch
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Definition: coupledPolyPatch.H:53
Foam::gSum
Type gSum(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:594
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:81
Foam::Pout
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
Foam::AMIInterpolation::New
static autoPtr< AMIInterpolation > New(const word &modelName, const dictionary &dict, const bool reverseTarget=false)
Selector for dictionary.
Definition: AMIInterpolationNew.C:33
Foam::transform
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Definition: dimensionSet.C:519
Foam::polyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:67
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::cyclicAMIPolyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
Definition: cyclicAMIPolyPatch.C:460
OFstream.H
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::cyclicAMIPolyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: cyclicAMIPolyPatch.C:532
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::cyclicAMIPolyPatch::transformPosition
virtual void transformPosition(pointField &) const
Transform patch-based positions from nbr side to this side.
Definition: cyclicAMIPolyPatch.C:887
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:51
Foam::polyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:116
Foam::cyclicAMIPolyPatch::separationVector_
vector separationVector_
Translation vector.
Definition: cyclicAMIPolyPatch.H:120
Foam::cyclicAMIPolyPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: cyclicAMIPolyPatch.C:453
Foam::Field< vector >
Foam::cyclicAMIPolyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: cyclicAMIPolyPatch.C:1104
Foam::cyclicAMIPolyPatch::AMIPtr_
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
AMI interpolation class.
Definition: cyclicAMIPolyPatch.H:124
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
DebugInFunction
#define DebugInFunction
Report an information message using Foam::Info.
Definition: messageStream.H:360
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:67
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::cyclicAMIPolyPatch::pointFace
label pointFace(const label facei, const vector &n, point &p) const
Definition: cyclicAMIPolyPatch.C:1058
Foam::cyclicAMIPolyPatch::movePoints
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
Definition: cyclicAMIPolyPatch.C:496
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::dictionary::readEntry
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
Definition: dictionaryTemplates.C:314
Foam::radToDeg
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
Definition: unitConversion.H:54
Foam::polyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:101
Foam::coupledPolyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: coupledPolyPatch.C:567
Foam::cyclicAMIPolyPatch::calcTransforms
virtual void calcTransforms()
Recalculate the transformation tensors.
Definition: cyclicAMIPolyPatch.C:400
Foam::cyclicAMIPolyPatch::rotationAxis_
vector rotationAxis_
Axis of rotation for rotational cyclics.
Definition: cyclicAMIPolyPatch.H:105
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::cyclicAMIPolyPatch::rotationAngle_
scalar rotationAngle_
Rotation angle.
Definition: cyclicAMIPolyPatch.H:114
Foam::cyclicAMIPolyPatch::neighbPatchID
virtual label neighbPatchID() const
Neighbour patch ID.
Definition: cyclicAMIPolyPatch.C:807
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::cyclicAMIPolyPatch::neighbPatch
virtual const cyclicAMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
Definition: cyclicAMIPolyPatch.C:849
Foam::word::valid
static bool valid(char c)
Is this character valid for a word?
Definition: wordI.H:130
Foam::PrimitivePatch::points
const Field< point_type > & points() const
Return reference to global points.
Definition: PrimitivePatch.H:305
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::PrimitivePatch::localFaces
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
Definition: PrimitivePatch.C:297
Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
cyclicAMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN, const word &defaultAMIMethod=faceAreaWeightAMI::typeName)
Construct from (base coupled patch) components.
Definition: cyclicAMIPolyPatch.C:557
Foam::Ostream::write
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::cyclicAMIPolyPatch::rotationAngleDefined_
bool rotationAngleDefined_
Flag to show whether the rotation angle is defined.
Definition: cyclicAMIPolyPatch.H:111
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::searchableSurface::New
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
Definition: searchableSurface.C:43
Foam::degToRad
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Definition: unitConversion.H:48
DebugPout
#define DebugPout
Report an information message using Foam::Pout.
Definition: messageStream.H:365
Foam::dictionary::subOrEmptyDict
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Definition: dictionary.C:608
cyclicAMIPolyPatch.H
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::PrimitivePatch::localPoints
const Field< point_type > & localPoints() const
Return pointField of points in patch.
Definition: PrimitivePatch.C:339
Foam::OFstream
Output to file stream, using an OSstream.
Definition: OFstream.H:87
Foam::cyclicAMIPolyPatch::moveFaceCentres_
bool moveFaceCentres_
Move face centres (default = no)
Definition: cyclicAMIPolyPatch.H:140
Time.H
Foam::autoPtr< Foam::searchableSurface >
Foam::cyclicAMIPolyPatch::AMI
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
Definition: cyclicAMIPolyPatch.C:856
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:372
clear
patchWriters clear()
Foam::nl
constexpr char nl
Definition: Ostream.H:385
Foam::Time::path
fileName path() const
Return path.
Definition: Time.H:358
Foam::polyPatch::faceCentres
const vectorField::subField faceCentres() const
Return face centres.
Definition: polyPatch.C:313
Foam::cyclicAMIPolyPatch::applyLowWeightCorrection
bool applyLowWeightCorrection() const
Return true if applying the low weight correction.
Definition: cyclicAMIPolyPatch.C:874
Foam::cyclicAMIPolyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: cyclicAMIPolyPatch.C:519
Foam::cyclicAMIPolyPatch::clearGeom
virtual void clearGeom()
Clear geometry.
Definition: cyclicAMIPolyPatch.C:541
Foam::Vector
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:62
Foam::findMax
label findMax(const ListType &input, label start=0)
Foam::List< label >
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:144
Foam::cyclicAMIPolyPatch::reverseTransformDirection
virtual void reverseTransformDirection(vector &d, const label facei) const
Transform a patch-based direction from this side to nbr side.
Definition: cyclicAMIPolyPatch.C:999
Foam::acos
dimensionedScalar acos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:268
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::AMIInterpolation
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Definition: AMIInterpolation.H:79
Foam::UList
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:103
Foam::cyclicAMIPolyPatch::neighbPatchName
const word & neighbPatchName() const
Neighbour patch name.
Definition: cyclicAMIPolyPatchI.H:49
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::word::null
static const word null
An empty word.
Definition: word.H:77
Foam::Ostream::writeEntry
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Definition: Ostream.H:232
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:248
Foam::boundaryMesh
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:62
Foam::primitivePatch
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
Definition: primitivePatch.H:51
FatalIOErrorInFunction
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:392
Foam::PrimitivePatch::movePoints
virtual void movePoints(const Field< point_type > &)
Correct patch after moving points.
Definition: PrimitivePatch.C:172
Foam::cyclicAMIPolyPatch::createAMIFaces_
bool createAMIFaces_
Flag to indicate that new AMI faces will created.
Definition: cyclicAMIPolyPatch.H:137
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::point
vector point
Point is a vector.
Definition: point.H:43
Foam::coupledPolyPatch::transformType
transformType
Definition: coupledPolyPatch.H:59
Foam::List::setSize
void setSize(const label newSize)
Alias for resize(const label)
Definition: ListI.H:146
Foam::TimePaths::constant
const word & constant() const
Return constant name.
Definition: TimePathsI.H:88
Foam::dictionary::getOrDefault
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:122
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::patchIdentifier::name
const word & name() const
The patch name.
Definition: patchIdentifier.H:134
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:298
Foam::tensor
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
Definition: symmTensor.H:61
Foam::dictionary::readIfPresent
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:417
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:85
Foam::IOobject::MUST_READ
Definition: IOobject.H:120
Foam::cos
dimensionedScalar cos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:265
Foam::cyclicAMIPolyPatch
Cyclic patch for Arbitrary Mesh Interface (AMI)
Definition: cyclicAMIPolyPatch.H:67