\hypertarget{adpcg_8h}{}\doxysection{src/adpcg.h File Reference}
\label{adpcg_8h}\index{src/adpcg.h@{src/adpcg.h}}


Header for basic types and routine list.  


{\ttfamily \#include $<$stddef.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structadpcg}{adpcg}}
\begin{DoxyCompactList}\small\item\em Working struct for the adaptive CG solver. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{adpcg_8h_a6dc5438d7da45fe939a6b00cb23365a3}\label{adpcg_8h_a6dc5438d7da45fe939a6b00cb23365a3}} 
\#define {\bfseries id}~\char`\"{}\%d\char`\"{}
\item 
\mbox{\Hypertarget{adpcg_8h_a692dd5b724daba70bb3d801815ab4b9d}\label{adpcg_8h_a692dd5b724daba70bb3d801815ab4b9d}} 
\#define {\bfseries cgerr}(x)~printf(x);
\item 
\mbox{\Hypertarget{adpcg_8h_a19bc5a320676b72d79aab883accaa598}\label{adpcg_8h_a19bc5a320676b72d79aab883accaa598}} 
\#define {\bfseries CG\+\_\+\+OK}~(0)
\item 
\mbox{\Hypertarget{adpcg_8h_ac21f78b5a323f6e3336783c04fbaaa3d}\label{adpcg_8h_ac21f78b5a323f6e3336783c04fbaaa3d}} 
\#define {\bfseries CG\+\_\+\+ERR}~(1)
\item 
\mbox{\Hypertarget{adpcg_8h_a251a5b14a42fb7b64e82d0773ec94833}\label{adpcg_8h_a251a5b14a42fb7b64e82d0773ec94833}} 
\#define {\bfseries CG\+\_\+\+TRUE}~(1)
\item 
\mbox{\Hypertarget{adpcg_8h_a2009460e44fe74cd92f9c13c2dd57592}\label{adpcg_8h_a2009460e44fe74cd92f9c13c2dd57592}} 
\#define {\bfseries CG\+\_\+\+FALSE}~(0)
\item 
\mbox{\Hypertarget{adpcg_8h_a791207da35af0f7509acd36c86403c6e}\label{adpcg_8h_a791207da35af0f7509acd36c86403c6e}} 
\#define {\bfseries CG\+\_\+\+PRECOND\+\_\+\+DIAG}~(10)
\begin{DoxyCompactList}\small\item\em Use diagonal as the pre-\/conditioner. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_a21c2080832231539dce1e00cd8a2365f}\label{adpcg_8h_a21c2080832231539dce1e00cd8a2365f}} 
\#define {\bfseries CG\+\_\+\+PRECOND\+\_\+\+CHOL}~(11)
\begin{DoxyCompactList}\small\item\em Use Cholesky factor as the pre-\/conditioner. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_a1116125faacbbcc5075c88a4510740f0}\label{adpcg_8h_a1116125faacbbcc5075c88a4510740f0}} 
\#define {\bfseries CG\+\_\+\+NO\+\_\+\+PRECOND}~(12)
\begin{DoxyCompactList}\small\item\em Use direct solver. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_ad87dfa03b9f3085142f1ab89b3cdfb8d}\label{adpcg_8h_ad87dfa03b9f3085142f1ab89b3cdfb8d}} 
\#define {\bfseries CG\+\_\+\+STATUS\+\_\+\+SOLVED}~(100)
\begin{DoxyCompactList}\small\item\em System is solved to desired accuracy within maximum iteration. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_a44f26b54fe220ecbbe30ebc77cb50621}\label{adpcg_8h_a44f26b54fe220ecbbe30ebc77cb50621}} 
\#define {\bfseries CG\+\_\+\+STATUS\+\_\+\+MAXITER}~(101)
\begin{DoxyCompactList}\small\item\em System reaches maximum iteration. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_ae2e377dfa5d495692a7441030dfb39b4}\label{adpcg_8h_ae2e377dfa5d495692a7441030dfb39b4}} 
\#define {\bfseries CG\+\_\+\+STATUS\+\_\+\+FAILED}~(102)
\begin{DoxyCompactList}\small\item\em CG fails to converge. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_ab999d19e7c3ccba6c2e8cd654229c312}\label{adpcg_8h_ab999d19e7c3ccba6c2e8cd654229c312}} 
\#define {\bfseries CG\+\_\+\+STATUS\+\_\+\+UNKNOWN}~(104)
\begin{DoxyCompactList}\small\item\em CG status is not known. Solution not yet started. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_ad4d207ffb28e2b94ddc94ce6234d6d05}\label{adpcg_8h_ad4d207ffb28e2b94ddc94ce6234d6d05}} 
\#define {\bfseries CG\+\_\+\+STATUS\+\_\+\+DIRECT}~(105)
\begin{DoxyCompactList}\small\item\em CG serves as a wrapper for direct solver. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{adpcg_8h_a3acffbd305ee72dcd4593c0d8af64a4f}\label{adpcg_8h_a3acffbd305ee72dcd4593c0d8af64a4f}} 
\#define {\bfseries MIN}(a,  b)~(((a)$<$(b))?(a)\+:(b))
\item 
\mbox{\Hypertarget{adpcg_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}\label{adpcg_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}} 
\#define {\bfseries MAX}(a,  b)~(((a)$>$(b))?(a)\+:(b))
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{adpcg_8h_af7d3e651ced1458479cc9dac96efbc0c}\label{adpcg_8h_af7d3e651ced1458479cc9dac96efbc0c}} 
typedef int32\+\_\+t {\bfseries cgint}
\end{DoxyCompactItemize}


\doxysubsection{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.

\begin{DoxyAuthor}{Author}
Wenzhi Gao, Shanghai University of Finance and Economics 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
Aug 29th, 2022 
\end{DoxyDate}
