KmlIssPcStructilu0Apply
Compute
for back substitution of ILU0 precondition.
Interface Definition
C interface:
int KmlIssPcStructilu0Apply(KmlIssPsStructilu0Handle gSmoother, float *bb, float *xx);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
gSmoother |
KmlIssPsStructilu0Handle |
Solver handle. handle cannot be a null pointer. |
Input/Output |
bb |
float * |
Input vector r. |
Input |
xx |
float * |
Output vector r'. |
Input/Output |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
The execution is successful. |
KMLSS_NULL_ARGUMENT |
int |
A null pointer exists in the input. |
Dependencies
#include "kml_struct_ilu.h"
Examples
C interface:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | int xl = 5; int yl = 5; int zl = 5; int xr = 6; int yr = 6; int zr = 6; int ybegin = 5; int yend = 6; int zbegin = 5; int zend = 6; float *v = (float*)malloc(sizeof(float) * 171); float *b = (float*)malloc(sizeof(float) * 9); float *x = (float*)malloc(sizeof(float) * 9); for (int i=0; i<171; i++) { v[i] = rand(); } for (int i=0; i<9; i++) { b[i] = rand(); x[i] = rand(); } KmlIssPsStructilu0Handle gSmoother; KmlIssPcStructilu0Setup(&gSmoother, v, &xl, &xr, &yl, &yr, &zl, &zr); KmlIssPcStructilu0Apply(gSmoother, b, x); |
Parent topic: PRECOND