49 #ifndef AMIInterpolation_H 50 #define AMIInterpolation_H 77 template<
class SourcePatch,
class TargetPatch>
80 public AMIInterpolationName
118 template<
class Patch>
131 const word methodName_;
135 const bool reverseTarget_;
139 const bool requireMatch_;
143 label singlePatchProc_;
146 scalar lowWeightCorrection_;
201 label calcDistribution
203 const SourcePatch& srcPatch,
204 const TargetPatch& tgtPatch
207 label calcOverlappingProcs
214 void distributePatches
217 const TargetPatch& pp,
224 void distributeAndMergePatches
227 const TargetPatch& tgtPatch,
236 const SourcePatch& srcPatch,
237 const TargetPatch& tgtPatch
244 void projectPointsToSurface
254 static void sumWeights
261 static void sumWeights
270 static void reportSumWeights
273 const word& patchName,
275 const scalar lowWeightTol
280 static void normaliseWeights
287 static void normaliseWeights
296 static void agglomerate
303 const labelList& sourceRestrictAddressing,
304 const labelList& targetRestrictAddressing,
313 void constructFromSurface
315 const SourcePatch& srcPatch,
316 const TargetPatch& tgtPatch,
328 const SourcePatch& srcPatch,
329 const TargetPatch& tgtPatch,
331 const bool requireMatch =
true,
334 const bool reverseTarget =
false,
335 const bool report =
true 341 const SourcePatch& srcPatch,
342 const TargetPatch& tgtPatch,
344 const bool requireMatch =
true,
345 const word& methodName =
348 const bool reverseTarget =
false,
349 const bool report =
true 355 const SourcePatch& srcPatch,
356 const TargetPatch& tgtPatch,
359 const bool requireMatch =
true,
362 const bool reverseTarget =
false,
363 const bool report =
true 369 const SourcePatch& srcPatch,
370 const TargetPatch& tgtPatch,
373 const bool requireMatch =
true,
374 const word& methodName =
377 const bool reverseTarget =
false,
378 const bool report =
true 386 const labelList& sourceRestrictAddressing,
387 const labelList& neighbourRestrictAddressing,
388 const bool report =
false 472 const SourcePatch& srcPatch,
473 const TargetPatch& tgtPatch,
478 static void sumWeights
484 static void sumWeights
492 static void reportSumWeights
498 static void normaliseWeights
504 static void normaliseWeights
516 template<
class Type,
class CombineOp>
520 const CombineOp& cop,
527 template<
class Type,
class CombineOp>
531 const CombineOp& cop,
538 template<
class Type,
class CombineOp>
542 const CombineOp& cop,
547 template<
class Type,
class CombineOp>
551 const CombineOp& cop,
556 template<
class Type,
class CombineOp>
560 const CombineOp& cop,
565 template<
class Type,
class CombineOp>
569 const CombineOp& cop,
611 const SourcePatch& srcPatch,
612 const TargetPatch& tgtPatch,
614 const label tgtFacei,
622 const SourcePatch& srcPatch,
623 const TargetPatch& tgtPatch,
625 const label srcFacei,
636 const SourcePatch& srcPatch,
637 const TargetPatch& tgtPatch,
static word interpolationMethodToWord(const interpolationMethod &method)
Convert interpolationMethod to word representation.
TemplateName(blendedSchemeBase)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label singlePatchProc() const
Set to -1, or the processor holding all faces (both sides) of.
const scalarListList & tgtWeights() const
Return const access to target patch weights.
const mapDistribute & srcMap() const
Source map pointer - valid only if singlePatchProc = -1.
static interpolationMethod wordTointerpolationMethod(const word &method)
Convert word to interpolationMethod.
const labelListList & tgtAddress() const
Return const access to target patch addressing.
Combination-Reduction operation for a parallel run.
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.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
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.
interpolationMethod
Enumeration specifying interpolation method.
void writeFaceConnectivity(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const labelListList &srcAddress) const
Write face connectivity as OBJ file.
SourcePatch sourcePatchType
const scalarField & srcMagSf() const
Return const access to source patch face areas.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A class for handling words, derived from string.
const scalarField & tgtWeightsSum() const
Return const access to normalisation factor of target.
~AMIInterpolation()
Destructor.
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.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const scalarListList & srcWeights() const
Return const access to source patch weights.
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.
const scalarField & srcWeightsSum() const
Return const access to normalisation factor of source.
Class containing processor-to-processor mapping information.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Standard boundBox + extra functionality for use in octree.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const mapDistribute & tgtMap() const
Target map pointer - valid only if singlePatchProc=-1.
A class for managing temporary objects.
void update(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const bool report)
Update addressing and weights.
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
const labelListList & srcAddress() const
Return const access to source patch addressing.
TargetPatch targetPatchType
const scalarField & tgtMagSf() const
Return const access to target patch face areas.
bool applyLowWeightCorrection() const
Return true if employing a 'lowWeightCorrection'.
static tmp< scalarField > patchMagSf(const Patch &patch, const faceAreaIntersect::triangulationMode triMode)
Calculate the patch face magnitudes for the given tri-mode.