KmlAmgPrecondSetSetupOptions
Set the parameters required for creating a preconditioner.
Interface Definition
C interface: KmlAmgStatus KmlAmgPrecondSetSetupOptions(KmlAmgPrecondH precond, const KmlAmgPrecondSetupOptions* options);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
precond |
KmlAmgPrecondH |
Preconditioner handle |
Input/Output |
options |
KmlAmgPrecondSetupOptions |
Preconditioner setup options |
Input |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLAMG_SUCCESS |
int |
Successful execution. |
KMLAMG_ERR_INVALID_PARAM |
int |
Invalid parameter. |
KMLAMG_ERR_UNSUPPORTED |
int |
Unsupported feature. |
KMLAMG_ERR_NULL_POINTER |
int |
Null pointer |
KMLAMG_ERR_NO_REQUIRED_FIELD |
int |
Required field not set. |
KMLAMG_ERR_NO_MEMORY |
int |
Memory allocation failed. |
KMLAMG_ERR_UNKNOWN_TYPE |
int |
Unknown type. |
KMLAMG_ERR_UNEXPECTED_CALL_ORDER |
int |
Unexpected call order. |
KMLAMG_ERR_NO_RESOURCE |
int |
Resources not ready. |
KMLAMG_ERR_INCONSISTENT |
int |
Inconsistent information transferred in different phases. |
KMLAMG_ERR_UNKNOWN_ERROR |
int |
Unknown error. |
Structure Description
The table below describes the KmlAmgPrecondSetupOptions structure.
Field |
Type |
Description |
|---|---|---|
fieldMask |
uint64_t |
Mask that determines to which fields the configuration is applied. If a bit is set to 1, its corresponding field uses a specified value. If a bit is set to 0, its corresponding field uses the default value. See the individual field description for configurable mask bits. |
partitionAlgo |
KmlAmgPartitionAlgo |
Matrix partitioning method, including:
Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_PARTITION |
reusePartition |
int8_t |
Reuse the matrix partition from the last setup (not supported currently). Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_REUSE_PARTITION |
strongThreshold |
double |
Strong threshold used by AMG for grid coarsening. The default value is 0.25. Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_STRONG_THRESHOLD |
maxLevels |
int32_t |
Maximum number of AMG grid levels. The default value is 8. Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_MAX_LEVELS |
coarsenType |
KmlAmgPrecondAmgCoarsenType |
AMG coarsening type. The options are as follows:
Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_COARSEN_TYPE |
interpType |
KmlAmgPrecondAmgInterpType |
AMG interpolation type. The options are as follows:
Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_INTERP_TYPE |
downSmoothType |
KmlAmgPrecondAmgSmoothType |
Type of the pre-smoothing operator. The options are as follows:
Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_DOWN_SMOOTH_TYPE |
upSmoothType |
KmlAmgPrecondAmgSmoothType |
Type of the post-smoothing operator. The options are as follows:
Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_UP_SMOOTH_TYPE |
coarsestSmoothType |
KmlAmgPrecondAmgSmoothType |
Type of the smoothing operator at the coarsest level. The options are as follows:
Mask bit: KMLAMG_PRECOND_SETUP_OPTIONS_COARSEST_SMOOTH_TYPE |
Dependencies
#include "amg4c.h"