Documentation 6b54b78464
Loading...
Searching...
No Matches
CRadialBasisFunction Class Referencefinal

Radial basis function interpolation. More...

#include <CRadialBasisFunction.hpp>

Inheritance diagram for CRadialBasisFunction:
[legend]

Public Member Functions

 CRadialBasisFunction (CGeometry ****geometry_container, const CConfig *const *config, unsigned int iZone, unsigned int jZone)
 Constructor of the class.
 
void SetTransferCoeff (CGeometry ****geometry, const CConfig *const *config) override
 Set up transfer matrix defining relation between two meshes.
 
void PrintStatistics (void) const override
 Print information about the interpolation.
 
- Public Member Functions inherited from CInterpolator
 CInterpolator (CGeometry ****geometry_container, const CConfig *const *config, unsigned int iZone, unsigned int jZone)
 Constructor of the class.
 
 CInterpolator (void)=delete
 No default construction allowed to force zones and geometry to always be set.
 
virtual ~CInterpolator (void)=default
 Destructor of the class, nothing is deleted, derived classes need to manage the MPI buffers.
 
virtual void WriteInterpolationDetails (const string &filename, const CConfig *const *config)
 Write mixing plane interpolation details to file.
 

Static Public Member Functions

static su2double Get_RadialBasisValue (RADIAL_BASIS type, const su2double radius, const su2double dist)
 Compute the value of a radial basis function, this is static so it can be re-used.
 
static void ComputeGeneratorMatrix (RADIAL_BASIS type, bool usePolynomial, su2double radius, const su2activematrix &coords, int &nPolynomial, vector< int > &keepPolynomialRow, su2passivematrix &C_inv_trunc)
 Compute the RBF "generator" matrix with or without polynomial terms.
 
static int CheckPolynomialTerms (su2double max_diff_tol, vector< int > &keep_row, su2passivematrix &P)
 If the polynomial term is included in the interpolation, and the points lie on a plane, the matrix becomes rank deficient and cannot be inverted. This method detects that condition and corrects it by removing a row from P (the polynomial part of the interpolation matrix).
 
- Static Public Member Functions inherited from CInterpolator
static bool CheckInterfaceBoundary (int val_markDonor, int val_markTarget)
 Check whether an interface should be processed or not, i.e. if it is part of the zones.
 
static bool CheckZonesInterface (const CConfig *donor, const CConfig *target)
 Check whether two zones have a common interface.
 

Additional Inherited Members

- Public Attributes inherited from CInterpolator
vector< vector< CDonorInfo > > targetVertices
 
vector< vector< CSpanDonorInfo > > targetSpans
 
- Protected Member Functions inherited from CInterpolator
void ReconstructBoundary (unsigned long val_zone, int val_marker)
 Reconstruct the boundary connectivity from parallel partitioning and broadcasts it to all threads.
 
void Determine_ArraySize (int markDonor, int markTarget, unsigned long nVertexDonor, unsigned short nDim)
 Determine array sizes used to collect and send coordinate and global point information.
 
void Collect_VertexInfo (int markDonor, int markTarget, unsigned long nVertexDonor, unsigned short nDim)
 Collect and communicate vertex info: coord, global point.
 
unsigned long Collect_ElementInfo (int markDonor, unsigned short nDim, bool compress, vector< unsigned long > &allNumElem, vector< unsigned short > &numNodes, su2matrix< long > &idxNodes) const
 Collect all donor elements in an interface pair.
 
- Protected Attributes inherited from CInterpolator
const int rank
 MPI Rank.
 
const int size
 MPI Size.
 
const unsigned donorZone
 Index of donor zone.
 
const unsigned targetZone
 Index of target zone.
 
unsigned long MaxLocalVertex_Donor
 Maximum vertices per processor.
 
unsigned long Buffer_Send_nVertex_Donor [1]
 Buffer to send number of vertices on the local processor.
 
unsigned long * Buffer_Receive_nVertex_Donor
 Buffer to store the number of vertices per processor on the Donor domain.
 
su2vector< unsigned long > Buffer_Send_GlobalPoint
 Buffer to send global point indices.
 
su2vector< unsigned long > Buffer_Receive_GlobalPoint
 Buffer to receive global point indices.
 
su2activematrix Buffer_Send_Coord
 Buffer to send coordinate values.
 
su2activematrix Buffer_Receive_Coord
 Buffer to receive coordinate values.
 
su2vector< unsigned long > Buffer_Receive_nLinkedNodes
 Buffer to receive the number of surface-connected edges, for each vertex.
 
