Actual source code: petscoptions.h

  1: /*
  2:    Routines to determine options set in the options database.
  3: */
  4: #ifndef PETSCOPTIONS_H
  5: #define PETSCOPTIONS_H

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

 10: /* SUBMANSEC = Sys */

 12: #define PETSC_MAX_OPTION_NAME 512
 13: typedef struct _n_PetscOptions *PetscOptions;
 14: PETSC_EXTERN PetscErrorCode     PetscOptionsCreate(PetscOptions *);
 15: PETSC_EXTERN PetscErrorCode     PetscOptionsPush(PetscOptions);
 16: PETSC_EXTERN PetscErrorCode     PetscOptionsPop(void);
 17: PETSC_EXTERN PetscErrorCode     PetscOptionsDestroy(PetscOptions *);
 18: PETSC_EXTERN PetscErrorCode     PetscOptionsCreateDefault(void);
 19: PETSC_EXTERN PetscErrorCode     PetscOptionsDestroyDefault(void);

 21: PETSC_EXTERN PetscErrorCode PetscOptionsHasHelp(PetscOptions, PetscBool *);
 22: PETSC_EXTERN PetscErrorCode PetscOptionsHasName(PetscOptions, const char[], const char[], PetscBool *);
 23: PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(PetscOptions, const char[], const char[], PetscBool *, PetscBool *);
 24: PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(PetscOptions, const char[], const char[], PetscInt *, PetscBool *);
 25: PETSC_EXTERN PetscErrorCode PetscOptionsGetEnum(PetscOptions, const char[], const char[], const char *const *, PetscEnum *, PetscBool *);
 26: PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(PetscOptions, const char[], const char[], const char *const *, PetscInt, PetscInt *, PetscBool *);
 27: PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(PetscOptions, const char[], const char[], PetscReal *, PetscBool *);
 28: PETSC_EXTERN PetscErrorCode PetscOptionsGetScalar(PetscOptions, const char[], const char[], PetscScalar *, PetscBool *);
 29: PETSC_EXTERN PetscErrorCode PetscOptionsGetString(PetscOptions, const char[], const char[], char[], size_t, PetscBool *);

 31: PETSC_EXTERN PetscErrorCode PetscOptionsGetBoolArray(PetscOptions, const char[], const char[], PetscBool[], PetscInt *, PetscBool *);
 32: PETSC_EXTERN PetscErrorCode PetscOptionsGetEnumArray(PetscOptions, const char[], const char[], const char *const *, PetscEnum *, PetscInt *, PetscBool *);
 33: PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(PetscOptions, const char[], const char[], PetscInt[], PetscInt *, PetscBool *);
 34: PETSC_EXTERN PetscErrorCode PetscOptionsGetRealArray(PetscOptions, const char[], const char[], PetscReal[], PetscInt *, PetscBool *);
 35: PETSC_EXTERN PetscErrorCode PetscOptionsGetScalarArray(PetscOptions, const char[], const char[], PetscScalar[], PetscInt *, PetscBool *);
 36: PETSC_EXTERN PetscErrorCode PetscOptionsGetStringArray(PetscOptions, const char[], const char[], char *[], PetscInt *, PetscBool *);

 38: PETSC_EXTERN PetscErrorCode PetscOptionsValidKey(const char[], PetscBool *);
 39: PETSC_EXTERN PetscErrorCode PetscOptionsSetAlias(PetscOptions, const char[], const char[]);
 40: PETSC_EXTERN PetscErrorCode PetscOptionsSetValue(PetscOptions, const char[], const char[]);
 41: PETSC_EXTERN PetscErrorCode PetscOptionsClearValue(PetscOptions, const char[]);
 42: PETSC_EXTERN PetscErrorCode PetscOptionsFindPair(PetscOptions, const char[], const char[], const char *[], PetscBool *);

 44: PETSC_EXTERN PetscErrorCode PetscOptionsGetAll(PetscOptions, char *[]);
 45: PETSC_EXTERN PetscErrorCode PetscOptionsAllUsed(PetscOptions, PetscInt *);
 46: PETSC_EXTERN PetscErrorCode PetscOptionsUsed(PetscOptions, const char[], PetscBool *);
 47: PETSC_EXTERN PetscErrorCode PetscOptionsLeft(PetscOptions);
 48: PETSC_EXTERN PetscErrorCode PetscOptionsLeftGet(PetscOptions, PetscInt *, char ***, char ***);
 49: PETSC_EXTERN PetscErrorCode PetscOptionsLeftRestore(PetscOptions, PetscInt *, char ***, char ***);
 50: PETSC_EXTERN PetscErrorCode PetscOptionsView(PetscOptions, PetscViewer);

 52: PETSC_EXTERN PetscErrorCode PetscOptionsReject(PetscOptions, const char[], const char[], const char[]);
 53: PETSC_EXTERN PetscErrorCode PetscOptionsInsert(PetscOptions, int *, char ***, const char[]);
 54: PETSC_EXTERN PetscErrorCode PetscOptionsInsertFile(MPI_Comm, PetscOptions, const char[], PetscBool);
 55: PETSC_EXTERN PetscErrorCode PetscOptionsInsertFileYAML(MPI_Comm, PetscOptions, const char[], PetscBool);
 56: PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(PetscOptions, const char[]);
 57: PETSC_EXTERN PetscErrorCode PetscOptionsInsertStringYAML(PetscOptions, const char[]);
 58: PETSC_EXTERN PetscErrorCode PetscOptionsInsertArgs(PetscOptions, int, char **);
 59: PETSC_EXTERN PetscErrorCode PetscOptionsClear(PetscOptions);
 60: PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPush(PetscOptions, const char[]);
 61: PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPop(PetscOptions);

 63: PETSC_EXTERN PetscErrorCode PetscOptionsGetenv(MPI_Comm, const char[], char[], size_t, PetscBool *);
 64: PETSC_EXTERN PetscErrorCode PetscOptionsStringToBool(const char[], PetscBool *);
 65: PETSC_EXTERN PetscErrorCode PetscOptionsStringToInt(const char[], PetscInt *);
 66: PETSC_EXTERN PetscErrorCode PetscOptionsStringToReal(const char[], PetscReal *);
 67: PETSC_EXTERN PetscErrorCode PetscOptionsStringToScalar(const char[], PetscScalar *);

 69: PETSC_EXTERN PetscErrorCode PetscOptionsMonitorSet(PetscErrorCode (*)(const char[], const char[], void *), void *, PetscErrorCode (*)(void **));
 70: PETSC_EXTERN PetscErrorCode PetscOptionsMonitorDefault(const char[], const char[], void *);

 72: PETSC_EXTERN PetscErrorCode PetscObjectSetOptions(PetscObject, PetscOptions);
 73: PETSC_EXTERN PetscErrorCode PetscObjectGetOptions(PetscObject, PetscOptions *);

 75: PETSC_EXTERN PetscBool PetscOptionsPublish;

 77: /*
 78:     See manual page for PetscOptionsBegin()

 80:     PetscOptionsItem and PetscOptionsItems are a single option (such as ksp_type) and a collection of such single
 81:   options being handled with a PetscOptionsBegin/End()

 83: */
 84: typedef enum {
 85:   OPTION_INT,
 86:   OPTION_BOOL,
 87:   OPTION_REAL,
 88:   OPTION_FLIST,
 89:   OPTION_STRING,
 90:   OPTION_REAL_ARRAY,
 91:   OPTION_SCALAR_ARRAY,
 92:   OPTION_HEAD,
 93:   OPTION_INT_ARRAY,
 94:   OPTION_ELIST,
 95:   OPTION_BOOL_ARRAY,
 96:   OPTION_STRING_ARRAY
 97: } PetscOptionType;
 98: typedef struct _n_PetscOptionItem *PetscOptionItem;
 99: struct _n_PetscOptionItem {
100:   char              *option;
101:   char              *text;
102:   void              *data;  /* used to hold the default value and then any value it is changed to by GUI */
103:   PetscFunctionList  flist; /* used for available values for PetscOptionsList() */
104:   const char *const *list;  /* used for available values for PetscOptionsEList() */
105:   char               nlist; /* number of entries in list */
106:   char              *man;
107:   size_t             arraylength; /* number of entries in data in the case that it is an array (of PetscInt etc) */
108:   PetscBool          set;         /* the user has changed this value in the GUI */
109:   PetscOptionType    type;
110:   PetscOptionItem    next;
111:   char              *pman;
112:   void              *edata;
113: };

