Linear system solver using the MUMPS direct solver. More...
#include <ptems/solvers/mumps.hpp>
Public Member Functions | |
MumpsSolver (const ParallelComm &comm, const SparsityPattern &mat, std::size_t size, MumpsMatrixType type=MumpsMatrixType::Unsymmetric, bool distributedConstruction=true) | |
Construct the MUMPS linear solver. More... | |
~MumpsSolver () | |
Cleans up the MUMPS solver. More... | |
virtual bool | DistributedConstruction () const override |
Gets if the matrix and right hand side should be constructed distributed (for MPI) More... | |
virtual opt_ref | Entry (std::size_t i, std::size_t j) override |
Gets a reference to the specified matrix entry. More... | |
virtual opt_const_ref | Entry (std::size_t i, std::size_t j) const override |
Gets a const reference to the specified matrix entry. More... | |
virtual void | Clear () override |
Clear the matrix of the linear system. More... | |
std::size_t | size () const override |
Gets the size of the linear system. More... | |
virtual std::vector< T > | Solve (const std::vector< T > &rhs, std::size_t offsetRHS=0, std::size_t lenRHS=-1) override |
Solves the linear system with the specified right-hand side. More... | |
Linear system solver using the MUMPS direct solver.
T | The type of the matrix entries |
|
inline |
Construct the MUMPS linear solver.
comm | MPI communicator to use for construction and solving |
mat | The sparsity pattern of the sparse matrix for MUMPS |
size | The size of the linear system |
type | The type of the matrix (symmetric, positive definite, unsymmetric) |
distributedConstruction | true if the matrix and right hand side should be constructed distributed over the MPI processes |
|
inline |
Cleans up the MUMPS solver.
|
inlineoverridevirtual |
Clear the matrix of the linear system.
Implements ptems::LinearSolver< T, detail::MumpsTypes< T >::reference, detail::MumpsTypes< T >::const_reference >.
|
inlineoverridevirtual |
Gets if the matrix and right hand side should be constructed distributed (for MPI)
Implements ptems::LinearSolver< T, detail::MumpsTypes< T >::reference, detail::MumpsTypes< T >::const_reference >.
|
inlineoverridevirtual |
Gets a const reference to the specified matrix entry.
std::out_of_range | If the row or column index are not less than the linear system size |
i | The row index |
j | The column index |
Implements ptems::LinearSolver< T, detail::MumpsTypes< T >::reference, detail::MumpsTypes< T >::const_reference >.
|
inlineoverridevirtual |
Gets a reference to the specified matrix entry.
std::out_of_range | If the row or column index are not less than the linear system size |
i | The row index |
j | The column index |
Implements ptems::LinearSolver< T, detail::MumpsTypes< T >::reference, detail::MumpsTypes< T >::const_reference >.
|
inlineoverridevirtual |
Gets the size of the linear system.
Implements ptems::LinearSolver< T, detail::MumpsTypes< T >::reference, detail::MumpsTypes< T >::const_reference >.
|
inlineoverridevirtual |
Solves the linear system with the specified right-hand side.
rhs | The right hand side vector |
offsetRHS | If using distributed matrix/rhs construction specifies the offset to the start of the right hand side vector populated by this process |
lenRHS | If using distributed matrix/rhs construction specifies the length of the right hand side vector populated by this process (or greater than size() for all) |
Implements ptems::LinearSolver< T, detail::MumpsTypes< T >::reference, detail::MumpsTypes< T >::const_reference >.