xref: /petsc/include/petscoptions.h (revision b22c9ba6aee6fe2ce9d3bf33ab3015abcf1a3d5c)
1 /*
2    Routines to determine options set in the options database.
3 */
4 #pragma once
5 
6 #include <petscsys.h>
7 #include <petscviewertypes.h>
8 
9 /* SUBMANSEC = Sys */
10 
11 typedef enum {
12   PETSC_OPT_CODE,
13   PETSC_OPT_COMMAND_LINE,
14   PETSC_OPT_FILE,
15   PETSC_OPT_ENVIRONMENT,
16   NUM_PETSC_OPT_SOURCE
17 } PetscOptionSource;
18 
19 #define PETSC_MAX_OPTION_NAME 512
20 typedef struct _n_PetscOptions *PetscOptions;
21 PETSC_EXTERN PetscErrorCode     PetscOptionsCreate(PetscOptions *);
22 PETSC_EXTERN PetscErrorCode     PetscOptionsPush(PetscOptions);
23 PETSC_EXTERN PetscErrorCode     PetscOptionsPop(void);
24 PETSC_EXTERN PetscErrorCode     PetscOptionsDestroy(PetscOptions *);
25 PETSC_EXTERN PetscErrorCode     PetscOptionsCreateDefault(void);
26 PETSC_EXTERN PetscErrorCode     PetscOptionsDestroyDefault(void);
27 
28 PETSC_EXTERN PetscErrorCode PetscOptionsHasHelp(PetscOptions, PetscBool *);
29 PETSC_EXTERN PetscErrorCode PetscOptionsHasName(PetscOptions, const char[], const char[], PetscBool *);
30 PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(PetscOptions, const char[], const char[], PetscBool *, PetscBool *);
31 PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(PetscOptions, const char[], const char[], PetscInt *, PetscBool *);
32 PETSC_EXTERN PetscErrorCode PetscOptionsGetEnum(PetscOptions, const char[], const char[], const char *const *, PetscEnum *, PetscBool *);
33 PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(PetscOptions, const char[], const char[], const char *const *, PetscInt, PetscInt *, PetscBool *);
34 PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(PetscOptions, const char[], const char[], PetscReal *, PetscBool *);
35 PETSC_EXTERN PetscErrorCode PetscOptionsGetScalar(PetscOptions, const char[], const char[], PetscScalar *, PetscBool *);
36 PETSC_EXTERN PetscErrorCode PetscOptionsGetString(PetscOptions, const char[], const char[], char[], size_t, PetscBool *);
37 
38 PETSC_EXTERN PetscErrorCode PetscOptionsGetBoolArray(PetscOptions, const char[], const char[], PetscBool[], PetscInt *, PetscBool *);
39 PETSC_EXTERN PetscErrorCode PetscOptionsGetEnumArray(PetscOptions, const char[], const char[], const char *const *, PetscEnum *, PetscInt *, PetscBool *);
40 PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(PetscOptions, const char[], const char[], PetscInt[], PetscInt *, PetscBool *);
41 PETSC_EXTERN PetscErrorCode PetscOptionsGetRealArray(PetscOptions, const char[], const char[], PetscReal[], PetscInt *, PetscBool *);
42 PETSC_EXTERN PetscErrorCode PetscOptionsGetScalarArray(PetscOptions, const char[], const char[], PetscScalar[], PetscInt *, PetscBool *);
43 PETSC_EXTERN PetscErrorCode PetscOptionsGetStringArray(PetscOptions, const char[], const char[], char *[], PetscInt *, PetscBool *);
44 
45 PETSC_EXTERN PetscErrorCode PetscOptionsValidKey(const char[], PetscBool *);
46 PETSC_EXTERN PetscErrorCode PetscOptionsSetAlias(PetscOptions, const char[], const char[]);
47 PETSC_EXTERN PetscErrorCode PetscOptionsSetValue(PetscOptions, const char[], const char[]);
48 PETSC_EXTERN PetscErrorCode PetscOptionsClearValue(PetscOptions, const char[]);
49 PETSC_EXTERN PetscErrorCode PetscOptionsFindPair(PetscOptions, const char[], const char[], const char *[], PetscBool *);
50 
51 PETSC_EXTERN PetscErrorCode PetscOptionsGetAll(PetscOptions, char *[]);
52 PETSC_EXTERN PetscErrorCode PetscOptionsAllUsed(PetscOptions, PetscInt *);
53 PETSC_EXTERN PetscErrorCode PetscOptionsUsed(PetscOptions, const char[], PetscBool *);
54 PETSC_EXTERN PetscErrorCode PetscOptionsLeft(PetscOptions);
55 PETSC_EXTERN PetscErrorCode PetscOptionsLeftGet(PetscOptions, PetscInt *, char ***, char ***);
56 PETSC_EXTERN PetscErrorCode PetscOptionsLeftRestore(PetscOptions, PetscInt *, char ***, char ***);
57 PETSC_EXTERN PetscErrorCode PetscOptionsView(PetscOptions, PetscViewer);
58 
59 PETSC_EXTERN PetscErrorCode PetscOptionsReject(PetscOptions, const char[], const char[], const char[]);
60 PETSC_EXTERN PetscErrorCode PetscOptionsInsert(PetscOptions, int *, char ***, const char[]);
61 PETSC_EXTERN PetscErrorCode PetscOptionsInsertFile(MPI_Comm, PetscOptions, const char[], PetscBool);
62 PETSC_EXTERN PetscErrorCode PetscOptionsInsertFileYAML(MPI_Comm, PetscOptions, const char[], PetscBool);
63 PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(PetscOptions, const char[]);
64 PETSC_EXTERN PetscErrorCode PetscOptionsInsertStringYAML(PetscOptions, const char[]);
65 PETSC_EXTERN PetscErrorCode PetscOptionsInsertArgs(PetscOptions, int, char **);
66 PETSC_EXTERN PetscErrorCode PetscOptionsClear(PetscOptions);
67 PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPush(PetscOptions, const char[]);
68 PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPop(PetscOptions);
69 
70 PETSC_EXTERN PetscErrorCode PetscOptionsGetenv(MPI_Comm, const char[], char[], size_t, PetscBool *);
71 PETSC_EXTERN PetscErrorCode PetscOptionsStringToBool(const char[], PetscBool *);
72 PETSC_EXTERN PetscErrorCode PetscOptionsStringToInt(const char[], PetscInt *);
73 PETSC_EXTERN PetscErrorCode PetscOptionsStringToReal(const char[], PetscReal *);
74 PETSC_EXTERN PetscErrorCode PetscOptionsStringToScalar(const char[], PetscScalar *);
75 
76 PETSC_EXTERN PetscErrorCode PetscOptionsMonitorSet(PetscErrorCode (*)(const char[], const char[], PetscOptionSource, void *), void *, PetscErrorCode (*)(void **));
77 PETSC_EXTERN PetscErrorCode PetscOptionsMonitorDefault(const char[], const char[], PetscOptionSource, void *);
78 
79 PETSC_EXTERN PetscErrorCode PetscObjectSetOptions(PetscObject, PetscOptions);
80 PETSC_EXTERN PetscErrorCode PetscObjectGetOptions(PetscObject, PetscOptions *);
81 
82 PETSC_EXTERN PetscBool PetscOptionsPublish;
83 
84 /*
85     See manual page for PetscOptionsBegin()
86 
87     PetscOptionsItem and PetscOptionsItems are a single option (such as ksp_type) and a collection of such single
88   options being handled with a PetscOptionsBegin/End()
89 
90 */
91 typedef enum {
92   OPTION_INT,
93   OPTION_BOOL,
94   OPTION_REAL,
95   OPTION_FLIST,
96   OPTION_STRING,
97   OPTION_REAL_ARRAY,
98   OPTION_SCALAR_ARRAY,
99   OPTION_HEAD,
100   OPTION_INT_ARRAY,
101   OPTION_ELIST,
102   OPTION_BOOL_ARRAY,
103   OPTION_STRING_ARRAY
104 } PetscOptionType;
105 
106 typedef struct _n_PetscOptionItem *PetscOptionItem;
107 struct _n_PetscOptionItem {
108   char              *option;
109   char              *text;
110   void              *data;  /* used to hold the default value and then any value it is changed to by GUI */
111   PetscFunctionList  flist; /* used for available values for PetscOptionsList() */
112   const char *const *list;  /* used for available values for PetscOptionsEList() */
113   char               nlist; /* number of entries in list */
114   char              *man;
115   size_t             arraylength; /* number of entries in data in the case that it is an array (of PetscInt etc) */
116   PetscBool          set;         /* the user has changed this value in the GUI */
117   PetscOptionType    type;
118   PetscOptionItem    next;
119   char              *pman;
120   void              *edata;
121 };
122 
123 typedef struct _p_PetscOptionItems {
124   PetscInt        count;
125   PetscOptionItem next;
126   char           *prefix, *pprefix;
127   char           *title;
128   MPI_Comm        comm;
129   PetscBool       printhelp, changedmethod, alreadyprinted;
130   PetscObject     object;
131   PetscOptions    options;
132 } PetscOptionItems;
133 
134 #if defined(PETSC_CLANG_STATIC_ANALYZER)
135 extern PetscOptionItems *PetscOptionsObject; /* declare this so that the PetscOptions stubs work */
136 PetscErrorCode           PetscOptionsBegin(MPI_Comm, const char *, const char *, const char *);
137 PetscErrorCode           PetscObjectOptionsBegin(PetscObject);
138 PetscErrorCode           PetscOptionsEnd(void);
139 #else
140   /*MC
141     PetscOptionsBegin - Begins a set of queries on the options database that are related and should be
142      displayed on the same window of a GUI that allows the user to set the options interactively. Often one should
143      use `PetscObjectOptionsBegin()` rather than this call.
144 
145     Synopsis:
146     #include <petscoptions.h>
147     PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[])
148 
149     Collective
150 
151     Input Parameters:
152 +   comm - communicator that shares GUI
153 .   prefix - options prefix for all options displayed on window (optional)
154 .   title - short descriptive text, for example "Krylov Solver Options"
155 -   mansec - section of manual pages for options, for example `KSP` (optional)
156 
157     Level: intermediate
158 
159     Notes:
160     This is a macro that handles its own error checking, it does not return an error code.
161 
162     The set of queries needs to be ended by a call to `PetscOptionsEnd()`.
163 
164     One can add subheadings with `PetscOptionsHeadBegin()`.
165 
166     Developer Notes:
167     `PetscOptionsPublish` is set in `PetscOptionsCheckInitial_Private()` with `-saws_options`. When `PetscOptionsPublish` is set the
168     loop between `PetscOptionsBegin()` and `PetscOptionsEnd()` is run THREE times with `PetscOptionsPublishCount` of values -1,0,1.
169      Otherwise the loop is run ONCE with a `PetscOptionsPublishCount` of 1.
170 +      \-1 - `PetscOptionsInt()` etc. just call `PetscOptionsGetInt()` etc.
171 .      0   - The GUI objects are created in `PetscOptionsInt()` etc. and displayed in `PetscOptionsEnd()` and the options
172               database updated with user changes; `PetscOptionsGetInt()` etc. are also called.
173 -      1   - `PetscOptionsInt()` etc. again call `PetscOptionsGetInt()` etc. (possibly getting new values), in addition the help message and
174               default values are printed if -help was given.
175      When `PetscOptionsObject.changedmethod` is set this causes `PetscOptionsPublishCount` to be reset to -2 (so in the next loop iteration it is -1)
176      and the whole process is repeated. This is to handle when, for example, the `KSPType` is changed thus changing the list of
177      options available so they need to be redisplayed so the user can change the. Changing `PetscOptionsObjects.changedmethod` is never
178      currently set.
179 
180      Fortran Note:
181      Returns ierr error code per PETSc Fortran API
182 
183 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
184           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
185           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
186           `PetscOptionsName()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
187           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
188           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
189           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()`
190 M*/
191   #define PetscOptionsBegin(comm, prefix, mess, sec) \
192     do { \
193       PetscOptionItems  PetscOptionsObjectBase; \
194       PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
195       PetscCall(PetscMemzero(PetscOptionsObject, sizeof(*PetscOptionsObject))); \
196       for (PetscOptionsObject->count = (PetscOptionsPublish ? -1 : 1); PetscOptionsObject->count < 2; PetscOptionsObject->count++) { \
197         PetscCall(PetscOptionsBegin_Private(PetscOptionsObject, comm, prefix, mess, sec))
198 
199   /*MC
200     PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be
201     displayed on the same window of a GUI that allows the user to set the options interactively.
202 
203     Synopsis:
204     #include <petscoptions.h>
205     PetscErrorCode PetscObjectOptionsBegin(PetscObject obj)
206 
207     Collective
208 
209     Input Parameter:
210 .   obj - object to set options for
211 
212     Level: intermediate
213 
214     Notes:
215     This is a macro that handles its own error checking, it does not return an error code.
216 
217     Needs to be ended by a call the `PetscOptionsEnd()`
218 
219     Can add subheadings with `PetscOptionsHeadBegin()`
220 
221 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
222           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
223           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
224           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
225           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
226           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
227           `PetscOptionsFList()`, `PetscOptionsEList()`
228 M*/
229   #define PetscObjectOptionsBegin(obj) \
230     do { \
231       PetscOptionItems  PetscOptionsObjectBase; \
232       PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
233       PetscOptionsObject->options          = ((PetscObject)obj)->options; \
234       for (PetscOptionsObject->count = (PetscOptionsPublish ? -1 : 1); PetscOptionsObject->count < 2; PetscOptionsObject->count++) { \
235         PetscCall(PetscObjectOptionsBegin_Private(obj, PetscOptionsObject))
236 
237   /*MC
238     PetscOptionsEnd - Ends a set of queries on the options database that are related and should be
239      displayed on the same window of a GUI that allows the user to set the options interactively.
240 
241     Synopsis:
242      #include <petscoptions.h>
243      PetscErrorCode PetscOptionsEnd(void)
244 
245     Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()`
246 
247     Level: intermediate
248 
249     Notes:
250     Needs to be preceded by a call to `PetscOptionsBegin()` or `PetscObjectOptionsBegin()`
251 
252     This is a macro that handles its own error checking, it does not return an error code.
253 
254     Fortran Note:
255     Returns ierr error code per PETSc Fortran API
256 
257 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
258           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
259           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
260           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsHeadBegin()`,
261           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
262           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
263           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()`
264 M*/
265   #define PetscOptionsEnd() \
266     PetscCall(PetscOptionsEnd_Private(PetscOptionsObject)); \
267     } \
268     } \
269     while (0)
270 #endif /* PETSC_CLANG_STATIC_ANALYZER */
271 
272 PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *, MPI_Comm, const char[], const char[], const char[]);
273 PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscObject, PetscOptionItems *);
274 PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *);
275 PETSC_EXTERN PetscErrorCode PetscOptionsHeadBegin(PetscOptionItems *, const char[]);
276 
277 #if defined(PETSC_CLANG_STATIC_ANALYZER)
278 template <typename... T>
279 void PetscOptionsHeadBegin(T...);
280 void PetscOptionsHeadEnd(void);
281 template <typename... T>
282 PetscErrorCode PetscOptionsEnum(T...);
283 template <typename... T>
284 PetscErrorCode PetscOptionsInt(T...);
285 template <typename... T>
286 PetscErrorCode PetscOptionsBoundedInt(T...);
287 template <typename... T>
288 PetscErrorCode PetscOptionsRangeInt(T...);
289 template <typename... T>
290 PetscErrorCode PetscOptionsReal(T...);
291 template <typename... T>
292 PetscErrorCode PetscOptionsScalar(T...);
293 template <typename... T>
294 PetscErrorCode PetscOptionsName(T...);
295 template <typename... T>
296 PetscErrorCode PetscOptionsString(T...);
297 template <typename... T>
298 PetscErrorCode PetscOptionsBool(T...);
299 template <typename... T>
300 PetscErrorCode PetscOptionsBoolGroupBegin(T...);
301 template <typename... T>
302 PetscErrorCode PetscOptionsBoolGroup(T...);
303 template <typename... T>
304 PetscErrorCode PetscOptionsBoolGroupEnd(T...);
305 template <typename... T>
306 PetscErrorCode PetscOptionsFList(T...);
307 template <typename... T>
308 PetscErrorCode PetscOptionsEList(T...);
309 template <typename... T>
310 PetscErrorCode PetscOptionsRealArray(T...);
311 template <typename... T>
312 PetscErrorCode PetscOptionsScalarArray(T...);
313 template <typename... T>
314 PetscErrorCode PetscOptionsIntArray(T...);
315 template <typename... T>
316 PetscErrorCode PetscOptionsStringArray(T...);
317 template <typename... T>
318 PetscErrorCode PetscOptionsBoolArray(T...);
319 template <typename... T>
320 PetscErrorCode PetscOptionsEnumArray(T...);
321 template <typename... T>
322 PetscErrorCode PetscOptionsDeprecated(T...);
323 template <typename... T>
324 PetscErrorCode PetscOptionsDeprecatedNoObject(T...);
325 #else
326   /*MC
327    PetscOptionsHeadBegin - Puts a heading before listing any more published options. Used, for example,
328    in `KSPSetFromOptions_GMRES()`.
329 
330    Logically Collective on the communicator passed in `PetscOptionsBegin()`
331 
332    Input Parameter:
333 .  head - the heading text
334 
335    Level: developer
336 
337    Notes:
338    Handles errors directly, hence does not return an error code
339 
340    Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`, and `PetscOptionsObject` created in `PetscOptionsBegin()` should be the first argument
341 
342    Must be followed by a call to `PetscOptionsHeadEnd()` in the same function.
343 
344 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
345           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
346           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
347           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
348           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
349           `PetscOptionsFList()`, `PetscOptionsEList()`
350 @*/
351   #define PetscOptionsHeadBegin(PetscOptionsObject, head) \
352     do { \
353       if (PetscOptionsObject->printhelp && PetscOptionsObject->count == 1 && !PetscOptionsObject->alreadyprinted) PetscCall((*PetscHelpPrintf)(PetscOptionsObject->comm, "  %s\n", head)); \
354     } while (0)
355 
356   #define PetscOptionsHead(...) PETSC_DEPRECATED_MACRO(3, 18, 0, "PetscOptionsHeadBegin()", ) PetscOptionsHeadBegin(__VA_ARGS__)
357 
358   /*MC
359      PetscOptionsHeadEnd - Ends a section of options begun with `PetscOptionsHeadBegin()`
360      See, for example, `KSPSetFromOptions_GMRES()`.
361 
362      Synopsis:
363      #include <petscoptions.h>
364      PetscErrorCode PetscOptionsHeadEnd(void)
365 
366      Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()`
367 
368      Level: intermediate
369 
370      Notes:
371      Must be between a `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` and a `PetscOptionsEnd()`
372 
373      Must be preceded by a call to `PetscOptionsHeadBegin()` in the same function.
374 
375      This needs to be used only if the code below `PetscOptionsHeadEnd()` can be run ONLY once.
376      See, for example, `PCSetFromOptions_Composite()`. This is a `return(0)` in it for early exit
377      from the function.
378 
379      This is only for use with the PETSc options GUI
380 
381 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
382           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
383           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
384           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
385           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
386           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsEnum()`
387 M*/
388   #define PetscOptionsHeadEnd() \
389     do { \
390       if (PetscOptionsObject->count != 1) PetscFunctionReturn(PETSC_SUCCESS); \
391     } while (0)
392 
393   #define PetscOptionsTail(...)                                                     PETSC_DEPRECATED_MACRO(3, 18, 0, "PetscOptionsHeadEnd()", ) PetscOptionsHeadEnd(__VA_ARGS__)
394 
395 /*MC
396   PetscOptionsEnum - Gets the enum value for a particular option in the database.
397 
398   Synopsis:
399   #include <petscoptions.h>
400   PetscErrorCode PetscOptionsEnum(const char opt[], const char text[], const char man[], const char *const *list, PetscEnum currentvalue, PetscEnum *value, PetscBool *set)
401 
402   Logically Collective on the communicator passed in `PetscOptionsBegin()`
403 
404   Input Parameters:
405 + opt          - option name
406 . text         - short string that describes the option
407 . man          - manual page with additional information on option
408 . list         - array containing the list of choices, followed by the enum name, followed by the enum prefix, followed by a null
409 - currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with either
410 .vb
411                  PetscOptionsEnum(..., obj->value,&object->value,...) or
412                  value = defaultvalue
413                  PetscOptionsEnum(..., value,&value,&flg);
414                  if (flg) {
415 .ve
416 
417   Output Parameters:
418 + value - the  value to return
419 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
420 
421   Level: beginner
422 
423   Notes:
424   Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
425 
426   list is usually something like `PCASMTypes` or some other predefined list of enum names
427 
428   If the user does not supply the option at all `value` is NOT changed. Thus
429   you should ALWAYS initialize `value` if you access it without first checking if `set` is `PETSC_TRUE`.
430 
431   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
432 
433 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
434           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
435           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
436           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
437           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
438           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
439           `PetscOptionsFList()`, `PetscOptionsEList()`
440 M*/
441   #define PetscOptionsEnum(opt, text, man, list, currentvalue, value, set)          PetscOptionsEnum_Private(PetscOptionsObject, opt, text, man, list, currentvalue, value, set)
442 
443 /*MC
444   PetscOptionsInt - Gets the integer value for a particular option in the database.
445 
446   Synopsis:
447   #include <petscoptions.h>
448   PetscErrorCode PetscOptionsInt(const char opt[], const char text[], const char man[], PetscInt currentvalue, PetscInt *value, PetscBool *set)
449 
450   Logically Collective on the communicator passed in `PetscOptionsBegin()`
451 
452   Input Parameters:
453 + opt          - option name
454 . text         - short string that describes the option
455 . man          - manual page with additional information on option
456 - currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with either
457 .vb
458                  PetscOptionsInt(..., obj->value,&obj->value,...) or
459                  value = defaultvalue
460                  PetscOptionsInt(..., value,&value,&flg);
461                  if (flg) {
462 .ve
463 
464   Output Parameters:
465 + value - the integer value to return
466 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
467 
468   Level: beginner
469 
470   Notes:
471   If the user does not supply the option at all `value` is NOT changed. Thus
472   you should ALWAYS initialize `value` if you access it without first checking if `flg` is `PETSC_TRUE`.
473 
474   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
475 
476   Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
477 
478 .seealso: `PetscOptionsBoundedInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
479           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`, `PetscOptionsRangeInt()`
480           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
481           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
482           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
483           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
484           `PetscOptionsFList()`, `PetscOptionsEList()`
485 M*/
486   #define PetscOptionsInt(opt, text, man, currentvalue, value, set)                 PetscOptionsInt_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set, PETSC_MIN_INT, PETSC_MAX_INT)
487 
488 /*MC
489    PetscOptionsBoundedInt - Gets an integer value greater than or equal a given bound for a particular option in the database.
490 
491    Synopsis:
492    #include <petscoptions.h>
493    PetscErrorCode  PetscOptionsBoundedInt(const char opt[], const char text[], const char man[], PetscInt currentvalue, PetscInt *value, PetscBool *flg, PetscInt bound)
494 
495    Logically Collective on the communicator passed in `PetscOptionsBegin()`
496 
497    Input Parameters:
498 +  opt          - option name
499 .  text         - short string that describes the option
500 .  man          - manual page with additional information on option
501 .  currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with either
502 .vb
503   PetscOptionsInt(..., obj->value,&obj->value,...)
504 .ve
505 or
506 .vb
507   value = defaultvalue
508   PetscOptionsInt(..., value,&value,&flg);
509   if (flg) {
510 .ve
511 -  bound - the requested value should be greater than or equal this bound or an error is generated
512 
513    Output Parameters:
514 +  value - the integer value to return
515 -  flg   - `PETSC_TRUE` if found, else `PETSC_FALSE`
516 
517    Level: beginner
518 
519    Notes:
520    If the user does not supply the option at all `value` is NOT changed. Thus
521    you should ALWAYS initialize `value` if you access it without first checking if `flg` is `PETSC_TRUE`.
522 
523    The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
524 
525    Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
526 
527 .seealso: `PetscOptionsInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
528           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`, `PetscOptionsRangeInt()`
529           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
530           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
531           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
532           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
533           `PetscOptionsFList()`, `PetscOptionsEList()`
534 M*/
535   #define PetscOptionsBoundedInt(opt, text, man, currentvalue, value, set, lb)      PetscOptionsInt_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set, lb, PETSC_MAX_INT)
536 
537 /*MC
538    PetscOptionsRangeInt - Gets an integer value within a range of values for a particular option in the database.
539 
540    Synopsis:
541    #include <petscoptions.h>
542    PetscErrorCode PetscOptionsRangeInt(const char opt[], const char text[], const char man[], PetscInt currentvalue, PetscInt *value, PetscBool *flg, PetscInt lb, PetscInt ub)
543 
544    Logically Collective on the communicator passed in `PetscOptionsBegin()`
545 
546    Input Parameters:
547 +  opt          - option name
548 .  text         - short string that describes the option
549 .  man          - manual page with additional information on option
550 .  currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with either
551 .vb
552                  PetscOptionsInt(..., obj->value,&obj->value,...) or
553                  value = defaultvalue
554                  PetscOptionsInt(..., value,&value,&flg);
555                  if (flg) {
556 .ve
557 .  lb - the lower bound, provided value must be greater than or equal to this value or an error is generated
558 -  ub - the upper bound, provided value must be less than or equal to this value or an error is generated
559 
560    Output Parameters:
561 +  value - the integer value to return
562 -  flg   - `PETSC_TRUE` if found, else `PETSC_FALSE`
563 
564    Level: beginner
565 
566    Notes:
567    If the user does not supply the option at all `value` is NOT changed. Thus
568    you should ALWAYS initialize `value` if you access it without first checking if `flg` is `PETSC_TRUE`.
569 
570    The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
571 
572    Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
573 
574 .seealso: `PetscOptionsInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
575           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`, `PetscOptionsBoundedInt()`
576           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
577           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
578           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
579           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
580           `PetscOptionsFList()`, `PetscOptionsEList()`
581 M*/
582   #define PetscOptionsRangeInt(opt, text, man, currentvalue, value, set, lb, ub)    PetscOptionsInt_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set, lb, ub)
583 
584 /*MC
585   PetscOptionsReal - Gets the `PetscReal` value for a particular option in the database.
586 
587   Synopsis:
588   #include <petscoptions.h>
589   PetscErrorCode PetscOptionsReal(const char opt[], const char text[], const char man[], PetscReal currentvalue, PetscReal *value, PetscBool *set)
590 
591   Logically Collective on the communicator passed in `PetscOptionsBegin()`
592 
593   Input Parameters:
594 + opt          - option name
595 . text         - short string that describes the option
596 . man          - manual page with additional information on option
597 - currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with either
598 .vb
599                  PetscOptionsReal(..., obj->value,&obj->value,...) or
600                  value = defaultvalue
601                  PetscOptionsReal(..., value,&value,&flg);
602                  if (flg) {
603 .ve
604 
605   Output Parameters:
606 + value - the value to return
607 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
608 
609   Level: beginner
610 
611   Notes:
612   If the user does not supply the option at all `value` is NOT changed. Thus
613   you should ALWAYS initialize `value` if you access it without first checking if `flg` is `PETSC_TRUE`.
614 
615   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
616 
617   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
618 
619 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
620           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
621           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
622           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
623           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
624           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
625           `PetscOptionsFList()`, `PetscOptionsEList()`
626 M*/
627   #define PetscOptionsReal(opt, text, man, currentvalue, value, set)                PetscOptionsReal_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
628 
629 /*MC
630   PetscOptionsScalar - Gets the `PetscScalar` value for a particular option in the database.
631 
632   Synopsis:
633   #include <petscoptions.h>
634   PetscErrorCode PetscOptionsScalar(const char opt[], const char text[], const char man[], PetscScalar currentvalue, PetscScalar *value, PetscBool *set)
635 
636   Logically Collective on the communicator passed in `PetscOptionsBegin()`
637 
638   Input Parameters:
639 + opt          - option name
640 . text         - short string that describes the option
641 . man          - manual page with additional information on option
642 - currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with either
643 .vb
644                  PetscOptionsScalar(..., obj->value,&obj->value,...) or
645                  value = defaultvalue
646                  PetscOptionsScalar(..., value,&value,&flg);
647                  if (flg) {
648 .ve
649 
650   Output Parameters:
651 + value - the value to return
652 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
653 
654   Level: beginner
655 
656   Notes:
657   If the user does not supply the option at all `value` is NOT changed. Thus
658   you should ALWAYS initialize `value` if you access it without first checking if `flg` is `PETSC_TRUE`.
659 
660   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
661 
662   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
663 
664 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
665           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
666           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
667           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
668           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
669           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
670           `PetscOptionsFList()`, `PetscOptionsEList()`
671 M*/
672   #define PetscOptionsScalar(opt, text, man, currentvalue, value, set)              PetscOptionsScalar_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
673 
674 /*MC
675   PetscOptionsName - Determines if a particular option has been set in the database. This returns true whether the option is a number, string or boolean, even
676   its value is set to false.
677 
678   Synopsis:
679   #include <petscoptions.h>
680   PetscErrorCode PetscOptionsName(const char opt[], const char text[], const char man[], PetscBool *flg)
681 
682   Logically Collective on the communicator passed in `PetscOptionsBegin()`
683 
684   Input Parameters:
685 + opt  - option name
686 . text - short string that describes the option
687 - man  - manual page with additional information on option
688 
689   Output Parameter:
690 . flg - `PETSC_TRUE` if found, else `PETSC_FALSE`
691 
692   Level: beginner
693 
694   Note:
695   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
696 
697 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
698           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
699           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
700           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
701           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
702           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
703           `PetscOptionsFList()`, `PetscOptionsEList()`
704 M*/
705   #define PetscOptionsName(opt, text, man, flg)                                     PetscOptionsName_Private(PetscOptionsObject, opt, text, man, flg)
706 
707 /*MC
708   PetscOptionsString - Gets the string value for a particular option in the database.
709 
710   Synopsis:
711   #include <petscoptions.h>
712   PetscErrorCode PetscOptionsString(const char opt[], const char text[], const char man[], const char currentvalue[], char value[], size_t len, PetscBool *set)
713 
714   Logically Collective on the communicator passed in `PetscOptionsBegin()`
715 
716   Input Parameters:
717 + opt          - option name
718 . text         - short string that describes the option
719 . man          - manual page with additional information on option
720 . currentvalue - the current value; caller is responsible for setting this value correctly. This is not used to set value
721 - len          - length of the result string including null terminator
722 
723   Output Parameters:
724 + value - the value to return
725 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
726 
727   Level: beginner
728 
729   Notes:
730   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
731 
732   If the user provided no string (for example `-optionname` `-someotheroption`) `flg` is set to `PETSC_TRUE` (and the string is filled with nulls).
733 
734   If the user does not supply the option at all `value` is NOT changed. Thus
735   you should ALWAYS initialize `value` if you access it without first checking if `flg` is `PETSC_TRUE`.
736 
737   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
738 
739 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
740           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
741           `PetscOptionsInt()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
742           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
743           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
744           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
745           `PetscOptionsFList()`, `PetscOptionsEList()`
746 M*/
747   #define PetscOptionsString(opt, text, man, currentvalue, value, len, set)         PetscOptionsString_Private(PetscOptionsObject, opt, text, man, currentvalue, value, len, set)
748 
749 /*MC
750   PetscOptionsBool - Determines if a particular option is in the database with a true or false
751 
752   Synopsis:
753   #include <petscoptions.h>
754   PetscErrorCode PetscOptionsBool(const char opt[], const char text[], const char man[], PetscBool currentvalue, PetscBool *flg, PetscBool *set)
755 
756   Logically Collective on the communicator passed in `PetscOptionsBegin()`
757 
758   Input Parameters:
759 + opt          - option name
760 . text         - short string that describes the option
761 . man          - manual page with additional information on option
762 - currentvalue - the current value
763 
764   Output Parameters:
765 + flg - `PETSC_TRUE` or `PETSC_FALSE`
766 - set - `PETSC_TRUE` if found, else `PETSC_FALSE`
767 
768   Level: beginner
769 
770   Notes:
771   TRUE, true, YES, yes, nostring, and 1 all translate to `PETSC_TRUE`
772   FALSE, false, NO, no, and 0 all translate to `PETSC_FALSE`
773 
774   If the option is given, but no value is provided, then flg and set are both given the value `PETSC_TRUE`. That is `-requested_bool`
775   is equivalent to `-requested_bool true`
776 
777   If the user does not supply the option at all `flg` is NOT changed. Thus
778   you should ALWAYS initialize the `flg` variable if you access it without first checking if the `set` flag is `PETSC_TRUE`.
779 
780   Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
781 
782 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
783           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
784           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`,
785           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
786           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
787           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
788           `PetscOptionsFList()`, `PetscOptionsEList()`
789 M*/
790   #define PetscOptionsBool(opt, text, man, currentvalue, value, set)                PetscOptionsBool_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
791 
792 /*MC
793   PetscOptionsBoolGroupBegin - First in a series of logical queries on the options database for
794   which at most a single value can be true.
795 
796   Synopsis:
797   #include <petscoptions.h>
798   PetscErrorCode PetscOptionsBoolGroupBegin(const char opt[], const char text[], const char man[], PetscBool *flg)
799 
800   Logically Collective on the communicator passed in `PetscOptionsBegin()`
801 
802   Input Parameters:
803 + opt  - option name
804 . text - short string that describes the option
805 - man  - manual page with additional information on option
806 
807   Output Parameter:
808 . flg - whether that option was set or not
809 
810   Level: intermediate
811 
812   Notes:
813   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
814 
815   Must be followed by 0 or more `PetscOptionsBoolGroup()`s and `PetscOptionsBoolGroupEnd()`
816 
817 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
818           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
819           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
820           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
821           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
822           `PetscOptionsFList()`, `PetscOptionsEList()`
823 M*/
824   #define PetscOptionsBoolGroupBegin(opt, text, man, flg)                           PetscOptionsBoolGroupBegin_Private(PetscOptionsObject, opt, text, man, flg)
825 
826 /*MC
827   PetscOptionsBoolGroup - One in a series of logical queries on the options database for
828   which at most a single value can be true.
829 
830   Synopsis:
831   #include <petscoptions.h>
832   PetscErrorCode PetscOptionsBoolGroup(const char opt[], const char text[], const char man[], PetscBool *flg)
833 
834   Logically Collective on the communicator passed in `PetscOptionsBegin()`
835 
836   Input Parameters:
837 + opt  - option name
838 . text - short string that describes the option
839 - man  - manual page with additional information on option
840 
841   Output Parameter:
842 . flg - `PETSC_TRUE` if found, else `PETSC_FALSE`
843 
844   Level: intermediate
845 
846   Notes:
847   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
848 
849   Must follow a `PetscOptionsBoolGroupBegin()` and preceded a `PetscOptionsBoolGroupEnd()`
850 
851 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
852           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
853           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
854           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
855           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
856           `PetscOptionsFList()`, `PetscOptionsEList()`
857 M*/
858   #define PetscOptionsBoolGroup(opt, text, man, flg)                                PetscOptionsBoolGroup_Private(PetscOptionsObject, opt, text, man, flg)
859 
860 /*MC
861   PetscOptionsBoolGroupEnd - Last in a series of logical queries on the options database for
862   which at most a single value can be true.
863 
864   Synopsis:
865   #include <petscoptions.h>
866   PetscErrorCode PetscOptionsBoolGroupEnd(const char opt[], const char text[], const char man[], PetscBool  *flg)
867 
868   Logically Collective on the communicator passed in `PetscOptionsBegin()`
869 
870   Input Parameters:
871 + opt  - option name
872 . text - short string that describes the option
873 - man  - manual page with additional information on option
874 
875   Output Parameter:
876 . flg - `PETSC_TRUE` if found, else `PETSC_FALSE`
877 
878   Level: intermediate
879 
880   Notes:
881   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
882 
883   Must follow a `PetscOptionsBoolGroupBegin()`
884 
885 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
886           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
887           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
888           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
889           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
890           `PetscOptionsFList()`, `PetscOptionsEList()`
891 M*/
892   #define PetscOptionsBoolGroupEnd(opt, text, man, flg)                             PetscOptionsBoolGroupEnd_Private(PetscOptionsObject, opt, text, man, flg)
893 
894 /*MC
895   PetscOptionsFList - Puts a list of option values that a single one may be selected from
896 
897   Synopsis:
898   #include <petscoptions.h>
899   PetscErrorCode PetscOptionsFList(const char opt[], const char ltext[], const char man[], PetscFunctionList list, const char currentvalue[], char value[], size_t len, PetscBool *set)
900 
901   Logically Collective on the communicator passed in `PetscOptionsBegin()`
902 
903   Input Parameters:
904 + opt          - option name
905 . ltext        - short string that describes the option
906 . man          - manual page with additional information on option
907 . list         - the possible choices
908 . currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with
909 .vb
910                  PetscOptionsFlist(..., obj->value,value,len,&flg);
911                  if (flg) {
912 .ve
913 - len          - the length of the character array value
914 
915   Output Parameters:
916 + value - the value to return
917 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
918 
919   Level: intermediate
920 
921   Notes:
922   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
923 
924   If the user does not supply the option at all `value` is NOT changed. Thus
925   you should ALWAYS initialize `value` if you access it without first checking if the `set` flag is `PETSC_TRUE`.
926 
927   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.
928 
929   See `PetscOptionsEList()` for when the choices are given in a string array
930 
931   To get a listing of all currently specified options,
932   see `PetscOptionsView()` or `PetscOptionsGetAll()`
933 
934   Developer Note:
935   This cannot check for invalid selection because of things like `MATAIJ` that are not included in the list
936 
937 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
938           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
939           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
940           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
941           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
942           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsEnum()`
943 M*/
944   #define PetscOptionsFList(opt, ltext, man, list, currentvalue, value, len, set)   PetscOptionsFList_Private(PetscOptionsObject, opt, ltext, man, list, currentvalue, value, len, set)
945 
946 /*MC
947   PetscOptionsEList - Puts a list of option values that a single one may be selected from
948 
949   Synopsis:
950   #include <petscoptions.h>
951   PetscErrorCode PetscOptionsEList(const char opt[], const char ltext[], const char man[], const char *const *list, PetscInt ntext, const char currentvalue[], PetscInt *value, PetscBool *set)
952 
953   Logically Collective on the communicator passed in `PetscOptionsBegin()`
954 
955   Input Parameters:
956 + opt          - option name
957 . ltext        - short string that describes the option
958 . man          - manual page with additional information on option
959 . list         - the possible choices (one of these must be selected, anything else is invalid)
960 . ntext        - number of choices
961 - currentvalue - the current value; caller is responsible for setting this value correctly. Normally this is done with
962 .vb
963                  PetscOptionsEList(..., obj->value,&value,&flg);
964 .ve                 if (flg) {
965 
966   Output Parameters:
967 + value - the index of the value to return
968 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
969 
970   Level: intermediate
971 
972   Notes:
973   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
974 
975   If the user does not supply the option at all `value` is NOT changed. Thus
976   you should ALWAYS initialize `value` if you access it without first checking if the `set` flag is `PETSC_TRUE`.
977 
978   See `PetscOptionsFList()` for when the choices are given in a `PetscFunctionList()`
979 
980 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
981           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
982           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
983           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
984           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
985           `PetscOptionsFList()`, `PetscOptionsEnum()`
986 M*/
987   #define PetscOptionsEList(opt, ltext, man, list, ntext, currentvalue, value, set) PetscOptionsEList_Private(PetscOptionsObject, opt, ltext, man, list, ntext, currentvalue, value, set)
988 
989 /*MC
990   PetscOptionsRealArray - Gets an array of double values for a particular
991   option in the database. The values must be separated with commas with
992   no intervening spaces.
993 
994   Synopsis:
995   #include <petscoptions.h>
996   PetscErrorCode PetscOptionsRealArray(const char opt[], const char text[], const char man[], PetscReal value[], PetscInt *n, PetscBool *set)
997 
998   Logically Collective on the communicator passed in `PetscOptionsBegin()`
999 
1000   Input Parameters:
1001 + opt  - the option one is seeking
1002 . text - short string describing option
1003 . man  - manual page for option
1004 - n    - maximum number of values that value has room for
1005 
1006   Output Parameters:
1007 + value - location to copy values
1008 . n     - actual number of values found
1009 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
1010 
1011   Level: beginner
1012 
1013   Note:
1014   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
1015 
1016 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
1017           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
1018           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
1019           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
1020           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
1021           `PetscOptionsFList()`, `PetscOptionsEList()`
1022 M*/
1023   #define PetscOptionsRealArray(opt, text, man, currentvalue, value, set)           PetscOptionsRealArray_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
1024 
1025 /*MC
1026   PetscOptionsScalarArray - Gets an array of `PetscScalar` values for a particular
1027   option in the database. The values must be separated with commas with
1028   no intervening spaces.
1029 
1030   Synopsis:
1031   #include <petscoptions.h>
1032   PetscErrorCode PetscOptionsScalarArray(const char opt[], const char text[], const char man[], PetscScalar value[], PetscInt *n, PetscBool *set)
1033 
1034   Logically Collective on the communicator passed in `PetscOptionsBegin()`
1035 
1036   Input Parameters:
1037 + opt  - the option one is seeking
1038 . text - short string describing option
1039 . man  - manual page for option
1040 - n    - maximum number of values allowed in the value array
1041 
1042   Output Parameters:
1043 + value - location to copy values
1044 . n     - actual number of values found
1045 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
1046 
1047   Level: beginner
1048 
1049   Note:
1050   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
1051 
1052 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
1053           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
1054           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
1055           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
1056           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
1057           `PetscOptionsFList()`, `PetscOptionsEList()`
1058 M*/
1059   #define PetscOptionsScalarArray(opt, text, man, currentvalue, value, set)         PetscOptionsScalarArray_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
1060 
1061 /*MC
1062   PetscOptionsIntArray - Gets an array of integers for a particular
1063   option in the database.
1064 
1065   Synopsis:
1066   #include <petscoptions.h>
1067   PetscErrorCode PetscOptionsIntArray(const char opt[], const char text[], const char man[], PetscInt value[], PetscInt *n, PetscBool *set)
1068 
1069   Logically Collective on the communicator passed in `PetscOptionsBegin()`
1070 
1071   Input Parameters:
1072 + opt  - the option one is seeking
1073 . text - short string describing option
1074 . man  - manual page for option
1075 - n    - maximum number of values
1076 
1077   Output Parameters:
1078 + value - location to copy values
1079 . n     - actual number of values found
1080 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
1081 
1082   Level: beginner
1083 
1084   Notes:
1085   The array can be passed as
1086 +   a comma separated list -                                  0,1,2,3,4,5,6,7
1087 .   a range (start\-end+1) -                                  0-8
1088 .   a range with given increment (start\-end+1:inc) -         0-7:2
1089 -   a combination of values and ranges separated by commas -  0,1-8,8-15:2
1090 
1091   There must be no intervening spaces between the values.
1092 
1093   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
1094 
1095 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
1096           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
1097           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
1098           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
1099           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
1100           `PetscOptionsFList()`, `PetscOptionsEList()`
1101 M*/
1102   #define PetscOptionsIntArray(opt, text, man, currentvalue, value, set)            PetscOptionsIntArray_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
1103 
1104 /*MC
1105   PetscOptionsStringArray - Gets an array of string values for a particular
1106   option in the database. The values must be separated with commas with
1107   no intervening spaces.
1108 
1109   Synopsis:
1110   #include <petscoptions.h>
1111   PetscErrorCode PetscOptionsStringArray(const char opt[], const char text[], const char man[], char *value[], PetscInt *nmax, PetscBool  *set)
1112 
1113   Logically Collective on the communicator passed in `PetscOptionsBegin()`; No Fortran Support
1114 
1115   Input Parameters:
1116 + opt  - the option one is seeking
1117 . text - short string describing option
1118 . man  - manual page for option
1119 - nmax - maximum number of strings
1120 
1121   Output Parameters:
1122 + value - location to copy strings
1123 . nmax  - actual number of strings found
1124 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
1125 
1126   Level: beginner
1127 
1128   Notes:
1129   The user should pass in an array of pointers to char, to hold all the
1130   strings returned by this function.
1131 
1132   The user is responsible for deallocating the strings that are
1133   returned.
1134 
1135   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
1136 
1137 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
1138           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
1139           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
1140           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
1141           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
1142           `PetscOptionsFList()`, `PetscOptionsEList()`
1143 M*/
1144   #define PetscOptionsStringArray(opt, text, man, currentvalue, value, set)         PetscOptionsStringArray_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
1145 
1146 /*MC
1147   PetscOptionsBoolArray - Gets an array of logical values (true or false) for a particular
1148   option in the database. The values must be separated with commas with
1149   no intervening spaces.
1150 
1151   Synopsis:
1152   #include <petscoptions.h>
1153   PetscErrorCode PetscOptionsBoolArray(const char opt[], const char text[], const char man[], PetscBool value[], PetscInt *n, PetscBool *set)
1154 
1155   Logically Collective on the communicator passed in `PetscOptionsBegin()`
1156 
1157   Input Parameters:
1158 + opt  - the option one is seeking
1159 . text - short string describing option
1160 . man  - manual page for option
1161 - n    - maximum number of values allowed in the value array
1162 
1163   Output Parameters:
1164 + value - location to copy values
1165 . n     - actual number of values found
1166 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
1167 
1168   Level: beginner
1169 
1170   Notes:
1171   The user should pass in an array of `PetscBool`
1172 
1173   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
1174 
1175 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
1176           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
1177           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
1178           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
1179           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
1180           `PetscOptionsFList()`, `PetscOptionsEList()`
1181 M*/
1182   #define PetscOptionsBoolArray(opt, text, man, currentvalue, value, set)           PetscOptionsBoolArray_Private(PetscOptionsObject, opt, text, man, currentvalue, value, set)
1183 
1184 /*MC
1185   PetscOptionsEnumArray - Gets an array of enum values for a particular
1186   option in the database.
1187 
1188   Synopsis:
1189   #include <petscoptions.h>
1190   PetscErrorCode PetscOptionsEnumArray(const char opt[], const char text[], const char man[], const char *const *list, PetscEnum value[], PetscInt *n, PetscBool *set)
1191 
1192   Logically Collective on the communicator passed in `PetscOptionsBegin()`
1193 
1194   Input Parameters:
1195 + opt  - the option one is seeking
1196 . text - short string describing option
1197 . man  - manual page for option
1198 . list - array containing the list of choices, followed by the enum name, followed by the enum prefix, followed by a null
1199 - n    - maximum number of values allowed in the value array
1200 
1201   Output Parameters:
1202 + value - location to copy values
1203 . n     - actual number of values found
1204 - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`
1205 
1206   Level: beginner
1207 
1208   Notes:
1209   The array must be passed as a comma separated list.
1210 
1211   There must be no intervening spaces between the values.
1212 
1213   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
1214 
1215 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
1216           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsGetBool()`,
1217           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
1218           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
1219           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
1220           `PetscOptionsFList()`, `PetscOptionsEList()`
1221 M*/
1222   #define PetscOptionsEnumArray(opt, text, man, list, value, n, set)                PetscOptionsEnumArray_Private(PetscOptionsObject, opt, text, man, list, value, n, set)
1223 
1224 /*MC
1225   PetscOptionsDeprecated - mark an option as deprecated, optionally replacing it with `newname`
1226 
1227   Prints a deprecation warning, unless an option is supplied to suppress.
1228 
1229   Logically Collective
1230 
1231   Input Parameters:
1232 + oldname - the old, deprecated option
1233 . newname - the new option, or `NULL` if option is purely removed
1234 . version - a string describing the version of first deprecation, e.g. "3.9"
1235 - info    - additional information string, or `NULL`.
1236 
1237   Options Database Key:
1238 . -options_suppress_deprecated_warnings - do not print deprecation warnings
1239 
1240   Level: developer
1241 
1242   Notes:
1243   If `newname` is provided then the options database will automatically check the database for `oldname`.
1244 
1245   The old call `PetscOptionsXXX`(`oldname`) should be removed from the source code when both (1) the call to `PetscOptionsDeprecated()` occurs before the
1246   new call to `PetscOptionsXXX`(`newname`) and (2) the argument handling of the new call to `PetscOptionsXXX`(`newname`) is identical to the previous call.
1247   See `PTScotch_PartGraph_Seq()` for an example of when (1) fails and `SNESTestJacobian()` where an example of (2) fails.
1248 
1249   Must be called between `PetscOptionsBegin()` (or `PetscObjectOptionsBegin()`) and `PetscOptionsEnd()`.
1250   Only the process of MPI rank zero that owns the `PetscOptionsItems` are argument (managed by `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` prints the information
1251   If newname is provided, the old option is replaced. Otherwise, it remains in the options database.
1252   If an option is not replaced, the info argument should be used to advise the user on how to proceed.
1253   There is a limit on the length of the warning printed, so very long strings provided as info may be truncated.
1254 
1255 .seealso: `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsScalar()`, `PetscOptionsBool()`, `PetscOptionsString()`, `PetscOptionsSetValue()`
1256 M*/
1257   #define PetscOptionsDeprecated(opt, text, man, info)                              PetscOptionsDeprecated_Private(PetscOptionsObject, opt, text, man, info)
1258 
1259 /*MC
1260   PetscOptionsDeprecatedMoObject - mark an option as deprecated in the global PetscOptionsObject, optionally replacing it with `newname`
1261 
1262   Prints a deprecation warning, unless an option is supplied to suppress.
1263 
1264   Logically Collective
1265 
1266   Input Parameters:
1267 + oldname - the old, deprecated option
1268 . newname - the new option, or `NULL` if option is purely removed
1269 . version - a string describing the version of first deprecation, e.g. "3.9"
1270 - info    - additional information string, or `NULL`.
1271 
1272   Options Database Key:
1273 . -options_suppress_deprecated_warnings - do not print deprecation warnings
1274 
1275   Level: developer
1276 
1277   Notes:
1278   If `newname` is provided then the options database will automatically check the database for `oldname`.
1279 
1280   The old call `PetscOptionsXXX`(`oldname`) should be removed from the source code when both (1) the call to `PetscOptionsDeprecated()` occurs before the
1281   new call to `PetscOptionsXXX`(`newname`) and (2) the argument handling of the new call to `PetscOptionsXXX`(`newname`) is identical to the previous call.
1282   See `PTScotch_PartGraph_Seq()` for an example of when (1) fails and `SNESTestJacobian()` where an example of (2) fails.
1283 
1284   Only the process of MPI rank zero that owns the `PetscOptionsItems` are argument (managed by `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` prints the information
1285   If newname is provided, the old option is replaced. Otherwise, it remains in the options database.
1286   If an option is not replaced, the info argument should be used to advise the user on how to proceed.
1287   There is a limit on the length of the warning printed, so very long strings provided as info may be truncated.
1288 
1289 .seealso: `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsScalar()`, `PetscOptionsBool()`, `PetscOptionsString()`, `PetscOptionsSetValue()`
1290 M*/
1291   #define PetscOptionsDeprecatedNoObject(opt, text, man, info)                      PetscOptionsDeprecated_Private(NULL, opt, text, man, info)
1292 #endif /* PETSC_CLANG_STATIC_ANALYZER */
1293 
1294 PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscEnum, PetscEnum *, PetscBool *);
1295 PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems *, const char[], const char[], const char[], PetscInt, PetscInt *, PetscBool *, PetscInt, PetscInt);
1296 PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems *, const char[], const char[], const char[], PetscReal, PetscReal *, PetscBool *);
1297 PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems *, const char[], const char[], const char[], PetscScalar, PetscScalar *, PetscBool *);
1298 PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
1299 PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems *, const char[], const char[], const char[], const char[], char *, size_t, PetscBool *);
1300 PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool, PetscBool *, PetscBool *);
1301 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
1302 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
1303 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
1304 PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems *, const char[], const char[], const char[], PetscFunctionList, const char[], char[], size_t, PetscBool *);
1305 PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscInt, const char[], PetscInt *, PetscBool *);
1306 PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscReal[], PetscInt *, PetscBool *);
1307 PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscScalar[], PetscInt *, PetscBool *);
1308 PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscInt[], PetscInt *, PetscBool *);
1309 PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems *, const char[], const char[], const char[], char *[], PetscInt *, PetscBool *);
1310 PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool[], PetscInt *, PetscBool *);
1311 PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscEnum[], PetscInt *, PetscBool *);
1312 PETSC_EXTERN PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems *, const char[], const char[], const char[], const char[]);
1313 
1314 PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void);
1315 
1316 PETSC_EXTERN PetscErrorCode PetscObjectAddOptionsHandler(PetscObject, PetscErrorCode (*)(PetscObject, PetscOptionItems *, void *), PetscErrorCode (*)(PetscObject, void *), void *);
1317 PETSC_EXTERN PetscErrorCode PetscObjectProcessOptionsHandlers(PetscObject, PetscOptionItems *);
1318 PETSC_EXTERN PetscErrorCode PetscObjectDestroyOptionsHandlers(PetscObject);
1319 
1320 PETSC_EXTERN PetscErrorCode PetscOptionsLeftError(void);
1321