xref: /petsc/include/petscsys.h (revision 4e627d3a034d8dbe6c0b444d105a274c665112f3) !
1 /* $Id: sys.h,v 1.15 1996/03/20 23:50:29 curfman Exp curfman $ */
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, RANDOM_DEFAULT_REAL,
21                RANDOM_DEFAULT_IMAGINARY } PetscRandomType;
22 
23 typedef struct _PetscRandom*   PetscRandom;
24 
25 extern int  PetscRandomCreate(MPI_Comm,PetscRandomType,PetscRandom*);
26 extern int  PetscRandomGetValue(PetscRandom,Scalar*);
27 extern int  PetscRandomDestroy(PetscRandom);
28 
29 extern int PetscGetFullPath(char*,char*,int);
30 extern int PetscGetRelativePath(char*,char*,int);
31 extern int PetscGetWorkingDirectory(char *, int);
32 extern int PetscGetRealPath(char *,char*);
33 extern int PetscGetHomeDirectory(int,char*);
34 extern int PetscRemoveHomeDirectory(char*);
35 
36 typedef enum { BINARY_INT, BINARY_DOUBLE, BINARY_SHORT, BINARY_FLOAT,
37                BINARY_CHAR } PetscBinaryType;
38 #define BINARY_SCALAR BINARY_DOUBLE /* not correct if compiled with complex */
39 extern int PetscBinaryRead(int,void*,int,PetscBinaryType);
40 extern int PetscBinaryWrite(int,void*,int,PetscBinaryType,int);
41 
42 #endif
43 
44