![]() |
libgenua
Basic Geometry, Numerical Algorithms and Interfaces
|
Solve in another precision.
This wrapper solves a linear problem in another precision than the one presented by the interface. Quite often, it is sufficient to solve a linear problem in single precision even though other parts of the same program may require double-precision computations. Many solvers are quite exactly twice as fast in single precision, in which case this class can be used to convert between the two. The overhead of this wrapper is an extra copy of the matrix and right-hand side.
#include <convertingsolver.h>
Public Member Functions | |
ConvertingSolver (InnerSolverPtr psolver) | |
construct with actual solver | |
virtual void | configure (const ConfigParser &cfg) |
load configuration settings | |
virtual bool | factor (const CsrMatrix< InterfaceFloat, 1 > *pa) |
full factorization (minimum interface) | |
virtual bool | refactor (const CsrMatrix< InterfaceFloat, 1 > *pa) |
numerical factorization only (if supported) | |
virtual bool | solve (const DMatrix< InterfaceFloat > &b, DMatrix< InterfaceFloat > &x) |
solve with multiple rhs | |
virtual bool | solve (const DVector< InterfaceFloat > &b, DVector< InterfaceFloat > &x) |
solve single RHS (by default implemented in terms of the above) | |
virtual bool | solve (const CsrMatrix< InterfaceFloat, 1 > *pa, const DMatrix< InterfaceFloat > &b, DMatrix< InterfaceFloat > &x) |
single-shot solve (may be more efficient for some solvers) | |
virtual bool | solve (const CsrMatrix< InterfaceFloat, 1 > *pa, const DVector< InterfaceFloat > &b, DVector< InterfaceFloat > &x) |
single-shot solve (may be more efficient for some solvers) | |
virtual bool | resolve (const CsrMatrix< InterfaceFloat, 1 > *pa, const DMatrix< InterfaceFloat > &b, DMatrix< InterfaceFloat > &x) |
solution with new values in A, but the same non-zero pattern | |
virtual bool | resolve (const CsrMatrix< InterfaceFloat, 1 > *pa, const DVector< InterfaceFloat > &b, DVector< InterfaceFloat > &x) |
solution with new values in A, but the same non-zero pattern | |
float | factorTime () const |
access timing data (if supported by implementation) | |
float | solveTime () const |
access timing data (if supported by implementation) | |
float | maxMemory () const |
memory, in Megabyte, as reported by solver (if possible) | |
virtual void | release () |
release internal storage | |
virtual double | condest () |
condition number estimate | |
![]() | |
AbstractLinearSolverTpl () | |
default construction for undefined matrix type | |
AbstractLinearSolverTpl (uint typeflag) | |
construction for defined matrix type | |
virtual | ~AbstractLinearSolverTpl () |
virtual destructor | |
uint | matrixType () const |
the matrix type for which this solver has been instantiated | |
const std::string & | name () const |
solver name (libary/implementation) | |
void | transposed (bool flag) |
request to solve the transposed problem (not always supported) | |
size_t | factorizations () const |
number of (re-) factorizations | |
size_t | solves () const |
number of (re-) factorizations | |
void | verbose (bool flag) |
enable diagnostid printing | |
Private Member Functions | |
void | gobbleup (const CsrMatrix< InterfaceFloat > &a) |
copy matrix to internal format | |
Private Attributes | |
CsrMatrix< SolverFloat > | m_acopy |
converted matrix | |
InnerSolverPtr | m_isolver |
actual solver | |
Additional Inherited Members | |
![]() | |
static SolverPtr | create (uint) |
Create a new instance of any solver which is supported by the library. More... | |
![]() | |
bool | isSymmetric () |
matrix property tests | |
bool | isReal () |
matrix property tests | |
bool | isComplex () |
matrix property tests | |
![]() | |
uint | m_mtxflags |
matrix type flag | |
std::string | m_implName |
implementation/solver/library name for logging | |
float | m_factorTime |
timing data; only useful if child classes set these values | |
size_t | m_factorCount |
call statistics; only useful if child classes set these values | |
bool | m_solveTransposed |
whether to solve the transposed problem A^T x = b | |
int | m_verbose |
print diagnostic info? | |