1#ifndef included_AMP_DelaunayInterpolation
2#define included_AMP_DelaunayInterpolation
7#include "AMP/utils/Array.h"
8#include "AMP/utils/kdtree.h"
113 template<
class TYPE2>
152 const int n_it = 20 )
const;
163 template<
class TYPE2>
184 template<
class TYPE2>
188 bool extrap =
false )
const;
210 template<
class TYPE2>
215 int extrap = 0 )
const;
void create_node_tri() const
Subroutine to get the starting triangle for each node.
void interp_cubic_single(const double f[], const double g[], const double xi[], const int index, double &fi, double *gi, int extrap) const
void create_node_neighbors() const
Subroutine to get the list of nodes that are connected to each node.
void create_tri_neighbors() const
Subroutine to get the list of triangle that are connected to each triangle.
Array< double > interp_nearest(const Array< double > &f, const Array< TYPE2 > &xi, const Array< size_t > &nearest) const
Subroutine to perform nearest-neighbor interpoaltion.
~DelaunayInterpolation()
Empty destructor.
DelaunayInterpolation()
Empty constructor.
void calc_node_gradient(const double *f, const int method, double *grad, const int n_it=20) const
Subroutine to calculate the gradient at each node.
Array< int > find_tri(const Array< TYPE2 > &xi, bool extrap=false) const
Subroutine to find the triangle that contains the point.
void create_tessellation(const AMP::Array< TYPE > &x)
Function to construct the tessellation.
std::tuple< AMP::Array< double >, AMP::Array< double > > interp_linear(const AMP::Array< double > &f, const AMP::Array< TYPE2 > &xi, const AMP::Array< int > &index, bool extrap=false) const
Subroutine to perform linear interpoaltion.
void create_kdtree() const
Subroutine to get the list of triangle that are connected to each triangle.
AMP::Array< int > get_tri_nab() const
Function to return the triangles neignbors.
void clear()
Clear the data.
std::tuple< AMP::Array< double >, AMP::Array< double > > interp_cubic(const AMP::Array< double > &f, const AMP::Array< double > &g, const AMP::Array< TYPE2 > &xi, const AMP::Array< int > &index, int extrap=0) const
Subroutine to perform cubic interpoaltion.
DelaunayInterpolation(const DelaunayInterpolation &)=delete
DelaunayInterpolation & operator=(const DelaunayInterpolation &)=delete
void create_tessellation(const Array< TYPE > &x, const Array< int > &tri)
Function to construct the tessellation using a given tessellation.
void create_tessellation(size_t N, const TYPE *x, const TYPE *y, const TYPE *z)
Function to construct the tessellation.
std::tuple< AMP::Array< TYPE >, AMP::Array< int > > copy_tessellation() const
Function to copy the tessellation.
Array< size_t > find_nearest(const Array< TYPE2 > &xi) const
Subroutine to find the nearest neighbor to a point.
static void compute_Barycentric(const int ndim, const double *x, const double *xi, double *L)
Subroutine to compute the Barycentric coordinates.
AMP::Array< int > get_tri() const
Function to return the triangles in the tessellation.
size_t get_N_tri() const
Function to return the number of triangles in the tessellation.
A class used to to perform kd-tree based operations.