pointToPointPlanarInterpolation Class Reference

Interpolates between two sets of unstructured points using 2D Delaunay triangulation. Used in e.g. timeVaryingMapped bcs. More...

Public Member Functions

 ClassName ("pointToPointPlanarInterpolation")
 
 pointToPointPlanarInterpolation (const pointField &sourcePoints, const pointField &destPoints, const scalar perturb, const bool nearestOnly=false)
 Construct from 3D locations. Determines local coordinate system. More...
 
 pointToPointPlanarInterpolation (const coordinateSystem &referenceCS, const pointField &sourcePoints, const pointField &destPoints, const scalar perturb)
 Construct from coordinate system and locations. More...
 
 pointToPointPlanarInterpolation (const scalar perturb, const bool nearestOnly, const coordinateSystem &referenceCS, const label sourceSize, const List< FixedList< label, 3 > > &nearestVertex, const List< FixedList< scalar, 3 > > &nearestVertexWeight)
 Construct from components. More...
 
autoPtr< pointToPointPlanarInterpolationclone () const
 Construct and return a clone. More...
 
scalar perturb () const
 Perturbation factor (for triangulation) More...
 
bool nearestOnly () const
 Whether to use nearest point only (avoids triangulation, projection) More...
 
const coordSystem::cartesianreferenceCS () const
 Return the Cartesian reference coordinate system. More...
 
label sourceSize () const
 Number of source points. More...
 
const List< FixedList< label, 3 > > & nearestVertex () const
 
const List< FixedList< scalar, 3 > > & nearestVertexWeight () const
 Current interpolation factors to face centres of underlying. More...
 
template<class Type >
tmp< Field< Type > > interpolate (const Field< Type > &sourceFld) const
 Interpolate from field on source points to dest points. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolate (const Field< Type > &sourceFld) const
 

Static Public Member Functions

static wordList timeNames (const instantList &)
 Helper: extract words of times. More...
 
static bool findTime (const instantList &times, const label startSampleTime, const scalar timeVal, label &lo, label &hi)
 Helper: find time. Return true if successful. More...
 

Detailed Description

Interpolates between two sets of unstructured points using 2D Delaunay triangulation. Used in e.g. timeVaryingMapped bcs.

Source files

Definition at line 53 of file pointToPointPlanarInterpolation.H.

Constructor & Destructor Documentation

◆ pointToPointPlanarInterpolation() [1/3]

pointToPointPlanarInterpolation ( const pointField sourcePoints,
const pointField destPoints,
const scalar  perturb,
const bool  nearestOnly = false 
)

Construct from 3D locations. Determines local coordinate system.

from sourcePoints and maps onto that. If nearestOnly skips any local coordinate system and triangulation and uses nearest vertex only

Definition at line 315 of file pointToPointPlanarInterpolation.C.

References pointToPointPlanarInterpolation::nearestOnly().

Here is the call graph for this function:

◆ pointToPointPlanarInterpolation() [2/3]

pointToPointPlanarInterpolation ( const coordinateSystem referenceCS,
const pointField sourcePoints,
const pointField destPoints,
const scalar  perturb 
)

Construct from coordinate system and locations.

Definition at line 336 of file pointToPointPlanarInterpolation.C.

◆ pointToPointPlanarInterpolation() [3/3]

pointToPointPlanarInterpolation ( const scalar  perturb,
const bool  nearestOnly,
const coordinateSystem referenceCS,
const label  sourceSize,
const List< FixedList< label, 3 > > &  nearestVertex,
const List< FixedList< scalar, 3 > > &  nearestVertexWeight 
)

Construct from components.

Definition at line 353 of file pointToPointPlanarInterpolation.C.

Member Function Documentation

◆ ClassName()

ClassName ( "pointToPointPlanarInterpolation"  )

◆ clone()

Construct and return a clone.

Definition at line 373 of file pointToPointPlanarInterpolation.C.

References Time::New().

Here is the call graph for this function:

◆ perturb()

scalar perturb ( ) const
inline

Perturbation factor (for triangulation)

Definition at line 138 of file pointToPointPlanarInterpolation.H.

◆ nearestOnly()

bool nearestOnly ( ) const
inline

Whether to use nearest point only (avoids triangulation, projection)

Definition at line 144 of file pointToPointPlanarInterpolation.H.

Referenced by pointToPointPlanarInterpolation::pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ referenceCS()

const coordSystem::cartesian & referenceCS ( ) const
inline

Return the Cartesian reference coordinate system.

Definition at line 150 of file pointToPointPlanarInterpolation.H.

◆ sourceSize()

label sourceSize ( ) const
inline

Number of source points.

Definition at line 156 of file pointToPointPlanarInterpolation.H.

◆ nearestVertex()

const List< FixedList< label, 3 > > & nearestVertex ( ) const
inline

Definition at line 162 of file pointToPointPlanarInterpolation.H.

◆ nearestVertexWeight()

const List< FixedList< scalar, 3 > > & nearestVertexWeight ( ) const
inline

Current interpolation factors to face centres of underlying.

patch

Definition at line 169 of file pointToPointPlanarInterpolation.H.

◆ timeNames()

Foam::wordList timeNames ( const instantList times)
static

Helper: extract words of times.

Definition at line 389 of file pointToPointPlanarInterpolation.C.

References forAll, and UList< T >::size().

Referenced by timeVaryingMappedFixedValuePointPatchField< Type >::checkTable().

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

◆ findTime()

bool findTime ( const instantList times,
const label  startSampleTime,
const scalar  timeVal,
label &  lo,
label &  hi 
)
static

Helper: find time. Return true if successful.

Definition at line 404 of file pointToPointPlanarInterpolation.C.

References Foam::endl(), Foam::Pout, and UList< T >::size().

Here is the call graph for this function:

◆ interpolate() [1/2]

tmp< Field< Type > > interpolate ( const Field< Type > &  sourceFld) const

Interpolate from field on source points to dest points.

◆ interpolate() [2/2]

Foam::tmp< Foam::Field< Type > > interpolate ( const Field< Type > &  sourceFld) const

Definition at line 33 of file pointToPointPlanarInterpolationTemplates.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, tmp< T >::ref(), and UList< T >::size().

Here is the call graph for this function:

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