KmlIssGcrAxpyX
Calculate
in the GCR algorithm.
Interface Definition
C interface:
int KmlIssGcrAxpyX(float *x, const float *p, const double *ac, const int *xl, const int *xr, const int *yl, const int *yr, const int *zl, const int *ylT, const int *yrT, const int *zlT, const int *ybegin, const int *yend, const int *zbegin, const int *zend);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
float * |
Intermediate variable x of the GCR algorithm. It is stored in the (z, x, y) direction. |
Input/Output |
p |
float * |
Intermediate variable p of the GCR algorithm. It is stored in the (z, x, y) direction. |
Input |
ax |
const double * |
Intermediate variable alpha of the GCR algorithm |
Input |
xl |
const int * |
Start position in the x direction of the solving space |
Input |
xr |
const int * |
End position in the x direction of the solving space |
Input |
yl |
const int * |
Start position in the y direction of the solving space |
Input |
yr |
const int * |
End position in the y direction of the solving space |
Input |
zl |
const int * |
Start position in the z direction of the solving space |
Input |
ylT |
const int * |
Start position in the yT direction of the solving space |
Input |
yrT |
const int * |
End position in the yT direction of the solving space |
Input |
zlT |
const int * |
Start position in the zT direction of the solving space |
Input |
ybegin |
const int * |
Start position in the y direction of the auxiliary solving space |
Input |
yend |
const int * |
End position in the y direction of the auxiliary solving space |
Input |
zbegin |
const int * |
Start position in the z direction of the auxiliary solving space |
Input |
zend |
const int * |
End position in the z direction of the auxiliary solving space |
Input |
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. |
KMLSS_BAD_DATA |
int |
The parameters related to the solving space are invalid. |
Dependencies
#include "kml_gcr_specific.h"
Examples
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;
int ylm = 4;
int yrm = 7;
int zlm = 4;
float *x = (float*)malloc(sizeof(float) * 9);
float *p = (float*)malloc(sizeof(float) * 36);
double ac = rand();
for (int i=0; i<9; i++) {
x[i] = rand();
}
for (int i=0; i<36; i++) {
p[i] = rand();
}
KmlIssGcrAxpyX(x, p, &ac, &xl, &xr, &ylm, &yrm, &zlm, &yl, &yr, &zl, &ybegin, ¥d, &zbegin, &zend);