115: typedef struct _p_PetscOptionItems {
116:   PetscInt        count;
117:   PetscOptionItem next;
118:   char           *prefix, *pprefix;
119:   char           *title;
120:   MPI_Comm        comm;
121:   PetscBool       printhelp, changedmethod, alreadyprinted;
122:   PetscObject     object;
123:   PetscOptions    options;
124: } PetscOptionItems;

126: #if defined(PETSC_CLANG_STATIC_ANALYZER)
127: extern PetscOptionItems *PetscOptionsObject; /* declare this so that the PetscOptions stubs work */
128: PetscErrorCode           PetscOptionsBegin(MPI_Comm, const char *, const char *, const char *);
129: PetscErrorCode           PetscObjectOptionsBegin(PetscObject);
130: PetscErrorCode           PetscOptionsEnd(void);
131: #else
132:   /*MC
133:     PetscOptionsBegin - Begins a set of queries on the options database that are related and should be
134:      displayed on the same window of a GUI that allows the user to set the options interactively. Often one should
135:      use PetscObjectOptionsBegin() rather than this call.

137:    Synopsis:
138: #include <petscoptions.h>
139:     PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[])

141:     Collective

143:   Input Parameters:
144: +   comm - communicator that shares GUI
145: .   prefix - options prefix for all options displayed on window (optional)
146: .   title - short descriptive text, for example "Krylov Solver Options"
147: -   mansec - section of manual pages for options, for example `KSP` (optional)

149:   Level: intermediate

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

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

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

158:   Developer Notes:
159:       PetscOptionsPublish is set in PetscOptionsCheckInitial_Private() with -saws_options. When PetscOptionsPublish is set the
160:       loop between PetscOptionsBegin() and PetscOptionsEnd() is run THREE times with PetscOptionsPublishCount of values -1,0,1.
161:       Otherwise the loop is run ONCE with a PetscOptionsPublishCount of 1.
162: +      \-1 - PetscOptionsInt() etc. just call PetscOptionsGetInt() etc.
163: .      0  - The GUI objects are created in PetscOptionsInt() etc. and displayed in PetscOptionsEnd() and the options
164:                database updated with user changes; PetscOptionsGetInt() etc. are also called.
165: -      1 - PetscOptionsInt() etc. again call PetscOptionsGetInt() etc. (possibly getting new values), in addition the help message and
166:               default values are printed if -help was given.
167:       When PetscOptionsObject.changedmethod is set this causes PetscOptionsPublishCount to be reset to -2 (so in the next loop iteration it is -1)
168:       and the whole process is repeated. This is to handle when, for example, the KSPType is changed thus changing the list of
169:       options available so they need to be redisplayed so the user can change the. Changing PetscOptionsObjects.changedmethod is never
170:       currently set.

172: .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
173:           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
174:           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
175:           `PetscOptionsName()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
176:           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
177:           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
178:           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()`

180: M*/
181:   #define PetscOptionsBegin(comm, prefix, mess, sec) \
182:     do { \
183:       PetscOptionItems  PetscOptionsObjectBase; \
184:       PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
185:       PetscMemzero(PetscOptionsObject, sizeof(*PetscOptionsObject)); \
186:       for (PetscOptionsObject->count = (PetscOptionsPublish ? -1 : 1); PetscOptionsObject->count < 2; PetscOptionsObject->count++) { \
187:         PetscCall(PetscOptionsBegin_Private(PetscOptionsObject, comm, prefix, mess, sec))

189:   /*MC
190:     PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be
191:      displayed on the same window of a GUI that allows the user to set the options interactively.

193:    Synopsis:
194: #include <petscoptions.h>
195:     PetscErrorCode PetscObjectOptionsBegin(PetscObject obj)

197:     Collective

199:   Input Parameters:
200: .   obj - object to set options for

202:   Level: intermediate

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

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

209:     Can add subheadings with `PetscOptionsHeadBegin()`

211: .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
212:           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
213:           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
214:           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
215:           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
216:           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
217:           `PetscOptionsFList()`, `PetscOptionsEList()`

219: M*/
220:   #define PetscObjectOptionsBegin(obj) \
221:     do { \
222:       PetscOptionItems  PetscOptionsObjectBase; \
223:       PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
224:       PetscOptionsObject->options          = ((PetscObject)obj)->options; \
225:       for (PetscOptionsObject->count = (PetscOptionsPublish ? -1 : 1); PetscOptionsObject->count < 2; PetscOptionsObject->count++) { \
226:         PetscCall(PetscObjectOptionsBegin_Private(obj, PetscOptionsObject))

228:   /*MC
229:     PetscOptionsEnd - Ends a set of queries on the options database that are related and should be
230:      displayed on the same window of a GUI that allows the user to set the options interactively.

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

234:    Synopsis:
235: #include <petscoptions.h>
236:      PetscErrorCode PetscOptionsEnd(void)

238:   Level: intermediate

240:   Notes:
241:     Needs to be preceded by a call to `PetscOptionsBegin()` or `PetscObjectOptionsBegin()`

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

245: .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
246:           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
247:           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
248:           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsHeadBegin()`,
249:           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
250:           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
251:           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()`

253: M*/
254:   #define PetscOptionsEnd() \
255:     PetscOptionsEnd_Private(PetscOptionsObject); \
256:     } \
257:     } \
258:     while (0)
259: #endif /* PETSC_CLANG_STATIC_ANALYZER */

261: PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *, MPI_Comm, const char[], const char[], const char[]);
262: PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscObject, PetscOptionItems *);
263: PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *);
264: PETSC_EXTERN PetscErrorCode PetscOptionsHeadBegin(PetscOptionItems *, const char[]);