su2vector< unsigned long > Buffer_Receive_StartLinkedNodes
 Buffer to receive the index of the Receive_LinkedNodes buffer where corresponding list of linked nodes begins.
 
su2vector< unsigned long > Buffer_Receive_LinkedNodes
 Buffer to receive the list of surface-connected nodes, for each vertex.
 
su2vector< unsigned long > Buffer_Receive_Proc
 Buffer to receive the rank that owns the vertex.
 
unsigned long nGlobalVertex_Target
 Global number of vertex of the target boundary.
 
unsigned long nLocalVertex_Target
 Number of vertex of the target boundary owned by the thread.
 
unsigned long nGlobalVertex_Donor
 Global number of vertex of the donor boundary.
 
unsigned long nLocalVertex_Donor
 Number of vertex of the donor boundary owned by the thread.
 
unsigned long nGlobalVertex
 Dummy variable to temporarily store the global number of vertex of a boundary.
 
unsigned long nLocalLinkedNodes
 Dummy variable to temporarily store the number of vertex of a boundary.
 
CGeometry ****const Geometry
 
CGeometry *const donor_geometry
 Vector which stores n zones of geometry.
 
CGeometry *const target_geometry
 Donor geometry.
 

Detailed Description

Radial basis function interpolation.

Constructor & Destructor Documentation

◆ CRadialBasisFunction()

CRadialBasisFunction::CRadialBasisFunction ( CGeometry ****  geometry_container,
const CConfig *const *  config,
unsigned int  iZone,
unsigned int  jZone 
)

Constructor of the class.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.
[in]iZone- index of the donor zone.
[in]jZone- index of the target zone.

Member Function Documentation

◆ CheckPolynomialTerms()

int CRadialBasisFunction::CheckPolynomialTerms ( su2double  max_diff_tol,
vector< int > &  keep_row,
su2passivematrix &  P 
)
static

If the polynomial term is included in the interpolation, and the points lie on a plane, the matrix becomes rank deficient and cannot be inverted. This method detects that condition and corrects it by removing a row from P (the polynomial part of the interpolation matrix).

Parameters
[in]max_diff_tol- Tolerance to detect whether points are on a plane.
[out]keep_row- Marks the dimensions of P kept.
[in,out]P- Polynomial part of the interpolation matrix, one row may be eliminated.
Returns
n_polynomial - Size of the polynomial part on exit (in practice nDim or nDim-1).

◆ ComputeGeneratorMatrix()

void CRadialBasisFunction::ComputeGeneratorMatrix ( RADIAL_BASIS  type,
bool  usePolynomial,
su2double  radius,
const su2activematrix &  coords,
int &  nPolynomial,
vector< int > &  keepPolynomialRow,
su2passivematrix &  C_inv_trunc 
)
static

Compute the RBF "generator" matrix with or without polynomial terms.

Note
Multiplying C_inv_trunc by a column vector gives specific coefficients for given "known values", conversely, multiplying (on the left) by a row vector of polynomial and RBF values gives generic interpolation coefficients for a given target evaluation point.
Parameters
[in]type- Type of radial basis function.
[in]usePolynomial- Whether to use polynomial terms.
[in]radius- Normalizes point-to-point distance when computing RBF values.
[in]coords- Coordinates of the donor points.
[out]nPolynomial- Num of poly terms, -1 if !usePolynomial, nDim-1 if coords lie on plane, else nDim.
[out]keepPolynomialRow- Size nDim, signals which (if any) iDim was removed from polynomial term.
[out]C_inv_trunc- The generator matrix as described above.

◆ Get_RadialBasisValue()

su2double CRadialBasisFunction::Get_RadialBasisValue ( RADIAL_BASIS  type,
const su2double  radius,
const su2double  dist 
)
static

Compute the value of a radial basis function, this is static so it can be re-used.

Parameters
[in]type- of radial basis function
[in]radius- the characteristic dimension
[in]dist- distance
Returns
value of the RBF.

◆ PrintStatistics()

void CRadialBasisFunction::PrintStatistics ( void  ) const
overridevirtual

Print information about the interpolation.

Reimplemented from CInterpolator.

◆ SetTransferCoeff()

void CRadialBasisFunction::SetTransferCoeff ( CGeometry ****  geometry,
const CConfig *const *  config 
)
overridevirtual

Set up transfer matrix defining relation between two meshes.

Parameters
[in]config- Definition of the particular problem.

Implements CInterpolator.


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