49 #ifndef AMIInterpolation_H 50 #define AMIInterpolation_H 111 const word methodName_;
115 const bool reverseTarget_;
119 const bool requireMatch_;
123 label singlePatchProc_;
126 scalar lowWeightCorrection_;
172 label calcDistribution
178 label calcOverlappingProcs
185 void distributePatches
195 void distributeAndMergePatches
215 void projectPointsToSurface
225 static void sumWeights
232 static void sumWeights
241 static void reportSumWeights
244 const word& patchName,
246 const scalar lowWeightTol
251 static void normaliseWeights
258 static void normaliseWeights
267 static void agglomerate
274 const labelList& sourceRestrictAddressing,
275 const labelList& targetRestrictAddressing,
284 void constructFromSurface
306 const bool requireMatch =
true,
309 const bool reverseTarget =
false,
310 const bool report =
true 319 const bool requireMatch =
true,
320 const word& methodName =
323 const bool reverseTarget =
false,
324 const bool report =
true 334 const bool requireMatch =
true,
337 const bool reverseTarget =
false,
338 const bool report =
true 348 const bool requireMatch =
true,
349 const word& methodName =
352 const bool reverseTarget =
false,
353 const bool report =
true 362 const labelList& sourceRestrictAddressing,
363 const labelList& neighbourRestrictAddressing,
364 const bool report =
false 480 template<
class Type,
class CombineOp>
484 const CombineOp& cop,
491 template<
class Type,
class CombineOp>
495 const CombineOp& cop,
502 template<
class Type,
class CombineOp>
506 const CombineOp& cop,
511 template<
class Type,
class CombineOp>
515 const CombineOp& cop,
520 template<
class Type,
class CombineOp>
524 const CombineOp& cop,
529 template<
class Type,
class CombineOp>
533 const CombineOp& cop,
578 const label tgtFacei,
589 const label srcFacei,
static word interpolationMethodToWord(const interpolationMethod &method)
Convert interpolationMethod to word representation.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void update(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const bool report)
Update addressing and weights.
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.
const scalarListList & tgtWeights() const
Return const access to target patch weights.
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.
const mapDistribute & srcMap() const
Source map pointer - valid only if singlePatchProc = -1.
const labelListList & tgtAddress() const
Return const access to target patch addressing.
static tmp< scalarField > patchMagSf(const primitivePatch &patch, const faceAreaIntersect::triangulationMode triMode)
Calculate the patch face magnitudes for the given tri-mode.
Combination-Reduction operation for a parallel run.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
interpolationMethod
Enumeration specifying interpolation method.
const scalarField & srcMagSf() const
Return const access to source patch face areas.
A list of faces which address into the list of points.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
AMIInterpolation(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const faceAreaIntersect::triangulationMode &triMode, const bool requireMatch=true, const interpolationMethod &method=imFaceAreaWeight, const scalar lowWeightCorrection=-1, const bool reverseTarget=false, const bool report=true)
Construct from components.
A class for handling words, derived from string.
const scalarField & tgtWeightsSum() const
Return const access to normalisation factor of target.
virtual ~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.
static interpolationMethod wordTointerpolationMethod(const word &method)
Convert word to interpolationMethod.
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.
void operator=(const AMIInterpolation &)=delete
Disallow default bitwise assignment.
TypeName("cyclicAMI")
Runtime type information.
const scalarField & tgtMagSf() const
Return const access to target patch face areas.
bool applyLowWeightCorrection() const
Return true if employing a 'lowWeightCorrection'.