slidingInterface.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) 2020-2023 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 "slidingInterface.H"
30 #include "polyTopoChanger.H"
31 #include "polyMesh.H"
32 #include "polyTopoChange.H"
34 #include "plane.H"
35 
36 // Index of debug signs:
37 // p - adjusting a projection point
38 // * - adjusting edge intersection
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44  defineTypeNameAndDebug(slidingInterface, 0);
46  (
47  polyMeshModifier,
48  slidingInterface,
49  dictionary
50  );
51 }
52 
53 
54 const Foam::Enum
55 <
57 >
59 ({
60  { typeOfMatch::INTEGRAL, "integral" },
61  { typeOfMatch::PARTIAL, "partial" },
62 });
63 
64 
65 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
66 
67 void Foam::slidingInterface::checkDefinition()
68 {
69  const polyMesh& mesh = topoChanger().mesh();
70 
71  if
72  (
73  !masterFaceZoneID_.active()
74  || !slaveFaceZoneID_.active()
75  || !cutPointZoneID_.active()
76  || !cutFaceZoneID_.active()
77  || !masterPatchID_.active()
78  || !slavePatchID_.active()
79  )
80  {
82  << "Not all zones and patches needed in the definition "
83  << "have been found. Please check your mesh definition."
84  << abort(FatalError);
85  }
86 
87  // Check the sizes and set up state
88  if
89  (
90  mesh.faceZones()[masterFaceZoneID_.index()].empty()
91  || mesh.faceZones()[slaveFaceZoneID_.index()].empty()
92  )
93  {
95  << "Please check your mesh definition."
96  << abort(FatalError);
97  }
98 
99  if (debug)
100  {
101  Pout<< "Sliding interface object " << name() << " :" << nl
102  << " master face zone: " << masterFaceZoneID_.index() << nl
103  << " slave face zone: " << slaveFaceZoneID_.index() << endl;
104  }
105 }
106 
107 
108 void Foam::slidingInterface::clearOut() const
109 {
110  clearPointProjection();
111  clearAttachedAddressing();
112  clearAddressing();
113 }
114 
115 
116 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
117 
118 Foam::slidingInterface::slidingInterface
119 (
120  const word& name,
121  const label index,
122  const polyTopoChanger& mme,
123  const word& masterFaceZoneName,
124  const word& slaveFaceZoneName,
125  const word& cutPointZoneName,
126  const word& cutFaceZoneName,
127  const word& masterPatchName,
128  const word& slavePatchName,
129  const typeOfMatch tom,
130  const bool coupleDecouple,
131  const intersection::algorithm algo
132 )
133 :
134  polyMeshModifier(name, index, mme, true),
135  masterFaceZoneID_
136  (
137  masterFaceZoneName,
138  mme.mesh().faceZones()
139  ),
140  slaveFaceZoneID_
141  (
142  slaveFaceZoneName,
143  mme.mesh().faceZones()
144  ),
145  cutPointZoneID_
146  (
147  cutPointZoneName,
148  mme.mesh().pointZones()
149  ),
150  cutFaceZoneID_
151  (
152  cutFaceZoneName,
153  mme.mesh().faceZones()
154  ),
155  masterPatchID_
156  (
157  masterPatchName,
158  mme.mesh().boundaryMesh()
159  ),
160  slavePatchID_
161  (
162  slavePatchName,
163  mme.mesh().boundaryMesh()
164  ),
165  matchType_(tom),
166  coupleDecouple_(coupleDecouple),
167  attached_(false),
168  projectionAlgo_(algo),
169  trigger_(false),
170  pointMergeTol_(pointMergeTolDefault_),
171  edgeMergeTol_(edgeMergeTolDefault_),
172  nFacesPerSlaveEdge_(nFacesPerSlaveEdgeDefault_),
173  edgeFaceEscapeLimit_(edgeFaceEscapeLimitDefault_),
174  integralAdjTol_(integralAdjTolDefault_),
175  edgeMasterCatchFraction_(edgeMasterCatchFractionDefault_),
176  edgeCoPlanarTol_(edgeCoPlanarTolDefault_),
177  edgeEndCutoffTol_(edgeEndCutoffTolDefault_),
178  cutFaceMasterPtr_(nullptr),
179  cutFaceSlavePtr_(nullptr),
180  masterFaceCellsPtr_(nullptr),
181  slaveFaceCellsPtr_(nullptr),
182  masterStickOutFacesPtr_(nullptr),
183  slaveStickOutFacesPtr_(nullptr),
184  retiredPointMapPtr_(nullptr),
185  cutPointEdgePairMapPtr_(nullptr),
186  slavePointPointHitsPtr_(nullptr),
187  slavePointEdgeHitsPtr_(nullptr),
188  slavePointFaceHitsPtr_(nullptr),
189  masterPointEdgeHitsPtr_(nullptr),
190  projectedSlavePointsPtr_(nullptr)
191 {
192  checkDefinition();
193 
194  if (attached_)
195  {
197  << "Creation of a sliding interface from components "
198  << "in attached state not supported."
199  << abort(FatalError);
200  }
201  else
202  {
203  calcAttachedAddressing();
204  }
205 }
206 
207 
208 Foam::slidingInterface::slidingInterface
209 (
210  const word& name,
211  const dictionary& dict,
212  const label index,
213  const polyTopoChanger& mme
214 )
215 :
216  polyMeshModifier(name, index, mme, dict.get<bool>("active")),
217  masterFaceZoneID_
218  (
219  dict.get<keyType>("masterFaceZoneName"),
220  mme.mesh().faceZones()
221  ),
222  slaveFaceZoneID_
223  (
224  dict.get<keyType>("slaveFaceZoneName"),
225  mme.mesh().faceZones()
226  ),
227  cutPointZoneID_
228  (
229  dict.get<keyType>("cutPointZoneName"),
230  mme.mesh().pointZones()
231  ),
232  cutFaceZoneID_
233  (
234  dict.get<keyType>("cutFaceZoneName"),
235  mme.mesh().faceZones()
236  ),
237  masterPatchID_
238  (
239  dict.get<keyType>("masterPatchName"),
240  mme.mesh().boundaryMesh()
241  ),
242  slavePatchID_
243  (
244  dict.get<keyType>("slavePatchName"),
245  mme.mesh().boundaryMesh()
246  ),
247  matchType_(typeOfMatchNames.get("typeOfMatch", dict)),
248  coupleDecouple_(dict.get<bool>("coupleDecouple")),
249  attached_(dict.get<bool>("attached")),
250  projectionAlgo_
251  (
252  intersection::algorithmNames_.get("projection", dict)
253  ),
254  trigger_(false),
255  cutFaceMasterPtr_(nullptr),
256  cutFaceSlavePtr_(nullptr),
257  masterFaceCellsPtr_(nullptr),
258  slaveFaceCellsPtr_(nullptr),
259  masterStickOutFacesPtr_(nullptr),
260  slaveStickOutFacesPtr_(nullptr),
261  retiredPointMapPtr_(nullptr),
262  cutPointEdgePairMapPtr_(nullptr),
263  slavePointPointHitsPtr_(nullptr),
264  slavePointEdgeHitsPtr_(nullptr),
265  slavePointFaceHitsPtr_(nullptr),
266  masterPointEdgeHitsPtr_(nullptr),
267  projectedSlavePointsPtr_(nullptr)
268 {
269  // Optionally default tolerances from dictionary
271 
272  checkDefinition();
273 
274  // If the interface is attached, the master and slave face zone addressing
275  // needs to be read in; otherwise it will be created
276  if (attached_)
277  {
278  if (debug)
279  {
280  Pout<< "slidingInterface::slidingInterface(...) "
281  << " for object " << name << " : "
282  << "Interface attached. Reading master and slave face zones "
283  << "and retired point lookup." << endl;
284  }
285 
286  // The face zone addressing is written out in the definition dictionary
287  masterFaceCellsPtr_.reset(new labelList());
288  slaveFaceCellsPtr_.reset(new labelList());
289  masterStickOutFacesPtr_.reset(new labelList());
290  slaveStickOutFacesPtr_.reset(new labelList());
291  retiredPointMapPtr_.reset(new Map<label>());
292  cutPointEdgePairMapPtr_.reset(new Map<Pair<edge>>());
293 
294  dict.readEntry("masterFaceCells", *masterFaceCellsPtr_);
295  dict.readEntry("slaveFaceCells", *slaveFaceCellsPtr_);
296  dict.readEntry("masterStickOutFaces", *masterStickOutFacesPtr_);
297  dict.readEntry("slaveStickOutFaces", *slaveStickOutFacesPtr_);
298  dict.readEntry("retiredPointMap", *retiredPointMapPtr_);
299  dict.readEntry("cutPointEdgePairMap", *cutPointEdgePairMapPtr_);
300  }
301  else
302  {
303  calcAttachedAddressing();
304  }
305 }
306 
307 
308 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
309 
310 void Foam::slidingInterface::clearAddressing() const
311 {
312  cutFaceMasterPtr_.reset(nullptr);
313  cutFaceSlavePtr_.reset(nullptr);
314 }
315 
318 {
319  return masterFaceZoneID_;
320 }
321 
324 {
325  return slaveFaceZoneID_;
326 }
327 
328 
330 {
331  if (coupleDecouple_)
332  {
333  // Always changes. If not attached, project points
334  if (debug)
335  {
336  Pout<< "bool slidingInterface::changeTopology() const "
337  << "for object " << name() << " : "
338  << "Couple-decouple mode." << endl;
339  }
340 
341  if (!attached_)
342  {
343  projectPoints();
344  }
345  else
346  {
347  }
348 
349  return true;
350  }
351 
352  if
353  (
354  attached_
355  && !topoChanger().mesh().changing()
356  )
357  {
358  // If the mesh is not moving or morphing and the interface is
359  // already attached, the topology will not change
360  return false;
361  }
362  else
363  {
364  // Check if the motion changes point projection
365  return projectPoints();
366  }
367 }
368 
369 
370 void Foam::slidingInterface::setRefinement(polyTopoChange& ref) const
371 {
372  if (coupleDecouple_)
373  {
374  if (attached_)
375  {
376  // Attached, coupling
377  decoupleInterface(ref);
378  }
379  else
380  {
381  // Detached, coupling
382  coupleInterface(ref);
383  }
384 
385  return;
386  }
387 
388  if (trigger_)
389  {
390  if (attached_)
391  {
392  // Clear old coupling data
393  clearCouple(ref);
394  }
395 
396  coupleInterface(ref);
397 
398  trigger_ = false;
399  }
400 }
401 
402 
404 {
405  if (debug)
406  {
407  Pout<< "void slidingInterface::modifyMotionPoints("
408  << "pointField& motionPoints) const for object " << name() << " : "
409  << "Adjusting motion points." << endl;
410  }
411 
412  const polyMesh& mesh = topoChanger().mesh();
413 
414  // Get point from the cut zone
415  const labelList& cutPoints = mesh.pointZones()[cutPointZoneID_.index()];
416 
417  if (cutPoints.size() && !projectedSlavePointsPtr_)
418  {
419  return;
420  }
421  else
422  {
423  const pointField& projectedSlavePoints = *projectedSlavePointsPtr_;
424 
425  const Map<label>& rpm = retiredPointMap();
426 
427  const Map<Pair<edge>>& cpepm = cutPointEdgePairMap();
428 
429  const Map<label>& slaveZonePointMap =
430  mesh.faceZones()[slaveFaceZoneID_.index()]().meshPointMap();
431 
432  const primitiveFacePatch& masterPatch =
433  mesh.faceZones()[masterFaceZoneID_.index()]();
434  const edgeList& masterEdges = masterPatch.edges();
435  const pointField& masterLocalPoints = masterPatch.localPoints();
436 
437  const primitiveFacePatch& slavePatch =
438  mesh.faceZones()[slaveFaceZoneID_.index()]();
439  const edgeList& slaveEdges = slavePatch.edges();
440  const pointField& slaveLocalPoints = slavePatch.localPoints();
441  const vectorField& slavePointNormals = slavePatch.pointNormals();
442 
443  for (const label pointi : cutPoints)
444  {
445  // Try to find the cut point in retired points
446  const auto rpmIter = rpm.cfind(pointi);
447 
448  if (rpmIter.good())
449  {
450  if (debug)
451  {
452  Pout<< "p";
453  }
454 
455  // Cut point is a retired point
456  motionPoints[cutPoints[pointi]] =
457  projectedSlavePoints[slaveZonePointMap.find(rpmIter())()];
458  }
459  else
460  {
461  // A cut point is not a projected slave point. Therefore, it
462  // must be an edge-to-edge intersection.
463 
464  const auto cpepmIter = cpepm.cfind(pointi);
465 
466  if (cpepmIter.good())
467  {
468  // Pout<< "Need to re-create hit for point "
469  // << cutPoints[pointi]
470  // << " lookup: " << cpepmIter()
471  // << endl;
472 
473  // Note.
474  // The edge cutting code is repeated in
475  // slidingInterface::coupleInterface. This is done for
476  // efficiency reasons and avoids multiple creation of
477  // cutting planes. Please update both simultaneously.
478  //
479  const edge& globalMasterEdge = cpepmIter().first();
480 
481  const label curMasterEdgeIndex =
482  masterPatch.whichEdge
483  (
484  edge
485  (
486  masterPatch.whichPoint
487  (
488  globalMasterEdge.start()
489  ),
490  masterPatch.whichPoint
491  (
492  globalMasterEdge.end()
493  )
494  )
495  );
496 
497  const edge& cme = masterEdges[curMasterEdgeIndex];
498 
499  // Pout<< "curMasterEdgeIndex: " << curMasterEdgeIndex
500  // << " cme: " << cme
501  // << endl;
502 
503  const edge& globalSlaveEdge = cpepmIter().second();
504 
505  const label curSlaveEdgeIndex =
506  slavePatch.whichEdge
507  (
508  edge
509  (
510  slavePatch.whichPoint
511  (
512  globalSlaveEdge.start()
513  ),
514  slavePatch.whichPoint
515  (
516  globalSlaveEdge.end()
517  )
518  )
519  );
520 
521  const edge& curSlaveEdge = slaveEdges[curSlaveEdgeIndex];
522  // Pout<< "curSlaveEdgeIndex: " << curSlaveEdgeIndex
523  // << " curSlaveEdge: " << curSlaveEdge
524  // << endl;
525  const point& a = projectedSlavePoints[curSlaveEdge.start()];
526  const point& b = projectedSlavePoints[curSlaveEdge.end()];
527 
528  point c =
529  0.5*
530  (
531  slaveLocalPoints[curSlaveEdge.start()]
532  + slavePointNormals[curSlaveEdge.start()]
533  + slaveLocalPoints[curSlaveEdge.end()]
534  + slavePointNormals[curSlaveEdge.end()]
535  );
536 
537  // Create the plane
538  plane cutPlane(a, b, c);
539 
540  linePointRef curSlaveLine =
541  curSlaveEdge.line(slaveLocalPoints);
542  const scalar curSlaveLineMag = curSlaveLine.mag();
543 
544  scalar cutOnMaster =
545  cutPlane.lineIntersect
546  (
547  cme.line(masterLocalPoints)
548  );
549 
550  if
551  (
552  cutOnMaster > edgeEndCutoffTol_
553  && cutOnMaster < 1.0 - edgeEndCutoffTol_
554  )
555  {
556  // Master is cut, check the slave
557  point masterCutPoint =
558  masterLocalPoints[cme.start()]
559  + cutOnMaster*cme.vec(masterLocalPoints);
560 
561  pointHit slaveCut =
562  curSlaveLine.nearestDist(masterCutPoint);
563 
564  if (slaveCut.hit())
565  {
566  // Strict checking of slave cut to avoid capturing
567  // end points.
568  scalar cutOnSlave =
569  (
570  (
571  slaveCut.point()
572  - curSlaveLine.start()
573  ) & curSlaveLine.vec()
574  )/sqr(curSlaveLineMag);
575 
576  // Calculate merge tolerance from the
577  // target edge length
578  scalar mergeTol =
579  edgeCoPlanarTol_*mag(b - a);
580 
581  if
582  (
583  cutOnSlave > edgeEndCutoffTol_
584  && cutOnSlave < 1.0 - edgeEndCutoffTol_
585  && slaveCut.distance() < mergeTol
586  )
587  {
588  // Cut both master and slave.
589  motionPoints[pointi] = masterCutPoint;
590  }
591  }
592  else
593  {
594  Pout<< "Missed slave edge!!! This is an error. "
595  << "Master edge: "
596  << cme.line(masterLocalPoints)
597  << " slave edge: " << curSlaveLine
598  << " point: " << masterCutPoint
599  << " weight: " <<
600  (
601  (
602  slaveCut.point()
603  - curSlaveLine.start()
604  ) & curSlaveLine.vec()
605  )/sqr(curSlaveLineMag)
606  << endl;
607  }
608  }
609  else
610  {
611  Pout<< "Missed master edge!!! This is an error"
612  << endl;
613  }
614  }
615  else
616  {
618  << "Cut point " << cutPoints[pointi]
619  << " not recognised as either the projected "
620  << "or as intersection point. Error in point "
621  << "projection or data mapping"
622  << abort(FatalError);
623  }
624  }
625  }
626  if (debug)
627  {
628  Pout<< endl;
629  }
630  }
631 }
632 
633 
634 void Foam::slidingInterface::updateMesh(const mapPolyMesh& m)
635 {
636  if (debug)
637  {
638  Pout<< "void slidingInterface::updateMesh(const mapPolyMesh& m)"
639  << " const for object " << name() << " : "
640  << "Updating topology." << endl;
641  }
642 
643  // Mesh has changed topologically. Update local topological data
644  const polyMesh& mesh = topoChanger().mesh();
645 
646  masterFaceZoneID_.update(mesh.faceZones());
647  slaveFaceZoneID_.update(mesh.faceZones());
648  cutPointZoneID_.update(mesh.pointZones());
649  cutFaceZoneID_.update(mesh.faceZones());
650 
651  masterPatchID_.update(mesh.boundaryMesh());
652  slavePatchID_.update(mesh.boundaryMesh());
653 
654 //MJ:Disabled updating
655 // if (!attached())
656 // {
657 // calcAttachedAddressing();
658 // }
659 // else
660 // {
661 // renumberAttachedAddressing(m);
662 // }
663 }
664 
665 
667 {
668  if (!projectedSlavePointsPtr_)
669  {
670  projectPoints();
671  }
672 
673  return *projectedSlavePointsPtr_;
674 }
675 
676 
677 void Foam::slidingInterface::setTolerances(const dictionary&dict, bool report)
678 {
679  pointMergeTol_ = dict.getOrDefault<scalar>
680  (
681  "pointMergeTol",
682  pointMergeTol_
683  );
684  edgeMergeTol_ = dict.getOrDefault<scalar>
685  (
686  "edgeMergeTol",
687  edgeMergeTol_
688  );
689  nFacesPerSlaveEdge_ = dict.getOrDefault<label>
690  (
691  "nFacesPerSlaveEdge",
692  nFacesPerSlaveEdge_
693  );
694  edgeFaceEscapeLimit_ = dict.getOrDefault<label>
695  (
696  "edgeFaceEscapeLimit",
697  edgeFaceEscapeLimit_
698  );
699  integralAdjTol_ = dict.getOrDefault<scalar>
700  (
701  "integralAdjTol",
702  integralAdjTol_
703  );
704  edgeMasterCatchFraction_ = dict.getOrDefault<scalar>
705  (
706  "edgeMasterCatchFraction",
707  edgeMasterCatchFraction_
708  );
709  edgeCoPlanarTol_ = dict.getOrDefault<scalar>
710  (
711  "edgeCoPlanarTol",
712  edgeCoPlanarTol_
713  );
714  edgeEndCutoffTol_ = dict.getOrDefault<scalar>
715  (
716  "edgeEndCutoffTol",
717  edgeEndCutoffTol_
718  );
719 
720  if (report)
721  {
722  Info<< "Sliding interface parameters:" << nl
723  << "pointMergeTol : " << pointMergeTol_ << nl
724  << "edgeMergeTol : " << edgeMergeTol_ << nl
725  << "nFacesPerSlaveEdge : " << nFacesPerSlaveEdge_ << nl
726  << "edgeFaceEscapeLimit : " << edgeFaceEscapeLimit_ << nl
727  << "integralAdjTol : " << integralAdjTol_ << nl
728  << "edgeMasterCatchFraction : " << edgeMasterCatchFraction_ << nl
729  << "edgeCoPlanarTol : " << edgeCoPlanarTol_ << nl
730  << "edgeEndCutoffTol : " << edgeEndCutoffTol_ << endl;
731  }
732 }
733 
734 
735 void Foam::slidingInterface::write(Ostream& os) const
736 {
737  os << nl << type() << nl
738  << name()<< nl
739  << masterFaceZoneID_.name() << nl
740  << slaveFaceZoneID_.name() << nl
741  << cutPointZoneID_.name() << nl
742  << cutFaceZoneID_.name() << nl
743  << masterPatchID_.name() << nl
744  << slavePatchID_.name() << nl
745  << typeOfMatchNames[matchType_] << nl
746  << coupleDecouple_ << nl
747  << attached_ << endl;
748 }
749 
751 // To write out all those tolerances
752 #undef WRITE_NON_DEFAULT
753 #define WRITE_NON_DEFAULT(name) \
754  if ( name ## _ != name ## Default_ ) os.writeEntry( #name , name ## _ );
755 
756 
758 {
759  os << nl;
760 
761  os.beginBlock(name());
762 
763  os.writeEntry("type", type());
764  os.writeEntry("masterFaceZoneName", masterFaceZoneID_.name());
765  os.writeEntry("slaveFaceZoneName", slaveFaceZoneID_.name());
766  os.writeEntry("cutPointZoneName", cutPointZoneID_.name());
767  os.writeEntry("cutFaceZoneName", cutFaceZoneID_.name());
768  os.writeEntry("masterPatchName", masterPatchID_.name());
769  os.writeEntry("slavePatchName", slavePatchID_.name());
770  os.writeEntry("typeOfMatch", typeOfMatchNames[matchType_]);
771  os.writeEntry("coupleDecouple", coupleDecouple_);
772  os.writeEntry("projection", intersection::algorithmNames_[projectionAlgo_]);
773  os.writeEntry("attached", attached_);
774  os.writeEntry("active", active());
775 
776  if (attached_)
777  {
778  masterFaceCellsPtr_->writeEntry("masterFaceCells", os);
779  slaveFaceCellsPtr_->writeEntry("slaveFaceCells", os);
780  masterStickOutFacesPtr_->writeEntry("masterStickOutFaces", os);
781  slaveStickOutFacesPtr_->writeEntry("slaveStickOutFaces", os);
782 
783  os.writeEntry("retiredPointMap", retiredPointMap());
784  os.writeEntry("cutPointEdgePairMap", cutPointEdgePairMap());
785  }
786 
787  WRITE_NON_DEFAULT(pointMergeTol)
788  WRITE_NON_DEFAULT(edgeMergeTol)
789  WRITE_NON_DEFAULT(nFacesPerSlaveEdge)
790  WRITE_NON_DEFAULT(edgeFaceEscapeLimit)
791  WRITE_NON_DEFAULT(integralAdjTol)
792  WRITE_NON_DEFAULT(edgeMasterCatchFraction)
793  WRITE_NON_DEFAULT(edgeCoPlanarTol)
794  WRITE_NON_DEFAULT(edgeEndCutoffTol)
795 
796  #undef WRITE_NON_DEFAULT
797 
798  os.endBlock();
799 }
800 
801 
802 // ************************************************************************* //
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
dictionary dict
static const Enum< algorithm > algorithmNames_
Projection algorithm names.
Definition: intersection.H:88
const faceZoneID & slaveFaceZoneID() const
Return slave face zone ID.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL ERROR&#39; header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:598
virtual void modifyMotionPoints(pointField &motionPoints) const
Modify motion points to comply with the topological change.
List< edge > edgeList
List of edge.
Definition: edgeList.H:32
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Definition: boundaryMesh.H:58
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Definition: Ostream.H:321
virtual void write(Ostream &) const
Write.
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
Macros for easy insertion into run-time selection tables.
const pointField & pointProjection() const
Return projected points for a slave patch.
bool active() const noexcept
Has the zone been found.
Definition: DynamicID.H:147
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:38
dynamicFvMesh & mesh
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
line< point, const point & > linePointRef
A line using referred points.
Definition: line.H:66
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
List of mesh modifiers defining the mesh dynamics.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Definition: polyMesh.H:608
A class for handling words, derived from Foam::string.
Definition: word.H:63
#define WRITE_NON_DEFAULT(name)
virtual Ostream & endBlock()
Write end block group.
Definition: Ostream.C:108
Virtual base class for mesh modifiers.
errorManip< error > abort(error &err)
Definition: errorManip.H:139
label index() const
The index of the first matching items, -1 if no matches.
Definition: DynamicID.H:139
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
virtual bool update()=0
Update the mesh for both mesh motion and topology change.
rDeltaT ref()
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
Definition: polyMesh.H:670
defineTypeNameAndDebug(combustionModel, 0)
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
A PrimitivePatch with List storage for the faces, const reference for the point field.
typeOfMatch
Type of match.
const polyTopoChanger & topoChanger() const
Return reference to morph engine.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
Definition: polyMesh.H:662
vector point
Point is a vector.
Definition: point.H:37
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: error.H:64
virtual void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
const dimensionedScalar c
Speed of light in a vacuum.
const word & name() const
Return name of this modifier.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
Definition: Ostream.C:90
Field< vector > vectorField
Specialisation of Field<T> for vector.
const faceZoneID & masterFaceZoneID() const
Return master face zone ID.
void setTolerances(const dictionary &, bool report=false)
Set the tolerances from the values in a dictionary.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
List< label > labelList
A List of labels.
Definition: List.H:62
const polyMesh & mesh() const
Return the mesh reference.
static const Enum< typeOfMatch > typeOfMatchNames
Names for the types of matches.
virtual void writeDict(Ostream &) const
Write dictionary.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
virtual bool changeTopology() const
Check for topology change.
PointHit< point > pointHit
A PointHit with a 3D point.
Definition: pointHit.H:43
Namespace for OpenFOAM.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)