25#ifndef __BITPIT_RBF_HPP__
26#define __BITPIT_RBF_HPP__
28#include "bitpit_discretization.hpp"
86 void setDimension(
int dim);
87 void setDataCount(
int fields);
88 void evalBasis(
const double *x,
double *basis);
95 std::vector<double> m_supportRadii;
97 double (*m_fPtr)(double);
99 std::vector<double> m_error;
126 int getPolynomialDimension();
150 int addData(
const std::vector<double> &);
158 std::vector<double>
evalRBF(
const std::array<double,3> &);
159 std::vector<double>
evalRBF(
int jnode);
166 const std::vector<std::vector<double>> &
getWeights()
const;
176 virtual double calcDist(
int i,
int j) = 0;
177 virtual double calcDist(
const std::array<double,3> & point,
int j) = 0;
178 virtual std::vector<double> evalPolynomialBasis(
int i) = 0;
179 virtual std::vector<double> evalPolynomialBasis(
const std::array<double,3> &point) = 0;
180 virtual void initializePolynomialActiveBasis() = 0;
181 virtual void initializePolynomial() = 0;
187 std::vector<std::array<double,3>>
m_node;
197 int addNode(
const std::array<double,3> &);
198 std::vector<int>
addNode(
const std::vector<std::array<double,3>> &);
207 double calcDist(
int i,
int j)
override;
208 double calcDist(
const std::array<double,3> & point,
int j)
override;
209 void initializePolynomialActiveBasis()
override;
210 void initializePolynomial()
override;
211 std::vector<double> evalPolynomialBasis(
int i)
override;
212 std::vector<double> evalPolynomialBasis(
const std::array<double, 3> &point)
override;
Base class to handle Radial Basis Function with a large set of nodes.
std::vector< std::vector< double > > m_weight
void enablePolynomial(bool enable=true)
void setMode(RBFMode mode)
std::vector< std::vector< double > > m_value
void swap(RBFKernel &x) noexcept
double getSupportRadius()
void setSupportRadius(double)
void setFunction(RBFBasisFunction)
const std::vector< std::vector< double > > & getWeights() const
RBFBasisFunction getFunctionType()
std::vector< double > evalRBF(const std::array< double, 3 > &)
std::vector< int > m_polyActiveBasis
double evalBasisPair(int i, int j)
std::vector< int > getActiveSet()
void setDataToNode(int, const std::vector< double > &)
std::vector< bool > m_activeNodes
void setDataToAllNodes(int, const std::vector< double > &)
LinearPolynomial m_polynomial
void deactivateAllNodes()
int getPolynomialWeightsCount()
Class to handle Radial Basis Function with a large set of 3D points as nodes.
void swap(RBF &x) noexcept
int addNode(const std::array< double, 3 > &)
std::vector< std::array< double, 3 > > m_node
RBF(RBFBasisFunction=RBFBasisFunction::WENDLANDC2)
RBF & operator=(RBF other)
The ReconstructionPolynomial class allows to apply a reconstruction polynomial previously assembled.
RBFBasisFunction
Enum class defining types of RBF kernel functions that could be used in bitpit::RBF class.
RBFMode
Enum class defining behaviour of the bitpit::RBF class.
double wendlandc2(double)