FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Solver::SuperLU< Matrix_, Filter_ > Class Template Referenceabstract

(distributed) SuperLU direct sparse solver More...

#include <superlu.hpp>

Inheritance diagram for FEAT::Solver::SuperLU< Matrix_, Filter_ >:
FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ > FEAT::Solver::SolverBase< Vector_ >

Public Types

typedef ADPSolverBase< Matrix_, Filter_ > BaseClass
 our base class More...
 
typedef Matrix_::VectorTypeL VectorType
 our vector type More...
 

Public Member Functions

 SuperLU (const Matrix_ &matrix, const Filter_ &filter)
 Constructor. More...
 
virtual Status apply (Vector_ &vec_cor, const Vector_ &vec_def)=0
 Solver application method. More...
 
virtual Status apply (VectorType &vec_cor, const VectorType &vec_def) override
 
virtual void done ()
 Finalization method. More...
 
virtual void done_numeric ()
 Numeric finalization method. More...
 
virtual void done_symbolic () override
 Symbolic finalization method. More...
 
virtual void init ()
 Initialization method. More...
 
virtual void init_numeric () override
 Numeric initialization method. More...
 
virtual void init_symbolic () override
 Symbolic initialization method. More...
 
virtual String name () const override
 Returns a descriptive string. More...
 

Protected Member Functions

void _download_vec_cor (VectorType &vec_cor)
 
void _download_vec_def (VectorType &vec_def)
 
const Dist::Comm_get_comm () const
 
Index _get_global_dof_offset () const
 
const IndexType * _get_mat_col_idx () const
 
Index _get_mat_num_nze () const
 
const IndexType * _get_mat_row_ptr () const
 
const DataType * _get_mat_vals () const
 
Index _get_num_global_dofs () const
 
Index _get_num_owned_dofs () const
 
DataType * _get_vec_cor_vals (VectorType &vec_cor)
 
const DataType * _get_vec_def_vals (const VectorType &vec_def)
 
DataType * _get_vec_def_vals (VectorType &vec_def)
 
void _upload_vec_cor (const VectorType &vec_cor)
 
void _upload_vec_def (const VectorType &vec_def)
 

Protected Attributes

void * _core
 a pointer to our opaque SuperLU core object More...
 

Detailed Description

template<typename Matrix_, typename Filter_>
class FEAT::Solver::SuperLU< Matrix_, Filter_ >

(distributed) SuperLU direct sparse solver

This class implements a wrapper around the distributed SuperLU direct sparse solver, which is provided by the SuperLU third-party library.

Attention
Because this class only wraps around the SuperLU_DIST library, it is only available when FEAT is configured and linked with MPI support, i.e. there exists no non-MPI version of this SuperLU class in serial builds. If you need a serial direct solver, look for UMFPACK.
Author
Peter Zajac

Definition at line 92 of file superlu.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename Matrix_ , typename Filter_ >
typedef ADPSolverBase<Matrix_, Filter_> FEAT::Solver::SuperLU< Matrix_, Filter_ >::BaseClass

our base class

Definition at line 97 of file superlu.hpp.

◆ VectorType

template<typename Matrix_ , typename Filter_ >
typedef Matrix_::VectorTypeL FEAT::Solver::SuperLU< Matrix_, Filter_ >::VectorType

our vector type

Definition at line 99 of file superlu.hpp.

Constructor & Destructor Documentation

◆ SuperLU()

template<typename Matrix_ , typename Filter_ >
FEAT::Solver::SuperLU< Matrix_, Filter_ >::SuperLU ( const Matrix_ &  matrix,
const Filter_ &  filter 
)
inlineexplicit

Constructor.

Definition at line 109 of file superlu.hpp.

Member Function Documentation

◆ _download_vec_cor()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
void FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_download_vec_cor ( VectorType vec_cor)
protectedinherited
Returns
Downloads a correction vector.

Referenced by FEAT::Solver::HypreSolverBase< Matrix_, Filter_, SolverBase_ >::_download_cor().

