Rate This Document
Findability
Accuracy
Completeness
Readability

KmlIssPcStructilu0Setup

Interface Definition

C interface:

int KmlIssPcStructilu0Setup(KmlIssPsStructilu0Handle *gSmoother, float *v, const int *xl, const int *xr, const int *yl, const int *yr, const int *zl, const int *zr);

Parameters

Parameter

Type

Description

Input/Output

gSmoother

KmlIssPsStructilu0Handle *

Solver handle.

Output

v

float *

19-diagonal matrix v to be solved. It is stored by using a (l, k, i, j) format array, where l is a diagonal element (l=1:19), and k, i, and j are spatial positions.

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

zr

const int *

End position in the z direction of the solving space.

Input

Return Values

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.

Dependency

#include "kml_struct_ilu.h"

Example

C interface:
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);
for (int i=0; i<171; i++) {
    v[i] = rand();
}
for (int i=0; i<9; i++) {
    b[i] = rand();
}
KmlIssPsStructilu0Handle gSmoother;
KmlIssPcStructilu0Setup(&gSmoother, v, &xl, &xr, &yl, &yr, &zl, &zr);