cyclicAMIPolyPatch.H
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) 2018-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 Class
28  Foam::cyclicAMIPolyPatch
29 
30 Description
31  Cyclic patch for Arbitrary Mesh Interface (AMI)
32 
33  Includes provision for updating the patch topology to enforce a 1-to-1
34  face match across the interface, based on the \c createAMIFaces flag.
35 
36  The manipulations are based on the reference:
37 
38  \verbatim
39  H.J. Aguerre, S. Márquez Damián, J.M. Gimenez, N.M.Nigro, Conservative
40  handling of arbitrary non-conformal interfaces using an efficient
41  supermesh, Journal of Computational Physics 335(15) 21-49. 2017.
42  https://doi.org/10.1016/j.jcp.2017.01.018.
43  \endverbatim
44 
45 SourceFiles
46  cyclicAMIPolyPatch.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef cyclicAMIPolyPatch_H
51 #define cyclicAMIPolyPatch_H
52 
53 #include "coupledPolyPatch.H"
55 #include "polyBoundaryMesh.H"
56 #include "coupleGroupIdentifier.H"
57 #include "faceAreaWeightAMI.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class cyclicAMIPolyPatch Declaration
66 \*---------------------------------------------------------------------------*/
67 
69 :
70  public coupledPolyPatch
71 {
72  // Private Member Functions
73 
74  //- Return normal of face at max distance from rotation axis
75  vector findFaceNormalMaxRadius(const pointField& faceCentres) const;
76 
77  void calcTransforms
78  (
79  const primitivePatch& half0,
80  const pointField& half0Ctrs,
81  const vectorField& half0Areas,
82  const pointField& half1Ctrs,
83  const vectorField& half1Areas
84  );
85 
86 
87 protected:
88 
89  // Protected data
90 
91  //- Name of other half
92  mutable word nbrPatchName_;
93 
94  //- Optional patchGroup to find neighbPatch
96 
97  //- Index of other half
98  mutable label nbrPatchID_;
99 
100  //- Particle displacement fraction accross AMI
101  const scalar fraction_;
102 
103 
104  // Transformations
105 
106  // For rotation
107 
108  //- Axis of rotation for rotational cyclics
110 
111  //- Point on axis of rotation for rotational cyclics
113 
114  //- Flag to show whether the rotation angle is defined
116 
117  //- Rotation angle
118  scalar rotationAngle_;
119 
120 
121  // For translation
122 
123  //- Translation vector
125 
126 
127  //- AMI interpolation class
129 
130  //- Dictionary used during projection surface construction
131  const dictionary surfDict_;
132 
133  //- Projection surface
135 
136 
137  // Change of topology as AMI is updated
138 
139  //- Flag to indicate that new AMI faces will created
140  // Set by the call to changeTopology
141  mutable bool createAMIFaces_;
142 
143  //- Move face centres (default = no)
144  bool moveFaceCentres_;
145 
146  mutable bool updatingAMI_;
147 
149 
151 
152  //- Temporary storage for AMI face areas
153  mutable vectorField faceAreas0_;
154 
155  //- Temporary storage for AMI face centres
156  mutable vectorField faceCentres0_;
157 
158 
159  // Protected Member Functions
160 
161  // Topology change
162 
163  //- Collect faces to remove in the topoChange container
164  virtual bool removeAMIFaces(polyTopoChange& topoChange);
165 
166  //- Collect faces to add in the topoChange container
167  virtual bool addAMIFaces(polyTopoChange& topoChange);
168 
169  //- Set properties of newly inserted faces after topological changes
170  virtual void setAMIFaces();
171 
172  //- Helper to re-apply the geometric scaling lost during mesh
173  //- updates
174  virtual void restoreScaledGeometry();
175 
176 
177  //- Create and return pointer to the projection surface
178  const autoPtr<searchableSurface>& surfPtr() const;
179 
180  //- Reset the AMI interpolator, supply patch points
181  virtual void resetAMI(const UList<point>& points) const;
182 
183  //- Reset the AMI interpolator, use current patch points
184  virtual void resetAMI() const;
185 
186  //- Recalculate the transformation tensors
187  virtual void calcTransforms();
188 
189  //- Initialise the calculation of the patch geometry
190  virtual void initGeometry(PstreamBuffers&);
191 
192  //- Calculate the patch geometry
193  virtual void calcGeometry(PstreamBuffers&);
194 
195  //- Initialise the patches for moving points
196  virtual void initMovePoints(PstreamBuffers& pBufs, const pointField&);
197 
198  //- Correct patches after moving points
199  virtual void movePoints(PstreamBuffers& pBufs, const pointField&);
200 
201  //- Initialise the update of the patch topology
202  virtual void initUpdateMesh(PstreamBuffers&);
203 
204  //- Update of the patch topology
205  virtual void updateMesh(PstreamBuffers&);
206 
207  //- Clear geometry
208  virtual void clearGeom();
209 
210 
211 public:
212 
213  //- Runtime type information
214  TypeName("cyclicAMI");
215 
216 
217  // Constructors
218 
219  //- Construct from (base coupled patch) components
221  (
222  const word& name,
223  const label size,
224  const label start,
225  const label index,
226  const polyBoundaryMesh& bm,
227  const word& patchType,
229  const word& defaultAMIMethod = faceAreaWeightAMI::typeName
230  );
231 
232  //- Construct from dictionary
234  (
235  const word& name,
236  const dictionary& dict,
237  const label index,
238  const polyBoundaryMesh& bm,
239  const word& patchType,
240  const word& defaultAMIMethod = faceAreaWeightAMI::typeName
241  );
242 
243  //- Construct as copy, resetting the boundary mesh
245 
246  //- Construct given the original patch and resetting the
247  // face list and boundary mesh information
249  (
250  const cyclicAMIPolyPatch& pp,
251  const polyBoundaryMesh& bm,
252  const label index,
253  const label newSize,
254  const label newStart,
255  const word& nbrPatchName
256  );
257 
258  //- Construct given the original patch and a map
260  (
261  const cyclicAMIPolyPatch& pp,
262  const polyBoundaryMesh& bm,
263  const label index,
264  const labelUList& mapAddressing,
265  const label newStart
266  );
267 
268 
269  //- Construct and return a clone, resetting the boundary mesh
270  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
271  {
273  }
274 
275  //- Construct and return a clone, resetting the face list
276  // and boundary mesh
278  (
279  const polyBoundaryMesh& bm,
280  const label index,
281  const label newSize,
282  const label newStart
283  ) const
284  {
285  return autoPtr<polyPatch>
286  (
288  (
289  *this,
290  bm,
291  index,
292  newSize,
293  newStart,
295  )
296  );
297  }
298 
299  //- Construct and return a clone, resetting the face list
300  // and boundary mesh
302  (
303  const polyBoundaryMesh& bm,
304  const label index,
305  const labelUList& mapAddressing,
306  const label newStart
307  ) const
308  {
309  return autoPtr<polyPatch>
310  (
312  (
313  *this,
314  bm,
315  index,
316  mapAddressing,
317  newStart
318  )
319  );
320  }
321 
322 
323  //- Destructor
324  virtual ~cyclicAMIPolyPatch() = default;
325 
326 
327  // Member Functions
328 
329  // Access
330 
331  //- Tolerance used e.g. for area calculations/limits
332  static const scalar tolerance_;
333 
334  //- Flag to indicate whether the AMI can be reset
335  inline bool canResetAMI() const;
336 
337  //- Return access to the createAMIFaces flag
338  inline bool createAMIFaces() const;
339 
340  //- Return access to the updated flag
341  inline bool updatingAMI() const;
342 
343  //- Return true if this patch changes the mesh topology
344  // True when createAMIFaces is true
345  virtual bool changeTopology() const;
346 
347  //- Set topology changes in the polyTopoChange object
348  virtual bool setTopology(polyTopoChange& topoChange);
349 
350  //- Is patch 'coupled'. Note that on AMI the geometry is not
351  //- coupled but the fields are!
352  virtual bool coupled() const
353  {
354  return false;
355  }
356 
357  //- Neighbour patch name
358  inline const word& neighbPatchName() const;
359 
360  //- Neighbour patch ID
361  virtual label neighbPatchID() const;
362 
363  //- Particle fraction increase between AMI pathces
364  inline scalar fraction() const;
365 
366  //- Does this side own the patch?
367  virtual bool owner() const;
368 
369  //- Return a reference to the neighbour patch
370  virtual const cyclicAMIPolyPatch& neighbPatch() const;
371 
372  //- Return a reference to the AMI interpolator
373  const AMIPatchToPatchInterpolation& AMI() const;
374 
375  //- Helper function to return the weights
376  inline const scalarListList& weights() const;
377 
378  //- Helper function to return the weights sum
379  inline const scalarField& weightsSum() const;
380 
381  //- Return true if applying the low weight correction
382  bool applyLowWeightCorrection() const;
383 
384  //- Return access to the initial face areas
385  // Used for topology change
386  inline vectorField& faceAreas0() const;
387 
388  //- Return access to the initial face centres
389  // Used for topology change
390  inline vectorField& faceCentres0() const;
391 
392 
393  // Transformations
394 
395  //- Axis of rotation for rotational cyclic AMI
396  inline const vector& rotationAxis() const;
397 
398  //- Point on axis of rotation for rotational cyclic AMI
399  inline const point& rotationCentre() const;
400 
401  //- Translation vector for translational cyclic AMI
402  inline const vector& separationVector() const;
403 
404  //- Transform patch-based positions from nbr side to this side
405  virtual void transformPosition(pointField&) const;
406 
407  //- Transform a patch-based position from nbr side to this side
408  virtual void transformPosition
409  (
410  point& l,
411  const label facei
412  ) const;
413 
414  //- Transform a patch-based position from this side to nbr side
415  virtual void reverseTransformPosition
416  (
417  point& l,
418  const label facei
419  ) const;
420 
421  //- Transform a patch-based direction from this side to nbr side
422  virtual void reverseTransformDirection
423  (
424  vector& d,
425  const label facei
426  ) const;
427 
428 
429  // Interpolations
430 
431  //- Interpolate field
432  template<class Type>
434  (
435  const Field<Type>& fld,
436  const UList<Type>& defaultValues = UList<Type>()
437  ) const;
438 
439  //- Interpolate tmp field
440  template<class Type>
442  (
443  const tmp<Field<Type>>& tFld,
444  const UList<Type>& defaultValues = UList<Type>()
445  ) const;
446 
447  //- Low-level interpolate List
448  template<class Type, class CombineOp>
449  void interpolate
450  (
451  const UList<Type>& fld,
452  const CombineOp& cop,
453  List<Type>& result,
454  const UList<Type>& defaultValues = UList<Type>()
455  ) const;
456 
457 
458  //- Calculate the patch geometry
459  virtual void calcGeometry
460  (
461  const primitivePatch& referPatch,
462  const pointField& thisCtrs,
463  const vectorField& thisAreas,
464  const pointField& thisCc,
465  const pointField& nbrCtrs,
466  const vectorField& nbrAreas,
467  const pointField& nbrCc
468  );
469 
470  //- Initialize ordering for primitivePatch. Does not
471  //- refer to *this (except for name() and type() etc.)
472  virtual void initOrder
473  (
475  const primitivePatch&
476  ) const;
477 
478  //- Return new ordering for primitivePatch.
479  // Ordering is -faceMap: for every face
480  // index of the new face -rotation:for every new face the clockwise
481  // shift of the original face. Return false if nothing changes
482  // (faceMap is identity, rotation is 0), true otherwise.
483  virtual bool order
484  (
486  const primitivePatch&,
488  labelList& rotation
489  ) const;
490 
491  //- Return face index on neighbour patch which shares point p
492  //- following trajectory vector n
493  label pointFace
494  (
495  const label facei,
496  const vector& n,
497  point& p
498  ) const;
499 
500  //- Write the polyPatch data as a dictionary
501  virtual void write(Ostream&) const;
502 };
503 
504 
505 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
506 
507 } // End namespace Foam
508 
509 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
510 
511 #include "cyclicAMIPolyPatchI.H"
512 
513 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
514 
515 #ifdef NoRepository
517 #endif
518 
519 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
520 
521 #endif
522 
523 // ************************************************************************* //
Foam::coupleGroupIdentifier
Encapsulates using "patchGroups" to specify coupled patch.
Definition: coupleGroupIdentifier.H:58
Foam::cyclicAMIPolyPatch::order
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
Definition: cyclicAMIPolyPatch.C:1045
p
volScalarField & p
Definition: createFieldRefs.H:8
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:848
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::cyclicAMIPolyPatch::updatingAMI_
bool updatingAMI_
Definition: cyclicAMIPolyPatch.H:145
Foam::cyclicAMIPolyPatch::nbrPatchName_
word nbrPatchName_
Name of other half.
Definition: cyclicAMIPolyPatch.H:91
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::cyclicAMIPolyPatch::initOrder
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Definition: cyclicAMIPolyPatch.C:1037
Foam::cyclicAMIPolyPatch::changeTopology
virtual bool changeTopology() const
Return true if this patch changes the mesh topology.
Definition: cyclicAMIPolyPatchTopologyChange.C:647
Foam::cyclicAMIPolyPatch::rotationCentre_
point rotationCentre_
Point on axis of rotation for rotational cyclics.
Definition: cyclicAMIPolyPatch.H:111
Foam::cyclicAMIPolyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: cyclicAMIPolyPatch.C:436
Foam::cyclicAMIPolyPatch::setAMIFaces
virtual void setAMIFaces()
Set properties of newly inserted faces after topological changes.
Definition: cyclicAMIPolyPatchTopologyChange.C:261
coupleGroupIdentifier.H
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:87
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:966
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:99
Foam::cyclicAMIPolyPatch::surfDict_
const dictionary surfDict_
Dictionary used during projection surface construction.
Definition: cyclicAMIPolyPatch.H:130
Foam::cyclicAMIPolyPatch::weights
const scalarListList & weights() const
Helper function to return the weights.
Definition: cyclicAMIPolyPatchI.H:68
Foam::cyclicAMIPolyPatch::surfPtr
const autoPtr< searchableSurface > & surfPtr() const
Create and return pointer to the projection surface.
Definition: cyclicAMIPolyPatch.C:292
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:331
cyclicAMIPolyPatchTemplates.C
Foam::coupledPolyPatch
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Definition: coupledPolyPatch.H:53
Foam::cyclicAMIPolyPatch::nbrPatchID_
label nbrPatchID_
Index of other half.
Definition: cyclicAMIPolyPatch.H:97
Foam::cyclicAMIPolyPatch::separationVector
const vector & separationVector() const
Translation vector for translational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:113
Foam::cyclicAMIPolyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
Definition: cyclicAMIPolyPatch.C:460
Foam::cyclicAMIPolyPatch::coupled
virtual bool coupled() const
Definition: cyclicAMIPolyPatch.H:351
Foam::cyclicAMIPolyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: cyclicAMIPolyPatch.C:532
Foam::cyclicAMIPolyPatch::canResetAMI
bool canResetAMI() const
Flag to indicate whether the AMI can be reset.
Definition: cyclicAMIPolyPatchI.H:31
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:892
coupledPolyPatch.H
Foam::cyclicAMIPolyPatch::weightsSum
const scalarField & weightsSum() const
Helper function to return the weights sum.
Definition: cyclicAMIPolyPatchI.H:79
Foam::cyclicAMIPolyPatch::separationVector_
vector separationVector_
Translation vector.
Definition: cyclicAMIPolyPatch.H:123
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:1109
Foam::cyclicAMIPolyPatch::faceAreas0_
vectorField faceAreas0_
Temporary storage for AMI face areas.
Definition: cyclicAMIPolyPatch.H:152
Foam::cyclicAMIPolyPatch::AMIPtr_
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
AMI interpolation class.
Definition: cyclicAMIPolyPatch.H:127
Foam::cyclicAMIPolyPatch::pointFace
label pointFace(const label facei, const vector &n, point &p) const
Definition: cyclicAMIPolyPatch.C:1063
Foam::cyclicAMIPolyPatch::movePoints
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
Definition: cyclicAMIPolyPatch.C:496
Foam::cyclicAMIPolyPatch::removeAMIFaces
virtual bool removeAMIFaces(polyTopoChange &topoChange)
Collect faces to remove in the topoChange container.
Definition: cyclicAMIPolyPatchTopologyChange.C:82
Foam::coupledPolyPatch::UNKNOWN
Definition: coupledPolyPatch.H:61
Foam::cyclicAMIPolyPatch::setTopology
virtual bool setTopology(polyTopoChange &topoChange)
Set topology changes in the polyTopoChange object.
Definition: cyclicAMIPolyPatchTopologyChange.C:657
Foam::cyclicAMIPolyPatch::TypeName
TypeName("cyclicAMI")
Runtime type information.
Foam::cyclicAMIPolyPatch::updatingAMI
bool updatingAMI() const
Return access to the updated flag.
Definition: cyclicAMIPolyPatchI.H:43
fld
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputLagrangian.H:23
Foam::cyclicAMIPolyPatch::interpolate
tmp< Field< Type > > interpolate(const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >()) const
Interpolate field.
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:108
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::cyclicAMIPolyPatch::rotationAngle_
scalar rotationAngle_
Rotation angle.
Definition: cyclicAMIPolyPatch.H:117
AMIPatchToPatchInterpolation.H
Foam::cyclicAMIPolyPatch::neighbPatchID
virtual label neighbPatchID() const
Neighbour patch ID.
Definition: cyclicAMIPolyPatch.C:812
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:854
Foam::cyclicAMIPolyPatch::createAMIFaces
bool createAMIFaces() const
Return access to the createAMIFaces flag.
Definition: cyclicAMIPolyPatchI.H:37
Foam::PrimitivePatch::points
const Field< point_type > & points() const
Return reference to global points.
Definition: PrimitivePatch.H:305
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
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::cyclicAMIPolyPatch::rotationAngleDefined_
bool rotationAngleDefined_
Flag to show whether the rotation angle is defined.
Definition: cyclicAMIPolyPatch.H:114
Foam::cyclicAMIPolyPatch::srcFaceIDs_
labelListList srcFaceIDs_
Definition: cyclicAMIPolyPatch.H:147
Foam::polyPatch::start
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:313
Foam::coupledPolyPatch::transform
virtual transformType transform() const
Type of transform.
Definition: coupledPolyPatch.H:258
cyclicAMIPolyPatchI.H
Foam::cyclicAMIPolyPatch::moveFaceCentres_
bool moveFaceCentres_
Move face centres (default = no)
Definition: cyclicAMIPolyPatch.H:143
Foam::cyclicAMIPolyPatch::rotationAxis
const vector & rotationAxis() const
Axis of rotation for rotational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:101
Foam::cyclicAMIPolyPatch::fraction_
const scalar fraction_
Particle displacement fraction accross AMI.
Definition: cyclicAMIPolyPatch.H:100
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::cyclicAMIPolyPatch::AMI
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
Definition: cyclicAMIPolyPatch.C:861
Foam::cyclicAMIPolyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: cyclicAMIPolyPatch.H:269
Foam::cyclicAMIPolyPatch::fraction
scalar fraction() const
Particle fraction increase between AMI pathces.
Definition: cyclicAMIPolyPatchI.H:62
Foam::polyPatch::faceCentres
const vectorField::subField faceCentres() const
Return face centres.
Definition: polyPatch.C:313
faceAreaWeightAMI.H
Foam::cyclicAMIPolyPatch::applyLowWeightCorrection
bool applyLowWeightCorrection() const
Return true if applying the low weight correction.
Definition: cyclicAMIPolyPatch.C:879
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< scalar >
Foam::List< labelList >
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:1004
Foam::cyclicAMIPolyPatch::addAMIFaces
virtual bool addAMIFaces(polyTopoChange &topoChange)
Collect faces to add in the topoChange container.
Definition: cyclicAMIPolyPatchTopologyChange.C:137
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
Foam::cyclicAMIPolyPatch::faceCentres0_
vectorField faceCentres0_
Temporary storage for AMI face centres.
Definition: cyclicAMIPolyPatch.H:155
Foam::cyclicAMIPolyPatch::~cyclicAMIPolyPatch
virtual ~cyclicAMIPolyPatch()=default
Destructor.
polyBoundaryMesh.H
Foam::cyclicAMIPolyPatch::restoreScaledGeometry
virtual void restoreScaledGeometry()
Definition: cyclicAMIPolyPatchTopologyChange.C:35
Foam::cyclicAMIPolyPatch::surfPtr_
autoPtr< searchableSurface > surfPtr_
Projection surface.
Definition: cyclicAMIPolyPatch.H:133
Foam::cyclicAMIPolyPatch::rotationCentre
const point & rotationCentre() const
Point on axis of rotation for rotational cyclic AMI.
Definition: cyclicAMIPolyPatchI.H:107
Foam::cyclicAMIPolyPatch::createAMIFaces_
bool createAMIFaces_
Flag to indicate that new AMI faces will created.
Definition: cyclicAMIPolyPatch.H:140
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::coupledPolyPatch::transformType
transformType
Definition: coupledPolyPatch.H:59
Foam::patchIdentifier::name
const word & name() const
The patch name.
Definition: patchIdentifier.H:134
Foam::patchIdentifier::index
label index() const
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:158
Foam::cyclicAMIPolyPatch::tgtFaceIDs_
labelListList tgtFaceIDs_
Definition: cyclicAMIPolyPatch.H:149
Foam::cyclicAMIPolyPatch::faceAreas0
vectorField & faceAreas0() const
Return access to the initial face areas.
Definition: cyclicAMIPolyPatchI.H:90
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:85
Foam::cyclicAMIPolyPatch
Cyclic patch for Arbitrary Mesh Interface (AMI)
Definition: cyclicAMIPolyPatch.H:67
Foam::cyclicAMIPolyPatch::faceCentres0
vectorField & faceCentres0() const
Return access to the initial face centres.
Definition: cyclicAMIPolyPatchI.H:96