◆ _download_vec_def()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
void FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_download_vec_def ( VectorType vec_def)
protectedinherited
Returns
Downloads a defect vector.

◆ _get_comm()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
const Dist::Comm * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_comm ( ) const
protectedinherited

◆ _get_global_dof_offset()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
Index FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_global_dof_offset ( ) const
protectedinherited

◆ _get_mat_col_idx()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
const IndexType * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_mat_col_idx ( ) const
protectedinherited

◆ _get_mat_num_nze()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
Index FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_mat_num_nze ( ) const
protectedinherited
Returns
The number of non-zero entries in this process's matrix partition

◆ _get_mat_row_ptr()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
const IndexType * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_mat_row_ptr ( ) const
protectedinherited

◆ _get_mat_vals()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
const DataType * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_mat_vals ( ) const
protectedinherited

◆ _get_num_global_dofs()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
Index FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_num_global_dofs ( ) const
protectedinherited

◆ _get_num_owned_dofs()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
Index FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_num_owned_dofs ( ) const
protectedinherited

◆ _get_vec_cor_vals()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
DataType * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_vec_cor_vals ( VectorType vec_cor)
protectedinherited
Returns
The data array of the owned correction vector.

Referenced by FEAT::Solver::HypreSolverBase< Matrix_, Filter_, SolverBase_ >::_download_cor().

◆ _get_vec_def_vals() [1/2]

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
const DataType * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_vec_def_vals ( const VectorType vec_def)
protectedinherited
Returns
The data array of the owned defect vector.

Referenced by FEAT::Solver::HypreSolverBase< Matrix_, Filter_, SolverBase_ >::_upload_def().

◆ _get_vec_def_vals() [2/2]

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
DataType * FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_vec_def_vals ( VectorType vec_def)
protectedinherited
Returns
The data array of the owned defect vector.

◆ _upload_vec_cor()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
void FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_upload_vec_cor ( const VectorType vec_cor)
protectedinherited
Returns
Uploads a correction vector.

◆ _upload_vec_def()

template<typename Matrix_ , typename Filter_ , typename SolverBase_ = Solver::SolverBase<typename Matrix_::VectorTypeL>>
void FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_upload_vec_def ( const VectorType vec_def)
protectedinherited

◆ apply() [1/2]

template<typename Vector_ >
virtual Status FEAT::Solver::SolverBase< Vector_ >::apply ( Vector_ &  vec_cor,
const Vector_ &  vec_def 
)
pure virtualinherited

Solver application method.

This method applies the solver represented by this object onto a given defect vector and returns the corresponding correction vector.

Note
Solvers which derive from the IterativeSolver base class also provide a correct() method which corrects an initial solution instead of starting with the null vector.
Parameters
[out]vec_corThe vector that shall receive the solution of the linear system. It is assumed to be allocated, but its numerical contents may be undefined upon calling this method.
[in]vec_defThe vector that represents the right-hand-side of the linear system to be solved.
Attention
vec_cor and vec_def must not refer to the same vector object!
Returns
A Status code that represents the status of the solution step.

Implemented in FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >, FEAT::Solver::CuSolverLU, FEAT::Solver::CuSolverQR, FEAT::Solver::ScalePrecond< Vector_, Filter_ >, FEAT::Solver::DiagonalPrecond< Vector_, Filter_ >, FEAT::Solver::MultiGrid< SystemMatrix_, SystemFilter_, TransferOperator_ >, FEAT::Solver::NLOptPrecond< VectorType_, FilterType_ >, FEAT::Solver::AmaVanka< Matrix_, Filter_ >, FEAT::Solver::ConvertPrecond< VectorOuter_, VectorInner_ >, FEAT::Solver::ConvertPrecond< Global::Vector< LocalVectorOuter_, MirrorOuter_ >, Global::Vector< LocalVectorInner_, MirrorInner_ > >, and FEAT::Solver::BFBT< MatrixA_, MatrixB_, MatrixD_, FilterV_, FilterP_ >.

