xref: /petsc/include/petscsys.h (revision f630a525398fe18bec863feadb1b5ff26330c5af)
1 /* $Id: sys.h,v 1.16 1996/03/21 00:07:38 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 int  PetscGetHostName(char *,int);
12 
13 extern char *PetscGetDate();
14 
15 extern int  PetscSortInt(int,int*);
16 extern int  PetscSortIntWithPermutation(int,int*,int*);
17 extern int  PetscSortDouble(int,double*);
18 
19 extern int  PetscSetDisplay(MPI_Comm,char *,int);
20 
21 #define RANDOM_COOKIE PETSC_COOKIE+19
22 
23 typedef enum { RANDOM_DEFAULT, RANDOM_DEFAULT_REAL,
24                RANDOM_DEFAULT_IMAGINARY } PetscRandomType;
25 
26 typedef struct _PetscRandom*   PetscRandom;
27 
28 extern int  PetscRandomCreate(MPI_Comm,PetscRandomType,PetscRandom*);
29 extern int  PetscRandomGetValue(PetscRandom,Scalar*);
30 extern int  PetscRandomDestroy(PetscRandom);
31 
32 extern int PetscGetFullPath(char*,char*,int);
33 extern int PetscGetRelativePath(char*,char*,int);
34 extern int PetscGetWorkingDirectory(char *, int);
35 extern int PetscGetRealPath(char *,char*);
36 extern int PetscGetHomeDirectory(int,char*);
37 extern int PetscRemoveHomeDirectory(char*);
38 
39 typedef enum { BINARY_INT, BINARY_DOUBLE, BINARY_SHORT, BINARY_FLOAT,
40                BINARY_CHAR } PetscBinaryType;
41 #define BINARY_SCALAR BINARY_DOUBLE /* not correct if compiled with complex */
42 extern int PetscBinaryRead(int,void*,int,PetscBinaryType);
43 extern int PetscBinaryWrite(int,void*,int,PetscBinaryType,int);
44 
45 extern int PetscSetDebugger(char *,int,char *);
46 extern int PetscAttachDebugger();
47 
48 #endif
49 
50