266: #if defined(PETSC_CLANG_STATIC_ANALYZER)
267: template <typename... T>
268: void PetscOptionsHeadBegin(T...);
269: void PetscOptionsHeadEnd(void);
270: template <typename... T>
271: PetscErrorCode PetscOptionsEnum(T...);
272: template <typename... T>
273: PetscErrorCode PetscOptionsInt(T...);
274: template <typename... T>
275: PetscErrorCode PetscOptionsBoundedInt(T...);
276: template <typename... T>
277: PetscErrorCode PetscOptionsRangeInt(T...);
278: template <typename... T>
279: PetscErrorCode PetscOptionsReal(T...);
280: template <typename... T>
281: PetscErrorCode PetscOptionsScalar(T...);
282: template <typename... T>
283: PetscErrorCode PetscOptionsName(T...);
284: template <typename... T>
285: PetscErrorCode PetscOptionsString(T...);
286: template <typename... T>
287: PetscErrorCode PetscOptionsBool(T...);
288: template <typename... T>
289: PetscErrorCode PetscOptionsBoolGroupBegin(T...);
290: template <typename... T>
291: PetscErrorCode PetscOptionsBoolGroup(T...);
292: template <typename... T>
293: PetscErrorCode PetscOptionsBoolGroupEnd(T...);
294: template <typename... T>
295: PetscErrorCode PetscOptionsFList(T...);
296: template <typename... T>
297: PetscErrorCode PetscOptionsEList(T...);
298: template <typename... T>
299: PetscErrorCode PetscOptionsRealArray(T...);
300: template <typename... T>
301: PetscErrorCode PetscOptionsScalarArray(T...);
302: template <typename... T>
303: PetscErrorCode PetscOptionsIntArray(T...);
304: template <typename... T>
305: PetscErrorCode PetscOptionsStringArray(T...);
306: template <typename... T>
307: PetscErrorCode PetscOptionsBoolArray(T...);
308: template <typename... T>
309: PetscErrorCode PetscOptionsEnumArray(T...);
310: template <typename... T>
311: PetscErrorCode PetscOptionsDeprecated(T...);
312: template <typename... T>
313: PetscErrorCode PetscOptionsDeprecatedNoObject(T...);
314: #else
315:   /*MC
316:      PetscOptionsHeadBegin - Puts a heading before listing any more published options. Used, for example,
317:             in KSPSetFromOptions_GMRES().

319:    Logically Collective on the communicator passed in PetscOptionsBegin()

321:    Input Parameter:
322: .   head - the heading text

324:    Level: developer

326:    Notes:
327:     Handles errors directly, hence does not return an error code

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

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

333: .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
334:           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
335:           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
336:           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
337:           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
338:           `PetscOptionsFList()`, `PetscOptionsEList()`
339: @*/
340:   #define PetscOptionsHeadBegin(PetscOptionsObject, head) \
341:     do { \
342:       if (PetscOptionsObject->printhelp && PetscOptionsObject->count == 1 && !PetscOptionsObject->alreadyprinted) (*PetscHelpPrintf)(PetscOptionsObject->comm, "  %s\n", head); \
343:     } while (0)

