preCICE v3.1.2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T > Class Template Reference

#include <GinkgoRadialBasisFctSolver.hpp>

Collaboration diagram for precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >:
[legend]

Public Types

using BASIS_FUNCTION_T = RADIAL_BASIS_FUNCTION_T
 

Public Member Functions

 GinkgoRadialBasisFctSolver ()=default
 
template<typename IndexContainer >
 GinkgoRadialBasisFctSolver (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, MappingConfiguration::GinkgoParameter ginkgoParameter)
 Assembles the system matrices and computes the decomposition of the interpolation matrix.
 
Eigen::VectorXd solveConsistent (const Eigen::VectorXd &inputData, Polynomial polynomial)
 Maps the given input data.
 
Eigen::VectorXd solveConservative (const Eigen::VectorXd &inputData, Polynomial polynomial)
 Maps the given input data.
 
void clear ()
 
Eigen::Index getInputSize () const
 
Eigen::Index getOutputSize () const
 
std::shared_ptr< gko::Executor > getReferenceExecutor () const
 

Private Member Functions

void _solveRBFSystem (const std::shared_ptr< GinkgoVector > &rhs) const
 

Private Attributes

precice::logging::Logger _log {"mapping::GinkgoRadialBasisFctSolver"}
 
std::shared_ptr< gko::Executor > _deviceExecutor
 
std::shared_ptr< gko::Executor > _hostExecutor = gko::ReferenceExecutor::create()
 
std::shared_ptr< GinkgoMatrix_rbfSystemMatrix
 
std::shared_ptr< GinkgoMatrix_matrixA
 Evaluation matrix (output x input)
 
std::shared_ptr< GinkgoMatrix_matrixQ
 Polynomial matrix of the input mesh (for separate polynomial)
 
std::shared_ptr< gko::LinOp > _matrixQ_T
 Transposed Polynomial matrix of the input mesh (for separate polynomial) (to solve Q^T*Q*x=Q^T*b)
 
std::shared_ptr< gko::LinOp > _matrixQ_TQ
 Product Q^T*Q (to solve Q^TQx=Q^Tb)
 
std::shared_ptr< gko::LinOp > _matrixQQ_T
 Product Q*Q^T.
 
std::shared_ptr< GinkgoVector_polynomialRhs
 Right-hand side of the polynomial system.
 
std::shared_ptr< GinkgoVector_subPolynomialContribution
 Subtraction of the polynomial contribution.
 
std::shared_ptr< GinkgoVector_addPolynomialContribution
 Addition of the polynomial contribution.
 
std::shared_ptr< GinkgoMatrix_matrixV
 Polynomial matrix of the output mesh (for separate polynomial)
 
std::shared_ptr< GinkgoVector_rbfCoefficients
 Stores the calculated coefficients of the RBF interpolation.
 
std::shared_ptr< GinkgoVector_polynomialContribution
 
std::shared_ptr< GinkgoMatrix_decompMatrixQ_T
 Matrix Q^T of QR decomposition.
 
std::shared_ptr< GinkgoMatrix_dQ_T_Rhs
 Q^T * b of QR decomposition.
 
std::shared_ptr< GinkgoMatrix_decompMatrixR
 Matrix R of QR decomposition.
 
std::shared_ptr< triangular_triangularSolver
 Backwards Solver.
 
std::shared_ptr< cg_cgSolver = nullptr
 QR Solver.
 
std::shared_ptr< gmres_gmresSolver = nullptr
 
std::shared_ptr< cg_polynomialSolver = nullptr
 
GinkgoSolverType _solverType = GinkgoSolverType::CG
 
GinkgoPreconditionerType _preconditionerType
 
std::shared_ptr< GinkgoScalar_scalarOne
 
std::shared_ptr< GinkgoScalar_scalarNegativeOne
 
std::shared_ptr< gko::stop::Iteration::Factory > _iterationCriterion
 
std::shared_ptr< gko::stop::ResidualNormReduction<>::Factory > _residualCriterion
 
MappingConfiguration::GinkgoParameter _ginkgoParameter
 

Detailed Description

template<typename RADIAL_BASIS_FUNCTION_T>
class precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >

This class assembles and solves an RBF system, given an input mesh and an output mesh with relevant vertex IDs. It uses iterative solvers (CG, GMRES) and preconditioners ((Block-)Jacobi, Cholesky, Ilu) to solve the interpolation systems. Furthermore, it optionally does that on Nvidia or AMD GPUs which provides significant speedup over (single-threaded) CPU implementations.

