---
title: KmlIssPcStructilu0Apply
description: "ilu0预条件回代，计算"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC2/accel/kunpengaccel_kml_16_0472.html
sourcePath: /source/zh/kunpengboostkithistory/240RC2/accel/kunpengaccel_kml_16_0472.html
indexId: 27fb4d10f872f4fa6b9c361d96f86e2b2db7c88dec70022bf8d819fafc978fcf76
---
# KmlIssPcStructilu0Apply

ilu0预条件回代，计算

#### 接口定义

C Interface：

int KmlIssPcStructilu0Apply(KmlIssPsStructilu0Handle gSmoother, float *bb, float *xx);


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| gSmoother | KmlIssPsStructilu0Handle | 求解器句柄，handle不可为空指针。 | 输入/输出 |
| bb | float \* | 输入向量r。 | 输入 |
| xx | float \* | 输出向量r'。 | 输入/输出 |


#### 返回值

| 返回值 | 类型 | 描述 |
| --- | --- | --- |
| KMLSS\_NO\_ERROR | int | 正常执行。 |
| KMLSS\_NULL\_ARGUMENT | int | 输入中存在空指针。 |


#### 依赖

#include "kml_struct_ilu.h"


#### 示例

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);
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);
```