345:   #define PetscOptionsHead(...) PETSC_DEPRECATED_MACRO("GCC warning \"Use PetscOptionsHeadBegin() (since version 3.18)\"") PetscOptionsHeadBegin(__VA_ARGS__)

347:   /*MC
348:      PetscOptionsHeadEnd - Ends a section of options begun with `PetscOptionsHeadBegin()`
349:             See, for example, KSPSetFromOptions_GMRES().

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

353:    Synopsis:
354: #include <petscoptions.h>
355:      PetscErrorCode PetscOptionsHeadEnd(void)

357:   Level: intermediate

359:    Notes:
360:     Must be between a `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` and a `PetscOptionsEnd()`

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

364:     This needs to be used only if the code below `PetscOptionsHeadEnd()` can be run ONLY once.
365:     See, for example, `PCSetFromOptions_Composite()`. This is a return(0) in it for early exit
366:     from the function.

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

370: .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
371:           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
372:           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
373:           `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
374:           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
375:           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsEnum()`
376: M*/
377:   #define PetscOptionsHeadEnd() \
378:     do { \
379:       if (PetscOptionsObject->count != 1) return 0; \
380:     } while (0)

382:   #define PetscOptionsTail(...) PETSC_DEPRECATED_MACRO("GCC warning \"Use PetscOptionsHeadEnd() (since version 3.18)\"") PetscOptionsHeadEnd(__VA_ARGS__)

