AMIInterpolation.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-2017 OpenFOAM Foundation
9  Copyright (C) 2016-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 Class
28  Foam::AMIInterpolation
29 
30 Description
31  Interpolation class dealing with transfer of data between two
32  primitive patches with an arbitrary mesh interface (AMI).
33 
34  Based on the algorithm given in:
35 
36  Conservative interpolation between volume meshes by local Galerkin
37  projection, Farrell PE and Maddison JR, 2011, Comput. Methods Appl.
38  Mech Engrg, Volume 200, Issues 1-4, pp 89-100
39 
40  Interpolation requires that the two patches should have opposite
41  orientations (opposite normals). The 'reverseTarget' flag can be used to
42  reverse the orientation of the target patch.
43 
44 SourceFiles
45  AMIInterpolation.C
46  AMIInterpolationName.C
47  AMIInterpolationParallelOps.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef Foam_AMIInterpolation_H
52 #define Foam_AMIInterpolation_H
53 
54 #include "className.H"
55 #include "searchableSurface.H"
56 #include "treeBoundBoxList.H"
57 #include "boolList.H"
58 #include "primitivePatch.H"
59 #include "faceAreaIntersect.H"
60 #include "globalIndex.H"
61 #include "ops.H"
62 #include "refPtr.H"
63 #include "Enum.H"
64 #include "pointList.H"
65 #include "indexedOctree.H"
66 #include "treeDataPrimitivePatch.H"
67 
68 #include "runTimeSelectionTables.H"
69 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class AMIInterpolation Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 class AMIInterpolation
81 {
82 public:
83 
84  // Public Data Types
85 
86  static bool cacheIntersections_;
87 
88 
89 protected:
90 
91  //- Local typedef to octree tree-type
93 
94  // Protected data
95 
96  //- Flag to indicate that the two patches must be matched/an overlap
97  //- exists between them
98  bool requireMatch_;
99 
100  //- Flag to indicate that the two patches are co-directional and
101  //- that the orientation of the target patch should be reversed
102  const bool reverseTarget_;
104  //- Threshold weight below which interpolation is deactivated
105  const scalar lowWeightCorrection_;
106 
107  //- Index of processor that holds all of both sides. -1 in all other
108  //- cases
109  label singlePatchProc_;
110 
111 
112  // Source patch
113 
114  //- Source face areas
116 
117  //- Addresses of target faces per source face
119 
120  //- Weights of target faces per source face
123  //- Sum of weights of target faces per source face
125 
126  //- Centroid of target faces per source face
128 
129  //- Source patch points if input points are manipulated, e.g.
130  //- projected
133  //- Source patch using manipulated input points
135 
136  //- Source map pointer - parallel running only
138 
139 
140 
141  // Target patch
143  //- Target face areas
145 
146  //- Addresses of source faces per target face
149  //- Weights of source faces per target face
151 
152  //- Sum of weights of source faces per target face
154 
155  //- Centroid of source faces per target face
157 
158  //- Target patch points if input points are manipulated, e.g.
159  //- projected
161 
162  //- Target patch using manipulated input points
164 
165  //- Target map pointer - parallel running only
168  //- Up-to-date flag
169  bool upToDate_;
170 
171 
172  // Protected Member Functions
173 
174  //- No copy assignment
175  void operator=(const AMIInterpolation&) = delete;
176 
178  // Initialisation
179 
180  //- Reset the octree for the patch face search
182  (
183  const primitivePatch& patch
184  ) const;
185 
186  //- Calculate if patches are on multiple processors
188  (
189  const primitivePatch& srcPatch,
190  const primitivePatch& tgtPatch
191  ) const;
192 
193  //- Project points to surface
195  (
196  const searchableSurface& surf,
197  pointField& pts
198  ) const;
199 
200 
201  // Access
202 
203  //- Return the orginal src patch with optionally updated points
204  inline const primitivePatch& srcPatch0() const;
205 
206  //- Return the orginal tgt patch with optionally updated points
207  inline const primitivePatch& tgtPatch0() const;
209 
210  // Evaluation
211 
212  //- Normalise the (area) weights - suppresses numerical error in
213  //- weights calculation
214  // NOTE: if area weights are incorrect by 'a significant amount'
215  // normalisation may stabilise the solution, but will introduce
216  // numerical error!
217  static void normaliseWeights
218  (
219  const scalarList& patchAreas,
220  const word& patchName,
221  const labelListList& addr,
222  scalarListList& wght,
223  scalarField& wghtSum,
224  const bool conformal,
225  const bool output,
226  const scalar lowWeightTol
227  );
228 
229 
230  // Constructor helpers
231 
232  static void agglomerate
233  (
234  const autoPtr<mapDistribute>& targetMap,
235  const scalarList& fineSrcMagSf,
236  const labelListList& fineSrcAddress,
237  const scalarListList& fineSrcWeights,
238 
239  const labelList& sourceRestrictAddressing,
240  const labelList& targetRestrictAddressing,
241 
247  );
248 
249 
250 public:
251 
252  //- Runtime type information
253  TypeName("AMIInterpolation");
254 
255  // Selection tables
256 
257  //- Selection table for dictionary construction
259  (
260  autoPtr,
262  dict,
263  (
264  const dictionary& dict,
265  const bool reverseTarget
266  ),
267  (
268  dict,
270  )
271  );
272 
273  //- Selection table for component-wise construction
275  (
276  autoPtr,
278  component,
279  (
280  const bool requireMatch,
281  const bool reverseTarget,
282  const scalar lowWeightCorrection
283  ),
284  (
285  requireMatch,
288  )
289  );
290 
291  //- Selector for dictionary
293  (
294  const word& modelName,
295  const dictionary& dict,
296  const bool reverseTarget = false
297  );
298 
299  //- Selector for components
301  (
302  const word& modelName,
303  const bool requireMatch = true,
304  const bool reverseTarget = false,
305  const scalar lowWeightCorrection = -1
306  );
307 
308 
309  // Constructors
310 
311  //- Construct from dictionary
313  (
314  const dictionary& dict,
315  const bool reverseTarget = false
316  );
317 
318  //- Construct from components
320  (
321  const bool requireMatch = true,
322  const bool reverseTarget = false,
323  const scalar lowWeightCorrection = -1
324  );
325 
326  //- Construct from agglomeration of AMIInterpolation. Agglomeration
327  //- passed in as new coarse size and addressing from fine from coarse
329  (
330  const AMIInterpolation& fineAMI,
331  const labelList& sourceRestrictAddressing,
332  const labelList& neighbourRestrictAddressing
333  );
334 
335  //- Construct as copy
337 
338  //- Construct and return a clone
339  virtual autoPtr<AMIInterpolation> clone() const
340  {
341  return autoPtr<AMIInterpolation>::New(*this);
342  }
343 
344 
345  //- Destructor
346  virtual ~AMIInterpolation() = default;
347 
348 
349  // Member Functions
350 
351  // Access
352 
353  //- Is up-to-date?
354  bool upToDate() const noexcept { return upToDate_; }
355 
356  //- Set as up-to-date, return the previous value
357  bool upToDate(bool flag) noexcept
358  {
359  bool old(upToDate_);
360  upToDate_ = flag;
361  return old;
362  }
363 
364  //- Access to the up-to-date flag
365  // \deprecated Prefer the upToDate(bool) setter (JAN-2023)
366  bool upToDate() noexcept { return upToDate_; }
367 
368  //- Access to the distributed flag
369  inline bool distributed() const;
370 
371  //- Access to the requireMatch flag
372  inline bool requireMatch() const;
373 
374  //- Access to the requireMatch flag
375  inline bool setRequireMatch(const bool flag);
376 
377  //- Return true if requireMatch and lowWeightCorrectionin active
378  inline bool mustMatchFaces() const;
379 
380  //- Access to the reverseTarget flag
381  inline bool reverseTarget() const;
382 
383  //- Threshold weight below which interpolation is deactivated
384  inline scalar lowWeightCorrection() const;
385 
386  //- Return true if employing a 'lowWeightCorrection'
387  inline bool applyLowWeightCorrection() const;
388 
389  //- Set to -1, or the processor holding all faces (both sides) of
390  //- the AMI
391  inline label singlePatchProc() const;
392 
393 
394  // Source patch
395 
396  //- Return const access to source patch face areas
397  inline const List<scalar>& srcMagSf() const;
398 
399  //- Return access to source patch face areas
400  inline List<scalar>& srcMagSf();
401 
402  //- Return const access to source patch addressing
403  inline const labelListList& srcAddress() const;
404 
405  //- Return access to source patch addressing
406  inline labelListList& srcAddress();
407 
408  //- Return const access to source patch weights
409  inline const scalarListList& srcWeights() const;
410 
411  //- Return access to source patch weights
412  inline scalarListList& srcWeights();
414  //- Return const access to normalisation factor of source
415  //- patch weights (i.e. the sum before normalisation)
416  inline const scalarField& srcWeightsSum() const;
417 
418  //- Return access to normalisation factor of source
419  //- patch weights (i.e. the sum before normalisation)
420  inline scalarField& srcWeightsSum();
421 
422  //- Return const access to source patch face centroids
423  inline const pointListList& srcCentroids() const;
424 
425  //- Return access to source patch face centroids
426  inline pointListList& srcCentroids();
427 
428  //- Source map pointer - valid only if singlePatchProc = -1
429  //- This gets source data into a form to be consumed by
430  //- tgtAddress, tgtWeights
431  inline const mapDistribute& srcMap() const;
433 
434  // Target patch
435 
436  //- Return const access to target patch face areas
437  inline const List<scalar>& tgtMagSf() const;
438 
439  //- Return access to target patch face areas
440  inline List<scalar>& tgtMagSf();
441 
442  //- Return const access to target patch addressing
443  inline const labelListList& tgtAddress() const;
444 
445  //- Return access to target patch addressing
446  inline labelListList& tgtAddress();
447 
448  //- Return const access to target patch weights
449  inline const scalarListList& tgtWeights() const;
450 
451  //- Return access to target patch weights
452  inline scalarListList& tgtWeights();
453 
454  //- Return const access to normalisation factor of target
455  //- patch weights (i.e. the sum before normalisation)
456  inline const scalarField& tgtWeightsSum() const;
457 
458  //- Return access to normalisation factor of target
459  //- patch weights (i.e. the sum before normalisation)
460  inline scalarField& tgtWeightsSum();
461 
462  //- Target map pointer - valid only if singlePatchProc=-1.
463  //- This gets target data into a form to be consumed by
464  //- srcAddress, srcWeights
465  inline const mapDistribute& tgtMap() const;
466 
467 
468  // Manipulation
469 
470  //- Update addressing, weights and (optional) centroids
471  virtual bool calculate
472  (
473  const primitivePatch& srcPatch,
474  const primitivePatch& tgtPatch,
475  const autoPtr<searchableSurface>& surfPtr = nullptr
476  );
477 
478  //- Set the maps, addresses and weights from an external source
479  void reset
480  (
481  autoPtr<mapDistribute>&& srcToTgtMap,
482  autoPtr<mapDistribute>&& tgtToSrcMap,
487  );
488 
489  //- Append additional addressing and weights
490  void append
491  (
492  const primitivePatch& srcPatch,
493  const primitivePatch& tgtPatch
494  );
495 
496  //- Normalise the weights
497  void normaliseWeights(const bool conformal, const bool output);
498 
499 
500  // Evaluation
501 
502  // Low-level
503 
504  //- Interpolate from target to source with supplied op
505  //- to combine existing value with remote value and weight
506  template<class Type, class CombineOp>
508  (
509  const UList<Type>& fld,
510  const CombineOp& cop,
511  List<Type>& result,
512  const UList<Type>& defaultValues = UList<Type>::null()
513  ) const;
514 
515  //- Interpolate from source to target with supplied op
516  //- to combine existing value with remote value and weight
517  template<class Type, class CombineOp>
519  (
520  const UList<Type>& fld,
521  const CombineOp& cop,
522  List<Type>& result,
523  const UList<Type>& defaultValues = UList<Type>::null()
524  ) const;
525 
526 
527  //- Interpolate from target to source with supplied op
528  template<class Type, class CombineOp>
530  (
531  const Field<Type>& fld,
532  const CombineOp& cop,
533  const UList<Type>& defaultValues = UList<Type>::null()
534  ) const;
535 
536  //- Interpolate from target tmp field to source with supplied op
537  template<class Type, class CombineOp>
539  (
540  const tmp<Field<Type>>& tFld,
541  const CombineOp& cop,
542  const UList<Type>& defaultValues = UList<Type>::null()
543  ) const;
544 
545  //- Interpolate from source to target with supplied op
546  template<class Type, class CombineOp>
548  (
549  const Field<Type>& fld,
550  const CombineOp& cop,
551  const UList<Type>& defaultValues = UList<Type>::null()
552  ) const;
553 
554  //- Interpolate from source tmp field to target with supplied op
555  template<class Type, class CombineOp>
557  (
558  const tmp<Field<Type>>& tFld,
559  const CombineOp& cop,
560  const UList<Type>& defaultValues = UList<Type>::null()
561  ) const;
562 
563  //- Interpolate from target to source
564  template<class Type>
566  (
567  const Field<Type>& fld,
568  const UList<Type>& defaultValues = UList<Type>::null()
569  ) const;
570 
571  //- Interpolate from target tmp field
572  template<class Type>
574  (
575  const tmp<Field<Type>>& tFld,
576  const UList<Type>& defaultValues = UList<Type>::null()
577  ) const;
578 
579  //- Interpolate from source to target
580  template<class Type>
582  (
583  const Field<Type>& fld,
584  const UList<Type>& defaultValues = UList<Type>::null()
585  ) const;
586 
587  //- Interpolate from source tmp field
588  template<class Type>
590  (
591  const tmp<Field<Type>>& tFld,
592  const UList<Type>& defaultValues = UList<Type>::null()
593  ) const;
594 
595 
596  // Point intersections
597 
598  //- Return source patch face index of point on target patch face
599  label srcPointFace
600  (
601  const primitivePatch& srcPatch,
602  const primitivePatch& tgtPatch,
603  const vector& n,
604  const label tgtFacei,
605  point& tgtPoint
606  )
607  const;
608 
609  //- Return target patch face index of point on source patch face
610  label tgtPointFace
611  (
612  const primitivePatch& srcPatch,
613  const primitivePatch& tgtPatch,
614  const vector& n,
615  const label srcFacei,
616  point& srcPoint
617  )
618  const;
619 
620 
621  // Checks
622 
623  //- Check if src addresses are present in tgt addresses and
624  //- viceversa
625  bool checkSymmetricWeights(const bool log) const;
626 
627  //- Write face connectivity as OBJ file
629  (
630  const primitivePatch& srcPatch,
631  const primitivePatch& tgtPatch,
633  ) const;
634 
635 
636  // I-O
637 
638  //- Write
639  virtual void write(Ostream& os) const;
640 };
641 
642 
643 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
644 
645 } // End namespace Foam
646 
647 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
648 
649 #include "AMIInterpolationI.H"
650 
651 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
652 
653 #ifdef NoRepository
654  #include "AMIInterpolationTemplates.C"
655 #endif
656 
657 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
658 
659 #endif
660 
661 // ************************************************************************* //
TypeName("AMIInterpolation")
Runtime type information.
label singlePatchProc_
Index of processor that holds all of both sides. -1 in all other cases.
dictionary dict
void append(const primitivePatch &srcPatch, const primitivePatch &tgtPatch)
Append additional addressing and weights.
const pointListList & srcCentroids() const
Return const access to source patch face centroids.
refPtr< primitivePatch > tsrcPatch0_
Source patch using manipulated input points.
static void agglomerate(const autoPtr< mapDistribute > &targetMap, const scalarList &fineSrcMagSf, const labelListList &fineSrcAddress, const scalarListList &fineSrcWeights, const labelList &sourceRestrictAddressing, const labelList &targetRestrictAddressing, scalarList &srcMagSf, labelListList &srcAddress, scalarListList &srcWeights, scalarField &srcWeightsSum, autoPtr< mapDistribute > &tgtMap)
virtual ~AMIInterpolation()=default
Destructor.
pointListList tgtCentroids_
Centroid of source faces per target face.
labelListList tgtAddress_
Addresses of source faces per target face.
pointListList srcCentroids_
Centroid of target faces per source face.
dimensionedScalar log(const dimensionedScalar &ds)
label tgtPointFace(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label srcFacei, point &srcPoint) const
Return target patch face index of point on source patch face.
label singlePatchProc() const
Set to -1, or the processor holding all faces (both sides) of the AMI.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
const scalarListList & tgtWeights() const
Return const access to target patch weights.
pointField tgtPatchPts_
Target patch points if input points are manipulated, e.g. projected.
bool mustMatchFaces() const
Return true if requireMatch and lowWeightCorrectionin active.
bool setRequireMatch(const bool flag)
Access to the requireMatch flag.
void reset(autoPtr< mapDistribute > &&srcToTgtMap, autoPtr< mapDistribute > &&tgtToSrcMap, labelListList &&srcAddress, scalarListList &&srcWeights, labelListList &&tgtAddress, scalarListList &&tgtWeights)
Set the maps, addresses and weights from an external source.
autoPtr< mapDistribute > tgtMapPtr_
Target map pointer - parallel running only.
virtual autoPtr< AMIInterpolation > clone() const
Construct and return a clone.
treeDataPrimitivePatch< primitivePatch > treeType
Local typedef to octree tree-type.
void writeFaceConnectivity(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const labelListList &srcAddress) const
Write face connectivity as OBJ file.
label srcPointFace(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const vector &n, const label tgtFacei, point &tgtPoint) const
Return source patch face index of point on target patch face.
void projectPointsToSurface(const searchableSurface &surf, pointField &pts) const
Project points to surface.
autoPtr< indexedOctree< treeType > > createTree(const primitivePatch &patch) const
Reset the octree for the patch face search.
const mapDistribute & srcMap() const
Source map pointer - valid only if singlePatchProc = -1 This gets source data into a form to be consu...
const labelListList & tgtAddress() const
Return const access to target patch addressing.
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
refPtr< primitivePatch > ttgtPatch0_
Target patch using manipulated input points.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
static bool cacheIntersections_
List< labelList > labelListList
List of labelList.
Definition: labelList.H:38
declareRunTimeSelectionTable(autoPtr, AMIInterpolation, dict,(const dictionary &dict, const bool reverseTarget),(dict, reverseTarget))
Selection table for dictionary construction.
A class for managing references or pointers (no reference counting)
Definition: HashPtrTable.H:49
autoPtr< mapDistribute > srcMapPtr_
Source map pointer - parallel running only.
AMIInterpolation(const dictionary &dict, const bool reverseTarget=false)
Construct from dictionary.
A list of faces which address into the list of points.
const primitivePatch & tgtPatch0() const
Return the orginal tgt patch with optionally updated points.
virtual bool calculate(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr=nullptr)
Update addressing, weights and (optional) centroids.
const List< scalar > & tgtMagSf() const
Return const access to target patch face areas.
bool upToDate() const noexcept
Is up-to-date?
List< scalarList > scalarListList
List of scalarList.
Definition: scalarList.H:35
A class for handling words, derived from Foam::string.
Definition: word.H:63
bool upToDate_
Up-to-date flag.
Encapsulation of data needed to search on PrimitivePatches.
const primitivePatch & srcPatch0() const
Return the orginal src patch with optionally updated points.
const scalarField & tgtWeightsSum() const
Return const access to normalisation factor of target patch weights (i.e. the sum before normalisatio...
bool checkSymmetricWeights(const bool log) const
Check if src addresses are present in tgt addresses and viceversa.
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from source to target with supplied op to combine existing value with remote value and we...
scalarListList srcWeights_
Weights of target faces per source face.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:55
const direction noexcept
Definition: Scalar.H:258
scalarField srcWeightsSum_
Sum of weights of target faces per source face.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const scalarListList & srcWeights() const
Return const access to source patch weights.
OBJstream os(runTime.globalPath()/outputName)
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from target to source with supplied op to combine existing value with remote value and we...
const List< scalar > & srcMagSf() const
Return const access to source patch face areas.
const scalarField & srcWeightsSum() const
Return const access to normalisation factor of source patch weights (i.e. the sum before normalisatio...
scalarList tgtMagSf_
Target face areas.
bool requireMatch() const
Access to the requireMatch flag.
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))
scalarField tgtWeightsSum_
Sum of weights of source faces per target face.
labelListList srcAddress_
Addresses of target faces per source face.
Class containing processor-to-processor mapping information.
bool requireMatch_
Flag to indicate that the two patches must be matched/an overlap exists between them.
scalarListList tgtWeights_
Weights of source faces per target face.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
pointField srcPatchPts_
Source patch points if input points are manipulated, e.g. projected.
bool distributed() const
Access to the distributed flag.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const std::string patch
OpenFOAM patch number as a std::string.
static Ostream & output(Ostream &os, const IntRange< T > &range)
Definition: IntRanges.C:58
label n
label calcDistribution(const primitivePatch &srcPatch, const primitivePatch &tgtPatch) const
Calculate if patches are on multiple processors.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
static autoPtr< AMIInterpolation > New(const word &modelName, const dictionary &dict, const bool reverseTarget=false)
Selector for dictionary.
Macros to ease declaration of run-time selection tables.
const mapDistribute & tgtMap() const
Target map pointer - valid only if singlePatchProc=-1. This gets target data into a form to be consum...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Definition: autoPtr.H:178
static void normaliseWeights(const scalarList &patchAreas, const word &patchName, const labelListList &addr, scalarListList &wght, scalarField &wghtSum, const bool conformal, const bool output, const scalar lowWeightTol)
Normalise the (area) weights - suppresses numerical error in weights calculation. ...
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
bool reverseTarget() const
Access to the reverseTarget flag.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
const labelListList & srcAddress() const
Return const access to source patch addressing.
scalarList srcMagSf_
Source face areas.
void operator=(const AMIInterpolation &)=delete
No copy assignment.
const scalar lowWeightCorrection_
Threshold weight below which interpolation is deactivated.
const bool reverseTarget_
Flag to indicate that the two patches are co-directional and that the orientation of the target patch...
bool applyLowWeightCorrection() const
Return true if employing a &#39;lowWeightCorrection&#39;.
Namespace for OpenFOAM.
virtual void write(Ostream &os) const
Write.
const pointField & pts