Rate This Document
Findability
Accuracy
Completeness
Readability

KmlMgSolverQuery

Query the solver configuration information.

Interface Definition

C interface:

KmlMgStatus KmlMgSolverQuery(KmlMgSolverH solver, KmlMgSolverInfo* info);

Parameters

Parameter

Type

Description

Input/Output

solver

KmlMgSolverH

Solver handle created by KmlMgSolverCreate

Input/Output

info

KmlMgSolverInfo*

Solver information results for user queries.

Output

Return Value

Return Value

Type

Description

KML_MG_OK

int

The execution is successful.

KML_MG_ERR_INVALID_PARAM

int

The parameter is invalid.

KML_MG_ERR_UNSUPPORTED

int

Unsupported feature.

KML_MG_ERR_NO_MEMORY

int

Memory allocation failed.

KML_MG_ERR_EXCEEDS_LIMIT

int

The parameter is out of the valid range.

KML_MG_ERR_INCOMPATIBLE

int

Incompatible version.

KML_MG_ERR_NO_REQUIRED_FIELD

int

Required field not set.

KML_MG_ERR_UNKNOWN_TYPE

int

Unknown type.

KML_MG_ERR_THIRD_PART

int

Internal third-party call error.

KML_MG_ERR_INCONSISTENT

int

Inconsistent information transferred.

KML_MG_ERR_UNEXPECTED_CALL_ORDER

int

Unexpected call order.

KML_MG_ERR_MATRIX_VALUE_IS_NULL

int

The matrix value is null.

KML_MG_ERR_NO_RESOURCE

int

Resources not ready.

Structure Description

KmlMgSolverInfo

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.

ksp

KmlMgSolverKsp

ksp field of KmlMgSolverOptions. For details, see KmlMgSolverOptions.

Mask bit: KML_MG_SOLVER_INFO_KSP_TYPE

useZeroGuess

bool

useZeroGuess field of KmlMgApplyOptions. For details, see KmlMgApplyOptions.

Mask bit: KML_MG_SOLVER_INFO_USE_ZERO_GUESS

toleranceType

KmlMgToleranceType

toleranceType field of KmlMgApplyOptions. For details, see KmlMgApplyOptions.

Mask bit: KML_MG_SOLVER_INFO_TOLERANCE_TYPE

tolerance

double

tolerance field of KmlMgApplyOptions. For details, see KmlMgApplyOptions.

Mask bit: KML_MG_SOLVER_INFO_TOLERANCE

maxIteration

int64_t

maxIteration field of KmlMgApplyOptions. For details, see KmlMgApplyOptions.

Mask bit: KML_MG_SOLVER_INFO_MAX_ITERATION

restartStep

int64_t

restartStep field of KmlMgApplyOptions. For details, see KmlMgApplyOptions. This parameter is valid only when KmlMgSolverOptions.ksp is set to KML_MG_SOLVER_GCR or KML_MG_SOLVER_GMRES.

Mask bit: KML_MG_SOLVER_INFO_RESTART_STEP

solveResi

bool

solveResi field of KmlMgApplyOptions. For details, see KmlMgApplyOptions. This parameter is valid only when KmlMgSolverOptions.ksp is set to KML_MG_SOLVER_GCR.

Mask bit: KML_MG_SOLVER_INFO_SOLVE_RESI

Dependencies

#include "mg.h"

For details about the sample code, see Examples.