54 int *options,
double *params,
56 AZ_MATRIX *Amat, AZ_PRECOND **Prec)
60 int nr,
nc, *data_org;
61 double rthresh, athresh;
68 if (options[AZ_precond] == AZ_none)
69 ifp_preconditioner(&precon, bmat, IFP_NONE,
70 (
double) options[AZ_graph_fill], 0.0,
71 IFP_INVERSE, 0.0, 0.0);
73 else if (options[AZ_precond] == AZ_Jacobi)
75 rthresh = params[AZ_rthresh];
76 athresh = params[AZ_athresh];
77 ifp_preconditioner(&precon, bmat, IFP_BJACOBI, 0.0, 0.0,
78 IFP_SVD, rthresh, athresh);
82 else if (options[AZ_precond] == AZ_dom_decomp &&
83 options[AZ_subdomain_solve] == AZ_bilu_ifp)
85 rthresh = params[AZ_rthresh];
86 athresh = params[AZ_athresh];
87 ifp_preconditioner(&precon, bmat,
88 IFP_BILUK, (
double) options[AZ_graph_fill], 0.0,
89 IFP_SVD, rthresh, athresh);
95 printf(
"Not a supported preconditioner in az_ifpack_prec_create\n");
109 data_org = Amat->data_org;
110 nr = data_org[AZ_N_internal] + data_org[AZ_N_border];
114 Prec_pass_data->
nr =
nr;
115 Prec_pass_data->
nc =
nc;
116 (*Prec)->Pmat = Amat;
118 (*Prec)->Pmat->aux_ptr = (
void *) Prec_pass_data;
121 options[AZ_precond] = AZ_user_precond;
void az2ifp_blockmatrix(void **bmat, AZ_MATRIX *Amat)
void AZ_ifpack_prec_create(double *x, double *b, int *options, double *params, int *proc_config, AZ_MATRIX *Amat, AZ_PRECOND **Prec)
void AZ_ifpack_precon(double x[], int *, int *, double *, AZ_MATRIX *Amat, AZ_PRECOND *prec)