49 #ifndef AMIInterpolation_H 50 #define AMIInterpolation_H 77 template<
class SourcePatch,
class TargetPatch>
80 public AMIInterpolationName
113 const word methodName_;
117 const bool reverseTarget_;
121 const bool requireMatch_;
125 label singlePatchProc_;
128 scalar lowWeightCorrection_;
183 label calcDistribution
185 const SourcePatch& srcPatch,
186 const TargetPatch& tgtPatch
189 label calcOverlappingProcs
196 void distributePatches
199 const TargetPatch& pp,
206 void distributeAndMergePatches
209 const TargetPatch& tgtPatch,
218 const SourcePatch& srcPatch,
219 const TargetPatch& tgtPatch
226 void projectPointsToSurface
240 static void normaliseWeights
243 const word& patchName,
247 const bool conformal,
249 const scalar lowWeightTol
255 static void agglomerate
262 const labelList& sourceRestrictAddressing,
263 const labelList& targetRestrictAddressing,
272 void constructFromSurface
274 const SourcePatch& srcPatch,
275 const TargetPatch& tgtPatch,
286 const SourcePatch& srcPatch,
287 const TargetPatch& tgtPatch,
289 const bool requireMatch =
true,
292 const bool reverseTarget =
false 298 const SourcePatch& srcPatch,
299 const TargetPatch& tgtPatch,
301 const bool requireMatch =
true,
302 const word& methodName =
305 const bool reverseTarget =
false 311 const SourcePatch& srcPatch,
312 const TargetPatch& tgtPatch,
315 const bool requireMatch =
true,
318 const bool reverseTarget =
false 324 const SourcePatch& srcPatch,
325 const TargetPatch& tgtPatch,
328 const bool requireMatch =
true,
329 const word& methodName =
332 const bool reverseTarget =
false 340 const labelList& sourceRestrictAddressing,
341 const labelList& neighbourRestrictAddressing
431 const SourcePatch& srcPatch,
432 const TargetPatch& tgtPatch
442 template<
class Type,
class CombineOp>
446 const CombineOp& cop,
453 template<
class Type,
class CombineOp>
457 const CombineOp& cop,
464 template<
class Type,
class CombineOp>
468 const CombineOp& cop,
473 template<
class Type,
class CombineOp>
477 const CombineOp& cop,
482 template<
class Type,
class CombineOp>
486 const CombineOp& cop,
491 template<
class Type,
class CombineOp>
495 const CombineOp& cop,
537 const SourcePatch& srcPatch,
538 const TargetPatch& tgtPatch,
540 const label tgtFacei,
548 const SourcePatch& srcPatch,
549 const TargetPatch& tgtPatch,
551 const label srcFacei,
562 const SourcePatch& srcPatch,
563 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.
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.
void update(const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
Update addressing and weights.
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.
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'.