~ubuntu-branches/ubuntu/warty/petsc/warty

« back to all changes in this revision

Viewing changes to include/petsc.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2004-06-07 13:41:43 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040607134143-92p586zrauvie0le
Tags: 2.2.0-2
* Upstream patch level 2.
* New PETSC_BOPT_EXTRA option for different BOPT and lib names, with _c++
  symlinks only for plain and single (closes: #249617).
* New DEBIAN_DIST=contrib option to link with hypre, parmetis (closes:
  #249619).
* Combined petsc-c and petsc-fortran substvars into petsc-compilers.
* Extra quote in -dev prerm eliminates "too many arguments" problem.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
*/
6
6
#if !defined(__PETSC_H)
7
7
#define __PETSC_H
8
 
 
9
 
/*
10
 
    Macros for indicating code that should be compiled with a C interface,
11
 
   rather than a C++ interface. Any routines that are dynamically loaded
12
 
   (such as the PCCreate_XXX() routines) must be wrapped so that the name
13
 
   mangler does not change the functions symbol name. This just hides the 
14
 
   ugly extern "C" {} wrappers.
 
8
/* ========================================================================== */
 
9
/* 
 
10
   This facilitates using C version of PETSc from C++
15
11
*/
16
 
#if defined(__cplusplus)
17
 
#define EXTERN_C_BEGIN extern "C" {
18
 
#define EXTERN_C_END }
 
12
 
 
13
#if defined(PETSC_USE_EXTERN_CXX) && defined(__cplusplus)
 
14
#define PETSC_EXTERN_CXX_BEGIN extern "C" {
 
15
#define PETSC_EXTERN_CXX_END  }
19
16
#else
20
 
#define EXTERN_C_BEGIN 
21
 
#define EXTERN_C_END 
 
17
#define PETSC_EXTERN_CXX_BEGIN
 
18
#define PETSC_EXTERN_CXX_END
22
19
#endif
23
 
 
24
 
EXTERN_C_BEGIN
25
 
 
26
20
/* ========================================================================== */
27
21
/* 
28
22
   Current PETSc version number and release date
58
52
*/
59
53
#include "mpi.h"
60
54
 
 
55
 
 
56
/*
 
57
    Declare extern C stuff after incuding external header files
 
58
*/
 
59
 
 
60
PETSC_EXTERN_CXX_BEGIN
 
61
 
61
62
/*
62
63
    EXTERN indicates a PETSc function defined elsewhere
63
64
*/
 
65
#if !defined(EXTERN)
64
66
#define EXTERN extern
 
67
#endif
65
68
 
66
69
/*
67
70
    Defines some elementary mathematics functions and constants.
80
83
E*/
81
84
typedef enum { PETSC_FALSE,PETSC_TRUE } PetscTruth;
82
85
 
 
86
/*M
 
87
    PETSC_NULL - standard way of passing in a null or array or pointer
 
88
 
 
89
   Level: beginner
 
90
 
 
91
   Notes: accepted by many PETSc functions to not set a parameter and instead use
 
92
          some default
 
93
 
 
94
          This macro does not exist in Fortran; you must use PETSC_NULL_INTEGER, 
 
95
          PETSC_NULL_DOUBLE_PRECISION etc
 
96
 
 
97
.seealso: PETSC_DECIDE, PETSC_DEFAULT, PETSC_IGNORE, PETSC_DETERMINE
 
98
 
 
99
M*/
83
100
#define PETSC_NULL           0
 
101
 
 
102
/*M
 
103
    PETSC_DECIDE - standard way of passing in integer or floating point parameter
 
104
       where you wish PETSc to use the default.
 
105
 
 
106
   Level: beginner
 
107
 
 
108
.seealso: PETSC_NULL, PETSC_DEFAULT, PETSC_IGNORE, PETSC_DETERMINE
 
109
 
 
110
M*/
84
111
#define PETSC_DECIDE         -1
 
112
 
 
113
/*M
 
114
    PETSC_DEFAULT - standard way of passing in integer or floating point parameter
 
115
       where you wish PETSc to use the default.
 
116
 
 
117
   Level: beginner
 
118
 
 
119
.seealso: PETSC_DECIDE, PETSC_NULL, PETSC_IGNORE, PETSC_DETERMINE
 
120
 
 
121
M*/
85
122
#define PETSC_DEFAULT        -2
86
123
 
87
124
#define PETSC_YES            PETSC_TRUE
88
125
#define PETSC_NO             PETSC_FALSE
 
126
 
 
127
/*M
 
128
    PETSC_IGNORE - same as PETSC_NULL, means PETSc will ignore this argument
 
129
 
 
130
   Level: beginner
 
131
 
 
132
   Notes: accepted by many PETSc functions to not set a parameter and instead use
 
133
          some default
 
134
 
 
135
          This macro does not exist in Fortran; you must use PETSC_NULL_INTEGER, 
 
136
          PETSC_NULL_DOUBLE_PRECISION etc
 
137
 
 
138
.seealso: PETSC_DECIDE, PETSC_DEFAULT, PETSC_NULL, PETSC_DETERMINE
 
139
 
 
140
M*/
89
141
#define PETSC_IGNORE         PETSC_NULL
 
142
 
 
143
/*M
 
144
    PETSC_DETERMINE - standard way of passing in integer or floating point parameter
 
145
       where you wish PETSc to compute the required value.
 
146
 
 
147
   Level: beginner
 
148
 
 
149
.seealso: PETSC_DECIDE, PETSC_DEFAULT, PETSC_IGNORE, PETSC_NULL, VecSetSizes()
 
150
 
 
151
M*/
90
152
#define PETSC_DETERMINE      PETSC_DECIDE
91
153
 
92
 
 
 
154
/*M
 
155
    PETSC_COMM_WORLD - a duplicate of the MPI_COMM_WORLD communicator which represents
 
156
           all the processs
 
157
 
 
158
   Level: beginner
 
159
 
 
160
   Notes: PETSC_COMM_WORLD and MPI_COMM_WORLD are equivalent except that passing MPI_COMM_WORLD
 
161
          into PETSc object constructors will result in using more MPI resources since an MPI_Comm_dup()
 
162
          will be done on it internally. We recommend always using PETSC_COMM_WORLD
 
163
 
 
164
.seealso: PETSC_COMM_SELF
 
165
 
 
166
M*/
93
167
extern MPI_Comm   PETSC_COMM_WORLD;
 
168
 
 
169
/*M
 
170
    PETSC_COMM_SELF - a duplicate of the MPI_COMM_SELF communicator which represents
 
171
           the current process
 
172
 
 
173
   Level: beginner
 
174
 
 
175
   Notes: PETSC_COMM_SELF and MPI_COMM_SELF are equivalent except that passint MPI_COMM_SELF
 
176
          into PETSc object constructors will result in using more MPI resources since an MPI_Comm_dup()
 
177
          will be done on it internally. We recommend always using PETSC_COMM_SELF
 
178
 
 
179
.seealso: PETSC_COMM_WORLD
 
180
 
 
181
M*/
94
182
extern MPI_Comm   PETSC_COMM_SELF;
 
183
 
95
184
extern PetscTruth PetscInitializeCalled;
96
185
EXTERN int        PetscSetCommWorld(MPI_Comm);
97
186
EXTERN int        PetscSetHelpVersionFunctions(int (*)(MPI_Comm),int (*)(MPI_Comm));
 
187
EXTERN int        PetscCommDuplicate(MPI_Comm,MPI_Comm*,int*);
 
188
EXTERN int        PetscCommDestroy(MPI_Comm*);
98
189
 
99
190
/*MC
100
191
   PetscMalloc - Allocates memory
106
197
.  result - memory allocated
107
198
 
108
199
   Synopsis:
109
 
   int PetscMalloc(int m,void **result)
 
200
   int PetscMalloc(size_t m,void **result)
110
201
 
111
202
   Level: beginner
112
203
 
157
248
 
158
249
M*/
159
250
#define PetscFree(a)         (*PetscTrFree)((a),__LINE__,__FUNCT__,__FILE__,__SDIR__)
160
 
EXTERN int  (*PetscTrMalloc)(int,int,char*,char*,char*,void**);
161
 
EXTERN int  (*PetscTrFree)(void *,int,char*,char*,char*);
162
 
EXTERN int  PetscSetMalloc(int (*)(int,int,char*,char*,char*,void**),int (*)(void *,int,char*,char*,char*));
 
251
EXTERN int  (*PetscTrMalloc)(size_t,int,const char[],const char[],const char[],void**);
 
252
EXTERN int  (*PetscTrFree)(void *,int,const char[],const char[],const char[]);
 
253
EXTERN int  PetscSetMalloc(int (*)(size_t,int,const char[],const char[],const char[],void**),int (*)(void *,int,const char[],const char[],const char[]));
163
254
EXTERN int  PetscClearMalloc(void);
164
255
 
165
256
/*
211
302
 
212
303
EXTERN int PetscDataTypeToMPIDataType(PetscDataType,MPI_Datatype*);
213
304
EXTERN int PetscDataTypeGetSize(PetscDataType,int*);
214
 
EXTERN int PetscDataTypeGetName(PetscDataType,char*[]);
 
305
EXTERN int PetscDataTypeGetName(PetscDataType,const char*[]);
215
306
 
216
307
/*
217
308
    Basic memory and string operations. These are usually simple wrappers
232
323
EXTERN int   PetscStrcat(char[],const char[]);
233
324
EXTERN int   PetscStrncat(char[],const char[],int);
234
325
EXTERN int   PetscStrncpy(char[],const char[],int);
235
 
EXTERN int   PetscStrchr(const char[],char,char **);
 
326
EXTERN int   PetscStrchr(const char[],char,char *[]);
236
327
EXTERN int   PetscStrtolower(char[]);
237
 
EXTERN int   PetscStrrchr(const char[],char,char **);
238
 
EXTERN int   PetscStrstr(const char[],const char[],char **);
239
 
EXTERN int   PetscStrallocpy(const char[],char **);
240
 
EXTERN int   PetscStrreplace(MPI_Comm,const char[],char*,int);
 
328
EXTERN int   PetscStrrchr(const char[],char,char *[]);
 
329
EXTERN int   PetscStrstr(const char[],const char[],char *[]);
 
330
EXTERN int   PetscStrallocpy(const char[],char *[]);
 
331
EXTERN int   PetscStrreplace(MPI_Comm,const char[],char[],int);
241
332
#define      PetscStrfree(a) ((a) ? PetscFree(a) : 0) 
242
333
typedef struct {char token;char *array;char *current;} PetscToken;
243
334
EXTERN int   PetscTokenCreate(const char[],const char,PetscToken**);
244
 
EXTERN int   PetscTokenFind(PetscToken*,char **);
 
335
EXTERN int   PetscTokenFind(PetscToken*,char *[]);
245
336
EXTERN int   PetscTokenDestroy(PetscToken*);
246
337
 
247
338
/*
253
344
#else
254
345
#define PetscSum_Op MPI_SUM
255
346
#endif
 
347
EXTERN int PetscMaxSum(MPI_Comm,const int[],int*,int*);
256
348
 
257
349
/*S
258
 
     PetscObject - any PETSc object, PetscViewer, Mat, Vec, SLES etc
 
350
     PetscObject - any PETSc object, PetscViewer, Mat, Vec, KSP etc
259
351
 
260
352
   Level: beginner
261
353
 
 
354
   Note: This is the base class from which all objects appear.
 
355
 
262
356
.seealso:  PetscObjectDestroy(), PetscObjectView(), PetscObjectGetName(), PetscObjectSetName()
263
357
S*/
264
358
typedef struct _p_PetscObject* PetscObject;
276
370
#include "petscviewer.h"
277
371
#include "petscoptions.h"
278
372
 
279
 
EXTERN int PetscShowMemoryUsage(PetscViewer,char*);
 
373
EXTERN int PetscShowMemoryUsage(PetscViewer,const char[]);
280
374
EXTERN int PetscGetTime(PetscLogDouble*);
281
375
EXTERN int PetscGetCPUTime(PetscLogDouble*);
282
376
EXTERN int PetscSleep(int);
284
378
/*
285
379
    Initialization of PETSc
286
380
*/
287
 
EXTERN int  PetscInitialize(int*,char***,char[],const char[]);
 
381
EXTERN int  PetscInitialize(int*,char***,const char[],const char[]);
288
382
EXTERN int  PetscInitializeNoArguments(void);
289
383
EXTERN int  PetscFinalize(void);
290
384
EXTERN int  PetscInitializeFortran(void);
301
395
 
302
396
/*
303
397
   PetscTryMethod - Queries an object for a method, if it exists then calls it.
304
 
          Can support argument checking 
 
398
              These are intended to be used only inside PETSc functions.
305
399
*/
306
 
#if defined(PETSC_FORTRAN_STUBS)
307
 
#define  PetscTryMethod(obj,A,B,C) \
308
 
  0;{ int (*f)B; \
309
 
   *ierr = PetscObjectQueryFunction((PetscObject)obj,#A,(PetscVoidFunction)&f);if (*ierr) return; \
310
 
    if (f) {*ierr = (*f)C;if (*ierr) return;}\
311
 
  }
312
 
#else
313
400
#define  PetscTryMethod(obj,A,B,C) \
314
401
  0;{ int (*f)B, __ierr; \
315
402
    __ierr = PetscObjectQueryFunction((PetscObject)obj,#A,(PetscVoidFunction)&f);CHKERRQ(__ierr); \
316
403
    if (f) {__ierr = (*f)C;CHKERRQ(__ierr);}\
317
404
  }
318
 
#endif
319
 
 
 
405
#define  PetscUseMethod(obj,A,B,C) \
 
406
  0;{ int (*f)B, __ierr; \
 
407
    __ierr = PetscObjectQueryFunction((PetscObject)obj,A,(PetscVoidFunction)&f);CHKERRQ(__ierr); \
 
408
    if (f) {__ierr = (*f)C;CHKERRQ(__ierr);}\
 
409
    else {SETERRQ1(1,"Cannot locate function %s in object",A);} \
 
410
  }
320
411
/*
321
412
    Functions that can act on any PETSc object.
322
413
*/
338
429
EXTERN int PetscObjectCompose(PetscObject,const char[],PetscObject);
339
430
EXTERN int PetscObjectQuery(PetscObject,const char[],PetscObject *);
340
431
EXTERN int PetscObjectComposeFunction(PetscObject,const char[],const char[],void (*)(void));
 
432
 
 
433
typedef void (*FCNVOID)(void); /* cast in next macro should never be extern C */
 
434
typedef int  (*FCNINTVOID)(void); /* used in casts to make sure they are not extern C */
 
435
/*MC
 
436
   PetscObjectComposeFunctionDynamic - Associates a function with a given PETSc object. 
 
437
                       
 
438
   Collective on PetscObject
 
439
 
 
440
   Input Parameters:
 
441
+  obj - the PETSc object; this must be cast with a (PetscObject), for example, 
 
442
         PetscObjectCompose((PetscObject)mat,...);
 
443
.  name - name associated with the child function
 
444
.  fname - name of the function
 
445
-  ptr - function pointer (or PETSC_NULL if using dynamic libraries)
 
446
 
 
447
   Level: advanced
 
448
 
 
449
    Synopsis:
 
450
    int PetscObjectComposeFunctionDynamic(PetscObject obj,const char name[],const char fname[],void *ptr)
 
451
 
 
452
   Notes:
 
453
   PetscObjectComposeFunctionDynamic() can be used with any PETSc object (such as
 
454
   Mat, Vec, KSP, SNES, etc.) or any user-provided object. 
 
455
 
 
456
   The composed function must be wrapped in a EXTERN_C_BEGIN/END for this to
 
457
   work in C++/complex with dynamic link libraries (PETSC_USE_DYNAMIC_LIBRARIES)
 
458
   enabled.
 
459
 
 
460
   Concepts: objects^composing functions
 
461
   Concepts: composing functions
 
462
   Concepts: functions^querying
 
463
   Concepts: objects^querying
 
464
   Concepts: querying objects
 
465
 
 
466
.seealso: PetscObjectQueryFunction()
 
467
M*/
341
468
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
342
469
#define PetscObjectComposeFunctionDynamic(a,b,c,d) PetscObjectComposeFunction(a,b,c,0)
343
470
#else
344
 
#define PetscObjectComposeFunctionDynamic(a,b,c,d) PetscObjectComposeFunction(a,b,c,(void (*)(void))(d))
 
471
#define PetscObjectComposeFunctionDynamic(a,b,c,d) PetscObjectComposeFunction(a,b,c,(FCNVOID)(d))
345
472
#endif
 
473
 
346
474
EXTERN int PetscObjectQueryFunction(PetscObject,const char[],void (**)(void));
347
475
EXTERN int PetscObjectSetOptionsPrefix(PetscObject,const char[]);
348
476
EXTERN int PetscObjectAppendOptionsPrefix(PetscObject,const char[]);
349
477
EXTERN int PetscObjectPrependOptionsPrefix(PetscObject,const char[]);
350
478
EXTERN int PetscObjectGetOptionsPrefix(PetscObject,char*[]);
351
479
EXTERN int PetscObjectPublish(PetscObject);
352
 
EXTERN int PetscObjectChangeTypeName(PetscObject,char *);
353
 
EXTERN int PetscObjectChangeSerializeName(PetscObject,char *);
 
480
EXTERN int PetscObjectChangeTypeName(PetscObject,const char[]);
354
481
EXTERN int PetscObjectRegisterDestroy(PetscObject);
355
482
EXTERN int PetscObjectRegisterDestroyAll(void);
356
483
EXTERN int PetscObjectName(PetscObject);
357
 
EXTERN int PetscTypeCompare(PetscObject,char*,PetscTruth*);
358
 
EXTERN int PetscSerializeCompare(PetscObject,char*,PetscTruth*);
 
484
EXTERN int PetscTypeCompare(PetscObject,const char[],PetscTruth*);
359
485
 
360
486
/*
361
487
    Defines PETSc error handling.
384
510
EXTERN int PetscFListAdd(PetscFList*,const char[],const char[],void (*)(void));
385
511
EXTERN int PetscFListDestroy(PetscFList*);
386
512
EXTERN int PetscFListFind(MPI_Comm,PetscFList,const char[],void (**)(void));
387
 
EXTERN int PetscFListPrintTypes(MPI_Comm,FILE*,const char[],const char[],char *,char *,PetscFList);
 
513
EXTERN int PetscFListPrintTypes(MPI_Comm,FILE*,const char[],const char[],const char[],const char[],PetscFList);
388
514
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
389
515
#define    PetscFListAddDynamic(a,b,p,c) PetscFListAdd(a,b,p,0)
390
516
#else
413
539
EXTERN int PetscDLLibraryPrepend(MPI_Comm,PetscDLLibraryList *,const char[]);
414
540
EXTERN int PetscDLLibraryClose(PetscDLLibraryList);
415
541
EXTERN int PetscDLLibraryPrintPath(void);
416
 
EXTERN int PetscDLLibraryGetInfo(void *,char *,char **);
 
542
EXTERN int PetscDLLibraryGetInfo(void *,const char[],const char *[]);
417
543
 
418
544
/*
419
545
    Mechanism for translating PETSc object representations between languages
491
617
EXTERN int  PetscFClose(MPI_Comm,FILE*);
492
618
EXTERN int  PetscFPrintf(MPI_Comm,FILE*,const char[],...) PETSC_PRINTF_FORMAT_CHECK(3,4);
493
619
EXTERN int  PetscPrintf(MPI_Comm,const char[],...)  PETSC_PRINTF_FORMAT_CHECK(2,3);
 
620
 
 
621
/*MC
 
622
    PetscErrorPrintf - Prints error messages.
 
623
 
 
624
    Not Collective
 
625
 
 
626
   Synopsis:
 
627
     int (*PetscErrorPrintf)(const char format[],...);
 
628
 
 
629
    Input Parameters:
 
630
.   format - the usual printf() format string 
 
631
 
 
632
   Options Database Keys:
 
633
.    -error_output_stderr - cause error messages to be printed to stderr instead of the
 
634
         (default) stdout
 
635
 
 
636
 
 
637
   Level: developer
 
638
 
 
639
    Fortran Note:
 
640
    This routine is not supported in Fortran.
 
641
 
 
642
    Concepts: error messages^printing
 
643
    Concepts: printing^error messages
 
644
 
 
645
.seealso: PetscFPrintf(), PetscSynchronizedPrintf(), PetscHelpPrintf()
 
646
M*/
494
647
EXTERN int  (*PetscErrorPrintf)(const char[],...);
 
648
 
 
649
/*MC
 
650
    PetscHelpPrintf - Prints help messages.
 
651
 
 
652
    Not Collective
 
653
 
 
654
   Synopsis:
 
655
     int (*PetscHelpPrintf)(const char format[],...);
 
656
 
 
657
    Input Parameters:
 
658
.   format - the usual printf() format string 
 
659
 
 
660
   Level: developer
 
661
 
 
662
    Fortran Note:
 
663
    This routine is not supported in Fortran.
 
664
 
 
665
    Concepts: help messages^printing
 
666
    Concepts: printing^help messages
 
667
 
 
668
.seealso: PetscFPrintf(), PetscSynchronizedPrintf(), PetscErrorPrintf()
 
669
M*/
495
670
EXTERN int  (*PetscHelpPrintf)(MPI_Comm,const char[],...);
496
 
EXTERN int  PetscPOpen(MPI_Comm,char *,char*,const char[],FILE **);
 
671
 
 
672
EXTERN int  PetscPOpen(MPI_Comm,const char[],const char[],const char[],FILE **);
497
673
EXTERN int  PetscPClose(MPI_Comm,FILE*);
498
674
EXTERN int  PetscSynchronizedPrintf(MPI_Comm,const char[],...) PETSC_PRINTF_FORMAT_CHECK(2,3);
499
675
EXTERN int  PetscSynchronizedFPrintf(MPI_Comm,FILE*,const char[],...) PETSC_PRINTF_FORMAT_CHECK(3,4);
500
676
EXTERN int  PetscSynchronizedFlush(MPI_Comm);
501
677
EXTERN int  PetscSynchronizedFGets(MPI_Comm,FILE*,int,char[]);
502
 
EXTERN int  PetscStartMatlab(MPI_Comm,char *,char*,FILE**);
503
 
EXTERN int  PetscStartJava(MPI_Comm,char *,char*,FILE**);
504
 
EXTERN int  PetscGetPetscDir(char**);
 
678
EXTERN int  PetscStartMatlab(MPI_Comm,const char[],const char[],FILE**);
 
679
EXTERN int  PetscStartJava(MPI_Comm,const char[],const char[],FILE**);
 
680
EXTERN int  PetscGetPetscDir(const char*[]);
505
681
 
506
682
EXTERN int  PetscPopUpSelect(MPI_Comm,char*,char*,int,char**,int*);
507
683
/*S
536
712
/*
537
713
    Allows accessing Matlab Engine
538
714
*/
539
 
#include "petscengine.h"
 
715
#include "petscmatlab.h"
540
716
 
541
717
/*
542
718
    C code optimization is often enhanced by telling the compiler 
613
789
 
614
790
#endif
615
791
 
 
792
/*
 
793
    Macros for indicating code that should be compiled with a C interface,
 
794
   rather than a C++ interface. Any routines that are dynamically loaded
 
795
   (such as the PCCreate_XXX() routines) must be wrapped so that the name
 
796
   mangler does not change the functions symbol name. This just hides the 
 
797
   ugly extern "C" {} wrappers.
 
798
*/
 
799
#if defined(__cplusplus)
 
800
#define EXTERN_C_BEGIN extern "C" {
 
801
#define EXTERN_C_END }
 
802
#else
 
803
#define EXTERN_C_BEGIN 
 
804
#define EXTERN_C_END 
 
805
#endif
 
806
 
616
807
/* --------------------------------------------------------------------*/
617
808
 
618
809
/*M
642
833
M*/
643
834
 
644
835
/*M
 
836
    MPI_Comm - the basic object used by MPI to determine which processes are involved in a 
 
837
        communication
 
838
 
 
839
   Level: beginner
 
840
 
 
841
   Note: This manual page is a place-holder because MPICH does not have a manual page for MPI_Comm
 
842
 
 
843
.seealso: size, rank, comm, PETSC_COMM_WORLD, PETSC_COMM_SELF
 
844
M*/
 
845
 
 
846
/*M
645
847
    PetscScalar - PETSc type that represents either a double precision real number or 
646
848
       a double precision complex number if the code is compiled with BOPT=g_complex or O_complex
647
849
 
648
850
   Level: beginner
649
851
 
 
852
.seealso: PetscReal, PassiveReal, PassiveScalar
 
853
M*/
 
854
 
 
855
/*M
 
856
    PetscReal - PETSc type that represents a double precision real number
 
857
 
 
858
   Level: beginner
 
859
 
 
860
.seealso: PetscScalar, PassiveReal, PassiveScalar
 
861
M*/
 
862
 
 
863
/*M
 
864
    PassiveScalar - PETSc type that represents either a double precision real number or 
 
865
       a double precision complex number if the code is compiled with BOPT=g_complex or O_complex
 
866
 
 
867
   Level: beginner
 
868
 
 
869
    This is the same as a PetscScalar except in code that is automatically differentiated it is
 
870
   treated as a constant (not an indendent or dependent variable)
 
871
 
 
872
.seealso: PetscReal, PassiveReal, PetscScalar
 
873
M*/
 
874
 
 
875
/*M
 
876
    PassiveReal - PETSc type that represents a double precision real number
 
877
 
 
878
   Level: beginner
 
879
 
 
880
    This is the same as a PetscReal except in code that is automatically differentiated it is
 
881
   treated as a constant (not an indendent or dependent variable)
 
882
 
 
883
.seealso: PetscScalar, PetscReal, PassiveScalar
650
884
M*/
651
885
 
652
886
/*
657
891
#undef hz
658
892
#endif
659
893
 
660
 
EXTERN_C_END
 
894
/*  For arrays that contain filenames or paths */
 
895
 
 
896
 
 
897
#if defined(PETSC_HAVE_LIMITS_H)
 
898
#include <limits.h>
 
899
#endif
 
900
#if defined(PETSC_HAVE_SYS_PARAM_H)
 
901
#include <sys/param.h>
 
902
#endif
 
903
 
 
904
#if defined(MAXPATHLEN)
 
905
#  define PETSC_MAX_PATH_LEN     MAXPATHLEN
 
906
#elif defined(MAX_PATH)
 
907
#  define PETSC_MAX_PATH_LEN     MAX_PATH
 
908
#elif defined(_MAX_PATH)
 
909
#  define PETSC_MAX_PATH_LEN     _MAX_PATH
 
910
#else
 
911
#  define PETSC_MAX_PATH_LEN     4096
 
912
#endif
 
913
 
 
914
PETSC_EXTERN_CXX_END
661
915
#endif
662
916
 
663
917