MeshKernel
Public Member Functions | List of all members
meshkernel::BilinearInterpolationOnGriddedSamples< T > Class Template Reference

A class for performing bilinear interpolation on gridded samples. More...

#include <BilinearInterpolationOnGriddedSamples.hpp>

Inheritance diagram for meshkernel::BilinearInterpolationOnGriddedSamples< T >:
meshkernel::MeshInterpolation

Public Member Functions

 BilinearInterpolationOnGriddedSamples (const Mesh2D &mesh, UInt numXCoord, UInt numYCoord, const Point &origin, double cellSize, std::span< T const > values)
 Bilinear interpolation with constant cell size (faster because no linear search is performed for each mesh node) More...
 
 BilinearInterpolationOnGriddedSamples (const Mesh2D &mesh, std::span< double const > xCoordinates, std::span< double const > yCoordinates, std::span< T const > values)
 Bilinear interpolation with non constant cell size (slower because linear search is performed for each mesh node) More...
 
void Compute () override
 Compute interpolation.
 
- Public Member Functions inherited from meshkernel::MeshInterpolation
virtual ~MeshInterpolation ()=default
 Virtual destructor.
 
double GetNodeResult (UInt node) const
 Gets the interpolation value at a specific node. More...
 
double GetEdgeResult (UInt edge) const
 Gets the interpolation value at a specific edge. More...
 
double GetFaceResult (UInt face) const
 Gets the interpolation value at a specific face. More...
 
const std::vector< double > & GetNodeResults () const
 Gets all interpolated values at nodes. More...
 
const std::vector< double > & GetEdgeResults () const
 Gets all interpolated values at edges. More...
 
const std::vector< double > & GetFaceResults () const
 Gets all interpolated values at faces. More...
 

Additional Inherited Members

- Protected Attributes inherited from meshkernel::MeshInterpolation
std::vector< double > m_nodeResults
 The interpolation results at nodes.
 
std::vector< double > m_edgeResults
 The interpolation results at edges.
 
std::vector< double > m_faceResults
 The interpolation results at faces.
 

Detailed Description

template<InterpolatableType T>
class meshkernel::BilinearInterpolationOnGriddedSamples< T >

A class for performing bilinear interpolation on gridded samples.

Constructor & Destructor Documentation

◆ BilinearInterpolationOnGriddedSamples() [1/2]

template<InterpolatableType T>
meshkernel::BilinearInterpolationOnGriddedSamples< T >::BilinearInterpolationOnGriddedSamples ( const Mesh2D mesh,
UInt  numXCoord,
UInt  numYCoord,
const Point origin,
double  cellSize,
std::span< T const >  values 
)

Bilinear interpolation with constant cell size (faster because no linear search is performed for each mesh node)

Parameters
[in]meshThe input mesh
[in]numXCoordThe number of x coordinates of the gridded data
[in]numYCoordThe number of y coordinates of the gridded data
[in]originThe coordinate of the grid origin
[in]cellSizeThe grid cell size
[in]valuesThe values of the gridded samples

◆ BilinearInterpolationOnGriddedSamples() [2/2]

template<InterpolatableType T>
meshkernel::BilinearInterpolationOnGriddedSamples< T >::BilinearInterpolationOnGriddedSamples ( const Mesh2D mesh,
std::span< double const >  xCoordinates,
std::span< double const >  yCoordinates,
std::span< T const >  values 
)

Bilinear interpolation with non constant cell size (slower because linear search is performed for each mesh node)

Parameters
[in]meshThe input mesh
[in]xCoordinatesThe x coordinates of the grid
[in]yCoordinatesThe y coordinates of the grid
[in]valuesThe values of the gridded samples

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