Actual source code: petscoptions.h

  1: /*
  2:    Routines to determine options set in the options database.
  3: */
  4: #pragma once

  6: #include <petscsys.h>
  7: #include <petscviewertypes.h>

  9: /* SUBMANSEC = Sys */

 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;

 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);

 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 *);

 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 *);

 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 *);

 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);

 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);

 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 *);

 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 *);

 79: PETSC_EXTERN PetscErrorCode PetscObjectSetOptions(PetscObject, PetscOptions);
 80: PETSC_EXTERN PetscErrorCode PetscObjectGetOptions(PetscObject, PetscOptions *);

 82: PETSC_EXTERN PetscBool PetscOptionsPublish;

 84: /*
 85:     See manual page for PetscOptionsBegin()

 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()

 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;

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: };

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;

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.

145:     Synopsis:
146: #include <petscoptions.h>
147:     PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[])

149:     Collective

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)

157:     Level: intermediate

159:     Notes:
160:     This is a macro that handles its own error checking, it does not return an error code.

162:     The set of queries needs to be ended by a call to `PetscOptionsEnd()`.

164:     One can add subheadings with `PetscOptionsHeadBegin()`.

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.

180:      Fortran Note:
181:      Returns ierr error code per PETSc Fortran API

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))

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.

203:     Synopsis:
204: #include <petscoptions.h>
205:     PetscErrorCode PetscObjectOptionsBegin(PetscObject obj)

207:     Collective

209:     Input Parameter:
210: .   obj - object to set options for

212:     Level: intermediate

214:     Notes:
215:     This is a macro that handles its own error checking, it does not return an error code.

217:     Needs to be ended by a call the `PetscOptionsEnd()`

219:     Can add subheadings with `PetscOptionsHeadBegin()`

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))

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.

241:     Synopsis:
242: #include <petscoptions.h>
243:      PetscErrorCode PetscOptionsEnd(void)

245:     Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()`

247:     Level: intermediate

249:     Notes:
250:     Needs to be preceded by a call to `PetscOptionsBegin()` or `PetscObjectOptionsBegin()`

252:     This is a macro that handles its own error checking, it does not return an error code.

254:     Fortran Note:
255:     Returns ierr error code per PETSc Fortran API

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 */

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[]);

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()`.

330:    Logically Collective on the communicator passed in `PetscOptionsBegin()`

332:    Input Parameter:
333: .  head - the heading text

335:    Level: developer

337:    Notes:
338:    Handles errors directly, hence does not return an error code

340:    Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`, and `PetscOptionsObject` created in `PetscOptionsBegin()` should be the first argument

342:    Must be followed by a call to `PetscOptionsHeadEnd()` in the same function.

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: M*/
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)

356:   #define PetscOptionsHead(...) PETSC_DEPRECATED_MACRO(3, 18, 0, "PetscOptionsHeadBegin()", ) PetscOptionsHeadBegin(__VA_ARGS__)

