Loading...
Searching...
No Matches
pointToPointPlanarInterpolation Class Reference

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

#include <pointToPointPlanarInterpolation.H>

Public Member Functions

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

Static Public Member Functions

static wordList timeNames (const instantList &times)
 Helper: extract words of times.

Detailed Description

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

Source files

Definition at line 51 of file pointToPointPlanarInterpolation.H.

Constructor & Destructor Documentation

◆ pointToPointPlanarInterpolation() [1/4]

pointToPointPlanarInterpolation ( const pointToPointPlanarInterpolation & )
default

Copy construct.

References pointToPointPlanarInterpolation().

Referenced by operator=(), and pointToPointPlanarInterpolation().

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

◆ pointToPointPlanarInterpolation() [2/4]

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 nearestOnly(), and perturb().

Here is the call graph for this function:

◆ pointToPointPlanarInterpolation() [3/4]

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.

References perturb(), and referenceCS().

Here is the call graph for this function:

◆ pointToPointPlanarInterpolation() [4/4]

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

Construct from components.

Definition at line 353 of file pointToPointPlanarInterpolation.C.

References nearestOnly(), nearestVertex(), nearestVertexWeight(), perturb(), referenceCS(), and sourceSize().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "pointToPointPlanarInterpolation" )

◆ operator=()

Copy assignment.

References nearestOnly(), nearestVertex(), nearestVertexWeight(), perturb(), pointToPointPlanarInterpolation(), referenceCS(), and sourceSize().

Here is the call graph for this function:

◆ clone()

autoPtr< pointToPointPlanarInterpolation > clone ( ) const
inline

Construct and return a clone.

Definition at line 173 of file pointToPointPlanarInterpolation.H.

References autoPtr< T >::New().

Here is the call graph for this function:

◆ perturb()

scalar perturb ( ) const
inlinenoexcept

Perturbation factor (for triangulation).

Definition at line 184 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

Referenced by operator=(), pointToPointPlanarInterpolation(), pointToPointPlanarInterpolation(), and pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ nearestOnly()

bool nearestOnly ( ) const
inlinenoexcept

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

Definition at line 192 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

Referenced by operator=(), pointToPointPlanarInterpolation(), and pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ referenceCS()

const coordSystem::cartesian & referenceCS ( ) const
inlinenoexcept

Return the Cartesian reference coordinate system.

Definition at line 200 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

Referenced by operator=(), pointToPointPlanarInterpolation(), and pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ sourceSize()

label sourceSize ( ) const
inlinenoexcept

Number of source points.

Definition at line 208 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

Referenced by operator=(), and pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ targetSize()

label targetSize ( ) const
inlinenoexcept

Number of target points.

Definition at line 216 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

◆ nearestVertex()

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

Interpolation addressing to face centres of underlying patch.

Definition at line 224 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

Referenced by operator=(), and pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ nearestVertexWeight()

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

Interpolation factors to face centres of underlying patch.

Definition at line 232 of file pointToPointPlanarInterpolation.H.

References Foam::noexcept.

Referenced by operator=(), and pointToPointPlanarInterpolation().

Here is the caller graph for this function:

◆ timeNames()

Foam::wordList timeNames ( const instantList & times)
static

Helper: extract words of times.

Definition at line 374 of file pointToPointPlanarInterpolation.C.

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

Here is the call graph for this function:

◆ interpolate() [1/4]

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

Interpolate from field on source points to dest points.

◆ interpolate() [2/4]

template<class Type>
tmp< Field< Type > > interpolate ( const tmp< Field< Type > > & tsource) const

Interpolate from field on source points to dest points.

◆ interpolate() [3/4]

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

Definition at line 28 of file pointToPointPlanarInterpolationTemplates.C.

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

Here is the call graph for this function:

◆ interpolate() [4/4]

template<class Type>
Foam::tmp< Foam::Field< Type > > interpolate ( const tmp< Field< Type > > & tsource) const

Definition at line 80 of file pointToPointPlanarInterpolationTemplates.C.

References Foam::interpolate().

Here is the call graph for this function:

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