xref: /petsc/include/petscoptions.h (revision 95452b02e12c0ee11232c7ff2b24b568a8e07e43)
1f26ada1bSBarry Smith /*
237f753daSBarry Smith    Routines to determine options set in the options database.
3f26ada1bSBarry Smith */
40a835dfdSSatish Balay #if !defined(__PETSCOPTIONS_H)
50a835dfdSSatish Balay #define __PETSCOPTIONS_H
62c8e378dSBarry Smith #include <petscsys.h>
7c619b03eSJed Brown #include <petscviewertypes.h>
83a3b2205SBarry Smith 
9c5929fdfSBarry Smith typedef struct _n_PetscOptions* PetscOptions;
10c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsCreate(PetscOptions *);
11c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsDestroy(PetscOptions *);
12c5929fdfSBarry Smith 
13c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsHasName(PetscOptions,const char[],const char[],PetscBool *);
14c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(PetscOptions,const char[],const char [],PetscInt *,PetscBool *);
15c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(PetscOptions,const char[],const char [],PetscBool  *,PetscBool *);
16c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(PetscOptions,const char[],const char[],PetscReal *,PetscBool *);
17c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetScalar(PetscOptions,const char[],const char[],PetscScalar *,PetscBool *);
18c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(PetscOptions,const char[],const char[],PetscInt[],PetscInt *,PetscBool *);
19c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetRealArray(PetscOptions,const char[],const char[],PetscReal[],PetscInt *,PetscBool *);
20c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetScalarArray(PetscOptions,const char[],const char[],PetscScalar[],PetscInt *,PetscBool *);
21c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetBoolArray(PetscOptions,const char[],const char[],PetscBool [],PetscInt *,PetscBool *);
22c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetString(PetscOptions,const char[],const char[],char[],size_t,PetscBool *);
23c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetStringArray(PetscOptions,const char[],const char[],char*[],PetscInt*,PetscBool *);
24c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(PetscOptions,const char[],const char[],const char*const*,PetscInt,PetscInt*,PetscBool *);
25c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetEnum(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscBool *);
26c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetEnumArray(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscInt *,PetscBool *);
27014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsValidKey(const char[],PetscBool *);
283a3b2205SBarry Smith 
29c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsSetAlias(PetscOptions,const char[],const char[]);
30c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsSetValue(PetscOptions,const char[],const char[]);
31c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsClearValue(PetscOptions,const char[]);
323a3b2205SBarry Smith 
33c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsAllUsed(PetscOptions,PetscInt*);
34c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsUsed(PetscOptions,const char *,PetscBool*);
35c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsLeft(PetscOptions);
361ab23d95SFande Kong PETSC_EXTERN PetscErrorCode PetscOptionsLeftGet(PetscOptions,PetscInt*,char***,char***);
375b191818SFande Kong PETSC_EXTERN PetscErrorCode PetscOptionsLeftRestore(PetscOptions,PetscInt*,char***,char***);
38c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsView(PetscOptions,PetscViewer);
394b0e389bSBarry Smith 
404416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsCreateDefault(void);
41c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsInsert(PetscOptions,int*,char ***,const char[]);
42c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsInsertFile(MPI_Comm,PetscOptions,const char[],PetscBool );
433bcbd388SSean Farley #if defined(PETSC_HAVE_YAML)
44826011d7SBlaise Bourdin PETSC_EXTERN PetscErrorCode PetscOptionsInsertFileYAML(MPI_Comm,const char[],PetscBool);
453bcbd388SSean Farley #endif
46c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(PetscOptions,const char[]);
474416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsDestroyDefault(void);
48c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsClear(PetscOptions);
49c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPush(PetscOptions,const char[]);
50c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPop(PetscOptions);
515d0dffe5SBarry Smith 
52c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsReject(PetscOptions,const char[],const char[]);
53c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetAll(PetscOptions,char*[]);
545d0dffe5SBarry Smith 
55014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetenv(MPI_Comm,const char[],char[],size_t,PetscBool  *);
56014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsStringToInt(const char[],PetscInt*);
57014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsStringToReal(const char[],PetscReal*);
58014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsStringToBool(const char[],PetscBool*);
592e8a6d31SBarry Smith 
60014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsMonitorSet(PetscErrorCode (*)(const char[], const char[], void*), void *, PetscErrorCode (*)(void**));
61014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsMonitorCancel(void);
62014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsMonitorDefault(const char[], const char[], void *);
63081c24baSBoyana Norris 
64014dd563SJed Brown PETSC_EXTERN PetscBool PetscOptionsPublish;
65e55864a3SBarry Smith 
66e55864a3SBarry Smith 
67e55864a3SBarry Smith /*
68e55864a3SBarry Smith     See manual page for PetscOptionsBegin()
694416b707SBarry Smith 
704416b707SBarry Smith     PetscOptionsItem and PetscOptionsItems are a single option (such as ksp_type) and a collection of such single
714416b707SBarry Smith   options being handled with a PetscOptionsBegin/End()
724416b707SBarry Smith 
73e55864a3SBarry Smith */
74050cccc3SHong Zhang typedef enum {OPTION_INT,OPTION_BOOL,OPTION_REAL,OPTION_FLIST,OPTION_STRING,OPTION_REAL_ARRAY,OPTION_SCALAR_ARRAY,OPTION_HEAD,OPTION_INT_ARRAY,OPTION_ELIST,OPTION_BOOL_ARRAY,OPTION_STRING_ARRAY} PetscOptionType;
754416b707SBarry Smith typedef struct _n_PetscOptionItem* PetscOptionItem;
764416b707SBarry Smith struct _n_PetscOptionItem{
77e55864a3SBarry Smith   char              *option;
78e55864a3SBarry Smith   char              *text;
79e55864a3SBarry Smith   void              *data;         /* used to hold the default value and then any value it is changed to by GUI */
80e55864a3SBarry Smith   PetscFunctionList flist;         /* used for available values for PetscOptionsList() */
81e55864a3SBarry Smith   const char *const *list;        /* used for available values for PetscOptionsEList() */
82e55864a3SBarry Smith   char              nlist;         /* number of entries in list */
83e55864a3SBarry Smith   char              *man;
84e55864a3SBarry Smith   size_t            arraylength;   /* number of entries in data in the case that it is an array (of PetscInt etc) */
85e55864a3SBarry Smith   PetscBool         set;           /* the user has changed this value in the GUI */
86e55864a3SBarry Smith   PetscOptionType   type;
874416b707SBarry Smith   PetscOptionItem   next;
88e55864a3SBarry Smith   char              *pman;
89e55864a3SBarry Smith   void              *edata;
90e55864a3SBarry Smith };
91e55864a3SBarry Smith 
924416b707SBarry Smith typedef struct _p_PetscOptionItems {
93e55864a3SBarry Smith   PetscInt         count;
944416b707SBarry Smith   PetscOptionItem  next;
95e55864a3SBarry Smith   char             *prefix,*pprefix;
96e55864a3SBarry Smith   char             *title;
97e55864a3SBarry Smith   MPI_Comm         comm;
98e55864a3SBarry Smith   PetscBool        printhelp,changedmethod,alreadyprinted;
99e55864a3SBarry Smith   PetscObject      object;
100c5929fdfSBarry Smith   PetscOptions     options;
1014416b707SBarry Smith } PetscOptionItems;
10230de9b25SBarry Smith 
1038c6bf8b2SFande Kong 
10430de9b25SBarry Smith /*MC
10530de9b25SBarry Smith     PetscOptionsBegin - Begins a set of queries on the options database that are related and should be
1061957e957SBarry Smith      displayed on the same window of a GUI that allows the user to set the options interactively. Often one should
1071957e957SBarry Smith      use PetscObjectOptionsBegin() rather than this call.
10830de9b25SBarry Smith 
109f2ba6396SBarry Smith    Synopsis:
110aaa7dc30SBarry Smith     #include <petscoptions.h>
111f2ba6396SBarry Smith     PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[])
11230de9b25SBarry Smith 
11330de9b25SBarry Smith     Collective on MPI_Comm
11430de9b25SBarry Smith 
11530de9b25SBarry Smith   Input Parameters:
11630de9b25SBarry Smith +   comm - communicator that shares GUI
11730de9b25SBarry Smith .   prefix - options prefix for all options displayed on window
11830de9b25SBarry Smith .   title - short descriptive text, for example "Krylov Solver Options"
11930de9b25SBarry Smith -   mansec - section of manual pages for options, for example KSP
12030de9b25SBarry Smith 
12130de9b25SBarry Smith   Level: intermediate
12230de9b25SBarry Smith 
123*95452b02SPatrick Sanan   Notes:
124*95452b02SPatrick Sanan     Needs to be ended by a call the PetscOptionsEnd()
12530de9b25SBarry Smith          Can add subheadings with PetscOptionsHead()
12630de9b25SBarry Smith 
127*95452b02SPatrick Sanan   Developer Notes:
128*95452b02SPatrick Sanan     PetscOptionsPublish is set in PetscOptionsCheckInitial_Private() with -saws_options. When PetscOptionsPublish is set the
129aee2cecaSBarry Smith $             loop between PetscOptionsBegin() and PetscOptionsEnd() is run THREE times with PetscOptionsPublishCount of values -1,0,1 otherwise
130aee2cecaSBarry Smith $             the loop is run ONCE with a PetscOptionsPublishCount of 1.
131aee2cecaSBarry Smith $             = -1 : The PetscOptionsInt() etc just call the PetscOptionsGetInt() etc
132aee2cecaSBarry Smith $             = 0  : The GUI objects are created in PetscOptionsInt() etc and displayed in PetscOptionsEnd() and the options
133c8e70145SBarry Smith $                    database updated updated with user changes; PetscOptionsGetInt() etc are also called
134c8e70145SBarry Smith $             = 1 : The PetscOptionsInt() etc again call the PetscOptionsGetInt() etc (possibly getting new values), in addition the help message and
135c8e70145SBarry Smith $                   default values are printed if -help was given.
136538aa990SBarry Smith $           When PetscOptionsObject.changedmethod is set this causes PetscOptionsPublishCount to be reset to -2 (so in the next loop iteration it is -1)
137538aa990SBarry Smith $           and the whole process is repeated. This is to handle when, for example, the KSPType is changed thus changing the list of
138538aa990SBarry Smith $           options available so they need to be redisplayed so the user can change the. Chaning PetscOptionsObjects.changedmethod is never
139538aa990SBarry Smith $           currently set.
140aee2cecaSBarry Smith 
141aee2cecaSBarry Smith 
14230de9b25SBarry Smith .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(),
143acfcf0e5SJed Brown           PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool()
144acfcf0e5SJed Brown           PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(),
14530de9b25SBarry Smith           PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(),
14630de9b25SBarry Smith           PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(),
147acfcf0e5SJed Brown           PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(),
148a264d7a6SBarry Smith           PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin()
14930de9b25SBarry Smith 
15030de9b25SBarry Smith M*/
1513194b578SJed Brown #define    PetscOptionsBegin(comm,prefix,mess,sec) 0; do {\
1524416b707SBarry Smith              PetscOptionItems PetscOptionsObjectBase;\
1534416b707SBarry Smith              PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
1544416b707SBarry Smith              PetscMemzero(PetscOptionsObject,sizeof(PetscOptionItems)); \
155e55864a3SBarry Smith              for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\
156e55864a3SBarry Smith              PetscErrorCode _5_ierr = PetscOptionsBegin_Private(PetscOptionsObject,comm,prefix,mess,sec);CHKERRQ(_5_ierr);
15730de9b25SBarry Smith 
1585fefd1ebSJed Brown /*MC
1595fefd1ebSJed Brown     PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be
1605fefd1ebSJed Brown      displayed on the same window of a GUI that allows the user to set the options interactively.
1615fefd1ebSJed Brown 
162f2ba6396SBarry Smith    Synopsis:
163aaa7dc30SBarry Smith     #include <petscoptions.h>
164f2ba6396SBarry Smith     PetscErrorCode PetscObjectOptionsBegin(PetscObject obj)
1655fefd1ebSJed Brown 
1665fefd1ebSJed Brown     Collective on PetscObject
1675fefd1ebSJed Brown 
1685fefd1ebSJed Brown   Input Parameters:
1695fefd1ebSJed Brown .   obj - object to set options for
1705fefd1ebSJed Brown 
1715fefd1ebSJed Brown   Level: intermediate
1725fefd1ebSJed Brown 
173*95452b02SPatrick Sanan   Notes:
174*95452b02SPatrick Sanan     Needs to be ended by a call the PetscOptionsEnd()
1755fefd1ebSJed Brown          Can add subheadings with PetscOptionsHead()
1765fefd1ebSJed Brown 
1775fefd1ebSJed Brown .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(),
1785fefd1ebSJed Brown           PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool()
1795fefd1ebSJed Brown           PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(),
1805fefd1ebSJed Brown           PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(),
1815fefd1ebSJed Brown           PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(),
1825fefd1ebSJed Brown           PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(),
183a264d7a6SBarry Smith           PetscOptionsFList(), PetscOptionsEList()
1845fefd1ebSJed Brown 
1855fefd1ebSJed Brown M*/
1863194b578SJed Brown #define PetscObjectOptionsBegin(obj) 0; do {                            \
1874416b707SBarry Smith              PetscOptionItems PetscOptionsObjectBase;\
1884416b707SBarry Smith              PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
189c5929fdfSBarry Smith              PetscOptionsObject->options = ((PetscObject)obj)->options; \
190e55864a3SBarry Smith              for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\
191e55864a3SBarry Smith              PetscErrorCode _5_ierr = PetscObjectOptionsBegin_Private(PetscOptionsObject,obj);CHKERRQ(_5_ierr);
1923194b578SJed Brown 
19330de9b25SBarry Smith /*MC
19430de9b25SBarry Smith     PetscOptionsEnd - Ends a set of queries on the options database that are related and should be
19530de9b25SBarry Smith      displayed on the same window of a GUI that allows the user to set the options interactively.
19630de9b25SBarry Smith 
19730de9b25SBarry Smith     Collective on the MPI_Comm used in PetscOptionsBegin()
19830de9b25SBarry Smith 
199f2ba6396SBarry Smith    Synopsis:
200aaa7dc30SBarry Smith      #include <petscoptions.h>
201f2ba6396SBarry Smith      PetscErrorCode PetscOptionsEnd(void)
20230de9b25SBarry Smith 
20330de9b25SBarry Smith   Level: intermediate
20430de9b25SBarry Smith 
205*95452b02SPatrick Sanan   Notes:
206*95452b02SPatrick Sanan     Needs to be preceded by a call to PetscOptionsBegin() or PetscObjectOptionsBegin()
20730de9b25SBarry Smith 
20830de9b25SBarry Smith .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(),
209acfcf0e5SJed Brown           PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool()
210acfcf0e5SJed Brown           PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(),
21130de9b25SBarry Smith           PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(),
21230de9b25SBarry Smith           PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(),
213acfcf0e5SJed Brown           PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(),
214a264d7a6SBarry Smith           PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin()
21530de9b25SBarry Smith 
21630de9b25SBarry Smith M*/
217e55864a3SBarry Smith #define    PetscOptionsEnd() _5_ierr = PetscOptionsEnd_Private(PetscOptionsObject);CHKERRQ(_5_ierr);}} while (0)
21830de9b25SBarry Smith 
2194416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *,MPI_Comm,const char[],const char[],const char[]);
2204416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscOptionItems *,PetscObject);
2214416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *);
2224416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsHead(PetscOptionItems *,const char[]);
22330de9b25SBarry Smith 
22430de9b25SBarry Smith /*MC
22530de9b25SBarry Smith      PetscOptionsTail - Ends a section of options begun with PetscOptionsHead()
22630de9b25SBarry Smith             See, for example, KSPSetFromOptions_GMRES().
22730de9b25SBarry Smith 
22830de9b25SBarry Smith    Collective on the communicator passed in PetscOptionsBegin()
22930de9b25SBarry Smith 
230f2ba6396SBarry Smith    Synopsis:
231aaa7dc30SBarry Smith      #include <petscoptions.h>
232f2ba6396SBarry Smith      PetscErrorCode PetscOptionsTail(void)
23330de9b25SBarry Smith 
23430de9b25SBarry Smith   Level: intermediate
23530de9b25SBarry Smith 
236*95452b02SPatrick Sanan    Notes:
237*95452b02SPatrick Sanan     Must be between a PetscOptionsBegin()/PetscObjectOptionsBegin() and a PetscOptionsEnd()
23830de9b25SBarry Smith 
23930de9b25SBarry Smith           Must be preceded by a call to PetscOptionsHead() in the same function.
24030de9b25SBarry Smith 
241b52f573bSBarry Smith           This needs to be used only if the code below PetscOptionsTail() can be run ONLY once.
242b52f573bSBarry Smith       See, for example, PCSetFromOptions_Composite(). This is a return(0) in it for early exit
243b52f573bSBarry Smith       from the function.
244b52f573bSBarry Smith 
24556752e42SBarry Smith           This is only for use with the PETSc options GUI
246b52f573bSBarry Smith 
24730de9b25SBarry Smith    Concepts: options database^subheading
24830de9b25SBarry Smith 
24930de9b25SBarry Smith .seealso: PetscOptionsGetInt(), PetscOptionsGetReal(),
250acfcf0e5SJed Brown            PetscOptionsHasName(), PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool(),
25130de9b25SBarry Smith           PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(),
25230de9b25SBarry Smith           PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(),
253acfcf0e5SJed Brown           PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(),
254a264d7a6SBarry Smith           PetscOptionsFList(), PetscOptionsEList(), PetscOptionsEnum()
25530de9b25SBarry Smith M*/
256e55864a3SBarry Smith #define    PetscOptionsTail() 0; {if (PetscOptionsObject->count != 1) PetscFunctionReturn(0);}
257186905e3SBarry Smith 
258e55864a3SBarry Smith #define PetscOptionsEnum(a,b,c,d,e,f,g) PetscOptionsEnum_Private(PetscOptionsObject,a,b,c,d,e,f,g)
259e55864a3SBarry Smith #define PetscOptionsInt(a,b,c,d,e,f) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f)
260e55864a3SBarry Smith #define PetscOptionsReal(a,b,c,d,e,f) PetscOptionsReal_Private(PetscOptionsObject,a,b,c,d,e,f)
261e55864a3SBarry Smith #define PetscOptionsScalar(a,b,c,d,e,f) PetscOptionsScalar_Private(PetscOptionsObject,a,b,c,d,e,f)
262e55864a3SBarry Smith #define PetscOptionsName(a,b,c,d) PetscOptionsName_Private(PetscOptionsObject,a,b,c,d)
263e55864a3SBarry Smith #define PetscOptionsString(a,b,c,d,e,f,g) PetscOptionsString_Private(PetscOptionsObject,a,b,c,d,e,f,g)
264e55864a3SBarry Smith #define PetscOptionsBool(a,b,c,d,e,f) PetscOptionsBool_Private(PetscOptionsObject,a,b,c,d,e,f)
265e55864a3SBarry Smith #define PetscOptionsBoolGroupBegin(a,b,c,d) PetscOptionsBoolGroupBegin_Private(PetscOptionsObject,a,b,c,d)
266e55864a3SBarry Smith #define PetscOptionsBoolGroup(a,b,c,d) PetscOptionsBoolGroup_Private(PetscOptionsObject,a,b,c,d)
267e55864a3SBarry Smith #define PetscOptionsBoolGroupEnd(a,b,c,d) PetscOptionsBoolGroupEnd_Private(PetscOptionsObject,a,b,c,d)
26883355fc5SBarry Smith #define PetscOptionsFList(a,b,c,d,e,f,g,h) PetscOptionsFList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h)
269e55864a3SBarry Smith #define PetscOptionsEList(a,b,c,d,e,f,g,h) PetscOptionsEList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h)
270e55864a3SBarry Smith #define PetscOptionsRealArray(a,b,c,d,e,f) PetscOptionsRealArray_Private(PetscOptionsObject,a,b,c,d,e,f)
271050cccc3SHong Zhang #define PetscOptionsScalarArray(a,b,c,d,e,f) PetscOptionsScalarArray_Private(PetscOptionsObject,a,b,c,d,e,f)
272e55864a3SBarry Smith #define PetscOptionsIntArray(a,b,c,d,e,f) PetscOptionsIntArray_Private(PetscOptionsObject,a,b,c,d,e,f)
273e55864a3SBarry Smith #define PetscOptionsStringArray(a,b,c,d,e,f) PetscOptionsStringArray_Private(PetscOptionsObject,a,b,c,d,e,f)
274e55864a3SBarry Smith #define PetscOptionsBoolArray(a,b,c,d,e,f) PetscOptionsBoolArray_Private(PetscOptionsObject,a,b,c,d,e,f)
275d3e47460SLisandro Dalcin #define PetscOptionsEnumArray(a,b,c,d,e,f,g) PetscOptionsEnumArray_Private(PetscOptionsObject,a,b,c,d,e,f,g)
276e55864a3SBarry Smith 
277e55864a3SBarry Smith 
2784416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum,PetscEnum*,PetscBool *);
2794416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt,PetscInt*,PetscBool *);
2804416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal,PetscReal*,PetscBool *);
2814416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar,PetscScalar*,PetscBool *);
2824416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *);
2834416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems*,const char[],const char[],const char[],const char[],char*,size_t,PetscBool *);
2844416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool ,PetscBool *,PetscBool *);
2854416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *);
2864416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *);
2874416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *);
2884416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems*,const char[],const char[],const char[],PetscFunctionList,const char[],char[],size_t,PetscBool *);
2894416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems*,const char[],const char[],const char[],const char*const*,PetscInt,const char[],PetscInt*,PetscBool *);
2904416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal[],PetscInt*,PetscBool *);
2914416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar[],PetscInt*,PetscBool *);
2924416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt[],PetscInt*,PetscBool *);
2934416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems*,const char[],const char[],const char[],char*[],PetscInt*,PetscBool *);
2944416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool [],PetscInt*,PetscBool *);
2954416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum[],PetscInt*,PetscBool *);
296cffb1e40SBarry Smith 
297e9fa29b7SSatish Balay 
298c5929fdfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsSetFromOptions(PetscOptions);
299e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void);
300f8d0b74dSMatthew Knepley 
301447ac60bSBarry Smith PETSC_EXTERN PetscErrorCode PetscObjectAddOptionsHandler(PetscObject,PetscErrorCode (*)(PetscOptionItems*,PetscObject,void*),PetscErrorCode (*)(PetscObject,void*),void*);
302447ac60bSBarry Smith PETSC_EXTERN PetscErrorCode PetscObjectProcessOptionsHandlers(PetscOptionItems*,PetscObject);
303447ac60bSBarry Smith PETSC_EXTERN PetscErrorCode PetscObjectDestroyOptionsHandlers(PetscObject);
304447ac60bSBarry Smith 
3053a3b2205SBarry Smith #endif
306