39 static int dropdiag_di (
int i,
int j,
double aij,
void *other) {
return (i != j) ;}
61 int i,j,k, n, nnz, *csp, *csi;
80 for (j=B->
ia[i]; j<B->ia[i+1]; j++) {
99 Bsym = make_sym_di(&Bcs);
122 Malloc(Bsol_data->
w, n,
double);
124 *data = (
void *) Bsol_data;
139 int n = Bsol_data->
n;
140 double *w = Bsol_data->
w;
155 int n = Bsol_data->
n;
156 double *w = Bsol_data->
w;
158 memcpy(w, b, n*
sizeof(
double));
169 double *w = Bsol_data->
w;
191 complex
double *zk,
void **data) {
193 int i, j, nrow, ncol, nnzB, nnzC, *map;
228 matadd(1.0, 0.0, A, B, &C, NULL, map);
236 for (i=0; i<nnzC; i++) {
237 Cz[i] = Cx[i] + 0.0 * I;
251 for (i=0; i<num; i++) {
253 double zkr = creal(zk[i]);
254 double zkc = cimag(zk[i]);
257 for (j=0; j<nnzB; j++) {
261 double r = creal(Cz[p]) - (zkr - zkr1) * v;
262 Cz[p] = r - zkc * v * I;
325 double *xz,
void *data) {
335 for (i=0; i<n; i++) {
336 b[i] = br[i] + bi[i] * I;
343 for (i=0; i<n; i++) {
354 for (i=0; i<num; i++) {
int cs_ci_lsolve(const cs_ci *L, cs_complex_t *x)
void ASIGMABSolDirect(int n, double *br, double *bi, double *xr, double *xz, void *data)
complex linear solver routine passed to evsl
int SetupASIGMABSolDirect(csrMat *A, csrMat *BB, int num, complex double *zk, void **data)
setup CXsparse solver for A - SIGMA B
cs_di * cs_di_add(const cs_di *A, const cs_di *B, double alpha, double beta)
int SetupBSolDirect(csrMat *B, void **data)
Setup the B-sol by computing the Cholesky factorization of B.
void FreeASIGMABSolDirect(int num, void **data)
free the data needed by CXSparse
cs_di * cs_di_transpose(const cs_di *A, int values)
int cs_di_pvec(const int *p, const double *b, double *x, int n)
int cs_di_fkeep(cs_di *A, int(*fkeep)(int, int, double, void *), void *other)
void FreeBSolDirectData(void *data)
Free solver data.
void free_csr(csrMat *csr)
memory deallocation for csr matrix
This file contains function prototypes and constant definitions internally used in EVSL...
cs_cin * cs_ci_lu(const cs_ci *A, const cs_cis *S, double tol)
int cs_ci_ipvec(const int *p, const cs_complex_t *b, cs_complex_t *x, int n)
int speye(int n, csrMat *A)
return an identity matrix of dimension n
#define Malloc(base, nmem, type)
int cs_ci_usolve(const cs_ci *U, cs_complex_t *x)
cs_din * cs_di_nfree(cs_din *N)
evslStat evslstat
global statistics of EVSL
struct _ASBSolDataDirect ASBSolDataDirect
sparse matrix format: the compressed sparse row (CSR) format, 0-based
int cs_di_ipvec(const int *p, const double *b, double *x, int n)
void LTSolDirect(double *b, double *x, void *data)
Solver function of L^{T} x = L^{-T}*b.
int matadd(double alp, double bet, csrMat *A, csrMat *B, csrMat *C, int *mapA, int *mapB)
matrix addition C = alp * A + bet * B
cs_dis * cs_di_schol(int order, const cs_di *A)
cs_din * cs_di_chol(const cs_di *A, const cs_dis *S)
int cs_di_ltsolve(const cs_di *L, double *x)
struct _BSolDataDirect BSolDataDirect
cs_cis * cs_ci_sfree(cs_cis *S)
void BSolDirect(double *b, double *x, void *data)
Solver function of B.
Definitions used for direct solver interface.
cs_cin * cs_ci_nfree(cs_cin *N)
cs_di * cs_di_spfree(cs_di *A)
double evsl_timer()
evsl timer for mac
int cs_di_lsolve(const cs_di *L, double *x)
cs_dis * cs_di_sfree(cs_dis *S)
cs_cis * cs_ci_sqr(int order, const cs_ci *A, int qr)