384:   #define PetscOptionsEnum(a, b, c, d, e, f, g)        PetscOptionsEnum_Private(PetscOptionsObject, a, b, c, d, e, f, g)
385:   #define PetscOptionsInt(a, b, c, d, e, f)            PetscOptionsInt_Private(PetscOptionsObject, a, b, c, d, e, f, PETSC_MIN_INT, PETSC_MAX_INT)
386:   #define PetscOptionsBoundedInt(a, b, c, d, e, f, g)  PetscOptionsInt_Private(PetscOptionsObject, a, b, c, d, e, f, g, PETSC_MAX_INT)
387:   #define PetscOptionsRangeInt(a, b, c, d, e, f, g, h) PetscOptionsInt_Private(PetscOptionsObject, a, b, c, d, e, f, g, h)
388:   #define PetscOptionsReal(a, b, c, d, e, f)           PetscOptionsReal_Private(PetscOptionsObject, a, b, c, d, e, f)
389:   #define PetscOptionsScalar(a, b, c, d, e, f)         PetscOptionsScalar_Private(PetscOptionsObject, a, b, c, d, e, f)
390:   #define PetscOptionsName(a, b, c, d)                 PetscOptionsName_Private(PetscOptionsObject, a, b, c, d)
391:   #define PetscOptionsString(a, b, c, d, e, f, g)      PetscOptionsString_Private(PetscOptionsObject, a, b, c, d, e, f, g)
392:   #define PetscOptionsBool(a, b, c, d, e, f)           PetscOptionsBool_Private(PetscOptionsObject, a, b, c, d, e, f)
393:   #define PetscOptionsBoolGroupBegin(a, b, c, d)       PetscOptionsBoolGroupBegin_Private(PetscOptionsObject, a, b, c, d)
394:   #define PetscOptionsBoolGroup(a, b, c, d)            PetscOptionsBoolGroup_Private(PetscOptionsObject, a, b, c, d)
395:   #define PetscOptionsBoolGroupEnd(a, b, c, d)         PetscOptionsBoolGroupEnd_Private(PetscOptionsObject, a, b, c, d)
396:   #define PetscOptionsFList(a, b, c, d, e, f, g, h)    PetscOptionsFList_Private(PetscOptionsObject, a, b, c, d, e, f, g, h)
397:   #define PetscOptionsEList(a, b, c, d, e, f, g, h)    PetscOptionsEList_Private(PetscOptionsObject, a, b, c, d, e, f, g, h)
398:   #define PetscOptionsRealArray(a, b, c, d, e, f)      PetscOptionsRealArray_Private(PetscOptionsObject, a, b, c, d, e, f)
399:   #define PetscOptionsScalarArray(a, b, c, d, e, f)    PetscOptionsScalarArray_Private(PetscOptionsObject, a, b, c, d, e, f)
400:   #define PetscOptionsIntArray(a, b, c, d, e, f)       PetscOptionsIntArray_Private(PetscOptionsObject, a, b, c, d, e, f)
401:   #define PetscOptionsStringArray(a, b, c, d, e, f)    PetscOptionsStringArray_Private(PetscOptionsObject, a, b, c, d, e, f)
402:   #define PetscOptionsBoolArray(a, b, c, d, e, f)      PetscOptionsBoolArray_Private(PetscOptionsObject, a, b, c, d, e, f)
403:   #define PetscOptionsEnumArray(a, b, c, d, e, f, g)   PetscOptionsEnumArray_Private(PetscOptionsObject, a, b, c, d, e, f, g)
404:   #define PetscOptionsDeprecated(a, b, c, d)           PetscOptionsDeprecated_Private(PetscOptionsObject, a, b, c, d)
405:   #define PetscOptionsDeprecatedNoObject(a, b, c, d)   PetscOptionsDeprecated_Private(NULL, a, b, c, d)
406: #endif /* PETSC_CLANG_STATIC_ANALYZER */

