preCICE v3.2.0
|
#include <RadialBasisFctSolver.hpp>
Public Types | |
using | DecompositionType = std::conditional_t<RADIAL_BASIS_FUNCTION_T::isStrictlyPositiveDefinite(), Eigen::LLT<Eigen::MatrixXd>, Eigen::ColPivHouseholderQR<Eigen::MatrixXd>> |
using | BASIS_FUNCTION_T = RADIAL_BASIS_FUNCTION_T |
Public Member Functions | |
RadialBasisFctSolver ()=default | |
Default constructor. | |
template<typename IndexContainer > | |
RadialBasisFctSolver (RADIAL_BASIS_FUNCTION_T basisFunction, const mesh::Mesh &inputMesh, const IndexContainer &inputIDs, const mesh::Mesh &outputMesh, const IndexContainer &outputIDs, std::vector< bool > deadAxis, Polynomial polynomial) | |
Eigen::VectorXd | solveConsistent (Eigen::VectorXd &inputData, Polynomial polynomial) const |
Maps the given input data. | |
void | computeCacheData (Eigen::MatrixXd &inputData, Polynomial polynomial, Eigen::MatrixXd &polyOut, Eigen::MatrixXd &coeffsOut) const |
Eigen::VectorXd | solveConservative (const Eigen::VectorXd &inputData, Polynomial polynomial) const |
Maps the given input data. | |
void | clear () |
Eigen::Index | getInputSize () const |
Eigen::Index | getOutputSize () const |
Eigen::Index | getNumberOfPolynomials () const |
template<typename IndexContainer > | |
Eigen::VectorXd | interpolateAt (const mesh::Vertex &v, const Eigen::MatrixXd &poly, const Eigen::MatrixXd &coeffs, const RADIAL_BASIS_FUNCTION_T &function, const IndexContainer &inputIDs, const mesh::Mesh &inMesh) const |
template<typename IndexContainer > | |
void | addWriteDataToCache (const mesh::Vertex &v, const Eigen::VectorXd &load, Eigen::MatrixXd &epsilon, Eigen::MatrixXd &Au, const RADIAL_BASIS_FUNCTION_T &basisFunction, const IndexContainer &inputIDs, const mesh::Mesh &inMesh) const |
void | evaluateConservativeCache (Eigen::MatrixXd &epsilon, const Eigen::MatrixXd &Au, Eigen::MatrixXd &result) const |
Private Member Functions | |
double | evaluateRippaLOOCVerror (const Eigen::VectorXd &lambda) const |
Private Attributes | |
precice::logging::Logger | _log {"mapping::RadialBasisFctSolver"} |
DecompositionType | _decMatrixC |
Decomposition of the interpolation matrix. | |
Eigen::VectorXd | _inverseDiagonal |
Diagonal entris of the inverse matrix C, requires for the Rippa scheme. | |
Eigen::ColPivHouseholderQR< Eigen::MatrixXd > | _qrMatrixQ |
Decomposition of the polynomial (for separate polynomial) | |
Eigen::MatrixXd | _matrixQ |
Polynomial matrix of the input mesh (for separate polynomial) | |
Eigen::MatrixXd | _matrixV |
Polynomial matrix of the output mesh (for separate polynomial) | |
Eigen::MatrixXd | _matrixA |
Evaluation matrix (output x input) | |
bool | computeCrossValidation = false |
std::array< bool, 3 > | _localActiveAxis |
This class assembles and solves an RBF system, given an input mesh and an output mesh with relevant vertex IDs. The class uses a dense matrix decomposition in order to decompose the resulting system(s) and a backward substitution in order to solve the system at runtime. The functionality uses Eigen and supports only serial execution. In case the polynomial="separate" option is used, the polynomial system is solved using a QR decomposition.
Definition at line 25 of file RadialBasisFctSolver.hpp.
using precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::BASIS_FUNCTION_T = RADIAL_BASIS_FUNCTION_T |
Definition at line 28 of file RadialBasisFctSolver.hpp.
using precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::DecompositionType = std::conditional_t<RADIAL_BASIS_FUNCTION_T::isStrictlyPositiveDefinite(), Eigen::LLT<Eigen::MatrixXd>, Eigen::ColPivHouseholderQR<Eigen::MatrixXd>> |
Definition at line 27 of file RadialBasisFctSolver.hpp.
|
default |
Default constructor.
precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::RadialBasisFctSolver | ( | RADIAL_BASIS_FUNCTION_T | basisFunction, |
const mesh::Mesh & | inputMesh, | ||
const IndexContainer & | inputIDs, | ||
const mesh::Mesh & | outputMesh, | ||
const IndexContainer & | outputIDs, | ||
std::vector< bool > | deadAxis, | ||
Polynomial | polynomial ) |
assembles the system matrices and computes the decomposition of the interpolation matrix inputMesh refers to the mesh where the interpolants are built on, i.e., the input mesh for consistent mappings and the output mesh for conservative mappings outputMesh refers to the mesh where we evaluate the interpolants, i.e., the output mesh consistent mappings and the input mesh for conservative mappings
Definition at line 342 of file RadialBasisFctSolver.hpp.
void precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::addWriteDataToCache | ( | const mesh::Vertex & | v, |
const Eigen::VectorXd & | load, | ||
Eigen::MatrixXd & | epsilon, | ||
Eigen::MatrixXd & | Au, | ||
const RADIAL_BASIS_FUNCTION_T & | basisFunction, | ||
const IndexContainer & | inputIDs, | ||
const mesh::Mesh & | inMesh ) const |
void precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::clear | ( | ) |
Definition at line 578 of file RadialBasisFctSolver.hpp.
void precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::computeCacheData | ( | Eigen::MatrixXd & | inputData, |
Polynomial | polynomial, | ||
Eigen::MatrixXd & | polyOut, | ||
Eigen::MatrixXd & | coeffsOut ) const |
Definition at line 471 of file RadialBasisFctSolver.hpp.
void precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::evaluateConservativeCache | ( | Eigen::MatrixXd & | epsilon, |
const Eigen::MatrixXd & | Au, | ||
Eigen::MatrixXd & | result ) const |
Definition at line 565 of file RadialBasisFctSolver.hpp.
|
private |
Eigen::Index precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::getInputSize | ( | ) | const |
Definition at line 585 of file RadialBasisFctSolver.hpp.
Eigen::Index precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::getNumberOfPolynomials | ( | ) | const |
Eigen::Index precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::getOutputSize | ( | ) | const |
Definition at line 591 of file RadialBasisFctSolver.hpp.
Eigen::VectorXd precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::interpolateAt | ( | const mesh::Vertex & | v, |
const Eigen::MatrixXd & | poly, | ||
const Eigen::MatrixXd & | coeffs, | ||
const RADIAL_BASIS_FUNCTION_T & | function, | ||
const IndexContainer & | inputIDs, | ||
const mesh::Mesh & | inMesh ) const |
Eigen::VectorXd precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::solveConservative | ( | const Eigen::VectorXd & | inputData, |
Polynomial | polynomial ) const |
Maps the given input data.
Definition at line 414 of file RadialBasisFctSolver.hpp.
Eigen::VectorXd precice::mapping::RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::solveConsistent | ( | Eigen::VectorXd & | inputData, |
Polynomial | polynomial ) const |
Maps the given input data.
Definition at line 442 of file RadialBasisFctSolver.hpp.
|
private |
Decomposition of the interpolation matrix.
Definition at line 78 of file RadialBasisFctSolver.hpp.
|
private |
Diagonal entris of the inverse matrix C, requires for the Rippa scheme.
Definition at line 81 of file RadialBasisFctSolver.hpp.
|
private |
Definition at line 96 of file RadialBasisFctSolver.hpp.
|
mutableprivate |
Definition at line 74 of file RadialBasisFctSolver.hpp.
|
private |
Evaluation matrix (output x input)
Definition at line 93 of file RadialBasisFctSolver.hpp.
|
private |
Polynomial matrix of the input mesh (for separate polynomial)
Definition at line 87 of file RadialBasisFctSolver.hpp.
|
private |
Polynomial matrix of the output mesh (for separate polynomial)
Definition at line 90 of file RadialBasisFctSolver.hpp.
|
private |
Decomposition of the polynomial (for separate polynomial)
Definition at line 84 of file RadialBasisFctSolver.hpp.
|
private |
Definition at line 95 of file RadialBasisFctSolver.hpp.