Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
AMIInterpolation< SourcePatch, TargetPatch > Class Template Reference

Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mesh interface (AMI). More...

Inheritance diagram for AMIInterpolation< SourcePatch, TargetPatch >:
Inheritance graph
[legend]
Collaboration diagram for AMIInterpolation< SourcePatch, TargetPatch >:
Collaboration graph
[legend]

Public Types

enum  interpolationMethod { imDirect, imMapNearest, imFaceAreaWeight, imPartialFaceAreaWeight }
 Enumeration specifying interpolation method. More...
 
typedef SourcePatch sourcePatchType
 
typedef TargetPatch targetPatchType
 

Public Member Functions

 AMIInterpolation (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const faceAreaIntersect::triangulationMode &triMode, const bool requireMatch=true, const interpolationMethod &method=imFaceAreaWeight, const scalar lowWeightCorrection=-1, const bool reverseTarget=false)
 Construct from components. More...
 
 AMIInterpolation (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const faceAreaIntersect::triangulationMode &triMode, const bool requireMatch=true, const word &methodName=interpolationMethodToWord(imFaceAreaWeight), const scalar lowWeightCorrection=-1, const bool reverseTarget=false)
 Construct from components. More...
 
 AMIInterpolation (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const autoPtr< searchableSurface > &surf, const faceAreaIntersect::triangulationMode &triMode, const bool requireMatch=true, const interpolationMethod &method=imFaceAreaWeight, const scalar lowWeightCorrection=-1, const bool reverseTarget=false)
 Construct from components, with projection surface. More...
 
 AMIInterpolation (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const autoPtr< searchableSurface > &surf, const faceAreaIntersect::triangulationMode &triMode, const bool requireMatch=true, const word &methodName=interpolationMethodToWord(imFaceAreaWeight), const scalar lowWeightCorrection=-1, const bool reverseTarget=false)
 Construct from components, with projection surface. More...
 
 AMIInterpolation (const AMIInterpolation< SourcePatch, TargetPatch > &fineAMI, const labelList &sourceRestrictAddressing, const labelList &neighbourRestrictAddressing)
 Construct from agglomeration of AMIInterpolation. Agglomeration. More...
 
 ~AMIInterpolation ()
 Destructor. More...
 
label singlePatchProc () const
 Set to -1, or the processor holding all faces (both sides) of. More...
 
scalar lowWeightCorrection () const
 Threshold weight below which interpolation is deactivated. More...
 
bool applyLowWeightCorrection () const
 Return true if employing a 'lowWeightCorrection'. More...
 
const scalarFieldsrcMagSf () const
 Return const access to source patch face areas. More...
 
const labelListListsrcAddress () const
 Return const access to source patch addressing. More...
 
const scalarListListsrcWeights () const
 Return const access to source patch weights. More...
 
const scalarFieldsrcWeightsSum () const
 Return const access to normalisation factor of source. More...
 
const mapDistributesrcMap () const
 Source map pointer - valid only if singlePatchProc = -1. More...
 
const scalarFieldtgtMagSf () const
 Return const access to target patch face areas. More...
 
const labelListListtgtAddress () const
 Return const access to target patch addressing. More...
 
const scalarListListtgtWeights () const
 Return const access to target patch weights. More...
 
const scalarFieldtgtWeightsSum () const
 Return const access to normalisation factor of target. More...
 
const mapDistributetgtMap () const
 Target map pointer - valid only if singlePatchProc=-1. More...
 