Referenced by FEAT::Solver::solve().

◆ apply() [2/2]

template<typename Matrix_ , typename Filter_ >
virtual Status FEAT::Solver::SuperLU< Matrix_, Filter_ >::apply ( VectorType vec_cor,
const VectorType vec_def 
)
inlineoverridevirtual

Definition at line 170 of file superlu.hpp.

◆ done()

template<typename Vector_ >
virtual void FEAT::Solver::SolverBase< Vector_ >::done ( )
inlinevirtualinherited

Finalization method.

This function performs both the symbolic and numeric finalization, i.e. it simply performs

this->done_numeric();
this->done_symbolic();

Definition at line 283 of file base.hpp.

References FEAT::Solver::SolverBase< Vector_ >::done_numeric(), and FEAT::Solver::SolverBase< Vector_ >::done_symbolic().

◆ done_numeric()

template<typename Vector_ >
virtual void FEAT::Solver::SolverBase< Vector_ >::done_numeric ( )
inlinevirtualinherited

Numeric finalization method.

This method is called to release any data allocated in the numeric initialization step.

Reimplemented in FEAT::Solver::BFBT< MatrixA_, MatrixB_, MatrixD_, FilterV_, FilterP_ >, FEAT::Solver::BFBT< Global::Matrix< MatrixA_, MirrorV_, MirrorV_ >, Global::Matrix< MatrixB_, MirrorV_, MirrorP_ >, Global::Matrix< MatrixD_, MirrorP_, MirrorV_ >, Global::Filter< FilterV_, MirrorV_ >, Global::Filter< FilterP_, MirrorP_ > >, FEAT::Solver::ConvertPrecond< VectorOuter_, VectorInner_ >, FEAT::Solver::ConvertPrecond< Global::Vector< LocalVectorOuter_, MirrorOuter_ >, Global::Vector< LocalVectorInner_, MirrorInner_ > >, FEAT::Solver::CUDSS, FEAT::Solver::DirectStokesSolver< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, LAFEM::TupleFilter< FilterV_, FilterP_ > >, FEAT::Solver::DirectStokesSolver< Global::Matrix< LocalMatrix_, Mirror_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >, FEAT::Solver::ParaSailsPrecond< Matrix_, Filter_ >, FEAT::Solver::EuclidPrecond< Matrix_, Filter_ >, FEAT::Solver::BoomerAMG< Matrix_, Filter_ >, FEAT::Solver::PreconditionedIterativeSolver< Vector_ >, FEAT::Solver::PreconditionedIterativeSolver< Matrix_::VectorTypeR >, FEAT::Solver::PreconditionedIterativeSolver< Functional_::VectorTypeR >, FEAT::Solver::MKLDSS, FEAT::Solver::MultiGrid< SystemMatrix_, SystemFilter_, TransferOperator_ >, FEAT::Solver::PCGNR< Matrix_, Filter_ >, FEAT::Solver::SchwarzPrecond< Global::Vector< LocalVector_, Mirror_ >, Global::Filter< LocalFilter_, Mirror_ > >, FEAT::Solver::Umfpack, FEAT::Solver::UmfpackMean, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >, FEAT::Solver::GenericUmfpack< Matrix_ >, FEAT::Solver::UzawaPrecond< MatrixA_, MatrixB_, MatrixD_, FilterV_, FilterP_ >, and FEAT::Solver::UzawaPrecond< Global::Matrix< MatrixA_, MirrorV_, MirrorV_ >, Global::Matrix< MatrixB_, MirrorV_, MirrorP_ >, Global::Matrix< MatrixD_, MirrorP_, MirrorV_ >, Global::Filter< FilterV_, MirrorV_ >, Global::Filter< FilterP_, MirrorP_ > >.

Definition at line 246 of file base.hpp.

