public abstract class DirectSolverTestBase extends UnitTest
DirectSolver implementations. It provides the
tests which are common to all such solvers; subclasses supply the solver
itself, through createSolver(), along with any solver specific tests.
Tests which depend on optional functionality are guarded by the
corresponding capability queries (DirectSolver.hasMultipleRhsSolves()
and DirectSolver.hasIterativeSolves()), while the few expectations
which legitimately differ between solvers are supplied by overridable
methods such as expectedNumNegEigenvaluesSPD().
| Constructor and Description |
|---|
DirectSolverTestBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
test() |
void |
testBasics()
Runs all the solver independent tests.
|
void |
testCRSInterface()
Tests the analyze/factor/solve sequence using the CRS interface, which
is the one used by KKTSolver and MurtyMechSolver.
|
void |
testInertia()
Tests the inertia reported for a symmetric indefinite matrix.
|
void |
testIterativeSettings()
Tests the iterative solve settings, if the solver supports iterative
solves.
|
void |
testLargeMatrix()
Tests the solver on a larger matrix, read from testMatrix.mat.
|
void |
testSingularMatrix()
Tests that a singular matrix is detected and reported through the
perturbed pivot count, rather than causing the factorization to fail.
|
void |
testSPD()
Tests an SPD matrix, for which solvers normally use a Cholesky
factorization.
|
void |
testStateAndReuse()
Tests state handling and reuse of the solver after a call to dispose().
|
void |
testSymmetric()
Tests the analyze/factor/solve sequence for a symmetric indefinite
matrix supplied as a Matrix object.
|
void |
testUnsymmetric()
Tests an unsymmetric matrix:
M = [1 2 3
0 4 0
5 0 6]
|
check, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkEquals, checkNormedEquals, checkNormedEquals, getSilent, printUsageAndExit, runtest, setSilentpublic void testSymmetric()
public void testInertia()
public void testCRSInterface()
public void testUnsymmetric()
public void testSPD()
public void testSingularMatrix()
public void testStateAndReuse()
public void testLargeMatrix()
throws java.io.IOException
java.io.IOExceptionpublic void testIterativeSettings()
public void testBasics()
throws java.io.IOException
test() method, along with any solver specific
tests.java.io.IOException