Definition at line 90 of file GinkgoRadialBasisFctSolver.hpp.

Member Typedef Documentation

◆ BASIS_FUNCTION_T

template<typename RADIAL_BASIS_FUNCTION_T >
using precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::BASIS_FUNCTION_T = RADIAL_BASIS_FUNCTION_T

Definition at line 92 of file GinkgoRadialBasisFctSolver.hpp.

Constructor & Destructor Documentation

◆ GinkgoRadialBasisFctSolver() [1/2]

template<typename RADIAL_BASIS_FUNCTION_T >
precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::GinkgoRadialBasisFctSolver ( )
default

◆ GinkgoRadialBasisFctSolver() [2/2]

template<typename RADIAL_BASIS_FUNCTION_T >
template<typename IndexContainer >
precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::GinkgoRadialBasisFctSolver ( 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,
MappingConfiguration::GinkgoParameter ginkgoParameter )

Assembles the system matrices and computes the decomposition of the interpolation matrix.

Definition at line 196 of file GinkgoRadialBasisFctSolver.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ _solveRBFSystem()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_solveRBFSystem ( const std::shared_ptr< GinkgoVector > & rhs) const
private

Definition at line 438 of file GinkgoRadialBasisFctSolver.hpp.

Here is the call graph for this function:

◆ clear()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::clear ( )

Definition at line 641 of file GinkgoRadialBasisFctSolver.hpp.

◆ getInputSize()

template<typename RADIAL_BASIS_FUNCTION_T >
Eigen::Index precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::getInputSize ( ) const

Definition at line 629 of file GinkgoRadialBasisFctSolver.hpp.

◆ getOutputSize()

template<typename RADIAL_BASIS_FUNCTION_T >
Eigen::Index precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::getOutputSize ( ) const

Definition at line 635 of file GinkgoRadialBasisFctSolver.hpp.

◆ getReferenceExecutor()

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr< gko::Executor > precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::getReferenceExecutor ( ) const

Definition at line 623 of file GinkgoRadialBasisFctSolver.hpp.

◆ solveConservative()

template<typename RADIAL_BASIS_FUNCTION_T >
Eigen::VectorXd precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::solveConservative ( const Eigen::VectorXd & inputData,
Polynomial polynomial )

Maps the given input data.

Definition at line 532 of file GinkgoRadialBasisFctSolver.hpp.

◆ solveConsistent()

template<typename RADIAL_BASIS_FUNCTION_T >
Eigen::VectorXd precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::solveConsistent ( const Eigen::VectorXd & inputData,
Polynomial polynomial )

Maps the given input data.

Definition at line 469 of file GinkgoRadialBasisFctSolver.hpp.

Member Data Documentation

◆ _addPolynomialContribution

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoVector> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_addPolynomialContribution
private

Addition of the polynomial contribution.

Definition at line 146 of file GinkgoRadialBasisFctSolver.hpp.

◆ _cgSolver

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<cg> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_cgSolver = nullptr
private

QR Solver.

Definition at line 172 of file GinkgoRadialBasisFctSolver.hpp.

◆ _decompMatrixQ_T

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_decompMatrixQ_T
private

Matrix Q^T of QR decomposition.

Definition at line 157 of file GinkgoRadialBasisFctSolver.hpp.

◆ _decompMatrixR

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_decompMatrixR
private

Matrix R of QR decomposition.

Definition at line 163 of file GinkgoRadialBasisFctSolver.hpp.

◆ _deviceExecutor

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::Executor> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_deviceExecutor
private

Definition at line 118 of file GinkgoRadialBasisFctSolver.hpp.

◆ _dQ_T_Rhs

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_dQ_T_Rhs
private

Q^T * b of QR decomposition.

Definition at line 160 of file GinkgoRadialBasisFctSolver.hpp.

◆ _ginkgoParameter

template<typename RADIAL_BASIS_FUNCTION_T >
MappingConfiguration::GinkgoParameter precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_ginkgoParameter
private

Definition at line 191 of file GinkgoRadialBasisFctSolver.hpp.

◆ _gmresSolver

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gmres> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_gmresSolver = nullptr
private

