Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
bitpit::RBF Class Reference

Class to handle Radial Basis Function with a large set of 3D points as nodes. More...

Inheritance diagram for bitpit::RBF:
Inheritance graph
[legend]
Collaboration diagram for bitpit::RBF:
Collaboration graph
[legend]

Public Member Functions

 RBF (const RBF &other)
 
 RBF (RBFBasisFunction=RBFBasisFunction::WENDLANDC2)
 
 ~RBF ()
 
int addNode (const std::array< double, 3 > &)
 
std::vector< int > addNode (const std::vector< std::array< double, 3 > > &)
 
int getTotalNodesCount ()
 
RBFoperator= (RBF other)
 
void removeAllNodes ()
 
bool removeNode (int)
 
bool removeNode (std::vector< int > &)
 
- Public Member Functions inherited from bitpit::RBFKernel
 RBFKernel ()
 
 RBFKernel (const RBFKernel &other)
 
void activateAllNodes ()
 
bool activateNode (const std::vector< int > &)
 
bool activateNode (int)
 
int addData ()
 
int addData (const std::vector< double > &)
 
void deactivateAllNodes ()
 
bool deactivateNode (const std::vector< int > &)
 
bool deactivateNode (int)
 
void enablePolynomial (bool enable=true)
 
double evalBasis (double)
 
double evalBasisPair (int i, int j)
 
std::vector< double > evalRBF (const std::array< double, 3 > &)
 
std::vector< double > evalRBF (int jnode)
 
void fitDataToNodes ()
 
void fitDataToNodes (int)
 
int getActiveCount ()
 
std::vector< int > getActiveSet ()
 
int getDataCount ()
 
RBFBasisFunction getFunctionType ()
 
RBFMode getMode ()
 
int getPolynomialDimension ()
 
int getPolynomialWeightsCount ()
 
double getSupportRadius ()
 
double getSupportRadius (int)
 
const std::vector< std::vector< double > > & getWeights () const
 
int greedy (double)
 
bool isActive (int)
 
void removeAllData ()
 
bool removeData (int)
 
bool removeData (std::vector< int > &)
 
void setDataToAllNodes (int, const std::vector< double > &)
 
void setDataToNode (int, const std::vector< double > &)
 
void setFunction (double(&funct)(double))
 
void setFunction (RBFBasisFunction)
 
void setMode (RBFMode mode)
 
void setSupportRadius (const std::vector< double > &)
 
void setSupportRadius (double)
 
int solve ()
 

Protected Member Functions

void swap (RBF &x) noexcept
 
- Protected Member Functions inherited from bitpit::RBFKernel
int addGreedyPoint ()
 
double evalError ()
 
int solveLSQ ()
 
void swap (RBFKernel &x) noexcept
 

Protected Attributes

std::vector< std::array< double, 3 > > m_node
 
- Protected Attributes inherited from bitpit::RBFKernel
std::vector< bool > m_activeNodes
 
int m_maxFields
 
int m_nodes
 
std::vector< int > m_polyActiveBasis
 
bool m_polyEnabled
 
LinearPolynomial m_polynomial
 
std::vector< std::vector< double > > m_value
 
std::vector< std::vector< double > > m_weight
 

Detailed Description

Class to handle Radial Basis Function with a large set of 3D points as nodes.

The class specializes RBFKernel and employs a 3D point cloud as set of RBF nodes.

Examples
RBF_example_00001.cpp.

Definition at line 184 of file rbf.hpp.

Constructor & Destructor Documentation

◆ ~RBF()

bitpit::RBF::~RBF ( )

Destructor

Definition at line 1202 of file rbf.cpp.

◆ RBF() [1/2]

bitpit::RBF::RBF ( RBFBasisFunction bfunc = RBFBasisFunction::WENDLANDC2)
  Default constructor. RBFBasisFunction::WENDLANDC2 is default. RBFMode is
  INTERP, by default. Use setMode for changing it.
 &zwj;/

RBF::RBF(): RBFKernel() { m_node.clear(); }

/*! Default constructor. Requires optionally statements of type of RBFBasisFunction which must be used. RBFMode is INTERP, by default. Use setMode for changing it.

Definition at line 1219 of file rbf.cpp.

◆ RBF() [2/2]

bitpit::RBF::RBF ( const RBF & other)

Copy Constructor

Definition at line 1228 of file rbf.cpp.

Member Function Documentation

◆ addNode() [1/2]

int bitpit::RBF::addNode ( const std::array< double, 3 > & node)

Adds a RBF node and sets it to active. Does not manage duplicated nodes. Supported in both modes.

Parameters
[in]nodecoordinates of node to be added
Returns
id of node within class
Examples
RBF_example_00001.cpp.

Definition at line 1271 of file rbf.cpp.

◆ addNode() [2/2]

std::vector< int > bitpit::RBF::addNode ( const std::vector< std::array< double, 3 > > & node)

Adds a list of RBF nodes and sets them to active. Does not manage duplicated nodes. Supported in both modes.

Parameters
[in]nodecoordinates of nodes to be added
Returns
id of node within class

Definition at line 1286 of file rbf.cpp.

◆ getTotalNodesCount()

int bitpit::RBF::getTotalNodesCount ( )

Gets the total number of nodes, active or not. Supported in both modes.

Returns
number of available RBF nodes

Definition at line 1260 of file rbf.cpp.

◆ operator=()

RBF & bitpit::RBF::operator= ( RBF other)

Copy Operator

Definition at line 1237 of file rbf.cpp.

◆ removeAllNodes()

void bitpit::RBF::removeAllNodes ( )

Remove all nodes in RBF nodal list. Supported in both modes.

Definition at line 1347 of file rbf.cpp.

◆ removeNode() [1/2]

bool bitpit::RBF::removeNode ( int id)

Remove pre-existent node. RBF Node list is resized and renumbered after extraction. Supported in both modes.

Parameters
[in]idid of node
Returns
boolean, true if successfully extracted, false otherwise

Definition at line 1311 of file rbf.cpp.

◆ removeNode() [2/2]

bool bitpit::RBF::removeNode ( std::vector< int > & list)

Remove pre-existent set of nodes. RBF nodal list is resized and renumbered after extraction. Supported in both modes.

Parameters
[in]listid list of candidates to extraction
Returns
boolean, true if all nodes are successfully extracted, false if any of them or none are extracted

Definition at line 1329 of file rbf.cpp.

◆ swap()

void bitpit::RBF::swap ( RBF & other)
protectednoexcept

Swap method. Exchange contents of each class member with those corresponding in the argument object.

Parameters
[in]otherobject to be swapped

Definition at line 1249 of file rbf.cpp.

Member Data Documentation

◆ m_node

std::vector<std::array<double,3> > bitpit::RBF::m_node
protected

list of RBF nodes

Definition at line 187 of file rbf.hpp.


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