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