1 /* $Id: sys.h,v 1.13 1996/01/23 01:09:51 curfman Exp bsmith $ */ 2 /* 3 Provides access to a small number of system related and general utility routines. 4 */ 5 #if !defined(__SYS_PACKAGE) 6 #define __SYS_PACKAGE 7 8 #include "petsc.h" 9 10 extern int PetscGetArchType(char*,int); 11 extern char *PetscGetDate(); 12 13 extern int PetscSortInt(int,int*); 14 extern int PetscSortIntWithPermutation(int,int*,int*); 15 extern int PetscSortDouble(int,double*); 16 17 18 #define RANDOM_COOKIE PETSC_COOKIE+19 19 20 typedef enum { RANDOM_DEFAULT } PetscRandomType; 21 22 typedef struct _PetscRandom* PetscRandom; 23 24 extern int PetscRandomCreate(MPI_Comm,PetscRandomType,PetscRandom*); 25 extern int PetscRandomGetValue(PetscRandom,Scalar*); 26 extern int PetscRandomDestroy(PetscRandom); 27 28 extern int PetscGetFullPath(char*,char*,int); 29 extern int PetscGetRelativePath(char*,char*,int); 30 extern int PetscGetWorkingDirectory(char *, int); 31 extern int PetscGetRealPath(char *,char*); 32 extern int PetscGetHomeDirectory(int,char*); 33 extern int PetscRemoveHomeDirectory(char*); 34 35 typedef enum { BINARY_INT, BINARY_DOUBLE, BINARY_SHORT, BINARY_FLOAT, 36 BINARY_CHAR } PetscBinaryType; 37 #define BINARY_SCALAR BINARY_DOUBLE /* not correct if compiled with complex */ 38 extern int PetscBinaryRead(int,void*,int,PetscBinaryType); 39 extern int PetscBinaryWrite(int,void*,int,PetscBinaryType,int); 40 41 #endif 42 43