49 #ifndef AMIInterpolation_H 50 #define AMIInterpolation_H 76 const word methodName_;
80 const bool reverseTarget_;
84 const bool requireMatch_;
88 label singlePatchProc_;
91 scalar lowWeightCorrection_;
137 label calcDistribution
143 label calcOverlappingProcs
150 void distributePatches
160 void distributeAndMergePatches
180 void projectPointsToSurface
190 static void sumWeights
197 static void sumWeights
206 static void reportSumWeights
209 const word& patchName,
211 const scalar lowWeightTol
216 static void normaliseWeights
223 static void normaliseWeights
232 static void agglomerate
239 const labelList& sourceRestrictAddressing,
240 const labelList& targetRestrictAddressing,
249 void constructFromSurface
271 const bool requireMatch =
true,
272 const word& methodName = faceAreaWeightAMI::typeName,
274 const bool reverseTarget =
false,
275 const bool report =
true 285 const bool requireMatch =
true,
286 const word& methodName = faceAreaWeightAMI::typeName,
288 const bool reverseTarget =
false,
289 const bool report =
true 298 const labelList& sourceRestrictAddressing,
299 const labelList& neighbourRestrictAddressing,
300 const bool report =
false 416 template<
class Type,
class CombineOp>
420 const CombineOp& cop,
427 template<
class Type,
class CombineOp>
431 const CombineOp& cop,
438 template<
class Type,
class CombineOp>
442 const CombineOp& cop,
447 template<
class Type,
class CombineOp>
451 const CombineOp& cop,
456 template<
class Type,
class CombineOp>
460 const CombineOp& cop,
465 template<
class Type,
class CombineOp>
469 const CombineOp& cop,
514 const label tgtFacei,
525 const label srcFacei,
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 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.
const distributionMap & srcMap() const
Source map pointer - valid only if singlePatchProc = -1.
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...
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))
A class for handling words, derived from string.
const scalarField & tgtWeightsSum() const
Return const access to normalisation factor of target.
const distributionMap & tgtMap() const
Target map pointer - valid only if singlePatchProc=-1.
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...
AMIInterpolation(const primitivePatch &srcPatch, const primitivePatch &tgtPatch, const faceAreaIntersect::triangulationMode &triMode, const bool requireMatch=true, const word &methodName=faceAreaWeightAMI::typeName, const scalar lowWeightCorrection=-1, const bool reverseTarget=false, const bool report=true)
Construct from components.
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...
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'.