Pardiso solver wrapper class. More...
#include <solver_pardiso.h>
Inherits Solver.
Classes | |
| struct | Data |
Public Member Functions | |
| PardisoSolver () | |
| void | set_iparm (int idx, double val) |
| void | set_msglvl (int lvl) |
Protected Member Functions | |
| virtual bool | is_row_oriented () |
| Must return true if the solvers expects compressed row (CSR) format. Otherwise LinSystem assumes the compressed column (CSC) format. | |
| virtual bool | handles_symmetry () |
| Must return true if the solver is capable of solving structurally symmetric matrices, ie., when only the upper half of the matrix is stored in the CSR or CSC arrays. | |
| virtual void * | new_context (bool sym) |
| Creates a new data block containing (optional) factorization data. This method is called by LinSystem on its creation. | |
| virtual void | free_context (void *ctx) |
| Frees the data block created by new_context(). Called by LinSystem on destruction. | |
| virtual bool | analyze (void *ctx, int n, int *Ap, int *Ai, scalar *Ax, bool sym) |
| After the sparse structure of the matrix is calculated, LinSystem calls this function to give the solver a chance to analyze the matrix and store the results for reuse in the execution context. If the solver does not support the reuse of structural analysis, this method does not have to be implemented. | |
| virtual bool | factorize (void *ctx, int n, int *Ap, int *Ai, scalar *Ax, bool sym) |
| Called by LinSystem after the stiffness matrix has been assembled. Direct solvers should implement this function and store the result of the factorization in the execution context, so that it can be used many times by solve() for different right hand sides. | |
| virtual bool | solve (void *ctx, int n, int *Ap, int *Ai, scalar *Ax, bool sym, scalar *RHS, scalar *vec) |
| Called by LinSystem when the user requests the solution of the linear system. Direct solvers will want to use the matrix factorization stored in "ctx". Iterative solvers will probably solve the system from scratch in this call, but can expect "vec" to contain the initial guess for the solution vector. | |
| virtual void | free_data (void *ctx) |
| Must free all auxiliary data created in the calls to analyze() and/or factorize(). | |
| virtual void | print_status (int error) |
Protected Attributes | |
| int | msglvl |
| int | default_iparm [64] |
Pardiso solver wrapper class.
| PardisoSolver::PardisoSolver | ( | ) | [inline] |
| virtual bool PardisoSolver::analyze | ( | void * | ctx, | |
| int | n, | |||
| int * | Ap, | |||
| int * | Ai, | |||
| scalar * | Ax, | |||
| bool | sym | |||
| ) | [inline, protected, virtual] |
After the sparse structure of the matrix is calculated, LinSystem calls this function to give the solver a chance to analyze the matrix and store the results for reuse in the execution context. If the solver does not support the reuse of structural analysis, this method does not have to be implemented.
Reimplemented from Solver.
| virtual bool PardisoSolver::factorize | ( | void * | ctx, | |
| int | n, | |||
| int * | Ap, | |||
| int * | Ai, | |||
| scalar * | Ax, | |||
| bool | sym | |||
| ) | [inline, protected, virtual] |
Called by LinSystem after the stiffness matrix has been assembled. Direct solvers should implement this function and store the result of the factorization in the execution context, so that it can be used many times by solve() for different right hand sides.
Reimplemented from Solver.
| virtual void PardisoSolver::free_context | ( | void * | ctx | ) | [inline, protected, virtual] |
Frees the data block created by new_context(). Called by LinSystem on destruction.
Reimplemented from Solver.
| virtual void PardisoSolver::free_data | ( | void * | ctx | ) | [inline, protected, virtual] |
Must free all auxiliary data created in the calls to analyze() and/or factorize().
Reimplemented from Solver.
| virtual bool PardisoSolver::handles_symmetry | ( | ) | [inline, protected, virtual] |
Must return true if the solver is capable of solving structurally symmetric matrices, ie., when only the upper half of the matrix is stored in the CSR or CSC arrays.
Implements Solver.
| virtual bool PardisoSolver::is_row_oriented | ( | ) | [inline, protected, virtual] |
| virtual void* PardisoSolver::new_context | ( | bool | sym | ) | [inline, protected, virtual] |
| virtual void PardisoSolver::print_status | ( | int | error | ) | [inline, protected, virtual] |
| void PardisoSolver::set_iparm | ( | int | idx, | |
| double | val | |||
| ) | [inline] |
| void PardisoSolver::set_msglvl | ( | int | lvl | ) | [inline] |
| virtual bool PardisoSolver::solve | ( | void * | ctx, | |
| int | n, | |||
| int * | Ap, | |||
| int * | Ai, | |||
| scalar * | Ax, | |||
| bool | sym, | |||
| scalar * | RHS, | |||
| scalar * | vec | |||
| ) | [inline, protected, virtual] |
Called by LinSystem when the user requests the solution of the linear system. Direct solvers will want to use the matrix factorization stored in "ctx". Iterative solvers will probably solve the system from scratch in this call, but can expect "vec" to contain the initial guess for the solution vector.
| ctx | execution context | |
| n | [in] number of rows and columns of the matrix | |
| Ap,Ai,Ax | [in] the matrix in CSR or CSC format | |
| sym | [in] true if the matrix is symmetric and only the upper half is stored. | |
| RHS | [in] right hand side vector | |
| vec | [in/out] solution vector |
Implements Solver.
int PardisoSolver::default_iparm[64] [protected] |
int PardisoSolver::msglvl [protected] |
1.6.3