Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
PatchToPatchInterpolation< FromPatch, ToPatch > Class Template Reference

Interpolation class dealing with transfer of data between two primitivePatches. More...

Inheritance diagram for PatchToPatchInterpolation< FromPatch, ToPatch >:
Inheritance graph
[legend]
Collaboration diagram for PatchToPatchInterpolation< FromPatch, ToPatch >:
Collaboration graph
[legend]

Public Member Functions

 PatchToPatchInterpolation (const FromPatch &fromPatch, const ToPatch &toPatch, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR)
 Construct from components. More...
 
 ~PatchToPatchInterpolation ()
 Destructor. More...
 
intersection::algorithm projectionAlgo () const
 Return ype of intersection algorithm to use in projection. More...
 
intersection::direction projectionDir () const
 Return direction projection to use in projection. More...
 
const scalarFieldpointDistanceToIntersection () const
 Return distance to intersection for patch points. More...
 
const scalarFieldfaceDistanceToIntersection () const
 Return distance to intersection for patch face centres. More...
 
bool movePoints ()
 Correct weighting factors for moving mesh. More...
 
template<class Type >
tmp< Field< Type > > pointInterpolate (const Field< Type > &pf) const
 Interpolate point field. More...
 
template<class Type >
tmp< Field< Type > > pointInterpolate (const tmp< Field< Type > > &tpf) const
 
template<class Type >
tmp< Field< Type > > faceInterpolate (const Field< Type > &pf) const
 Interpolate face field. More...
 
template<class Type >
tmp< Field< Type > > faceInterpolate (const tmp< Field< Type > > &tpf) const
 

Static Public Member Functions

static scalar setProjectionTol (const scalar t)
 Set the projection tolerance, returning the previous value. More...
 

Private Member Functions

 PatchToPatchInterpolation (const PatchToPatchInterpolation &)
 Disallow default bitwise copy construct. More...
 
void operator= (const PatchToPatchInterpolation &)
 Disallow default bitwise assignment. More...
 
void calcPointAddressing () const
 Calculate point weights. More...
 
void calcFaceAddressing () const
 Calculate face weights. More...
 
void clearOut ()
 Clear all geometry and addressing. More...
 
const labelListpointAddr () const
 Return reference to point addressing. More...
 
const FieldField< Field, scalar > & pointWeights () const
 Return reference to point weights. More...
 
const labelListfaceAddr () const
 Return reference to face addressing. More...
 
const FieldField< Field, scalar > & faceWeights () const
 Return reference to face weights. More...
 

Private Attributes

const FromPatch & fromPatch_
 Reference to the source patch. More...
 
const ToPatch & toPatch_
 Reference to the target patch. More...
 
intersection::algorithm alg_
 Type of intersection algorithm to use in projection. More...
 
intersection::direction dir_
 Direction projection to use in projection. More...
 
labelListpointAddressingPtr_
 Face into which each point of target patch is projected. More...
 
FieldField< Field, scalar > * pointWeightsPtr_
 Weighting factors. More...
 
scalarFieldpointDistancePtr_
 Distance to intersection for patch points. More...
 
labelListfaceAddressingPtr_
 Face into which each face centre of target patch is projected. More...
 
FieldField< Field, scalar > * faceWeightsPtr_
 Weighting factors. More...
 
scalarFieldfaceDistancePtr_
 Distance to intersection for patch face centres. More...
 

Static Private Attributes

static scalar projectionTol_ = 0.05
 Relative merge tolerance for projected points missing the target. More...
 
static const scalar directHitTol = 1e-5
 Direct hit tolerance. More...
 

Detailed Description

template<class FromPatch, class ToPatch>
class Foam::PatchToPatchInterpolation< FromPatch, ToPatch >

Interpolation class dealing with transfer of data between two primitivePatches.

Source files

Definition at line 65 of file PatchToPatchInterpolation.H.

Constructor & Destructor Documentation

◆ PatchToPatchInterpolation() [1/2]

PatchToPatchInterpolation ( const PatchToPatchInterpolation< FromPatch, ToPatch > &  )
private

Disallow default bitwise copy construct.

◆ PatchToPatchInterpolation() [2/2]

PatchToPatchInterpolation ( const FromPatch &  fromPatch,
const ToPatch &  toPatch,
const intersection::algorithm  alg = intersection::FULL_RAY,
const intersection::direction  dir = intersection::VECTOR 
)

Construct from components.

Definition at line 111 of file PatchToPatchInterpolation.C.

◆ ~PatchToPatchInterpolation()

Destructor.

Definition at line 134 of file PatchToPatchInterpolation.C.

Member Function Documentation

◆ operator=()

void operator= ( const PatchToPatchInterpolation< FromPatch, ToPatch > &  )
private

Disallow default bitwise assignment.

◆ calcPointAddressing()

void calcPointAddressing
private

◆ calcFaceAddressing()

void calcFaceAddressing
private

Calculate face weights.

Definition at line 236 of file CalcPatchToPatchWeights.C.

References PointHit::distance(), Foam::endl(), forAll, PointHit::hitPoint(), Foam::Info, Foam::mag(), List::size(), and Foam::sum().

Here is the call graph for this function:

◆ clearOut()

void clearOut
private

Clear all geometry and addressing.

Definition at line 95 of file PatchToPatchInterpolation.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

◆ pointAddr()

const labelList & pointAddr
private

