|
HermesCommon
3.0
|
Abstract class for defining solver interface. More...
#include <linear_matrix_solver.h>
Inheritance diagram for Hermes::Solvers::LinearMatrixSolver< Scalar >:Public Member Functions | |
| LinearMatrixSolver (SparseMatrix< Scalar > *matrix, Hermes::Algebra::Vector< Scalar > *rhs) | |
| DirectSolver< Scalar > * | as_DirectSolver () const |
| LoopSolver< Scalar > * | as_LoopSolver () const |
| IterSolver< Scalar > * | as_IterSolver () const |
| AMGSolver< Scalar > * | as_AMGSolver () const |
| virtual void | free ()=0 |
| virtual void | solve ()=0 |
| virtual void | solve (Scalar *initial_guess)=0 |
| Scalar * | get_sln_vector () |
| double | get_time () |
| virtual int | get_matrix_size ()=0 |
| Get size of matrix. | |
| virtual MatrixStructureReuseScheme | get_used_reuse_scheme () const |
| Get factorization scheme. | |
| virtual void | set_reuse_scheme (MatrixStructureReuseScheme reuse_scheme) |
| virtual void | set_reuse_scheme () |
| Set factorization scheme to default. | |
| virtual void | use_node_wise_ordering (unsigned int num_pdes) |
| Set matrix ordering in the case of a system of PDEs. | |
| virtual void | use_equations_wise_ordering () |
| virtual double | get_residual_norm () |
| Dummy methods that are implemented in the appropriate classes. | |
| SparseMatrix< Scalar > * | get_matrix () |
| Vector< Scalar > * | get_rhs () |
Public Member Functions inherited from Hermes::Mixins::Loggable | |
| Loggable (bool verbose_output=false, callbackFn verbose_callback=NULL, bool add_newline=true) | |
| void | set_file_output_only (bool onOff) |
| void | set_timestamps (bool onOff) |
| Sets the addition of a time stamp on each line in the log file. By default it is on. | |
| void | set_erase_on_beginning (bool onOff) |
| Sets the logFile being always erased before logging. | |
| void | set_logFile_name (const char *filename) |
| void | set_logFile_name (std::string filename) |
| void | info (const char *msg,...) const |
| void | info_if (bool cond, const char *msg,...) const |
| void | warn (const char *msg,...) const |
| void | warn_if (bool cond, const char *msg,...) const |
| void | error (const char *msg,...) const |
| void | error_if (bool cond, const char *msg,...) const |
| virtual void | set_verbose_output (bool to_set) |
| bool | get_verbose_output () const |
| Returns the current value of verbose_output;. | |
| virtual void | set_verbose_callback (callbackFn callback) |
| callbackFn | get_verbose_callback () const |
| Returns the current value of verbose_callback;. | |
Public Member Functions inherited from Hermes::Mixins::TimeMeasurable | |
| TimeMeasurable (const char *name=nullptr) | |
| Constructs internal structures and starts measuring. | |
| const TimeMeasurable & | reset () |
| Resets accumulated time. | |
| const TimeMeasurable & | tick_reset () |
| Starts a new_ period and resets accumulated time. | |
| const TimeMeasurable & | tick (TimeMeasurable::TimerPeriodTickType type=HERMES_ACCUMULATE) |
| Starts/ends a new_ period. | |
| const std::string & | name () const |
| Returns a name of the time period if any. | |
| double | accumulated () const |
| Returns accumulated time (in seconds). | |
| std::string | accumulated_str () const |
| Returns accumulated time in human readable form. | |
| double | last () const |
| Returns last measured period (in seconds). More... | |
| std::string | last_str () const |
| Returns last measured period in human readable form. | |
Protected Attributes | |
| MatrixStructureReuseScheme | reuse_scheme |
| Factorization scheme. | |
| SparseMatrix< Scalar > * | general_matrix |
| Vector< Scalar > * | general_rhs |
| Scalar * | sln |
| Solution vector. More... | |
| double | time |
| unsigned int | n_eq |
| Number of equations in a system of PDEs. | |
| bool | node_wise_ordering |
Additional Inherited Members | |
Public Types inherited from Hermes::Mixins::TimeMeasurable | |
| enum | TimerPeriodTickType { HERMES_ACCUMULATE, HERMES_SKIP } |
| Tick type. Used by the class Hermes::TimePeriod. More... | |
Static Public Member Functions inherited from Hermes::Mixins::Loggable | |
| static void | set_static_logFile_name (const char *filename) |
| static void | set_static_logFile_name (std::string filename) |
Public Attributes inherited from Hermes::Mixins::Loggable | |
| char * | logFileName |
| Logfile name. | |
Static Public Attributes inherited from Hermes::Mixins::Loggable | |
| static char * | staticLogFileName = nullptr |
Protected Member Functions inherited from Hermes::Mixins::Loggable | |
| void | hermes_fwrite (const void *ptr, size_t size, size_t nitems, FILE *stream) const |
| void | hermes_fread (void *ptr, size_t size, size_t nitems, FILE *stream) const |
Abstract class for defining solver interface.
Typical usage is through the function create_linear_solver(Matrix<Scalar>* matrix, Vector<Scalar>* rhs, bool use_direct_solver).
Definition at line 100 of file linear_matrix_solver.h.
| Scalar * Hermes::Solvers::LinearMatrixSolver< Scalar >::get_sln_vector | ( | ) |
Get solution vector.
Definition at line 56 of file linear_matrix_solver.cpp.
| double Hermes::Solvers::LinearMatrixSolver< Scalar >::get_time | ( | ) |
Get time spent on solving.
Definition at line 74 of file linear_matrix_solver.cpp.
|
virtual |
Set factorization scheme.
| [in] | reuse_scheme | factoriztion scheme to set |
Reimplemented in Hermes::Solvers::AztecOOSolver< Scalar >.
Definition at line 92 of file linear_matrix_solver.cpp.
|
pure virtual |
Solve.
Implemented in Hermes::Solvers::AztecOOSolver< Scalar >, Hermes::Solvers::DirectSolver< Scalar >, Hermes::Solvers::AztecOOSolver< Scalar >, Hermes::Solvers::UMFPackLinearMatrixSolver< Scalar >, Hermes::Solvers::SimpleExternalSolver< Scalar >, Hermes::Solvers::UMFPackLinearMatrixSolver< Scalar >, Hermes::Solvers::ExternalSolver< Scalar >, Hermes::Solvers::AbstractParalutionLinearMatrixSolver< Scalar >, Hermes::Solvers::MumpsSolver< Scalar >, Hermes::Solvers::AmesosSolver< Scalar >, Hermes::Solvers::AmesosSolver< Scalar >, Hermes::Solvers::AztecOOSolver< Scalar >, Hermes::Solvers::UMFPackLinearMatrixSolver< Scalar >, and Hermes::Solvers::AmesosSolver< Scalar >.
|
pure virtual |
Solve.
| [in] | initial | guess. |
Implemented in Hermes::Solvers::DirectSolver< Scalar >, Hermes::Solvers::SimpleExternalSolver< Scalar >, Hermes::Solvers::ExternalSolver< Scalar >, Hermes::Solvers::AbstractParalutionLinearMatrixSolver< Scalar >, and Hermes::Solvers::AztecOOSolver< Scalar >.
|
protected |
Solution vector.
Time spent on solving (in secs).
Definition at line 159 of file linear_matrix_solver.h.