void update (const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
 Update addressing and weights. More...
 
void append (const SourcePatch &srcPatch, const TargetPatch &tgtPatch)
 Append additional addressing and weights. More...
 
void normaliseWeights (const bool conformal, const bool output)
 Normalise the weights. More...
 
template<class Type , class CombineOp >
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. More...
 
template<class Type , class CombineOp >
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. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToSource (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from target to source with supplied op. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToSource (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from target tmp field to source with supplied op. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToTarget (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from source to target with supplied op. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > interpolateToTarget (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from source tmp field to target with supplied op. More...
 
template<class Type >
tmp< Field< Type > > interpolateToSource (const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from target to source. More...
 
template<class Type >
tmp< Field< Type > > interpolateToSource (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from target tmp field. More...
 
template<class Type >
tmp< Field< Type > > interpolateToTarget (const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from source to target. More...
 
template<class Type >
tmp< Field< Type > > interpolateToTarget (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues=UList< Type >::null()) const
 Interpolate from source tmp field. More...
 
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. More...
 
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. More...
 
void writeFaceConnectivity (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const labelListList &srcAddress) const
 Write face connectivity as OBJ file. More...
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const Field< Type > &fld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const tmp< Field< Type > > &tFld, const CombineOp &cop, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const Field< Type > &fld, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToSource (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const Field< Type > &fld, const UList< Type > &defaultValues) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolateToTarget (const tmp< Field< Type > > &tFld, const UList< Type > &defaultValues) const
 

Static Public Member Functions

static word interpolationMethodToWord (const interpolationMethod &method)
 Convert interpolationMethod to word representation. More...
 
static interpolationMethod wordTointerpolationMethod (const word &method)
 Convert word to interpolationMethod. More...
 

Private Member Functions

 AMIInterpolation (const AMIInterpolation &)
 Disallow default bitwise copy construct. More...
 
void operator= (const AMIInterpolation &)
 Disallow default bitwise assignment. More...
 
label calcDistribution (const SourcePatch &srcPatch, const TargetPatch &tgtPatch) const
 Calculate if patches are on multiple processors. More...
 
label calcOverlappingProcs (const List< treeBoundBoxList > &procBb, const treeBoundBox &bb, boolList &overlaps) const
 
void distributePatches (const mapDistribute &map, const TargetPatch &pp, const globalIndex &gi, List< faceList > &faces, List< pointField > &points, List< labelList > &tgtFaceIDs) const
 
void distributeAndMergePatches (const mapDistribute &map, const TargetPatch &tgtPatch, const globalIndex &gi, faceList &tgtFaces, pointField &tgtPoints, labelList &tgtFaceIDs) const
 
autoPtr< mapDistributecalcProcMap (const SourcePatch &srcPatch, const TargetPatch &tgtPatch) const
 
void projectPointsToSurface (const searchableSurface &surf, pointField &pts) const
 Project points to surface. More...
 
void constructFromSurface (const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const autoPtr< searchableSurface > &surfPtr)
 

Static Private Member Functions

static void normaliseWeights (const scalarField &patchAreas, const word &patchName, const labelListList &addr, scalarListList &wght, scalarField &wghtSum, const bool conformal, const bool output, const scalar lowWeightTol)
 Normalise the (area) weights - suppresses numerical error in. More...
 
static void agglomerate (const autoPtr< mapDistribute > &targetMap, const scalarField &fineSrcMagSf, const labelListList &fineSrcAddress, const scalarListList &fineSrcWeights, const labelList &sourceRestrictAddressing, const labelList &targetRestrictAddressing, scalarField &srcMagSf, labelListList &srcAddress, scalarListList &srcWeights, scalarField &srcWeightsSum, autoPtr< mapDistribute > &tgtMap)
 

Private Attributes

const word methodName_
 Interpolation method. More...
 
const bool reverseTarget_
 Flag to indicate that the two patches are co-directional and. More...
 
const bool requireMatch_
 Flag to indicate that the two patches must be matched/an overlap. More...
 
label singlePatchProc_
 Index of processor that holds all of both sides. -1 in all other. More...
 
scalar lowWeightCorrection_
 Threshold weight below which interpolation is deactivated. More...
 
scalarField srcMagSf_
 Source face areas. More...
 
labelListList srcAddress_
 Addresses of target faces per source face. More...
 
scalarListList srcWeights_
 Weights of target faces per source face. More...
 
scalarField srcWeightsSum_
 Sum of weights of target faces per source face. More...
 
scalarField tgtMagSf_
 Target face areas. More...
 
labelListList tgtAddress_
 Addresses of source faces per target face. More...
 
scalarListList tgtWeights_
 Weights of source faces per target face. More...
 
scalarField tgtWeightsSum_
 Sum of weights of source faces per target face. More...
 
const faceAreaIntersect::triangulationMode triMode_
 Face triangulation mode. More...
 
autoPtr< mapDistributesrcMapPtr_
 Source map pointer - parallel running only. More...
 
autoPtr< mapDistributetgtMapPtr_
 Target map pointer - parallel running only. More...
 

Detailed Description

template<class SourcePatch, class TargetPatch>
class Foam::AMIInterpolation< SourcePatch, TargetPatch >

Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mesh interface (AMI).

Based on the algorithm given in:

Conservative interpolation between volume meshes by local Galerkin projection, Farrell PE and Maddison JR, 2011, Comput. Methods Appl. Mech Engrg, Volume 200, Issues 1-4, pp 89-100

Interpolation requires that the two patches should have opposite orientations (opposite normals). The 'reverseTarget' flag can be used to reverse the orientation of the target patch.

Source files

Definition at line 77 of file AMIInterpolation.H.

Member Typedef Documentation

◆ sourcePatchType

typedef SourcePatch sourcePatchType

Definition at line 348 of file AMIInterpolation.H.

◆ targetPatchType

typedef TargetPatch targetPatchType

Definition at line 351 of file AMIInterpolation.H.

Member Enumeration Documentation

◆ interpolationMethod

Enumeration specifying interpolation method.

Enumerator
imDirect 
imMapNearest 
imFaceAreaWeight 
imPartialFaceAreaWeight 

Definition at line 86 of file AMIInterpolation.H.

Constructor & Destructor Documentation

◆ AMIInterpolation() [1/6]

AMIInterpolation ( const AMIInterpolation< SourcePatch, TargetPatch > &  )
private

Disallow default bitwise copy construct.

◆ AMIInterpolation() [2/6]

AMIInterpolation ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const faceAreaIntersect::triangulationMode triMode,
const bool  requireMatch = true,
const interpolationMethod method = imFaceAreaWeight,
const scalar  lowWeightCorrection = -1,
const bool  reverseTarget = false 
)

Construct from components.

Definition at line 628 of file AMIInterpolation.C.

◆ AMIInterpolation() [3/6]

AMIInterpolation ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const faceAreaIntersect::triangulationMode triMode,
const bool  requireMatch = true,
const word methodName = interpolationMethodToWord(imFaceAreaWeight),
const scalar  lowWeightCorrection = -1,
const bool  reverseTarget = false 
)

Construct from components.

Definition at line 659 of file AMIInterpolation.C.

◆ AMIInterpolation() [4/6]

AMIInterpolation ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const autoPtr< searchableSurface > &  surf,
const faceAreaIntersect::triangulationMode triMode,
const bool  requireMatch = true,
const interpolationMethod method = imFaceAreaWeight,
const scalar  lowWeightCorrection = -1,
const bool  reverseTarget = false 
)

Construct from components, with projection surface.

Definition at line 690 of file AMIInterpolation.C.

◆ AMIInterpolation() [5/6]

AMIInterpolation ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const autoPtr< searchableSurface > &  surf,
const faceAreaIntersect::triangulationMode triMode,
const bool  requireMatch = true,
const word methodName = interpolationMethodToWord(imFaceAreaWeight),
const scalar  lowWeightCorrection = -1,
const bool  reverseTarget = false 
)

Construct from components, with projection surface.

Definition at line 722 of file AMIInterpolation.C.

◆ AMIInterpolation() [6/6]

AMIInterpolation ( const AMIInterpolation< SourcePatch, TargetPatch > &  fineAMI,
const labelList sourceRestrictAddressing,
const labelList neighbourRestrictAddressing 
)

◆ ~AMIInterpolation()

Destructor.

Definition at line 876 of file AMIInterpolation.C.

Member Function Documentation

◆ interpolationMethodToWord()

Foam::word interpolationMethodToWord ( const interpolationMethod method)
static

Convert interpolationMethod to word representation.

Definition at line 37 of file AMIInterpolation.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by meshToMesh::meshToMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wordTointerpolationMethod()

Foam::AMIInterpolation< SourcePatch, TargetPatch >::interpolationMethod wordTointerpolationMethod ( const word method)
static

Convert word to interpolationMethod.

Definition at line 80 of file AMIInterpolation.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ operator=()

void operator= ( const AMIInterpolation< SourcePatch, TargetPatch > &  )
private

Disallow default bitwise assignment.

◆ calcDistribution()

Foam::label calcDistribution ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch 
) const
private

Calculate if patches are on multiple processors.

Definition at line 35 of file AMIInterpolationParallelOps.C.

References Foam::endl(), Foam::findIndex(), Foam::Info, and Foam::sum().

Here is the call graph for this function:

◆ calcOverlappingProcs()

Foam::label calcOverlappingProcs ( const List< treeBoundBoxList > &  procBb,
const treeBoundBox bb,
boolList overlaps 
) const
private

Definition at line 88 of file AMIInterpolationParallelOps.C.

References forAll, List::setSize(), and List::size().

Here is the call graph for this function:

◆ distributePatches()

void distributePatches ( const mapDistribute map,
const TargetPatch &  pp,
const globalIndex gi,
List< faceList > &  faces,
List< pointField > &  points,
List< labelList > &  tgtFaceIDs 
) const
private

◆ distributeAndMergePatches()

void distributeAndMergePatches ( const mapDistribute map,
const TargetPatch &  tgtPatch,
const globalIndex gi,
faceList tgtFaces,
pointField tgtPoints,
labelList tgtFaceIDs 
) const
private

◆ calcProcMap()

Foam::autoPtr< Foam::mapDistribute > calcProcMap ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch 
) const
private

◆ projectPointsToSurface()

void projectPointsToSurface ( const searchableSurface surf,
pointField pts 
) const
private

Project points to surface.

Definition at line 131 of file AMIInterpolation.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, searchableSurface::findNearest(), forAll, Foam::Info, Foam::constant::mathematical::pi(), and scalarField().

Here is the call graph for this function:

◆ normaliseWeights() [1/2]

void normaliseWeights ( const scalarField patchAreas,
const word patchName,
const labelListList addr,
scalarListList wght,
scalarField wghtSum,
const bool  conformal,
const bool  output,
const scalar  lowWeightTol 
)
staticprivate

Normalise the (area) weights - suppresses numerical error in.

weights calculation NOTE: if area weights are incorrect by 'a significant amount' normalisation may stabilise the solution, but will introduce numerical error!

Definition at line 173 of file AMIInterpolation.C.

References Foam::endl(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::indent(), Foam::Info, Foam::returnReduce(), s(), List::size(), Foam::sum(), and w().

Here is the call graph for this function:

◆ agglomerate()

void agglomerate ( const autoPtr< mapDistribute > &  targetMap,
const scalarField fineSrcMagSf,
const labelListList fineSrcAddress,
const scalarListList fineSrcWeights,
const labelList sourceRestrictAddressing,
const labelList targetRestrictAddressing,
scalarField srcMagSf,
labelListList srcAddress,
scalarListList srcWeights,
scalarField srcWeightsSum,
autoPtr< mapDistribute > &  tgtMap 
)
staticprivate

◆ constructFromSurface()

void constructFromSurface ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const autoPtr< searchableSurface > &  surfPtr 
)
private

Definition at line 558 of file AMIInterpolation.C.

References forAll, autoPtr::valid(), and writeOBJ().

Here is the call graph for this function:

◆ singlePatchProc()

Foam::label singlePatchProc
inline

Set to -1, or the processor holding all faces (both sides) of.

the AMI

Definition at line 28 of file AMIInterpolationI.H.

Referenced by Cloud< streamLineParticle >::checkPatches().

Here is the caller graph for this function:

◆ lowWeightCorrection()

Foam::scalar lowWeightCorrection
inline

Threshold weight below which interpolation is deactivated.

Definition at line 36 of file AMIInterpolationI.H.

◆ applyLowWeightCorrection()

bool applyLowWeightCorrection
inline

Return true if employing a 'lowWeightCorrection'.

Definition at line 45 of file AMIInterpolationI.H.

◆ srcMagSf()

const Foam::scalarField & srcMagSf
inline

Return const access to source patch face areas.

Definition at line 53 of file AMIInterpolationI.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

Here is the caller graph for this function:

◆ srcAddress()

const Foam::labelListList & srcAddress
inline

Return const access to source patch addressing.

Definition at line 61 of file AMIInterpolationI.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

Here is the caller graph for this function:

◆ srcWeights()

const Foam::scalarListList & srcWeights
inline

Return const access to source patch weights.

Definition at line 69 of file AMIInterpolationI.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

Here is the caller graph for this function:

◆ srcWeightsSum()

const Foam::scalarField & srcWeightsSum
inline

Return const access to normalisation factor of source.

patch weights (i.e. the sum before normalisation)

Definition at line 77 of file AMIInterpolationI.H.

◆ srcMap()

const Foam::mapDistribute & srcMap
inline

Source map pointer - valid only if singlePatchProc = -1.

This gets source data into a form to be consumed by tgtAddress, tgtWeights

Definition at line 85 of file AMIInterpolationI.H.

◆ tgtMagSf()

const Foam::scalarField & tgtMagSf
inline

Return const access to target patch face areas.

Definition at line 93 of file AMIInterpolationI.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

Here is the caller graph for this function:

◆ tgtAddress()

const Foam::labelListList & tgtAddress
inline

Return const access to target patch addressing.

Definition at line 101 of file AMIInterpolationI.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

Here is the caller graph for this function:

◆ tgtWeights()

const Foam::scalarListList & tgtWeights
inline

Return const access to target patch weights.

Definition at line 109 of file AMIInterpolationI.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

Here is the caller graph for this function:

◆ tgtWeightsSum()

const Foam::scalarField & tgtWeightsSum
inline

Return const access to normalisation factor of target.

patch weights (i.e. the sum before normalisation)

Definition at line 117 of file AMIInterpolationI.H.

◆ tgtMap()

const Foam::mapDistribute & tgtMap
inline

Target map pointer - valid only if singlePatchProc=-1.

This gets target data into a form to be consumed by srcAddress, srcWeights

Definition at line 125 of file AMIInterpolationI.H.

◆ update()

void update ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch 
)

Update addressing and weights.

Definition at line 884 of file AMIInterpolation.C.

References mapDistributeBase::constructMap(), Foam::endl(), forAll, Foam::gSum(), Foam::indent(), Foam::Info, Foam::nl, Foam::returnReduce(), List::size(), mapDistributeBase::subMap(), and globalIndex::toGlobal().

Here is the call graph for this function:

◆ append()

void append ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch 
)

