Rate This Document
Findability
Accuracy
Completeness
Readability

KmlAmgSolverSetSetupOptions

Set the parameters of the iterative solver.

Interface Definition

C interface: KmlAmgStatus KmlAmgSolverSetSetupOptions(KmlAmgSolverH solver, const KmlAmgSolverSetupOptions* options);

Parameters

Parameter

Type

Description

Input/Output

solver

KmlAmgSolverH

Iterative solver handle

Input/Output

options

const KmlAmgSolverSetupOptions*

Iterative solver configuration

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 KmlAmgSolverSetupOptions 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 partition method, including:

  • KMLAMG_PARTITION_NONE: no partitioning (default value)
  • KMLAMG_PARTITION_KRDR: KRDR algorithm for partitioning

Mask bit: KMLAMG_SOLVER_SETUP_OPTIONS_PARTITION

reusePartition

int8_t

Reuse the matrix partition from the last setup (not supported currently).

Mask bit: KMLAMG_SOLVER_SETUP_OPTIONS_REUSE_PARTITION

restartLen

int

GMRES restart length. This parameter is valid only when solverType is set to KMLAMG_SOLVER_GMRES. The default value is 30.

Mask bit: KMLAMG_SOLVER_SETUP_OPTIONS_RESTART_LEN

Dependencies

#include "amg4c.h"