408: PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscEnum, PetscEnum *, PetscBool *);
409: PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems *, const char[], const char[], const char[], PetscInt, PetscInt *, PetscBool *, PetscInt, PetscInt);
410: PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems *, const char[], const char[], const char[], PetscReal, PetscReal *, PetscBool *);
411: PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems *, const char[], const char[], const char[], PetscScalar, PetscScalar *, PetscBool *);
412: PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
413: PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems *, const char[], const char[], const char[], const char[], char *, size_t, PetscBool *);
414: PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool, PetscBool *, PetscBool *);
415: PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
416: PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
417: PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *);
418: PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems *, const char[], const char[], const char[], PetscFunctionList, const char[], char[], size_t, PetscBool *);
419: PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscInt, const char[], PetscInt *, PetscBool *);
420: PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscReal[], PetscInt *, PetscBool *);
421: PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscScalar[], PetscInt *, PetscBool *);
422: PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscInt[], PetscInt *, PetscBool *);
423: PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems *, const char[], const char[], const char[], char *[], PetscInt *, PetscBool *);
424: PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool[], PetscInt *, PetscBool *);
425: PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscEnum[], PetscInt *, PetscBool *);
426: PETSC_EXTERN PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems *, const char[], const char[], const char[], const char[]);

428: PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void);

430: PETSC_EXTERN PetscErrorCode PetscObjectAddOptionsHandler(PetscObject, PetscErrorCode (*)(PetscObject, PetscOptionItems *, void *), PetscErrorCode (*)(PetscObject, void *), void *);
431: PETSC_EXTERN PetscErrorCode PetscObjectProcessOptionsHandlers(PetscObject, PetscOptionItems *);
432: PETSC_EXTERN PetscErrorCode PetscObjectDestroyOptionsHandlers(PetscObject);

434: PETSC_EXTERN PetscErrorCode PetscOptionsLeftError(void);
435: #endif