ADPCG 1.0.0
adpcg.h File Reference

Header for basic types and routine list. More...

#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  adpcg
 Working struct for the adaptive CG solver. More...
 

Macros

#define id   "%d"
 
#define cgerr(x)   printf(x);
 
#define CG_OK   (0)
 
#define CG_ERR   (1)
 
#define CG_TRUE   (1)
 
#define CG_FALSE   (0)
 
#define CG_PRECOND_DIAG   (10)
 Use diagonal as the pre-conditioner.
 
#define CG_PRECOND_CHOL   (11)
 Use Cholesky factor as the pre-conditioner.
 
#define CG_NO_PRECOND   (12)
 Use direct solver.
 
#define CG_STATUS_SOLVED   (100)
 System is solved to desired accuracy within maximum iteration.
 
#define CG_STATUS_MAXITER   (101)
 System reaches maximum iteration.
 
#define CG_STATUS_FAILED   (102)
 CG fails to converge.
 
#define CG_STATUS_UNKNOWN   (104)
 CG status is not known. Solution not yet started.
 
#define CG_STATUS_DIRECT   (105)
 CG serves as a wrapper for direct solver.
 
#define MIN(a, b)   (((a)<(b))?(a):(b))
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 

Typedefs

typedef int32_t cgint
 

Detailed Description

Header for basic types and routine list.

Given a set of positive definite linear systems $ A^k x = b^k $, adpcg solves them adaptively with pre-conditioning conjugate gradient method.

The routine is employed in HDSDP.

Author
Wenzhi Gao, Shanghai University of Finance and Economics
Date
Aug 29th, 2022