NiHu  2.0
NiHu::fmm::matrix_free< FmmMatrix > Class Template Reference

An Eigen::Matrix adaptor for the fmm_matrix class. More...

#include <matrix_free.hpp>

Public Types

enum  { ColsAtCompileTime = Eigen::Dynamic, MaxColsAtCompileTime = Eigen::Dynamic, IsRowMajor = false }
 
typedef FmmMatrix fmm_matrix_t
 
typedef fmm_matrix_t::scalar_t scalar_t
 
typedef scalar_t Scalar
 
typedef NiHu::real_part_type< Scalar >::type RealScalar
 
typedef int StorageIndex
 
typedef Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > vector_t
 

Public Member Functions

 matrix_free (FmmMatrix &mat)
 construct a new matrix_free instance More...
 
Eigen::Index rows () const
 return the number of rows More...
 
Eigen::Index cols () const
 return the number of columns More...
 
template<class RHS >
FmmMatrix::response_t operator* (Eigen::MatrixBase< RHS > const &rhs) const
 compute MVP More...
 
vector_t get_diagonal () const
 return the diagonal of the matrix More...
 

Detailed Description

template<class FmmMatrix>
class NiHu::fmm::matrix_free< FmmMatrix >

An Eigen::Matrix adaptor for the fmm_matrix class.

Template Parameters
FmmMatrixfmm_matrix type

The adaptor enables the usage of the fmm_matrix class in Eigen's iterative solvers.

Definition at line 26 of file matrix_free.hpp.

Constructor & Destructor Documentation

◆ matrix_free()

template<class FmmMatrix >
NiHu::fmm::matrix_free< FmmMatrix >::matrix_free ( FmmMatrix &  mat)
inline

construct a new matrix_free instance

Parameters
[in]matthe fmm matrix

Definition at line 74 of file matrix_free.hpp.

Member Function Documentation

◆ cols()

template<class FmmMatrix >
Eigen::Index NiHu::fmm::matrix_free< FmmMatrix >::cols ( ) const
inline

return the number of columns

Returns
the number of columns

Definition at line 88 of file matrix_free.hpp.

◆ get_diagonal()

template<class FmmMatrix >
vector_t NiHu::fmm::matrix_free< FmmMatrix >::get_diagonal ( ) const
inline

return the diagonal of the matrix

Returns
the diagonal

Definition at line 106 of file matrix_free.hpp.

◆ operator*()

template<class FmmMatrix >
template<class RHS >
FmmMatrix::response_t NiHu::fmm::matrix_free< FmmMatrix >::operator* ( Eigen::MatrixBase< RHS > const &  rhs) const
inline

compute MVP

Template Parameters
RHSthe right hand side type
Parameters
[in]rhsthe right hand side
Returns
the product

Definition at line 99 of file matrix_free.hpp.

◆ rows()

template<class FmmMatrix >
Eigen::Index NiHu::fmm::matrix_free< FmmMatrix >::rows ( ) const
inline

return the number of rows

Returns
the number of rows

Definition at line 81 of file matrix_free.hpp.


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