Referenced by FEAT::Solver::SolverBase< Vector_ >::done(), FEAT::Solver::BFBT< MatrixA_, MatrixB_, MatrixD_, FilterV_, FilterP_ >::done_numeric(), FEAT::Solver::BFBT< Global::Matrix< MatrixA_, MirrorV_, MirrorV_ >, Global::Matrix< MatrixB_, MirrorV_, MirrorP_ >, Global::Matrix< MatrixD_, MirrorP_, MirrorV_ >, Global::Filter< FilterV_, MirrorV_ >, Global::Filter< FilterP_, MirrorP_ > >::done_numeric(), FEAT::Solver::ConvertPrecond< VectorOuter_, VectorInner_ >::done_numeric(), FEAT::Solver::ConvertPrecond< Global::Vector< LocalVectorOuter_, MirrorOuter_ >, Global::Vector< LocalVectorInner_, MirrorInner_ > >::done_numeric(), FEAT::Solver::ParaSailsPrecond< Matrix_, Filter_ >::done_numeric(), FEAT::Solver::PreconditionedIterativeSolver< Vector_ >::done_numeric(), FEAT::Solver::MultiGrid< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_numeric(), FEAT::Solver::PCGNR< Matrix_, Filter_ >::done_numeric(), FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::done_numeric(), FEAT::Solver::UzawaPrecond< MatrixA_, MatrixB_, MatrixD_, FilterV_, FilterP_ >::done_numeric(), and FEAT::Solver::UzawaPrecond< Global::Matrix< MatrixA_, MirrorV_, MirrorV_ >, Global::Matrix< MatrixB_, MirrorV_, MirrorP_ >, Global::Matrix< MatrixD_, MirrorP_, MirrorV_ >, Global::Filter< FilterV_, MirrorV_ >, Global::Filter< FilterP_, MirrorP_ > >::done_numeric().

◆ done_symbolic()

template<typename Matrix_ , typename Filter_ >
virtual void FEAT::Solver::SuperLU< Matrix_, Filter_ >::done_symbolic ( )
inlineoverridevirtual

Symbolic finalization method.

This method is called to release any data allocated in the symbolic initialization step.

Reimplemented from FEAT::Solver::SolverBase< Vector_ >.

Definition at line 139 of file superlu.hpp.

References FEAT::Solver::SolverBase< Vector_ >::done_symbolic(), and XASSERT.

◆ init()

template<typename Vector_ >
virtual void FEAT::Solver::SolverBase< Vector_ >::init ( )
inlinevirtualinherited

Initialization method.

This function performs both the symbolic and numeric initialization, i.e. it simply performs

this->init_symbolic();
this->init_numeric();

Definition at line 268 of file base.hpp.

References FEAT::Solver::SolverBase< Vector_ >::init_numeric(), and FEAT::Solver::SolverBase< Vector_ >::init_symbolic().

◆ init_numeric()

template<typename Matrix_ , typename Filter_ >
virtual void FEAT::Solver::SuperLU< Matrix_, Filter_ >::init_numeric ( )
inlineoverridevirtual

Numeric initialization method.

This method is called to perform numeric initialization of the solver.
Before this function can be called, the symbolic initialization must be performed.

Reimplemented from FEAT::Solver::SolverBase< Vector_ >.

Definition at line 149 of file superlu.hpp.

References FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_mat_vals(), FEAT::Solver::ADPSolverBase< Matrix_, Filter_, SolverBase_ >::_get_num_global_dofs(), FEAT::Solver::SolverBase< Vector_ >::init_numeric(), XASSERT, and XASSERTM.

◆ init_symbolic()

◆ name()

template<typename Matrix_ , typename Filter_ >
virtual String FEAT::Solver::SuperLU< Matrix_, Filter_ >::name ( ) const
inlineoverridevirtual

Returns a descriptive string.

Returns
A string describing the solver.

Implements FEAT::Solver::SolverBase< Vector_ >.

Definition at line 115 of file superlu.hpp.

Member Data Documentation

◆ _core

template<typename Matrix_ , typename Filter_ >
void* FEAT::Solver::SuperLU< Matrix_, Filter_ >::_core
protected

a pointer to our opaque SuperLU core object

Definition at line 103 of file superlu.hpp.


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