Definition at line 173 of file GinkgoRadialBasisFctSolver.hpp.

◆ _hostExecutor

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::Executor> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_hostExecutor = gko::ReferenceExecutor::create()
private

Definition at line 119 of file GinkgoRadialBasisFctSolver.hpp.

◆ _iterationCriterion

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::stop::Iteration::Factory> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_iterationCriterion
private

Definition at line 187 of file GinkgoRadialBasisFctSolver.hpp.

◆ _log

template<typename RADIAL_BASIS_FUNCTION_T >
precice::logging::Logger precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_log {"mapping::GinkgoRadialBasisFctSolver"}
mutableprivate

Definition at line 116 of file GinkgoRadialBasisFctSolver.hpp.

◆ _matrixA

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_matrixA
private

Evaluation matrix (output x input)

Definition at line 125 of file GinkgoRadialBasisFctSolver.hpp.

◆ _matrixQ

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_matrixQ
private

Polynomial matrix of the input mesh (for separate polynomial)

Definition at line 128 of file GinkgoRadialBasisFctSolver.hpp.

◆ _matrixQ_T

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::LinOp> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_matrixQ_T
private

Transposed Polynomial matrix of the input mesh (for separate polynomial) (to solve Q^T*Q*x=Q^T*b)

Definition at line 131 of file GinkgoRadialBasisFctSolver.hpp.

◆ _matrixQ_TQ

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::LinOp> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_matrixQ_TQ
private

Product Q^T*Q (to solve Q^TQx=Q^Tb)

Definition at line 134 of file GinkgoRadialBasisFctSolver.hpp.

◆ _matrixQQ_T

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::LinOp> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_matrixQQ_T
private

Product Q*Q^T.

Definition at line 137 of file GinkgoRadialBasisFctSolver.hpp.

◆ _matrixV

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_matrixV
private

Polynomial matrix of the output mesh (for separate polynomial)

Definition at line 149 of file GinkgoRadialBasisFctSolver.hpp.

◆ _polynomialContribution

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoVector> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_polynomialContribution
private

Definition at line 154 of file GinkgoRadialBasisFctSolver.hpp.

◆ _polynomialRhs

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoVector> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_polynomialRhs
private

Right-hand side of the polynomial system.

Definition at line 140 of file GinkgoRadialBasisFctSolver.hpp.

◆ _polynomialSolver

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<cg> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_polynomialSolver = nullptr
private

Definition at line 175 of file GinkgoRadialBasisFctSolver.hpp.

◆ _preconditionerType

template<typename RADIAL_BASIS_FUNCTION_T >
GinkgoPreconditionerType precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_preconditionerType
private

Definition at line 179 of file GinkgoRadialBasisFctSolver.hpp.

◆ _rbfCoefficients

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoVector> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_rbfCoefficients
private

Stores the calculated coefficients of the RBF interpolation.

Definition at line 152 of file GinkgoRadialBasisFctSolver.hpp.

◆ _rbfSystemMatrix

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoMatrix> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_rbfSystemMatrix
private

Definition at line 122 of file GinkgoRadialBasisFctSolver.hpp.

◆ _residualCriterion

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<gko::stop::ResidualNormReduction<>::Factory> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_residualCriterion
private

Definition at line 189 of file GinkgoRadialBasisFctSolver.hpp.

◆ _scalarNegativeOne

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoScalar> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_scalarNegativeOne
private

Definition at line 183 of file GinkgoRadialBasisFctSolver.hpp.

◆ _scalarOne

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoScalar> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_scalarOne
private

Definition at line 182 of file GinkgoRadialBasisFctSolver.hpp.

◆ _solverType

template<typename RADIAL_BASIS_FUNCTION_T >
GinkgoSolverType precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_solverType = GinkgoSolverType::CG
private

Definition at line 177 of file GinkgoRadialBasisFctSolver.hpp.

◆ _subPolynomialContribution

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<GinkgoVector> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_subPolynomialContribution
private

Subtraction of the polynomial contribution.

Definition at line 143 of file GinkgoRadialBasisFctSolver.hpp.

◆ _triangularSolver

template<typename RADIAL_BASIS_FUNCTION_T >
std::shared_ptr<triangular> precice::mapping::GinkgoRadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T >::_triangularSolver
private

Backwards Solver.

Definition at line 166 of file GinkgoRadialBasisFctSolver.hpp.


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