Date: 2013-07-02T14:43:34+00:00

Actual source code: cholmodimpl.h
petsc-3.4.2 2013-07-02

      1: #if !defined(CHOLMODIMPL_H_)
      2: #define CHOLMODIMPL_H_

      4: #include <petscsys.h>

      6: #if defined(PETSC_USE_COMPLEX)
      7: #  define CHOLMOD_SCALAR_TYPE       CHOLMOD_COMPLEX
      8: #else
      9: #  define CHOLMOD_SCALAR_TYPE       CHOLMOD_REAL
     10: #endif

     12: #if defined(PETSC_USE_64BIT_INDICES)
     13: #  define CHOLMOD_INT_TYPE          CHOLMOD_LONG
     14: #  define cholmod_X_start           cholmod_l_start
     15: #  define cholmod_X_analyze         cholmod_l_analyze
     16: #  define cholmod_X_analyze_p       cholmod_l_analyze_p
     17: #  define cholmod_X_copy            cholmod_l_copy
     18: #  define cholmod_X_factorize       cholmod_l_factorize
     19: #  define cholmod_X_finish          cholmod_l_finish
     20: #  define cholmod_X_free_factor     cholmod_l_free_factor
     21: #  define cholmod_X_free_dense      cholmod_l_free_dense
     22: #  define cholmod_X_resymbol        cholmod_l_resymbol
     23: #  define cholmod_X_solve           cholmod_l_solve
     24: #else
     25: #  define CHOLMOD_INT_TYPE          CHOLMOD_INT
     26: #  define cholmod_X_start           cholmod_start
     27: #  define cholmod_X_analyze         cholmod_analyze
     28: #  define cholmod_X_analyze_p       cholmod_analyze_p
     29: #  define cholmod_X_copy            cholmod_copy
     30: #  define cholmod_X_factorize       cholmod_factorize
     31: #  define cholmod_X_finish          cholmod_finish
     32: #  define cholmod_X_free_factor     cholmod_free_factor
     33: #  define cholmod_X_free_dense      cholmod_free_dense
     34: #  define cholmod_X_resymbol        cholmod_resymbol
     35: #  define cholmod_X_solve           cholmod_solve
     36: #endif

     38: #define UF_long long long
     39: #define UF_long_max LONG_LONG_MAX
     40: #define UF_long_id "%lld"
     41: #undef I  /* complex.h defines I=_Complex_I, but cholmod_core.h uses I as a field member */

     43: EXTERN_C_BEGIN
     44: #include <cholmod.h>
     45: EXTERN_C_END

     47: typedef struct {
     48:   PetscErrorCode (*Wrap)(Mat,PetscBool,cholmod_sparse*,PetscBool*);
     49:   PetscErrorCode (*Destroy)(Mat);
     50:   cholmod_sparse *matrix;
     51:   cholmod_factor *factor;
     52:   cholmod_common *common;
     53:   PetscBool      pack;
     54: } Mat_CHOLMOD;

     56: PETSC_INTERN PetscErrorCode CholmodStart(Mat);
     57: PETSC_INTERN PetscErrorCode MatView_CHOLMOD(Mat,PetscViewer);
     58: PETSC_INTERN PetscErrorCode MatCholeskyFactorSymbolic_CHOLMOD(Mat,Mat,IS,const MatFactorInfo*);
     59: PETSC_INTERN PetscErrorCode MatDestroy_CHOLMOD(Mat);

     61: #endif /* CHOLMODIMPL_H_ */