MAOS
Multithreaded Adaptive Optics Simulator
chol.h File Reference

Data Structures

struct  spchol
 

Macros

#define chol_free(A)   ({chol_free_do(A);A=NULL;})
 

Functions

spcholchol_factorize (const dsp *A_in)
 
dspchol_factorize2 (lmat **Cp, const dsp *A_in)
 
void chol_solve (dmat **x, spchol *A, dmat *y)
 
dspchol_spsolve (spchol *A, const dsp *y)
 
void chol_free_do (spchol *A)
 
void chol_save (spchol *A, const char *format,...)
 
spcholchol_read (const char *format,...)
 
void chol_convert (spchol *A, int keep)
 

Detailed Description

Wraps the CHOLESKY Library to provide a simple interface.


Data Structure Documentation

◆ spchol

struct spchol
+ Collaboration diagram for spchol:
Data Fields
struct cholmod_factor_struct * L
struct cholmod_common_struct * c
dsp * Cl
dsp * Cu
spint * Cp

Function Documentation

◆ chol_factorize()

spchol* chol_factorize ( const dsp A_in)

Factorize a sparse array into LL' with reordering.

◆ chol_factorize2()

dsp* chol_factorize2 ( lmat **  Cp,
const dsp A_in 
)

Alternative interface

◆ chol_solve()

void chol_solve ( dmat **  x,
spchol A,
dmat y 
)

Solve A*x=y where the cholesky factor of A is stored in A.

◆ chol_spsolve()

dsp* chol_spsolve ( spchol A,
const dsp y 
)

Solve A*x=y where Y is sparse. Not good idea to use dsp ** as chol_solve because the result may have different nzmax.

◆ chol_free_do()

void chol_free_do ( spchol A)

Free cholesky factor.

◆ chol_save()

void chol_save ( spchol A,
const char *  format,
  ... 
)

Save cholesky factor and permutation vector to file.

◆ chol_read()

spchol* chol_read ( const char *  format,
  ... 
)

Read cholesky factor form file. In the matlab convention, the upper triangle is saved.

◆ chol_convert()

void chol_convert ( spchol A,
int  keep 
)

Convert the internal data type cholesky factor into the lower left diagonal and permutation vector. The internal data A->L is freed if keep is 0.

This routine works only if the factor is using simplicity factor. not supernodal. so, in chol_factorize, we have set c.final_super=0, so that the final result is always in simplicity factor.