Append additional addressing and weights.

Definition at line 1109 of file AMIInterpolation.C.

References List::append(), forAll, Foam::identity(), and List::size().

Here is the call graph for this function:

◆ normaliseWeights() [2/2]

void normaliseWeights ( const bool  conformal,
const bool  output 
)

Normalise the weights.

Definition at line 1287 of file AMIInterpolation.C.

◆ interpolateToSource() [1/9]

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.

to combine existing value with remote value and weight

Definition at line 1406 of file AMIInterpolation.C.

References Foam::abort(), mapDistribute::distribute(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, Foam::nl, List::setSize(), and UList::size().

Referenced by mappedPatchBase::distribute(), meshToMesh::mapAndOpTgtToSrc(), regionModel::mapRegionPatchField(), and regionModel::mapRegionPatchInternalField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolateToTarget() [1/9]

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.

to combine existing value with remote value and weight

Definition at line 1321 of file AMIInterpolation.C.

References Foam::abort(), mapDistribute::distribute(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, Foam::nl, List::setSize(), and UList::size().

Referenced by meshToMesh::mapAndOpSrcToTgt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolateToSource() [2/9]

tmp<Field<Type> > interpolateToSource ( const Field< Type > &  fld,
const CombineOp &  cop,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from target to source with supplied op.

◆ interpolateToSource() [3/9]

tmp<Field<Type> > interpolateToSource ( const tmp< Field< Type > > &  tFld,
const CombineOp &  cop,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from target tmp field to source with supplied op.

◆ interpolateToTarget() [2/9]

tmp<Field<Type> > interpolateToTarget ( const Field< Type > &  fld,
const CombineOp &  cop,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from source to target with supplied op.

◆ interpolateToTarget() [3/9]

tmp<Field<Type> > interpolateToTarget ( const tmp< Field< Type > > &  tFld,
const CombineOp &  cop,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from source tmp field to target with supplied op.

◆ interpolateToSource() [4/9]

tmp<Field<Type> > interpolateToSource ( const Field< Type > &  fld,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from target to source.

◆ interpolateToSource() [5/9]

tmp<Field<Type> > interpolateToSource ( const tmp< Field< Type > > &  tFld,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from target tmp field.

◆ interpolateToTarget() [4/9]

tmp<Field<Type> > interpolateToTarget ( const Field< Type > &  fld,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from source to target.

◆ interpolateToTarget() [5/9]

tmp<Field<Type> > interpolateToTarget ( const tmp< Field< Type > > &  tFld,
const UList< Type > &  defaultValues = UList< Type >::null() 
) const

Interpolate from source tmp field.

◆ srcPointFace()

Foam::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.

Definition at line 1632 of file AMIInterpolation.C.

References f(), forAll, PointHit::hit(), n, and PointHit::rawPoint().

Here is the call graph for this function:

◆ tgtPointFace()

Foam::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.

Definition at line 1686 of file AMIInterpolation.C.

References f(), forAll, PointHit::hit(), n, and PointHit::rawPoint().

Here is the call graph for this function:

◆ writeFaceConnectivity()

void writeFaceConnectivity ( const SourcePatch &  srcPatch,
const TargetPatch &  tgtPatch,
const labelListList srcAddress 
) const

Write face connectivity as OBJ file.

Definition at line 1740 of file AMIInterpolation.C.

References Foam::endl(), forAll, Foam::name(), and writeOBJ().

Here is the call graph for this function:

◆ interpolateToSource() [6/9]

Foam::tmp<Foam::Field<Type> > interpolateToSource ( const Field< Type > &  fld,
const CombineOp &  cop,
const UList< Type > &  defaultValues 
) const

Definition at line 1492 of file AMIInterpolation.C.

References fld().

Here is the call graph for this function:

◆ interpolateToSource() [7/9]

Foam::tmp<Foam::Field<Type> > interpolateToSource ( const tmp< Field< Type > > &  tFld,
const CombineOp &  cop,
const UList< Type > &  defaultValues 
) const

Definition at line 1523 of file AMIInterpolation.C.

◆ interpolateToTarget() [6/9]

Foam::tmp<Foam::Field<Type> > interpolateToTarget ( const Field< Type > &  fld,
const CombineOp &  cop,
const UList< Type > &  defaultValues 
) const

Definition at line 1537 of file AMIInterpolation.C.

References fld().

Here is the call graph for this function:

◆ interpolateToTarget() [7/9]

Foam::tmp<Foam::Field<Type> > interpolateToTarget ( const tmp< Field< Type > > &  tFld,
const CombineOp &  cop,
const UList< Type > &  defaultValues 
) const

Definition at line 1568 of file AMIInterpolation.C.

◆ interpolateToSource() [8/9]

Foam::tmp<Foam::Field<Type> > interpolateToSource ( const Field< Type > &  fld,
const UList< Type > &  defaultValues 
) const

Definition at line 1582 of file AMIInterpolation.C.

References fld().

Here is the call graph for this function:

◆ interpolateToSource() [9/9]

Foam::tmp<Foam::Field<Type> > interpolateToSource ( const tmp< Field< Type > > &  tFld,
const UList< Type > &  defaultValues 
) const

Definition at line 1595 of file AMIInterpolation.C.

◆ interpolateToTarget() [8/9]

Foam::tmp<Foam::Field<Type> > interpolateToTarget ( const Field< Type > &  fld,
const UList< Type > &  defaultValues 
) const

Definition at line 1608 of file AMIInterpolation.C.

References fld().

Here is the call graph for this function:

◆ interpolateToTarget() [9/9]

Foam::tmp<Foam::Field<Type> > interpolateToTarget ( const tmp< Field< Type > > &  tFld,
const UList< Type > &  defaultValues 
) const

Definition at line 1621 of file AMIInterpolation.C.

Field Documentation

◆ methodName_

const word methodName_
private

Interpolation method.

Definition at line 112 of file AMIInterpolation.H.

◆ reverseTarget_

const bool reverseTarget_
private

Flag to indicate that the two patches are co-directional and.

that the orientation of the target patch should be reversed

Definition at line 116 of file AMIInterpolation.H.

◆ requireMatch_

const bool requireMatch_
private

Flag to indicate that the two patches must be matched/an overlap.

exists between them

Definition at line 120 of file AMIInterpolation.H.

◆ singlePatchProc_

label singlePatchProc_
private

Index of processor that holds all of both sides. -1 in all other.

cases

Definition at line 124 of file AMIInterpolation.H.

◆ lowWeightCorrection_

scalar lowWeightCorrection_
private

Threshold weight below which interpolation is deactivated.

Definition at line 127 of file AMIInterpolation.H.

◆ srcMagSf_

scalarField srcMagSf_
private

Source face areas.

Definition at line 133 of file AMIInterpolation.H.

◆ srcAddress_

labelListList srcAddress_
private

Addresses of target faces per source face.

Definition at line 136 of file AMIInterpolation.H.

◆ srcWeights_

scalarListList srcWeights_
private

Weights of target faces per source face.

Definition at line 139 of file AMIInterpolation.H.

◆ srcWeightsSum_

scalarField srcWeightsSum_
private

Sum of weights of target faces per source face.

Definition at line 142 of file AMIInterpolation.H.

◆ tgtMagSf_

scalarField tgtMagSf_
private

Target face areas.

Definition at line 148 of file AMIInterpolation.H.

◆ tgtAddress_

labelListList tgtAddress_
private

Addresses of source faces per target face.

Definition at line 151 of file AMIInterpolation.H.

◆ tgtWeights_

scalarListList tgtWeights_
private

Weights of source faces per target face.

Definition at line 154 of file AMIInterpolation.H.

◆ tgtWeightsSum_

scalarField tgtWeightsSum_
private

Sum of weights of source faces per target face.

Definition at line 157 of file AMIInterpolation.H.

◆ triMode_

const faceAreaIntersect::triangulationMode triMode_
private

Face triangulation mode.

Definition at line 161 of file AMIInterpolation.H.

◆ srcMapPtr_

autoPtr<mapDistribute> srcMapPtr_
private

Source map pointer - parallel running only.

Definition at line 164 of file AMIInterpolation.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().

◆ tgtMapPtr_

autoPtr<mapDistribute> tgtMapPtr_
private

Target map pointer - parallel running only.

Definition at line 167 of file AMIInterpolation.H.

Referenced by AMIInterpolation< SourcePatch, TargetPatch >::AMIInterpolation().


The documentation for this class was generated from the following files: