1 #if !defined(_FreeSpace_h_) 2 #define _FreeSpace_h_ 3 4 #include <petscsys.h> 5 6 typedef struct _n_PetscFreeSpaceList *PetscFreeSpaceList; 7 8 struct _n_PetscFreeSpaceList { 9 PetscFreeSpaceList more_space; 10 PetscInt *array; 11 PetscInt *array_head; 12 PetscInt total_array_size; 13 PetscInt local_used; 14 PetscInt local_remaining; 15 }; 16 17 PetscErrorCode PetscFreeSpaceGet(PetscInt,PetscFreeSpaceList*); 18 PetscErrorCode PetscFreeSpaceContiguous(PetscFreeSpaceList*,PetscInt*); 19 PetscErrorCode PetscFreeSpaceContiguous_LU(PetscFreeSpaceList*,PetscInt*,PetscInt,PetscInt*,PetscInt*); 20 PetscErrorCode PetscFreeSpaceContiguous_Cholesky(PetscFreeSpaceList*,PetscInt*,PetscInt,PetscInt*,PetscInt*); 21 PetscErrorCode PetscFreeSpaceDestroy(PetscFreeSpaceList); 22 23 #endif 24