22 #ifndef __HERMES_COMMON_MUMPS_SOLVER_H_
23 #define __HERMES_COMMON_MUMPS_SOLVER_H_
31 #include <mumps_c_types.h>
75 template <
typename Scalar>
85 Scalar
get(
unsigned int m,
unsigned int n)
const;
88 void add(
unsigned int m,
unsigned int n, Scalar v);
104 void multiply_with_vector(Scalar* vector_in, Scalar*& vector_out,
bool vector_out_initialized =
false)
const;
107 void create(
unsigned int size,
unsigned int nnz,
int* ap,
int* ai, Scalar* ax);
129 template <
typename Scalar>
140 virtual void solve();
141 virtual int get_matrix_size();
149 bool setup_factorization();
172 static const int init_icntl_14 = 1;
174 static const int max_icntl_14 = 128;
unsigned int nnz
Number of non-zero entries ( = Ap[size]).
void free()
Utility method.
General namespace for the Hermes library.
Linear matrix solver functionality.
void create(unsigned int size, unsigned int nnz, int *ap, int *ai, Scalar *ax)
Creates matrix using size, nnz, and the three arrays.
HERMES_API SparseMatrix< Scalar > * create_matrix(bool use_direct_solver=false)
Function returning a matrix according to the users's choice.
unsigned int size
matrix size
void multiply_with_Scalar(Scalar value)
Multiplies matrix with a Scalar.
General (abstract) sparse matrix representation in Hermes.
MatrixExportFormat
Format of file matrix and vector output.
DMUMPS_STRUC_C mumps_struct
Vector used with MUMPS solver.
General CSC Matrix class. (can be used in umfpack, in that case use the CSCMatrix subclass...
mumps_type< Scalar >::mumps_struct param
MUMPS specific structure with solver parameters.
ZMUMPS_COMPLEX mumps_Scalar
void zero()
Utility method.
Matrix used with MUMPS solver.
void add(unsigned int m, unsigned int n, Scalar v)
Basic matrix classes and operations.
SimpleVector< Scalar > * rhs
Right hand side.
ZMUMPS_STRUC_C mumps_struct
void import_from_file(const char *filename, const char *var_name, MatrixExportFormat fmt)
MumpsMatrix< Scalar > * m
Matrix to solve.
General CS Matrix class. Either row- or column- specific (see subclassses).
mumps_type< Scalar >::mumps_Scalar * Ax
Matrix entries (column-wise).
void multiply_with_vector(Scalar *vector_in, Scalar *&vector_out, bool vector_out_initialized=false) const
Applies the matrix to vector_in and saves result to vector_out.
void export_to_file(const char *filename, const char *var_name, MatrixExportFormat fmt, char *number_format="%lf")
CSMatrix< Scalar > * duplicate() const
Duplicates a matrix (including allocation).