Go to the documentation of this file.
52 #ifndef AMIInterpolation_H
53 #define AMIInterpolation_H
81 template<
class SourcePatch,
class TargetPatch>
84 public AMIInterpolationName
104 template<
class Patch>
117 const word methodName_;
121 const bool reverseTarget_;
125 const bool requireMatch_;
129 label singlePatchProc_;
132 scalar lowWeightCorrection_;
187 label calcDistribution
189 const SourcePatch& srcPatch,
190 const TargetPatch& tgtPatch
193 label calcOverlappingProcs
200 void distributePatches
203 const TargetPatch& pp,
210 void distributeAndMergePatches
213 const TargetPatch& tgtPatch,
222 const SourcePatch& srcPatch,
223 const TargetPatch& tgtPatch
230 void projectPointsToSurface
244 static void normaliseWeights
247 const word& patchName,
251 const bool conformal,
253 const scalar lowWeightTol
259 static void agglomerate
266 const labelList& sourceRestrictAddressing,
267 const labelList& targetRestrictAddressing,
276 void constructFromSurface
278 const SourcePatch& srcPatch,
279 const TargetPatch& tgtPatch,
290 const SourcePatch& srcPatch,
291 const TargetPatch& tgtPatch,
293 const bool requireMatch =
true,
296 const bool reverseTarget =
false
302 const SourcePatch& srcPatch,
303 const TargetPatch& tgtPatch,
305 const bool requireMatch =
true,
306 const word& methodName =
309 const bool reverseTarget =
false
315 const SourcePatch& srcPatch,
316 const TargetPatch& tgtPatch,
319 const bool requireMatch =
true,
322 const bool reverseTarget =
false
328 const SourcePatch& srcPatch,
329 const TargetPatch& tgtPatch,
332 const bool requireMatch =
true,
333 const word& methodName =
336 const bool reverseTarget =
false
344 const labelList& sourceRestrictAddressing,
345 const labelList& neighbourRestrictAddressing
447 const SourcePatch& srcPatch,
448 const TargetPatch& tgtPatch
454 const SourcePatch& srcPatch,
455 const TargetPatch& tgtPatch
459 void normaliseWeights(
const bool conformal,
const bool output);
468 template<
class Type,
class CombineOp>
472 const CombineOp& cop,
479 template<
class Type,
class CombineOp>
483 const CombineOp& cop,
490 template<
class Type,
class CombineOp>
494 const CombineOp& cop,
499 template<
class Type,
class CombineOp>
503 const CombineOp& cop,
508 template<
class Type,
class CombineOp>
512 const CombineOp& cop,
517 template<
class Type,
class CombineOp>
521 const CombineOp& cop,
563 const SourcePatch& srcPatch,
564 const TargetPatch& tgtPatch,
566 const label tgtFacei,
574 const SourcePatch& srcPatch,
575 const TargetPatch& tgtPatch,
577 const label srcFacei,
588 const SourcePatch& srcPatch,
589 const TargetPatch& tgtPatch,
interpolationMethod
Enumeration specifying interpolation method.
void append(const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
Append additional addressing and weights.
static const Enum< interpolationMethod > interpolationMethodNames_
A class for handling words, derived from Foam::string.
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.
A class for managing temporary objects.
const scalarField & tgtWeightsSum() const
Standard boundBox with extra functionality for use in octree.
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
const scalarField & srcWeightsSum() const
const labelListList & tgtAddress() const
Return const access to target patch addressing.
const scalarListList & tgtWeights() const
Return const access to target patch weights.
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
TargetPatch targetPatchType
const mapDistribute & tgtMap() const
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 interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
static bool cacheIntersections_
~AMIInterpolation()
Destructor.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Class containing processor-to-processor mapping information.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
TemplateName(blendedSchemeBase)
void writeFaceConnectivity(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const labelListList &srcAddress) const
Write face connectivity as OBJ file.
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))
label singlePatchProc() const
static tmp< scalarField > patchMagSf(const Patch &patch, const faceAreaIntersect::triangulationMode triMode)
Calculate the patch face magnitudes for the given tri-mode.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
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.
const List< scalar > & srcMagSf() const
Return const access to source patch face areas.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
scalar lowWeightCorrection() const
Threshold weight below which interpolation is deactivated.
const mapDistribute & srcMap() const
bool applyLowWeightCorrection() const
Return true if employing a 'lowWeightCorrection'.
const std::string patch
OpenFOAM patch number as a std::string.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
void update(const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
Update addressing and weights.
const List< scalar > & tgtMagSf() const
Return const access to target patch face areas.
SourcePatch sourcePatchType
const labelListList & srcAddress() const
Return const access to source patch addressing.
const scalarListList & srcWeights() const
Return const access to source patch weights.