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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::AMIInterpolation
26 
27 Description
28  Interpolation class dealing with transfer of data between two
29  primitive patches with an arbitrary mesh interface (AMI).
30 
31  Based on the algorithm given in:
32 
33  Conservative interpolation between volume meshes by local Galerkin
34  projection, Farrell PE and Maddison JR, 2011, Comput. Methods Appl.
35  Mech Engrg, Volume 200, Issues 1-4, pp 89-100
36 
37  Interpolation requires that the two patches should have opposite
38  orientations (opposite normals). The 'reverseTarget' flag can be used to
39  reverse the orientation of the target patch.
40 
41 
42 SourceFiles
43  AMIInterpolation.C
44  AMIInterpolationName.C
45  AMIInterpolationParallelOps.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef AMIInterpolation_H
50 #define AMIInterpolation_H
51 
52 #include "className.H"
53 #include "searchableSurface.H"
54 #include "treeBoundBoxList.H"
55 #include "boolList.H"
56 #include "primitivePatch.H"
57 #include "faceAreaIntersect.H"
58 #include "globalIndex.H"
59 #include "ops.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class AMIInterpolationName Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 TemplateName(AMIInterpolation);
71 
72 
73 /*---------------------------------------------------------------------------*\
74  Class AMIInterpolation Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 template<class SourcePatch, class TargetPatch>
78 class AMIInterpolation
79 :
80  public AMIInterpolationName
81 {
82 public:
83 
84  // Public data types
85 
86  //- Enumeration specifying interpolation method
88  {
93  };
94 
95  //- Convert interpolationMethod to word representation
97  (
98  const interpolationMethod& method
99  );
100 
101  //- Convert word to interpolationMethod
103  (
104  const word& method
105  );
106 
107 
108 private:
109 
110  // Private data
111 
112  //- Interpolation method
113  const word methodName_;
114 
115  //- Flag to indicate that the two patches are co-directional and
116  // that the orientation of the target patch should be reversed
117  const bool reverseTarget_;
118 
119  //- Flag to indicate that the two patches must be matched/an overlap
120  // exists between them
121  const bool requireMatch_;
122 
123  //- Index of processor that holds all of both sides. -1 in all other
124  // cases
126 
127  //- Threshold weight below which interpolation is deactivated
128  scalar lowWeightCorrection_;
129 
130 
131  // Source patch
132 
133  //- Source face areas
135 
136  //- Addresses of target faces per source face
138 
139  //- Weights of target faces per source face
141 
142  //- Sum of weights of target faces per source face
144 
145 
146  // Target patch
147 
148  //- Target face areas
150 
151  //- Addresses of source faces per target face
153 
154  //- Weights of source faces per target face
156 
157  //- Sum of weights of source faces per target face
159 
160 
161  //- Face triangulation mode
163 
164  //- Source map pointer - parallel running only
166 
167  //- Target map pointer - parallel running only
169 
170 
171  // Private Member Functions
172 
173  //- Disallow default bitwise copy construct
175 
176  //- Disallow default bitwise assignment
177  void operator=(const AMIInterpolation&);
178 
179 
180  // Parallel functionality
181 
182  //- Calculate if patches are on multiple processors
184  (
185  const SourcePatch& srcPatch,
186  const TargetPatch& tgtPatch
187  ) const;
188 
190  (
191  const List<treeBoundBoxList>& procBb,
192  const treeBoundBox& bb,
193  boolList& overlaps
194  ) const;
195 
196  void distributePatches
197  (
198  const mapDistribute& map,
199  const TargetPatch& pp,
200  const globalIndex& gi,
201  List<faceList>& faces,
203  List<labelList>& tgtFaceIDs
204  ) const;
205 
207  (
208  const mapDistribute& map,
209  const TargetPatch& tgtPatch,
210  const globalIndex& gi,
211  faceList& tgtFaces,
212  pointField& tgtPoints,
213  labelList& tgtFaceIDs
214  ) const;
215 
217  (
218  const SourcePatch& srcPatch,
219  const TargetPatch& tgtPatch
220  ) const;
221 
222 
223  // Initialisation
224 
225  //- Project points to surface
227  (
228  const searchableSurface& surf,
229  pointField& pts
230  ) const;
231 
232 
233  // Evaluation
234 
235  //- Normalise the (area) weights - suppresses numerical error in
236  // weights calculation
237  // NOTE: if area weights are incorrect by 'a significant amount'
238  // normalisation may stabilise the solution, but will introduce
239  // numerical error!
240  static void normaliseWeights
241  (
242  const scalarField& patchAreas,
243  const word& patchName,
244  const labelListList& addr,
245  scalarListList& wght,
246  scalarField& wghtSum,
247  const bool conformal,
248  const bool output,
249  const scalar lowWeightTol
250  );
251 
252 
253  // Constructor helpers
254 
255  static void agglomerate
256  (
257  const autoPtr<mapDistribute>& targetMap,
258  const scalarField& fineSrcMagSf,
259  const labelListList& fineSrcAddress,
260  const scalarListList& fineSrcWeights,
261 
262  const labelList& sourceRestrictAddressing,
263  const labelList& targetRestrictAddressing,
264 
270  );
271 
273  (
274  const SourcePatch& srcPatch,
275  const TargetPatch& tgtPatch,
276  const autoPtr<searchableSurface>& surfPtr
277  );
278 
279 public:
280 
281  // Constructors
282 
283  //- Construct from components
285  (
286  const SourcePatch& srcPatch,
287  const TargetPatch& tgtPatch,
289  const bool requireMatch = true,
290  const interpolationMethod& method = imFaceAreaWeight,
291  const scalar lowWeightCorrection = -1,
292  const bool reverseTarget = false
293  );
294 
295  //- Construct from components
297  (
298  const SourcePatch& srcPatch,
299  const TargetPatch& tgtPatch,
301  const bool requireMatch = true,
302  const word& methodName =
304  const scalar lowWeightCorrection = -1,
305  const bool reverseTarget = false
306  );
307 
308  //- Construct from components, with projection surface
310  (
311  const SourcePatch& srcPatch,
312  const TargetPatch& tgtPatch,
313  const autoPtr<searchableSurface>& surf,
315  const bool requireMatch = true,
316  const interpolationMethod& method = imFaceAreaWeight,
317  const scalar lowWeightCorrection = -1,
318  const bool reverseTarget = false
319  );
320 
321  //- Construct from components, with projection surface
323  (
324  const SourcePatch& srcPatch,
325  const TargetPatch& tgtPatch,
326  const autoPtr<searchableSurface>& surf,
328  const bool requireMatch = true,
329  const word& methodName =
331  const scalar lowWeightCorrection = -1,
332  const bool reverseTarget = false
333  );
334 
335  //- Construct from agglomeration of AMIInterpolation. Agglomeration
336  // passed in as new coarse size and addressing from fine from coarse
338  (
340  const labelList& sourceRestrictAddressing,
341  const labelList& neighbourRestrictAddressing
342  );
343 
344 
345  //- Destructor
347 
348  // Typedef to SourcePatch type this AMIInterplation is instantiated on
349  typedef SourcePatch sourcePatchType;
350 
351  // Typedef to TargetPatch type this AMIInterplation is instantiated on
352  typedef TargetPatch targetPatchType;
353 
354 
355  // Member Functions
356 
357  // Access
358 
359  //- Set to -1, or the processor holding all faces (both sides) of
360  // the AMI
361  inline label singlePatchProc() const;
362 
363  //- Threshold weight below which interpolation is deactivated
364  inline scalar lowWeightCorrection() const;
365 
366  //- Return true if employing a 'lowWeightCorrection'
367  inline bool applyLowWeightCorrection() const;
368 
369 
370  // Source patch
371 
372  //- Return const access to source patch face areas
373  inline const scalarField& srcMagSf() const;
374 
375  //- Return const access to source patch addressing
376  inline const labelListList& srcAddress() const;
377 
378  //- Return const access to source patch weights
379  inline const scalarListList& srcWeights() const;
380 
381  //- Return const access to normalisation factor of source
382  // patch weights (i.e. the sum before normalisation)
383  inline const scalarField& srcWeightsSum() const;
384 
385  //- Source map pointer - valid only if singlePatchProc = -1
386  // This gets source data into a form to be consumed by
387  // tgtAddress, tgtWeights
388  inline const mapDistribute& srcMap() const;
389 
390 
391  // Target patch
392 
393  //- Return const access to target patch face areas
394  inline const scalarField& tgtMagSf() const;
395 
396  //- Return const access to target patch addressing
397  inline const labelListList& tgtAddress() const;
398 
399  //- Return const access to target patch weights
400  inline const scalarListList& tgtWeights() const;
401 
402  //- Return const access to normalisation factor of target
403  // patch weights (i.e. the sum before normalisation)
404  inline const scalarField& tgtWeightsSum() const;
405 
406  //- Target map pointer - valid only if singlePatchProc=-1.
407  // This gets target data into a form to be consumed by
408  // srcAddress, srcWeights
409  inline const mapDistribute& tgtMap() const;
410 
411 
412  // Manipulation
413 
414  //- Update addressing and weights
415  void update
416  (
417  const SourcePatch& srcPatch,
418  const TargetPatch& tgtPatch
419  );
420 
421  //- Append additional addressing and weights
422  void append
423  (
424  const SourcePatch& srcPatch,
425  const TargetPatch& tgtPatch
426  );
427 
428  //- Normalise the weights
429  void normaliseWeights(const bool conformal, const bool output);
430 
431 
432  // Evaluation
433 
434  // Low-level
435 
436  //- Interpolate from target to source with supplied op
437  // to combine existing value with remote value and weight
438  template<class Type, class CombineOp>
440  (
441  const UList<Type>& fld,
442  const CombineOp& cop,
443  List<Type>& result,
444  const UList<Type>& defaultValues = UList<Type>::null()
445  ) const;
446 
447  //- Interpolate from source to target with supplied op
448  // to combine existing value with remote value and weight
449  template<class Type, class CombineOp>
451  (
452  const UList<Type>& fld,
453  const CombineOp& cop,
454  List<Type>& result,
455  const UList<Type>& defaultValues = UList<Type>::null()
456  ) const;
457 
458 
459  //- Interpolate from target to source with supplied op
460  template<class Type, class CombineOp>
462  (
463  const Field<Type>& fld,
464  const CombineOp& cop,
465  const UList<Type>& defaultValues = UList<Type>::null()
466  ) const;
467 
468  //- Interpolate from target tmp field to source with supplied op
469  template<class Type, class CombineOp>
471  (
472  const tmp<Field<Type> >& tFld,
473  const CombineOp& cop,
474  const UList<Type>& defaultValues = UList<Type>::null()
475  ) const;
476 
477  //- Interpolate from source to target with supplied op
478  template<class Type, class CombineOp>
480  (
481  const Field<Type>& fld,
482  const CombineOp& cop,
483  const UList<Type>& defaultValues = UList<Type>::null()
484  ) const;
485 
486  //- Interpolate from source tmp field to target with supplied op
487  template<class Type, class CombineOp>
489  (
490  const tmp<Field<Type> >& tFld,
491  const CombineOp& cop,
492  const UList<Type>& defaultValues = UList<Type>::null()
493  ) const;
494 
495  //- Interpolate from target to source
496  template<class Type>
498  (
499  const Field<Type>& fld,
500  const UList<Type>& defaultValues = UList<Type>::null()
501  ) const;
502 
503  //- Interpolate from target tmp field
504  template<class Type>
506  (
507  const tmp<Field<Type> >& tFld,
508  const UList<Type>& defaultValues = UList<Type>::null()
509  ) const;
510 
511  //- Interpolate from source to target
512  template<class Type>
514  (
515  const Field<Type>& fld,
516  const UList<Type>& defaultValues = UList<Type>::null()
517  ) const;
518 
519  //- Interpolate from source tmp field
520  template<class Type>
522  (
523  const tmp<Field<Type> >& tFld,
524  const UList<Type>& defaultValues = UList<Type>::null()
525  ) const;
526 
527 
528  // Point intersections
529 
530  //- Return source patch face index of point on target patch face
532  (
533  const SourcePatch& srcPatch,
534  const TargetPatch& tgtPatch,
535  const vector& n,
536  const label tgtFaceI,
537  point& tgtPoint
538  )
539  const;
540 
541  //- Return target patch face index of point on source patch face
543  (
544  const SourcePatch& srcPatch,
545  const TargetPatch& tgtPatch,
546  const vector& n,
547  const label srcFaceI,
548  point& srcPoint
549  )
550  const;
551 
552 
553  // Checks
554 
555  //- Write face connectivity as OBJ file
557  (
558  const SourcePatch& srcPatch,
559  const TargetPatch& tgtPatch,
561  ) const;
562 };
563 
564 
565 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
566 
567 } // End namespace Foam
568 
569 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
570 
571 #include "AMIInterpolationI.H"
572 
573 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
574 
575 #ifdef NoRepository
576 # include "AMIInterpolation.C"
578 #endif
579 
580 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
581 
582 #endif
583 
584 // ************************************************************************* //
Foam::AMIInterpolation::interpolationMethod
interpolationMethod
Enumeration specifying interpolation method.
Definition: AMIInterpolation.H:86
Foam::AMIInterpolation::append
void append(const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
Append additional addressing and weights.
Definition: AMIInterpolation.C:1109
Foam::AMIInterpolation::calcProcMap
autoPtr< mapDistribute > calcProcMap(const SourcePatch &srcPatch, const TargetPatch &tgtPatch) const
Definition: AMIInterpolationParallelOps.C:333
AMIInterpolationI.H
Foam::AMIInterpolation::interpolationMethodToWord
static word interpolationMethodToWord(const interpolationMethod &method)
Convert interpolationMethod to word representation.
Definition: AMIInterpolation.C:37
Foam::AMIInterpolation::tgtMapPtr_
autoPtr< mapDistribute > tgtMapPtr_
Target map pointer - parallel running only.
Definition: AMIInterpolation.H:167
boolList.H
Foam::AMIInterpolation::srcWeights_
scalarListList srcWeights_
Weights of target faces per source face.
Definition: AMIInterpolation.H:139
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::AMIInterpolation::srcMagSf
const scalarField & srcMagSf() const
Return const access to source patch face areas.
Definition: AMIInterpolationI.H:53
searchableSurface.H
Foam::AMIInterpolation::methodName_
const word methodName_
Interpolation method.
Definition: AMIInterpolation.H:112
Foam::AMIInterpolation::constructFromSurface
void constructFromSurface(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr)
Definition: AMIInterpolation.C:558
Foam::faceAreaIntersect::triangulationMode
triangulationMode
Definition: faceAreaIntersect.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::AMIInterpolation::operator=
void operator=(const AMIInterpolation &)
Disallow default bitwise assignment.
Foam::AMIInterpolation::tgtWeightsSum
const scalarField & tgtWeightsSum() const
Return const access to normalisation factor of target.
Definition: AMIInterpolationI.H:117
Foam::AMIInterpolation::imFaceAreaWeight
@ imFaceAreaWeight
Definition: AMIInterpolation.H:90
Foam::AMIInterpolation::srcAddress_
labelListList srcAddress_
Addresses of target faces per source face.
Definition: AMIInterpolation.H:136
globalIndex.H
Foam::AMIInterpolation::singlePatchProc_
label singlePatchProc_
Index of processor that holds all of both sides. -1 in all other.
Definition: AMIInterpolation.H:124
Foam::treeBoundBox
Standard boundBox + extra functionality for use in octree.
Definition: treeBoundBox.H:75
Foam::AMIInterpolation::tgtWeights_
scalarListList tgtWeights_
Weights of source faces per target face.
Definition: AMIInterpolation.H:154
ops.H
Combination-Reduction operation for a parallel run.
Foam::AMIInterpolation::srcWeightsSum
const scalarField & srcWeightsSum() const
Return const access to normalisation factor of source.
Definition: AMIInterpolationI.H:77
Foam::AMIInterpolation::calcOverlappingProcs
label calcOverlappingProcs(const List< treeBoundBoxList > &procBb, const treeBoundBox &bb, boolList &overlaps) const
Definition: AMIInterpolationParallelOps.C:88
Foam::AMIInterpolation::tgtAddress
const labelListList & tgtAddress() const
Return const access to target patch addressing.
Definition: AMIInterpolationI.H:101
Foam::AMIInterpolation::tgtWeights
const scalarListList & tgtWeights() const
Return const access to target patch weights.
Definition: AMIInterpolationI.H:109
Foam::AMIInterpolation::interpolateToTarget
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.
Definition: AMIInterpolation.C:1321
faceAreaIntersect.H
Foam::AMIInterpolation::normaliseWeights
static void normaliseWeights(const scalarField &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.
Definition: AMIInterpolation.C:173
Foam::AMIInterpolation::targetPatchType
TargetPatch targetPatchType
Definition: AMIInterpolation.H:351
AMIInterpolation.C
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::AMIInterpolation::agglomerate
static void agglomerate(const autoPtr< mapDistribute > &targetMap, const scalarField &fineSrcMagSf, const labelListList &fineSrcAddress, const scalarListList &fineSrcWeights, const labelList &sourceRestrictAddressing, const labelList &targetRestrictAddressing, scalarField &srcMagSf, labelListList &srcAddress, scalarListList &srcWeights, scalarField &srcWeightsSum, autoPtr< mapDistribute > &tgtMap)
Definition: AMIInterpolation.C:253
Foam::AMIInterpolation::tgtMap
const mapDistribute & tgtMap() const
Target map pointer - valid only if singlePatchProc=-1.
Definition: AMIInterpolationI.H:125
Foam::AMIInterpolation::AMIInterpolation
AMIInterpolation(const AMIInterpolation &)
Disallow default bitwise copy construct.
Foam::AMIInterpolation::tgtMagSf_
scalarField tgtMagSf_
Target face areas.
Definition: AMIInterpolation.H:148
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::AMIInterpolation::interpolateToSource
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.
Definition: AMIInterpolation.C:1406
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::AMIInterpolation::srcWeightsSum_
scalarField srcWeightsSum_
Sum of weights of target faces per source face.
Definition: AMIInterpolation.H:142
AMIInterpolationParallelOps.C
Foam::AMIInterpolation::~AMIInterpolation
~AMIInterpolation()
Destructor.
Definition: AMIInterpolation.C:876
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:66
Foam::mapDistribute
Class containing processor-to-processor mapping information.
Definition: mapDistribute.H:152
className.H
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Foam::TemplateName
TemplateName(blendedSchemeBase)
Foam::AMIInterpolation::srcMapPtr_
autoPtr< mapDistribute > srcMapPtr_
Source map pointer - parallel running only.
Definition: AMIInterpolation.H:164
Foam::AMIInterpolation::writeFaceConnectivity
void writeFaceConnectivity(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const labelListList &srcAddress) const
Write face connectivity as OBJ file.
Definition: AMIInterpolation.C:1740
Foam::AMIInterpolation::singlePatchProc
label singlePatchProc() const
Set to -1, or the processor holding all faces (both sides) of.
Definition: AMIInterpolationI.H:28
fld
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::AMIInterpolation::tgtMagSf
const scalarField & tgtMagSf() const
Return const access to target patch face areas.
Definition: AMIInterpolationI.H:93
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::AMIInterpolation::srcMagSf_
scalarField srcMagSf_
Source face areas.
Definition: AMIInterpolation.H:133
Foam::globalIndex
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:63
Foam::AMIInterpolation::distributeAndMergePatches
void distributeAndMergePatches(const mapDistribute &map, const TargetPatch &tgtPatch, const globalIndex &gi, faceList &tgtFaces, pointField &tgtPoints, labelList &tgtFaceIDs) const
Definition: AMIInterpolationParallelOps.C:217
treeBoundBoxList.H
Foam::AMIInterpolation::requireMatch_
const bool requireMatch_
Flag to indicate that the two patches must be matched/an overlap.
Definition: AMIInterpolation.H:120
Foam::AMIInterpolation::imDirect
@ imDirect
Definition: AMIInterpolation.H:88
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::AMIInterpolation::lowWeightCorrection
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
Definition: AMIInterpolationI.H:36
Foam::AMIInterpolation::lowWeightCorrection_
scalar lowWeightCorrection_
Threshold weight below which interpolation is deactivated.
Definition: AMIInterpolation.H:127
Foam::AMIInterpolation::srcMap
const mapDistribute & srcMap() const
Source map pointer - valid only if singlePatchProc = -1.
Definition: AMIInterpolationI.H:85
Foam::AMIInterpolation::tgtAddress_
labelListList tgtAddress_
Addresses of source faces per target face.
Definition: AMIInterpolation.H:151
Foam::AMIInterpolation::distributePatches
void distributePatches(const mapDistribute &map, const TargetPatch &pp, const globalIndex &gi, List< faceList > &faces, List< pointField > &points, List< labelList > &tgtFaceIDs) const
Definition: AMIInterpolationParallelOps.C:120
Foam::AMIInterpolation::applyLowWeightCorrection
bool applyLowWeightCorrection() const
Return true if employing a 'lowWeightCorrection'.
Definition: AMIInterpolationI.H:45
Foam::AMIInterpolation::tgtPointFace
label tgtPointFace(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const vector &n, const label srcFaceI, point &srcPoint) const
Return target patch face index of point on source patch face.
Definition: AMIInterpolation.C:1686
Foam::Vector< scalar >
Foam::AMIInterpolation::tgtWeightsSum_
scalarField tgtWeightsSum_
Sum of weights of source faces per target face.
Definition: AMIInterpolation.H:157
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::AMIInterpolation
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Definition: AMIInterpolation.H:77
Foam::UList< Type >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::AMIInterpolation::imPartialFaceAreaWeight
@ imPartialFaceAreaWeight
Definition: AMIInterpolation.H:91
Foam::AMIInterpolation::reverseTarget_
const bool reverseTarget_
Flag to indicate that the two patches are co-directional and.
Definition: AMIInterpolation.H:116
Foam::AMIInterpolation::imMapNearest
@ imMapNearest
Definition: AMIInterpolation.H:89
Foam::AMIInterpolation::projectPointsToSurface
void projectPointsToSurface(const searchableSurface &surf, pointField &pts) const
Project points to surface.
Definition: AMIInterpolation.C:131
Foam::AMIInterpolation::update
void update(const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
Update addressing and weights.
Definition: AMIInterpolation.C:884
Foam::AMIInterpolation::calcDistribution
label calcDistribution(const SourcePatch &srcPatch, const TargetPatch &tgtPatch) const
Calculate if patches are on multiple processors.
Definition: AMIInterpolationParallelOps.C:35
Foam::AMIInterpolation::triMode_
const faceAreaIntersect::triangulationMode triMode_
Face triangulation mode.
Definition: AMIInterpolation.H:161
Foam::AMIInterpolation::sourcePatchType
SourcePatch sourcePatchType
Definition: AMIInterpolation.H:348
Foam::AMIInterpolation::srcAddress
const labelListList & srcAddress() const
Return const access to source patch addressing.
Definition: AMIInterpolationI.H:61
Foam::AMIInterpolation::srcWeights
const scalarListList & srcWeights() const
Return const access to source patch weights.
Definition: AMIInterpolationI.H:69
Foam::AMIInterpolation::srcPointFace
label srcPointFace(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const vector &n, const label tgtFaceI, point &tgtPoint) const
Return source patch face index of point on target patch face.
Definition: AMIInterpolation.C:1632
Foam::AMIInterpolation::wordTointerpolationMethod
static interpolationMethod wordTointerpolationMethod(const word &method)
Convert word to interpolationMethod.
Definition: AMIInterpolation.C:80