37 #include <tests/myratest.h> 43 ADD_TEST(
"zcholesky2_inverse",
"[multifrontal][parallel]")
56 Options options = Options::create().set_blocksize(4).set_globsize(4).set_nthreads(1);
66 for (
int j = 0; j < N; ++j)
68 std::vector<int> Pj = P.
pattern(j);
69 for (
auto i = Pj.begin(); i != Pj.end(); ++i)
70 error1 = std::max(error1, scalar_norm1(invA(*i,j)-solver.inverse(*i,j)) );
73 myra::out() <<
"|solver.inverse(i,j)| = " << error1 <<
", " << t <<
" sec" << std::endl;
74 REQUIRE(error1 < 1.0e-12);
79 Matrix<NumberZ> invA_block = solver.inverse(ilinspace(5,25), ilinspace(27,47));
81 double error3 = frobenius(invA_block - invA.
window(5,25,27,47));
82 myra::out() <<
"|solver.inverse(i_indices,j_indices)| = " << error3 <<
", " << t <<
" sec" << std::endl;
83 REQUIRE(error3 < 1.0e-12);
91 myra::out() <<
"|solver.inverse(ij_indices)| = " << error4 <<
", " << t <<
" sec" << std::endl;
92 REQUIRE(error4 < 1.0e-12);
Interface class for representing subranges of dense Matrix's.
Options pack for routines in /multifrontal.
Definition: Options.h:24
Represents a Permutation matrix, used to reorder rows/columns/etc of various numeric containers...
Definition: Permutation.h:34
Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAP...
Definition: bdsqr.h:20
Matrix< Number > make_Matrix(char op='N') const
Accumulates *this onto the lower triangle of a Matrix<Number>
Definition: LowerMatrix.cpp:152
Routines for computing Frobenius norms of various algebraic containers.
Sparse direct solver suitable for hermitian positive definite systems.
Simplistic timing class, might dispatch to platform specific timers depending upon environment...
std::vector< int > pattern(int j) const
Returns the (sorted) nonzero pattern of A(:,j)
Definition: Pattern.cpp:157
General purpose compressed-sparse-column (CSC) container.
Range construct for a lower triangular matrix stored in rectangular packed format.
CMatrixRange< Number > window(int i0, int i1, int j0, int j1) const
Returns a MatrixRange over this(i0:i1,j0:j1)
Definition: Matrix.cpp:142
Measures elapsed time.
Definition: Timer.h:19
Specialized container for a lower triangular matrix, O(N^2/2) storage. Used by symmetry exploiting ma...
Various utility functions/classes related to scalar Number types.
Returns a vector of int's, over [min,max)
General purpose dense matrix container, O(i*j) storage.
Range/Iterator types associated with Pattern.
Holds the nonzero pattern of a sparse matrix.
Definition: Pattern.h:55
Container class for a sparse nonzero pattern, used in reordering/symbolic analysis.
Overwrites a LowerMatrix, DiagonalMatrix, or square Matrix with its own inverse. Or, returns it as a copy.
Aggregates a (perm, iperm, swaps) triple into a vocabulary type.
Sparse direct solver suitable for hermitian positive definite systems.
Definition: SparseZCholeskySolver.h:61
Stores a lower triangular matrix in rectangular packed format.
Definition: conjugate.h:22
Stores an IxJ matrix A in compressed sparse column format.
Definition: bothcat.h:23
Helper routines for reordering/filling 2D structured grids. Used by many unit tests.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
Applies random phase shifts to a complex square SparseMatrix.
double elapsed_time() const
Returns elapsed time in seconds since last call to reset()
Definition: Timer.cpp:18
Range/Iterator types associated with SparseMatrix.
Matrix< Number > make_Matrix() const
Accumulates *this onto a Matrix<Number>.
Definition: SparseMatrix.cpp:581
Interface class for representing subranges of contiguous int's.
|solver.inverse(i,j)| = 3.88594e-16, 0.098005 sec
|solver.inverse(i_indices,j_indices)| = 1.58692e-16, 0.041003 sec
|solver.inverse(ij_indices)| = 5.03753e-16, 0.025001 sec