358:   /*MC
359:      PetscOptionsHeadEnd - Ends a section of options begun with `PetscOptionsHeadBegin()`
360:      See, for example, `KSPSetFromOptions_GMRES()`.

362:      Synopsis:
363: #include <petscoptions.h>
364:      PetscErrorCode PetscOptionsHeadEnd(void)

366:      Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()`

368:      Level: intermediate

370:      Notes:
371:      Must be between a `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` and a `PetscOptionsEnd()`

373:      Must be preceded by a call to `PetscOptionsHeadBegin()` in the same function.

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.

379:      This is only for use with the PETSc options GUI

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)

393:   #define PetscOptionsTail(...)                                                     PETSC_DEPRECATED_MACRO(3, 18, 0, "PetscOptionsHeadEnd()", ) PetscOptionsHeadEnd(__VA_ARGS__)

395: /*MC
396:   PetscOptionsEnum - Gets the enum value for a particular option in the database.

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)

402:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

417:   Output Parameters:
418: + value - the  value to return
419: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

421:   Level: beginner

423:   Notes:
424:   Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

426:   list is usually something like `PCASMTypes` or some other predefined list of enum names

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`.

431:   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

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)

443: /*MC
444:   PetscOptionsInt - Gets the integer value for a particular option in the database.

446:   Synopsis:
447: #include <petscoptions.h>
448:   PetscErrorCode PetscOptionsInt(const char opt[], const char text[], const char man[], PetscInt currentvalue, PetscInt *value, PetscBool *set)

450:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

464:   Output Parameters:
465: + value - the integer value to return
466: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

468:   Level: beginner

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`.

474:   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

476:   Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

488: /*MC
489:    PetscOptionsBoundedInt - Gets an integer value greater than or equal a given bound for a particular option in the database.

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)

495:    Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

513:    Output Parameters:
514: +  value - the integer value to return
515: -  flg   - `PETSC_TRUE` if found, else `PETSC_FALSE`

517:    Level: beginner

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`.

523:    The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

525:    Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

537: /*MC
538:    PetscOptionsRangeInt - Gets an integer value within a range of values for a particular option in the database.

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)

544:    Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

560:    Output Parameters:
561: +  value - the integer value to return
562: -  flg   - `PETSC_TRUE` if found, else `PETSC_FALSE`

564:    Level: beginner

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`.

570:    The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

572:    Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

584: /*MC
585:   PetscOptionsReal - Gets the `PetscReal` value for a particular option in the database.

587:   Synopsis:
588: #include <petscoptions.h>
589:   PetscErrorCode PetscOptionsReal(const char opt[], const char text[], const char man[], PetscReal currentvalue, PetscReal *value, PetscBool *set)

591:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

605:   Output Parameters:
606: + value - the value to return
607: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

609:   Level: beginner

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`.

615:   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

617:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

629: /*MC
630:   PetscOptionsScalar - Gets the `PetscScalar` value for a particular option in the database.

632:   Synopsis:
633: #include <petscoptions.h>
634:   PetscErrorCode PetscOptionsScalar(const char opt[], const char text[], const char man[], PetscScalar currentvalue, PetscScalar *value, PetscBool *set)

636:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

650:   Output Parameters:
651: + value - the value to return
652: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

654:   Level: beginner

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`.

660:   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

662:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

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.

678:   Synopsis:
679: #include <petscoptions.h>
680:   PetscErrorCode PetscOptionsName(const char opt[], const char text[], const char man[], PetscBool *flg)

682:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

684:   Input Parameters:
685: + opt  - option name
686: . text - short string that describes the option
687: - man  - manual page with additional information on option

689:   Output Parameter:
690: . flg - `PETSC_TRUE` if found, else `PETSC_FALSE`

692:   Level: beginner

694:   Note:
695:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

707: /*MC
708:   PetscOptionsString - Gets the string value for a particular option in the database.

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)

714:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

723:   Output Parameters:
724: + value - the value to return
725: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

727:   Level: beginner

729:   Notes:
730:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

732:   If the user provided no string (for example `-optionname` `-someotheroption`) `flg` is set to `PETSC_TRUE` (and the string is filled with nulls).

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`.

737:   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

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)

749: /*MC
750:   PetscOptionsBool - Determines if a particular option is in the database with a true or false

752:   Synopsis:
753: #include <petscoptions.h>
754:   PetscErrorCode PetscOptionsBool(const char opt[], const char text[], const char man[], PetscBool currentvalue, PetscBool *flg, PetscBool *set)

756:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

764:   Output Parameters:
765: + flg - `PETSC_TRUE` or `PETSC_FALSE`
766: - set - `PETSC_TRUE` if found, else `PETSC_FALSE`

768:   Level: beginner

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`

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`

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`.

780:   Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

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.

796:   Synopsis:
797: #include <petscoptions.h>
798:   PetscErrorCode PetscOptionsBoolGroupBegin(const char opt[], const char text[], const char man[], PetscBool *flg)

800:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

802:   Input Parameters:
803: + opt  - option name
804: . text - short string that describes the option
805: - man  - manual page with additional information on option

807:   Output Parameter:
808: . flg - whether that option was set or not

810:   Level: intermediate

812:   Notes:
813:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

815:   Must be followed by 0 or more `PetscOptionsBoolGroup()`s and `PetscOptionsBoolGroupEnd()`

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)

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.

830:   Synopsis:
831: #include <petscoptions.h>
832:   PetscErrorCode PetscOptionsBoolGroup(const char opt[], const char text[], const char man[], PetscBool *flg)

834:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

836:   Input Parameters:
837: + opt  - option name
838: . text - short string that describes the option
839: - man  - manual page with additional information on option

841:   Output Parameter:
842: . flg - `PETSC_TRUE` if found, else `PETSC_FALSE`

844:   Level: intermediate

846:   Notes:
847:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

849:   Must follow a `PetscOptionsBoolGroupBegin()` and preceded a `PetscOptionsBoolGroupEnd()`

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)

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.

864:   Synopsis:
865: #include <petscoptions.h>
866:   PetscErrorCode PetscOptionsBoolGroupEnd(const char opt[], const char text[], const char man[], PetscBool  *flg)

868:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

870:   Input Parameters:
871: + opt  - option name
872: . text - short string that describes the option
873: - man  - manual page with additional information on option

875:   Output Parameter:
876: . flg - `PETSC_TRUE` if found, else `PETSC_FALSE`

878:   Level: intermediate

880:   Notes:
881:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

883:   Must follow a `PetscOptionsBoolGroupBegin()`

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)

894: /*MC
895:   PetscOptionsFList - Puts a list of option values that a single one may be selected from

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)

901:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

915:   Output Parameters:
916: + value - the value to return
917: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

919:   Level: intermediate

921:   Notes:
922:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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`.

927:   The `currentvalue` passed into this routine does not get transferred to the output `value` variable automatically.

929:   See `PetscOptionsEList()` for when the choices are given in a string array

931:   To get a listing of all currently specified options,
932:   see `PetscOptionsView()` or `PetscOptionsGetAll()`

934:   Developer Note:
935:   This cannot check for invalid selection because of things like `MATAIJ` that are not included in the list

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)

946: /*MC
947:   PetscOptionsEList - Puts a list of option values that a single one may be selected from

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)

953:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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) {

966:   Output Parameters:
967: + value - the index of the value to return
968: - set   - `PETSC_TRUE` if found, else `PETSC_FALSE`

970:   Level: intermediate

972:   Notes:
973:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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`.

978:   See `PetscOptionsFList()` for when the choices are given in a `PetscFunctionList()`

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)

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.

994:   Synopsis:
995: #include <petscoptions.h>
996:   PetscErrorCode PetscOptionsRealArray(const char opt[], const char text[], const char man[], PetscReal value[], PetscInt *n, PetscBool *set)

998:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

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`

1011:   Level: beginner

1013:   Note:
1014:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

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.

1030:   Synopsis:
1031: #include <petscoptions.h>
1032:   PetscErrorCode PetscOptionsScalarArray(const char opt[], const char text[], const char man[], PetscScalar value[], PetscInt *n, PetscBool *set)

1034:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

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`

1047:   Level: beginner

1049:   Note:
1050:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

1061: /*MC
1062:   PetscOptionsIntArray - Gets an array of integers for a particular
1063:   option in the database.

1065:   Synopsis:
1066: #include <petscoptions.h>
1067:   PetscErrorCode PetscOptionsIntArray(const char opt[], const char text[], const char man[], PetscInt value[], PetscInt *n, PetscBool *set)

1069:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

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`

1082:   Level: beginner

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

1091:   There must be no intervening spaces between the values.

1093:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

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.

1109:   Synopsis:
1110: #include <petscoptions.h>
1111:   PetscErrorCode PetscOptionsStringArray(const char opt[], const char text[], const char man[], char *value[], PetscInt *nmax, PetscBool  *set)

1113:   Logically Collective on the communicator passed in `PetscOptionsBegin()`; No Fortran Support

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

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`

1126:   Level: beginner

1128:   Notes:
1129:   The user should pass in an array of pointers to char, to hold all the
1130:   strings returned by this function.

1132:   The user is responsible for deallocating the strings that are
1133:   returned.

1135:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

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.

1151:   Synopsis:
1152: #include <petscoptions.h>
1153:   PetscErrorCode PetscOptionsBoolArray(const char opt[], const char text[], const char man[], PetscBool value[], PetscInt *n, PetscBool *set)

1155:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

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`

1168:   Level: beginner

1170:   Notes:
1171:   The user should pass in an array of `PetscBool`

1173:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

1184: /*MC
1185:   PetscOptionsEnumArray - Gets an array of enum values for a particular
1186:   option in the database.

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)

1192:   Logically Collective on the communicator passed in `PetscOptionsBegin()`

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

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`

1206:   Level: beginner

1208:   Notes:
1209:   The array must be passed as a comma separated list.

1211:   There must be no intervening spaces between the values.

1213:   Must be used between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`

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)

1224: /*MC
1225:   PetscOptionsDeprecated - mark an option as deprecated, optionally replacing it with `newname`

1227:   Prints a deprecation warning, unless an option is supplied to suppress.

1229:   Logically Collective

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`.

1237:   Options Database Key:
1238: . -options_suppress_deprecated_warnings - do not print deprecation warnings

1240:   Level: developer

1242:   Notes:
1243:   If `newname` is provided then the options database will automatically check the database for `oldname`.

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.

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.

1255: .seealso: `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsScalar()`, `PetscOptionsBool()`, `PetscOptionsString()`, `PetscOptionsSetValue()`
1256: M*/
1257:   #define PetscOptionsDeprecated(opt, text, man, info)                              PetscOptionsDeprecated_Private(PetscOptionsObject, opt, text, man, info)

1259: /*MC
1260:   PetscOptionsDeprecatedMoObject - mark an option as deprecated in the global PetscOptionsObject, optionally replacing it with `newname`

1262:   Prints a deprecation warning, unless an option is supplied to suppress.

1264:   Logically Collective

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`.

1272:   Options Database Key:
1273: . -options_suppress_deprecated_warnings - do not print deprecation warnings

1275:   Level: developer

1277:   Notes:
1278:   If `newname` is provided then the options database will automatically check the database for `oldname`.

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.

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.

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 */

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[]);

1314: PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void);

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);

1320: PETSC_EXTERN PetscErrorCode PetscOptionsLeftError(void);