17#include "fasp_functs.h"
20#include "StrumpackSparseSolver.h"
47 INT* row_ptr = ptrA->
IA;
48 INT* col_ind = ptrA->
JA;
49 double* val = ptrA->
val;
58 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
59 printf(
"### DEBUG: nr=%d, nc=%d, nnz=%d\n", m, n, nnz);
62 REAL start_time, end_time;
66 STRUMPACK_SparseSolver S;
67 STRUMPACK_init_mt(&S, STRUMPACK_DOUBLE, STRUMPACK_MT, 0, NULL, verbose);
68 STRUMPACK_set_Krylov_solver(S, STRUMPACK_DIRECT);
69 STRUMPACK_set_matching(S, STRUMPACK_MATCHING_NONE);
70 STRUMPACK_set_reordering_method(S, STRUMPACK_METIS);
71 STRUMPACK_set_compression(S, STRUMPACK_NONE);
72 STRUMPACK_set_csr_matrix(S, &n, row_ptr, col_ind, val, 0);
75 status = STRUMPACK_reorder(S);
77 status = STRUMPACK_solve(S, b->
val, u->
val, 0);
85 STRUMPACK_destroy(&S);
88 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
95 printf(
"### ERROR: STRUMPACK is not available!\n");
void fasp_cputime(const char *message, const REAL cputime)
Print CPU walltime.
void fasp_gettime(REAL *time)
Get system time.
INT fasp_solver_strumpack(dCSRmat *ptrA, dvector *b, dvector *u, const SHORT prtlvl)
Solve Au=b by UMFpack.
Main header file for the FASP project.
#define SHORT
FASP integer and floating point numbers.
#define FASP_SUCCESS
Definition of return status and error messages.
#define ERROR_SOLVER_EXIT
Sparse matrix of REAL type in CSR format.
INT col
column of matrix A, n
REAL * val
nonzero entries of A
INT row
row number of matrix A, m
INT * IA
integer array of row pointers, the size is m+1
INT nnz
number of nonzero entries
INT * JA
integer array of column indexes, the size is nnz
Vector with n entries of REAL type.
REAL * val
actual vector entries