xref: /petsc/include/petscoptions.h (revision 89669be4d29968dc8d4c19ce1b69194a6a561ea4)
1 /*
2    Routines to determine options set in the options database.
3 */
4 #if !defined(PETSCOPTIONS_H)
5 #define PETSCOPTIONS_H
6 #include <petscsys.h>
7 #include <petscviewertypes.h>
8 
9 #define PETSC_MAX_OPTION_NAME 512
10 typedef struct _n_PetscOptions* PetscOptions;
11 PETSC_EXTERN PetscErrorCode PetscOptionsCreate(PetscOptions*);
12 PETSC_EXTERN PetscErrorCode PetscOptionsPush(PetscOptions);
13 PETSC_EXTERN PetscErrorCode PetscOptionsPop(void);
14 PETSC_EXTERN PetscErrorCode PetscOptionsDestroy(PetscOptions*);
15 PETSC_EXTERN PetscErrorCode PetscOptionsCreateDefault(void);
16 PETSC_EXTERN PetscErrorCode PetscOptionsDestroyDefault(void);
17 
18 PETSC_EXTERN PetscErrorCode PetscOptionsHasHelp(PetscOptions,PetscBool*);
19 PETSC_EXTERN PetscErrorCode PetscOptionsHasName(PetscOptions,const char[],const char[],PetscBool*);
20 PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(PetscOptions,const char[],const char [],PetscBool*,PetscBool*);
21 PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(PetscOptions,const char[],const char [],PetscInt*,PetscBool*);
22 PETSC_EXTERN PetscErrorCode PetscOptionsGetEnum(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscBool*);
23 PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(PetscOptions,const char[],const char[],const char*const*,PetscInt,PetscInt*,PetscBool*);
24 PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(PetscOptions,const char[],const char[],PetscReal*,PetscBool*);
25 PETSC_EXTERN PetscErrorCode PetscOptionsGetScalar(PetscOptions,const char[],const char[],PetscScalar*,PetscBool*);
26 PETSC_EXTERN PetscErrorCode PetscOptionsGetString(PetscOptions,const char[],const char[],char[],size_t,PetscBool*);
27 
28 PETSC_EXTERN PetscErrorCode PetscOptionsGetBoolArray(PetscOptions,const char[],const char[],PetscBool [],PetscInt*,PetscBool*);
29 PETSC_EXTERN PetscErrorCode PetscOptionsGetEnumArray(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscInt*,PetscBool*);
30 PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(PetscOptions,const char[],const char[],PetscInt[],PetscInt*,PetscBool*);
31 PETSC_EXTERN PetscErrorCode PetscOptionsGetRealArray(PetscOptions,const char[],const char[],PetscReal[],PetscInt*,PetscBool*);
32 PETSC_EXTERN PetscErrorCode PetscOptionsGetScalarArray(PetscOptions,const char[],const char[],PetscScalar[],PetscInt*,PetscBool*);
33 PETSC_EXTERN PetscErrorCode PetscOptionsGetStringArray(PetscOptions,const char[],const char[],char*[],PetscInt*,PetscBool*);
34 
35 PETSC_EXTERN PetscErrorCode PetscOptionsValidKey(const char[],PetscBool*);
36 PETSC_EXTERN PetscErrorCode PetscOptionsSetAlias(PetscOptions,const char[],const char[]);
37 PETSC_EXTERN PetscErrorCode PetscOptionsSetValue(PetscOptions,const char[],const char[]);
38 PETSC_EXTERN PetscErrorCode PetscOptionsClearValue(PetscOptions,const char[]);
39 PETSC_EXTERN PetscErrorCode PetscOptionsFindPair(PetscOptions,const char[],const char[],const char*[],PetscBool*);
40 
41 PETSC_EXTERN PetscErrorCode PetscOptionsGetAll(PetscOptions,char*[]);
42 PETSC_EXTERN PetscErrorCode PetscOptionsAllUsed(PetscOptions,PetscInt*);
43 PETSC_EXTERN PetscErrorCode PetscOptionsUsed(PetscOptions,const char[],PetscBool*);
44 PETSC_EXTERN PetscErrorCode PetscOptionsLeft(PetscOptions);
45 PETSC_EXTERN PetscErrorCode PetscOptionsLeftGet(PetscOptions,PetscInt*,char***,char***);
46 PETSC_EXTERN PetscErrorCode PetscOptionsLeftRestore(PetscOptions,PetscInt*,char***,char***);
47 PETSC_EXTERN PetscErrorCode PetscOptionsView(PetscOptions,PetscViewer);
48 
49 PETSC_EXTERN PetscErrorCode PetscOptionsReject(PetscOptions,const char[],const char[],const char[]);
50 PETSC_EXTERN PetscErrorCode PetscOptionsInsert(PetscOptions,int*,char***,const char[]);
51 PETSC_EXTERN PetscErrorCode PetscOptionsInsertFile(MPI_Comm,PetscOptions,const char[],PetscBool);
52 PETSC_EXTERN PetscErrorCode PetscOptionsInsertFileYAML(MPI_Comm,PetscOptions,const char[],PetscBool);
53 PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(PetscOptions,const char[]);
54 PETSC_EXTERN PetscErrorCode PetscOptionsInsertStringYAML(PetscOptions,const char[]);
55 PETSC_EXTERN PetscErrorCode PetscOptionsInsertArgs(PetscOptions,int,char**);
56 PETSC_EXTERN PetscErrorCode PetscOptionsClear(PetscOptions);
57 PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPush(PetscOptions,const char[]);
58 PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPop(PetscOptions);
59 
60 PETSC_EXTERN PetscErrorCode PetscOptionsGetenv(MPI_Comm,const char[],char[],size_t,PetscBool*);
61 PETSC_EXTERN PetscErrorCode PetscOptionsStringToBool(const char[],PetscBool*);
62 PETSC_EXTERN PetscErrorCode PetscOptionsStringToInt(const char[],PetscInt*);
63 PETSC_EXTERN PetscErrorCode PetscOptionsStringToReal(const char[],PetscReal*);
64 PETSC_EXTERN PetscErrorCode PetscOptionsStringToScalar(const char[],PetscScalar*);
65 
66 PETSC_EXTERN PetscErrorCode PetscOptionsMonitorSet(PetscErrorCode (*)(const char[], const char[], void*), void*, PetscErrorCode (*)(void**));
67 PETSC_EXTERN PetscErrorCode PetscOptionsMonitorDefault(const char[], const char[], void*);
68 
69 PETSC_EXTERN PetscErrorCode PetscObjectSetOptions(PetscObject,PetscOptions);
70 PETSC_EXTERN PetscErrorCode PetscObjectGetOptions(PetscObject,PetscOptions*);
71 
72 PETSC_EXTERN PetscBool PetscOptionsPublish;
73 
74 /*
75     See manual page for PetscOptionsBegin()
76 
77     PetscOptionsItem and PetscOptionsItems are a single option (such as ksp_type) and a collection of such single
78   options being handled with a PetscOptionsBegin/End()
79 
80 */
81 typedef enum {OPTION_INT,OPTION_BOOL,OPTION_REAL,OPTION_FLIST,OPTION_STRING,OPTION_REAL_ARRAY,OPTION_SCALAR_ARRAY,OPTION_HEAD,OPTION_INT_ARRAY,OPTION_ELIST,OPTION_BOOL_ARRAY,OPTION_STRING_ARRAY} PetscOptionType;
82 typedef struct _n_PetscOptionItem* PetscOptionItem;
83 struct _n_PetscOptionItem{
84   char              *option;
85   char              *text;
86   void              *data;         /* used to hold the default value and then any value it is changed to by GUI */
87   PetscFunctionList flist;         /* used for available values for PetscOptionsList() */
88   const char *const *list;        /* used for available values for PetscOptionsEList() */
89   char              nlist;         /* number of entries in list */
90   char              *man;
91   size_t            arraylength;   /* number of entries in data in the case that it is an array (of PetscInt etc) */
92   PetscBool         set;           /* the user has changed this value in the GUI */
93   PetscOptionType   type;
94   PetscOptionItem   next;
95   char              *pman;
96   void              *edata;
97 };
98 
99 typedef struct _p_PetscOptionItems {
100   PetscInt         count;
101   PetscOptionItem  next;
102   char             *prefix,*pprefix;
103   char             *title;
104   MPI_Comm         comm;
105   PetscBool        printhelp,changedmethod,alreadyprinted;
106   PetscObject      object;
107   PetscOptions     options;
108 } PetscOptionItems;
109 
110 #if defined(PETSC_CLANG_STATIC_ANALYZER)
111 extern PetscOptionItems* PetscOptionsObject; /* declare this so that the PetscOptions stubs work */
112 PetscErrorCode PetscOptionsBegin(MPI_Comm,const char*,const char*,const char*);
113 PetscErrorCode PetscObjectOptionsBegin(PetscObject);
114 PetscErrorCode PetscOptionsEnd(void);
115 #else
116 /*MC
117     PetscOptionsBegin - Begins a set of queries on the options database that are related and should be
118      displayed on the same window of a GUI that allows the user to set the options interactively. Often one should
119      use PetscObjectOptionsBegin() rather than this call.
120 
121    Synopsis:
122     #include <petscoptions.h>
123     PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[])
124 
125     Collective
126 
127   Input Parameters:
128 +   comm - communicator that shares GUI
129 .   prefix - options prefix for all options displayed on window (optional)
130 .   title - short descriptive text, for example "Krylov Solver Options"
131 -   mansec - section of manual pages for options, for example KSP (optional)
132 
133   Level: intermediate
134 
135   Notes:
136     This is a macro that handles its own error checking, it does not return an error code.
137 
138     The set of queries needs to be ended by a call to PetscOptionsEnd().
139 
140     One can add subheadings with PetscOptionsHeadBegin().
141 
142   Developer Notes:
143       PetscOptionsPublish is set in PetscOptionsCheckInitial_Private() with -saws_options. When PetscOptionsPublish is set the
144       loop between PetscOptionsBegin() and PetscOptionsEnd() is run THREE times with PetscOptionsPublishCount of values -1,0,1.
145       Otherwise the loop is run ONCE with a PetscOptionsPublishCount of 1.
146 +      \-1 - PetscOptionsInt() etc. just call PetscOptionsGetInt() etc.
147 .      0  - The GUI objects are created in PetscOptionsInt() etc. and displayed in PetscOptionsEnd() and the options
148                database updated with user changes; PetscOptionsGetInt() etc. are also called.
149 -      1 - PetscOptionsInt() etc. again call PetscOptionsGetInt() etc. (possibly getting new values), in addition the help message and
150               default values are printed if -help was given.
151       When PetscOptionsObject.changedmethod is set this causes PetscOptionsPublishCount to be reset to -2 (so in the next loop iteration it is -1)
152       and the whole process is repeated. This is to handle when, for example, the KSPType is changed thus changing the list of
153       options available so they need to be redisplayed so the user can change the. Changing PetscOptionsObjects.changedmethod is never
154       currently set.
155 
156 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
157           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
158           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
159           `PetscOptionsName()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
160           `PetscOptionsStringArray(),PetscOptionsRealArray()`, `PetscOptionsScalar()`,
161           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
162           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()`
163 
164 M*/
165 #define    PetscOptionsBegin(comm,prefix,mess,sec) do {\
166              PetscOptionItems PetscOptionsObjectBase;\
167              PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
168              PetscCall(PetscMemzero(PetscOptionsObject,sizeof(*PetscOptionsObject))); \
169              for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\
170              PetscCall(PetscOptionsBegin_Private(PetscOptionsObject,comm,prefix,mess,sec))
171 
172 /*MC
173     PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be
174      displayed on the same window of a GUI that allows the user to set the options interactively.
175 
176    Synopsis:
177     #include <petscoptions.h>
178     PetscErrorCode PetscObjectOptionsBegin(PetscObject obj)
179 
180     Collective on obj
181 
182   Input Parameters:
183 .   obj - object to set options for
184 
185   Level: intermediate
186 
187   Notes:
188     This is a macro that handles its own error checking, it does not return an error code.
189 
190     Needs to be ended by a call the PetscOptionsEnd()
191 
192     Can add subheadings with PetscOptionsHeadBegin()
193 
194 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
195           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
196           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
197           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
198           `PetscOptionsStringArray(),PetscOptionsRealArray()`, `PetscOptionsScalar()`,
199           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
200           `PetscOptionsFList()`, `PetscOptionsEList()`
201 
202 M*/
203 #define PetscObjectOptionsBegin(obj)  do {                            \
204              PetscOptionItems PetscOptionsObjectBase;\
205              PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \
206              PetscOptionsObject->options = ((PetscObject)obj)->options; \
207              for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\
208              PetscCall(PetscObjectOptionsBegin_Private(PetscOptionsObject,obj))
209 
210 /*MC
211     PetscOptionsEnd - Ends a set of queries on the options database that are related and should be
212      displayed on the same window of a GUI that allows the user to set the options interactively.
213 
214     Collective on the comm used in PetscOptionsBegin() or obj used in PetscObjectOptionsBegin()
215 
216    Synopsis:
217      #include <petscoptions.h>
218      PetscErrorCode PetscOptionsEnd(void)
219 
220   Level: intermediate
221 
222   Notes:
223     Needs to be preceded by a call to PetscOptionsBegin() or PetscObjectOptionsBegin()
224 
225     This is a macro that handles its own error checking, it does not return an error code.
226 
227 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`,
228           `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`
229           `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`,
230           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsHeadBegin()`,
231           `PetscOptionsStringArray(),PetscOptionsRealArray()`, `PetscOptionsScalar()`,
232           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
233           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()`
234 
235 M*/
236 #define    PetscOptionsEnd() PetscCall(PetscOptionsEnd_Private(PetscOptionsObject));}} while (0)
237 #endif /* PETSC_CLANG_STATIC_ANALYZER */
238 
239 PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *,MPI_Comm,const char[],const char[],const char[]);
240 PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscOptionItems *,PetscObject);
241 PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *);
242 PETSC_EXTERN PetscErrorCode PetscOptionsHeadBegin(PetscOptionItems *,const char[]);
243 
244 #if defined(PETSC_CLANG_STATIC_ANALYZER)
245 template <typename... T> void PetscOptionsHeadBegin(T...);
246 void PetscOptionsHeadEnd(void);
247 template <typename... T> PetscErrorCode PetscOptionsEnum(T...);
248 template <typename... T> PetscErrorCode PetscOptionsInt(T...);
249 template <typename... T> PetscErrorCode PetscOptionsBoundedInt(T...);
250 template <typename... T> PetscErrorCode PetscOptionsRangeInt(T...);
251 template <typename... T> PetscErrorCode PetscOptionsReal(T...);
252 template <typename... T> PetscErrorCode PetscOptionsScalar(T...);
253 template <typename... T> PetscErrorCode PetscOptionsName(T...);
254 template <typename... T> PetscErrorCode PetscOptionsString(T...);
255 template <typename... T> PetscErrorCode PetscOptionsBool(T...);
256 template <typename... T> PetscErrorCode PetscOptionsBoolGroupBegin(T...);
257 template <typename... T> PetscErrorCode PetscOptionsBoolGroup(T...);
258 template <typename... T> PetscErrorCode PetscOptionsBoolGroupEnd(T...);
259 template <typename... T> PetscErrorCode PetscOptionsFList(T...);
260 template <typename... T> PetscErrorCode PetscOptionsEList(T...);
261 template <typename... T> PetscErrorCode PetscOptionsRealArray(T...);
262 template <typename... T> PetscErrorCode PetscOptionsScalarArray(T...);
263 template <typename... T> PetscErrorCode PetscOptionsIntArray(T...);
264 template <typename... T> PetscErrorCode PetscOptionsStringArray(T...);
265 template <typename... T> PetscErrorCode PetscOptionsBoolArray(T...);
266 template <typename... T> PetscErrorCode PetscOptionsEnumArray(T...);
267 template <typename... T> PetscErrorCode PetscOptionsDeprecated(T...);
268 template <typename... T> PetscErrorCode PetscOptionsDeprecatedNoObject(T...);
269 #else
270 /*MC
271      PetscOptionsHeadBegin - Puts a heading before listing any more published options. Used, for example,
272             in KSPSetFromOptions_GMRES().
273 
274    Logically Collective on the communicator passed in PetscOptionsBegin()
275 
276    Input Parameter:
277 .   head - the heading text
278 
279    Level: intermediate
280 
281    Notes:
282     Handles errors directly, hence does not return an error code
283 
284     Must be between a PetscOptionsBegin() and a PetscOptionsEnd(), and PetscOptionsObject created in PetscOptionsBegin() should be the first argument
285 
286     Can be followed by a call to PetscOptionsHeadEnd() in the same function.
287 
288 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
289           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
290           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
291           `PetscOptionsStringArray(),PetscOptionsRealArray()`, `PetscOptionsScalar()`,
292           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
293           `PetscOptionsFList()`, `PetscOptionsEList()`
294 @*/
295 #define PetscOptionsHeadBegin(PetscOptionsObject,head) do {\
296   if (PetscOptionsObject->printhelp && PetscOptionsObject->count == 1 && !PetscOptionsObject->alreadyprinted) {\
297     PetscCall((*PetscHelpPrintf)(PetscOptionsObject->comm,"  %s\n",head));\
298   }\
299 } while (0)
300 
301 #define PetscOptionsHead(...) PETSC_DEPRECATED_MACRO("GCC warning \"Use PetscOptionsHeadBegin() (since version 3.18)\"") PetscOptionsHeadBegin(__VA_ARGS__)
302 
303 /*MC
304      PetscOptionsHeadEnd - Ends a section of options begun with PetscOptionsHeadBegin()
305             See, for example, KSPSetFromOptions_GMRES().
306 
307     Collective on the comm used in PetscOptionsBegin() or obj used in PetscObjectOptionsBegin()
308 
309    Synopsis:
310      #include <petscoptions.h>
311      PetscErrorCode PetscOptionsHeadEnd(void)
312 
313   Level: intermediate
314 
315    Notes:
316     Must be between a PetscOptionsBegin()/PetscObjectOptionsBegin() and a PetscOptionsEnd()
317 
318           Must be preceded by a call to PetscOptionsHeadBegin() in the same function.
319 
320           This needs to be used only if the code below PetscOptionsHeadEnd() can be run ONLY once.
321       See, for example, PCSetFromOptions_Composite(). This is a return(0) in it for early exit
322       from the function.
323 
324           This is only for use with the PETSc options GUI
325 
326 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
327           `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
328           `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
329           `PetscOptionsStringArray(),PetscOptionsRealArray()`, `PetscOptionsScalar()`,
330           `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
331           `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsEnum()`
332 M*/
333 #define PetscOptionsHeadEnd() do {if (PetscOptionsObject->count != 1) PetscFunctionReturn(0);} while (0)
334 
335 #define PetscOptionsTail(...) PETSC_DEPRECATED_MACRO("GCC warning \"Use PetscOptionsHeadEnd() (since version 3.18)\"") PetscOptionsHeadEnd(__VA_ARGS__)
336 
337 #define PetscOptionsEnum(a,b,c,d,e,f,g) PetscOptionsEnum_Private(PetscOptionsObject,a,b,c,d,e,f,g)
338 #define PetscOptionsInt(a,b,c,d,e,f) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f,PETSC_MIN_INT,PETSC_MAX_INT)
339 #define PetscOptionsBoundedInt(a,b,c,d,e,f,g) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f,g,PETSC_MAX_INT)
340 #define PetscOptionsRangeInt(a,b,c,d,e,f,g,h) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f,g,h)
341 #define PetscOptionsReal(a,b,c,d,e,f) PetscOptionsReal_Private(PetscOptionsObject,a,b,c,d,e,f)
342 #define PetscOptionsScalar(a,b,c,d,e,f) PetscOptionsScalar_Private(PetscOptionsObject,a,b,c,d,e,f)
343 #define PetscOptionsName(a,b,c,d) PetscOptionsName_Private(PetscOptionsObject,a,b,c,d)
344 #define PetscOptionsString(a,b,c,d,e,f,g) PetscOptionsString_Private(PetscOptionsObject,a,b,c,d,e,f,g)
345 #define PetscOptionsBool(a,b,c,d,e,f) PetscOptionsBool_Private(PetscOptionsObject,a,b,c,d,e,f)
346 #define PetscOptionsBoolGroupBegin(a,b,c,d) PetscOptionsBoolGroupBegin_Private(PetscOptionsObject,a,b,c,d)
347 #define PetscOptionsBoolGroup(a,b,c,d) PetscOptionsBoolGroup_Private(PetscOptionsObject,a,b,c,d)
348 #define PetscOptionsBoolGroupEnd(a,b,c,d) PetscOptionsBoolGroupEnd_Private(PetscOptionsObject,a,b,c,d)
349 #define PetscOptionsFList(a,b,c,d,e,f,g,h) PetscOptionsFList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h)
350 #define PetscOptionsEList(a,b,c,d,e,f,g,h) PetscOptionsEList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h)
351 #define PetscOptionsRealArray(a,b,c,d,e,f) PetscOptionsRealArray_Private(PetscOptionsObject,a,b,c,d,e,f)
352 #define PetscOptionsScalarArray(a,b,c,d,e,f) PetscOptionsScalarArray_Private(PetscOptionsObject,a,b,c,d,e,f)
353 #define PetscOptionsIntArray(a,b,c,d,e,f) PetscOptionsIntArray_Private(PetscOptionsObject,a,b,c,d,e,f)
354 #define PetscOptionsStringArray(a,b,c,d,e,f) PetscOptionsStringArray_Private(PetscOptionsObject,a,b,c,d,e,f)
355 #define PetscOptionsBoolArray(a,b,c,d,e,f) PetscOptionsBoolArray_Private(PetscOptionsObject,a,b,c,d,e,f)
356 #define PetscOptionsEnumArray(a,b,c,d,e,f,g) PetscOptionsEnumArray_Private(PetscOptionsObject,a,b,c,d,e,f,g)
357 #define PetscOptionsDeprecated(a,b,c,d) PetscOptionsDeprecated_Private(PetscOptionsObject,a,b,c,d)
358 #define PetscOptionsDeprecatedNoObject(a,b,c,d) PetscOptionsDeprecated_Private(NULL,a,b,c,d)
359 #endif /* PETSC_CLANG_STATIC_ANALYZER */
360 
361 PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum,PetscEnum*,PetscBool*);
362 PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt,PetscInt*,PetscBool*,PetscInt,PetscInt);
363 PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal,PetscReal*,PetscBool*);
364 PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar,PetscScalar*,PetscBool*);
365 PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*);
366 PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems*,const char[],const char[],const char[],const char[],char*,size_t,PetscBool*);
367 PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool ,PetscBool*,PetscBool*);
368 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*);
369 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*);
370 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*);
371 PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems*,const char[],const char[],const char[],PetscFunctionList,const char[],char[],size_t,PetscBool*);
372 PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems*,const char[],const char[],const char[],const char*const*,PetscInt,const char[],PetscInt*,PetscBool*);
373 PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal[],PetscInt*,PetscBool*);
374 PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar[],PetscInt*,PetscBool*);
375 PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt[],PetscInt*,PetscBool*);
376 PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems*,const char[],const char[],const char[],char*[],PetscInt*,PetscBool*);
377 PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool [],PetscInt*,PetscBool*);
378 PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum[],PetscInt*,PetscBool*);
379 PETSC_EXTERN PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems*,const char[],const char[],const char[],const char[]);
380 
381 PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void);
382 
383 PETSC_EXTERN PetscErrorCode PetscObjectAddOptionsHandler(PetscObject,PetscErrorCode (*)(PetscOptionItems*,PetscObject,void*),PetscErrorCode (*)(PetscObject,void*),void*);
384 PETSC_EXTERN PetscErrorCode PetscObjectProcessOptionsHandlers(PetscOptionItems*,PetscObject);
385 PETSC_EXTERN PetscErrorCode PetscObjectDestroyOptionsHandlers(PetscObject);
386 
387 #endif
388