29 template<
typename Scalar>
34 Vector<Scalar>* b = create_vector<Scalar>(force_use_direct_solver);
50 template<
typename Scalar>
56 delete this->linear_matrix_solver;
64 template<
typename Scalar>
68 this->linear_matrix_solver->set_verbose_output(to_set);
71 template<
typename Scalar>
74 return this->linear_matrix_solver;
77 template<
typename Scalar>
80 return this->linear_matrix_solver->get_matrix();
83 template<
typename Scalar>
86 return this->linear_matrix_solver->get_rhs();
89 template<
typename Scalar>
95 template<
typename Scalar>
98 this->constant_jacobian = to_set;
100 this->jacobian_reusable =
false;
104 template<
typename Scalar>
107 return this->UMFPACK_reporting_data[data_value];
110 template<
typename Scalar>
115 this->warn(
"A different MatrixSolver than UMFPACK is used, ignoring the call to set_UMFPACK_reporting().");
124 this->do_UMFPACK_reporting = to_set;
127 template<
typename Scalar>
130 if (this->do_UMFPACK_reporting)
135 this->UMFPACK_reporting_data[this->FactorizationSize] = umfpack_matrix_solver->
Info[UMFPACK_NUMERIC_SIZE] * umfpack_matrix_solver->
Info[UMFPACK_SIZE_OF_UNIT];
136 this->UMFPACK_reporting_data[this->PeakMemoryUsage] = umfpack_matrix_solver->
Info[UMFPACK_PEAK_MEMORY] * umfpack_matrix_solver->
Info[UMFPACK_SIZE_OF_UNIT];
137 this->UMFPACK_reporting_data[this->Flops] = umfpack_matrix_solver->
Info[UMFPACK_FLOPS];
140 memset(this->UMFPACK_reporting_data, 0, 3 *
sizeof(
double));
General namespace for the Hermes library.
General (linear/nonlinear) matrix solver functionality.
virtual void set_verbose_output(bool to_set)
Verbose output.
General (abstract) vector representation in Hermes.
bool do_UMFPACK_reporting
General (abstract) sparse matrix representation in Hermes.
MatrixSolver(bool force_use_direct_solver=false)
bool jacobian_reusable
Jacobian is ready to be reused if desirable.
SparseMatrix< Scalar > * get_jacobian()
Only a shortcut for algebraic solver (->) get_matrix().
double Info[UMFPACK_INFO]
For reporting.
void handle_UMFPACK_reports()
This is not used now.
interface for both linear and nonlinear algebraic solvers.
virtual double get_UMFPACK_reporting_data(UMFPACK_reporting_data_value data_value)
factorization / operator.
void set_jacobian_constant(bool to_set=true)
Sets the jacobian to be constant, i.e. reused whenever possible.
UMFPACK solver interface.
Abstract class for defining solver interface.
Scalar * sln_vector
The solution vector.
Encapsulation of UMFPACK linear solver.
Vector< Scalar > * get_residual()
Only a shortcut for algebraic solver (->) get_rhs().
Hermes::Solvers::LinearMatrixSolver< Scalar > * linear_matrix_solver
Linear solver.
virtual void set_verbose_output(bool to_set)
int problem_size
Number of equations.
virtual Scalar * get_sln_vector()
Return the solution vector.
bool constant_jacobian
Jacobian can be reused if possible.
virtual void set_UMFPACK_output(bool to_set=true, bool with_output=false)