public class UmfpackSolver extends java.lang.Object implements DirectSolver
Modifier and Type | Field and Description |
---|---|
static int |
UMFPACK_ERROR_argument_missing |
static int |
UMFPACK_ERROR_different_pattern |
static int |
UMFPACK_ERROR_file_IO |
static int |
UMFPACK_ERROR_internal_error |
static int |
UMFPACK_ERROR_invalid_matrix |
static int |
UMFPACK_ERROR_invalid_Numeric_object |
static int |
UMFPACK_ERROR_invalid_permutation |
static int |
UMFPACK_ERROR_invalid_Symbolic_object |
static int |
UMFPACK_ERROR_invalid_system |
static int |
UMFPACK_ERROR_n_nonpositive |
static int |
UMFPACK_ERROR_out_of_memory |
static int |
UMFPACK_OK |
static int |
UMFPACK_WARNING_determinant_overflow |
static int |
UMFPACK_WARNING_determinant_underflow |
static int |
UMFPACK_WARNING_singular_matrix |
Constructor and Description |
---|
UmfpackSolver() |
Modifier and Type | Method and Description |
---|---|
int |
analyze(int[] colOffs,
int[] rowIdxs,
int size,
int numVals) |
void |
analyze(Matrix M,
int size,
int type)
Performs prefactor analysis on a specified matrix.
|
void |
analyzeAndFactor(Matrix M)
Factors a matrix.
|
void |
autoFactorAndSolve(VectorNd x,
VectorNd b,
int tolExp)
Factors a previously analyzed matrix M and then solves the system
|
void |
dispose()
Releases all internal resources allocated by this solver.
|
void |
factor()
Factors a previously analyzed matrix.
|
int |
factor(double[] vals) |
void |
finalize() |
static java.lang.String |
getInitErrorMessage() |
boolean |
hasAutoIterativeSolving()
Returns true if this solver supports automatic iterative solving using a
recent directly-factored matrix as a preconditioner.
|
static boolean |
isAvailable() |
static void |
main(java.lang.String[] args) |
void |
solve(double[] x,
double[] b) |
void |
solve(VectorNd x,
VectorNd b)
Solves the system
|
public static int UMFPACK_OK
public static int UMFPACK_WARNING_singular_matrix
public static int UMFPACK_WARNING_determinant_underflow
public static int UMFPACK_WARNING_determinant_overflow
public static int UMFPACK_ERROR_out_of_memory
public static int UMFPACK_ERROR_invalid_Numeric_object
public static int UMFPACK_ERROR_invalid_Symbolic_object
public static int UMFPACK_ERROR_argument_missing
public static int UMFPACK_ERROR_n_nonpositive
public static int UMFPACK_ERROR_invalid_matrix
public static int UMFPACK_ERROR_different_pattern
public static int UMFPACK_ERROR_invalid_system
public static int UMFPACK_ERROR_invalid_permutation
public static int UMFPACK_ERROR_internal_error
public static int UMFPACK_ERROR_file_IO
public static boolean isAvailable()
public static java.lang.String getInitErrorMessage()
public void finalize()
finalize
in class java.lang.Object
public void analyze(Matrix M, int size, int type)
DirectSolver
factor()
. If
size
is less than the actual matrix size, then the analysis
is done on the principal submatrix of M defined by the first
size
rows and columns.analyze
in interface DirectSolver
M
- matrix to analyzesize
- size of the matrix to factor.type
- or-ed flags giving information about the matrix type. Typical flags are
SYMMETRIC
or
POSITIVE_DEFINITE
public int analyze(int[] colOffs, int[] rowIdxs, int size, int numVals)
public int factor(double[] vals)
public void factor()
DirectSolver
factor
in interface DirectSolver
public void analyzeAndFactor(Matrix M)
DirectSolver
analyze (M, M.rowSize(), 0) factor()
analyzeAndFactor
in interface DirectSolver
M
- matrix to factorpublic void solve(VectorNd x, VectorNd b)
DirectSolver
solve
in interface DirectSolver
x
- vector in which result is returnedb
- right hand vector of matrix equationpublic void autoFactorAndSolve(VectorNd x, VectorNd b, int tolExp)
DirectSolver
M x = bThis is equivalent to
factor() solve (x, b)but is included because it may be faster depending on the underlying implementation. If auto-iterative solving is available (as determined by
hasAutoIterativeSolving
), this method also
allows the solver to automatically employ iterative solving using a recent
direct factorization as a preconditioner. To enable auto-iterative
solving, the argument tolExp should be set to a positive value giving the
(negative) exponent of the desired relative residual.autoFactorAndSolve
in interface DirectSolver
x
- vector in which result is returnedb
- right hand vector of matrix equationtolExp
- if positive, enables auto-iterative solving with the specified value
giving the (negative) exponent of the desired relative residual.public boolean hasAutoIterativeSolving()
autoFactorAndSolve
method.hasAutoIterativeSolving
in interface DirectSolver
public void solve(double[] x, double[] b)
public static void main(java.lang.String[] args)
public void dispose()
DirectSolver
dispose
in interface DirectSolver