Return reference to point addressing.

Definition at line 44 of file PatchToPatchInterpolation.C.

◆ pointWeights()

const FieldField< Field, scalar > & pointWeights
private

Return reference to point weights.

Definition at line 57 of file PatchToPatchInterpolation.C.

◆ faceAddr()

const labelList & faceAddr
private

Return reference to face addressing.

Definition at line 70 of file PatchToPatchInterpolation.C.

◆ faceWeights()

const FieldField< Field, scalar > & faceWeights
private

Return reference to face weights.

Definition at line 83 of file PatchToPatchInterpolation.C.

◆ setProjectionTol()

static scalar setProjectionTol ( const scalar  t)
inlinestatic

Set the projection tolerance, returning the previous value.

Definition at line 172 of file PatchToPatchInterpolation.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and PatchToPatchInterpolation< FromPatch, ToPatch >::projectionTol_.

Here is the call graph for this function:

◆ projectionAlgo()

intersection::algorithm projectionAlgo ( ) const
inline

Return ype of intersection algorithm to use in projection.

Definition at line 187 of file PatchToPatchInterpolation.H.

References PatchToPatchInterpolation< FromPatch, ToPatch >::alg_.

◆ projectionDir()

intersection::direction projectionDir ( ) const
inline

Return direction projection to use in projection.

Definition at line 193 of file PatchToPatchInterpolation.H.

References PatchToPatchInterpolation< FromPatch, ToPatch >::dir_.

◆ pointDistanceToIntersection()

const scalarField & pointDistanceToIntersection

Return distance to intersection for patch points.

Definition at line 145 of file PatchToPatchInterpolation.C.

◆ faceDistanceToIntersection()

const scalarField & faceDistanceToIntersection

Return distance to intersection for patch face centres.

Definition at line 159 of file PatchToPatchInterpolation.C.

◆ movePoints()

bool movePoints

Correct weighting factors for moving mesh.

Definition at line 171 of file PatchToPatchInterpolation.C.

◆ pointInterpolate() [1/2]

tmp< Field< Type > > pointInterpolate ( const Field< Type > &  pf) const

Interpolate point field.

Definition at line 41 of file PatchToPatchInterpolate.C.

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

Here is the call graph for this function:

◆ pointInterpolate() [2/2]

tmp< Field< Type > > pointInterpolate ( const tmp< Field< Type > > &  tpf) const

Definition at line 95 of file PatchToPatchInterpolate.C.

◆ faceInterpolate() [1/2]

tmp< Field< Type > > faceInterpolate ( const Field< Type > &  pf) const

Interpolate face field.

Definition at line 110 of file PatchToPatchInterpolate.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::fv::ff(), and forAll.

Here is the call graph for this function:

◆ faceInterpolate() [2/2]

tmp< Field< Type > > faceInterpolate ( const tmp< Field< Type > > &  tpf) const

Definition at line 166 of file PatchToPatchInterpolate.C.

Field Documentation

◆ fromPatch_

const FromPatch& fromPatch_
private

Reference to the source patch.

Definition at line 72 of file PatchToPatchInterpolation.H.

◆ toPatch_

const ToPatch& toPatch_
private

Reference to the target patch.

Definition at line 75 of file PatchToPatchInterpolation.H.

◆ alg_

Type of intersection algorithm to use in projection.

Definition at line 78 of file PatchToPatchInterpolation.H.

Referenced by PatchToPatchInterpolation< FromPatch, ToPatch >::projectionAlgo().

◆ dir_

Direction projection to use in projection.

Definition at line 81 of file PatchToPatchInterpolation.H.

Referenced by PatchToPatchInterpolation< FromPatch, ToPatch >::projectionDir().

◆ projectionTol_

scalar projectionTol_ = 0.05
staticprivate

Relative merge tolerance for projected points missing the target.

Expressed as the fraction of min involved edge size

Definition at line 88 of file PatchToPatchInterpolation.H.

Referenced by PatchToPatchInterpolation< FromPatch, ToPatch >::setProjectionTol().

◆ pointAddressingPtr_

labelList* pointAddressingPtr_
mutableprivate

Face into which each point of target patch is projected.

Definition at line 94 of file PatchToPatchInterpolation.H.

◆ pointWeightsPtr_

FieldField<Field, scalar>* pointWeightsPtr_
mutableprivate

Weighting factors.

Definition at line 97 of file PatchToPatchInterpolation.H.

◆ pointDistancePtr_

scalarField* pointDistancePtr_
mutableprivate

Distance to intersection for patch points.

Definition at line 100 of file PatchToPatchInterpolation.H.

◆ faceAddressingPtr_

labelList* faceAddressingPtr_
mutableprivate

Face into which each face centre of target patch is projected.

Definition at line 105 of file PatchToPatchInterpolation.H.

◆ faceWeightsPtr_

FieldField<Field, scalar>* faceWeightsPtr_
mutableprivate

Weighting factors.

Definition at line 108 of file PatchToPatchInterpolation.H.

◆ faceDistancePtr_

scalarField* faceDistancePtr_
mutableprivate

Distance to intersection for patch face centres.

Definition at line 111 of file PatchToPatchInterpolation.H.

◆ directHitTol

const scalar directHitTol = 1e-5
staticprivate

Direct hit tolerance.

Definition at line 148 of file PatchToPatchInterpolation.H.


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