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 189 M*/ 190 #define PetscOptionsBegin(comm, prefix, mess, sec) \ 191 do { \ 192 PetscOptionItems PetscOptionsObjectBase; \ 193 PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \ 194 PetscCall(PetscMemzero(PetscOptionsObject, sizeof(*PetscOptionsObject))); \ 195 for (PetscOptionsObject->count = (PetscOptionsPublish ? -1 : 1); PetscOptionsObject->count < 2; PetscOptionsObject->count++) { \ 196 PetscCall(PetscOptionsBegin_Private(PetscOptionsObject, comm, prefix, mess, sec)) 197 198 /*MC 199 PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be 200 displayed on the same window of a GUI that allows the user to set the options interactively. 201 202 Synopsis: 203 #include <petscoptions.h> 204 PetscErrorCode PetscObjectOptionsBegin(PetscObject obj) 205 206 Collective 207 208 Input Parameter: 209 . obj - object to set options for 210 211 Level: intermediate 212 213 Notes: 214 This is a macro that handles its own error checking, it does not return an error code. 215 216 Needs to be ended by a call the `PetscOptionsEnd()` 217 218 Can add subheadings with `PetscOptionsHeadBegin()` 219 220 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`, 221 `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()` 222 `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`, 223 `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, 224 `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, 225 `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, 226 `PetscOptionsFList()`, `PetscOptionsEList()` 227 228 M*/ 229 #define PetscObjectOptionsBegin(obj) \ 230 do { \ 231 PetscOptionItems PetscOptionsObjectBase; \ 232 PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \ 233 PetscOptionsObject->options = ((PetscObject)obj)->options; \ 234 for (PetscOptionsObject->count = (PetscOptionsPublish ? -1 : 1); PetscOptionsObject->count < 2; PetscOptionsObject->count++) { \ 235 PetscCall(PetscObjectOptionsBegin_Private(obj, PetscOptionsObject)) 236 237 /*MC 238 PetscOptionsEnd - Ends a set of queries on the options database that are related and should be 239 displayed on the same window of a GUI that allows the user to set the options interactively. 240 241 Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()` 242 243 Synopsis: 244 #include <petscoptions.h> 245 PetscErrorCode PetscOptionsEnd(void) 246 247 Level: intermediate 248 249 Notes: 250 Needs to be preceded by a call to `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` 251 252 This is a macro that handles its own error checking, it does not return an error code. 253 254 .seealso: `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetInt()`, 255 `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()` 256 `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`, 257 `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsHeadBegin()`, 258 `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, 259 `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, 260 `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscObjectOptionsBegin()` 261 262 M*/ 263 #define PetscOptionsEnd() \ 264 PetscCall(PetscOptionsEnd_Private(PetscOptionsObject)); \ 265 } \ 266 } \ 267 while (0) 268 #endif /* PETSC_CLANG_STATIC_ANALYZER */ 269 270 PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *, MPI_Comm, const char[], const char[], const char[]); 271 PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscObject, PetscOptionItems *); 272 PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *); 273 PETSC_EXTERN PetscErrorCode PetscOptionsHeadBegin(PetscOptionItems *, const char[]); 274 275 #if defined(PETSC_CLANG_STATIC_ANALYZER) 276 template <typename... T> 277 void PetscOptionsHeadBegin(T...); 278 void PetscOptionsHeadEnd(void); 279 template <typename... T> 280 PetscErrorCode PetscOptionsEnum(T...); 281 template <typename... T> 282 PetscErrorCode PetscOptionsInt(T...); 283 template <typename... T> 284 PetscErrorCode PetscOptionsBoundedInt(T...); 285 template <typename... T> 286 PetscErrorCode PetscOptionsRangeInt(T...); 287 template <typename... T> 288 PetscErrorCode PetscOptionsReal(T...); 289 template <typename... T> 290 PetscErrorCode PetscOptionsScalar(T...); 291 template <typename... T> 292 PetscErrorCode PetscOptionsName(T...); 293 template <typename... T> 294 PetscErrorCode PetscOptionsString(T...); 295 template <typename... T> 296 PetscErrorCode PetscOptionsBool(T...); 297 template <typename... T> 298 PetscErrorCode PetscOptionsBoolGroupBegin(T...); 299 template <typename... T> 300 PetscErrorCode PetscOptionsBoolGroup(T...); 301 template <typename... T> 302 PetscErrorCode PetscOptionsBoolGroupEnd(T...); 303 template <typename... T> 304 PetscErrorCode PetscOptionsFList(T...); 305 template <typename... T> 306 PetscErrorCode PetscOptionsEList(T...); 307 template <typename... T> 308 PetscErrorCode PetscOptionsRealArray(T...); 309 template <typename... T> 310 PetscErrorCode PetscOptionsScalarArray(T...); 311 template <typename... T> 312 PetscErrorCode PetscOptionsIntArray(T...); 313 template <typename... T> 314 PetscErrorCode PetscOptionsStringArray(T...); 315 template <typename... T> 316 PetscErrorCode PetscOptionsBoolArray(T...); 317 template <typename... T> 318 PetscErrorCode PetscOptionsEnumArray(T...); 319 template <typename... T> 320 PetscErrorCode PetscOptionsDeprecated(T...); 321 template <typename... T> 322 PetscErrorCode PetscOptionsDeprecatedNoObject(T...); 323 #else 324 /*MC 325 PetscOptionsHeadBegin - Puts a heading before listing any more published options. Used, for example, 326 in KSPSetFromOptions_GMRES(). 327 328 Logically Collective on the communicator passed in PetscOptionsBegin() 329 330 Input Parameter: 331 . head - the heading text 332 333 Level: developer 334 335 Notes: 336 Handles errors directly, hence does not return an error code 337 338 Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`, and PetscOptionsObject created in `PetscOptionsBegin()` should be the first argument 339 340 Must be followed by a call to `PetscOptionsHeadEnd()` in the same function. 341 342 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`, 343 `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`, 344 `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, 345 `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, 346 `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, 347 `PetscOptionsFList()`, `PetscOptionsEList()` 348 @*/ 349 #define PetscOptionsHeadBegin(PetscOptionsObject, head) \ 350 do { \ 351 if (PetscOptionsObject->printhelp && PetscOptionsObject->count == 1 && !PetscOptionsObject->alreadyprinted) PetscCall((*PetscHelpPrintf)(PetscOptionsObject->comm, " %s\n", head)); \ 352 } while (0) 353 354 #define PetscOptionsHead(...) PETSC_DEPRECATED_MACRO("GCC warning \"Use PetscOptionsHeadBegin() (since version 3.18)\"") PetscOptionsHeadBegin(__VA_ARGS__) 355 356 /*MC 357 PetscOptionsHeadEnd - Ends a section of options begun with `PetscOptionsHeadBegin()` 358 See, for example, KSPSetFromOptions_GMRES(). 359 360 Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()` 361 362 Synopsis: 363 #include <petscoptions.h> 364 PetscErrorCode PetscOptionsHeadEnd(void) 365 366 Level: intermediate 367 368 Notes: 369 Must be between a `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` and a `PetscOptionsEnd()` 370 371 Must be preceded by a call to `PetscOptionsHeadBegin()` in the same function. 372 373 This needs to be used only if the code below `PetscOptionsHeadEnd()` can be run ONLY once. 374 See, for example, `PCSetFromOptions_Composite()`. This is a return(0) in it for early exit 375 from the function. 376 377 This is only for use with the PETSc options GUI 378 379 .seealso: `PetscOptionsGetInt()`, `PetscOptionsGetReal()`, 380 `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`, 381 `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, 382 `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, 383 `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, 384 `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsEnum()` 385 M*/ 386 #define PetscOptionsHeadEnd() \ 387 do { \ 388 if (PetscOptionsObject->count != 1) PetscFunctionReturn(PETSC_SUCCESS); \ 389 } while (0) 390 391 #define PetscOptionsTail(...) PETSC_DEPRECATED_MACRO("GCC warning \"Use PetscOptionsHeadEnd() (since version 3.18)\"") PetscOptionsHeadEnd(__VA_ARGS__) 392 393 #define PetscOptionsEnum(a, b, c, d, e, f, g) PetscOptionsEnum_Private(PetscOptionsObject, a, b, c, d, e, f, g) 394 #define PetscOptionsInt(a, b, c, d, e, f) PetscOptionsInt_Private(PetscOptionsObject, a, b, c, d, e, f, PETSC_MIN_INT, PETSC_MAX_INT) 395 #define PetscOptionsBoundedInt(a, b, c, d, e, f, g) PetscOptionsInt_Private(PetscOptionsObject, a, b, c, d, e, f, g, PETSC_MAX_INT) 396 #define PetscOptionsRangeInt(a, b, c, d, e, f, g, h) PetscOptionsInt_Private(PetscOptionsObject, a, b, c, d, e, f, g, h) 397 #define PetscOptionsReal(a, b, c, d, e, f) PetscOptionsReal_Private(PetscOptionsObject, a, b, c, d, e, f) 398 #define PetscOptionsScalar(a, b, c, d, e, f) PetscOptionsScalar_Private(PetscOptionsObject, a, b, c, d, e, f) 399 #define PetscOptionsName(a, b, c, d) PetscOptionsName_Private(PetscOptionsObject, a, b, c, d) 400 #define PetscOptionsString(a, b, c, d, e, f, g) PetscOptionsString_Private(PetscOptionsObject, a, b, c, d, e, f, g) 401 #define PetscOptionsBool(a, b, c, d, e, f) PetscOptionsBool_Private(PetscOptionsObject, a, b, c, d, e, f) 402 #define PetscOptionsBoolGroupBegin(a, b, c, d) PetscOptionsBoolGroupBegin_Private(PetscOptionsObject, a, b, c, d) 403 #define PetscOptionsBoolGroup(a, b, c, d) PetscOptionsBoolGroup_Private(PetscOptionsObject, a, b, c, d) 404 #define PetscOptionsBoolGroupEnd(a, b, c, d) PetscOptionsBoolGroupEnd_Private(PetscOptionsObject, a, b, c, d) 405 #define PetscOptionsFList(a, b, c, d, e, f, g, h) PetscOptionsFList_Private(PetscOptionsObject, a, b, c, d, e, f, g, h) 406 #define PetscOptionsEList(a, b, c, d, e, f, g, h) PetscOptionsEList_Private(PetscOptionsObject, a, b, c, d, e, f, g, h) 407 #define PetscOptionsRealArray(a, b, c, d, e, f) PetscOptionsRealArray_Private(PetscOptionsObject, a, b, c, d, e, f) 408 #define PetscOptionsScalarArray(a, b, c, d, e, f) PetscOptionsScalarArray_Private(PetscOptionsObject, a, b, c, d, e, f) 409 #define PetscOptionsIntArray(a, b, c, d, e, f) PetscOptionsIntArray_Private(PetscOptionsObject, a, b, c, d, e, f) 410 #define PetscOptionsStringArray(a, b, c, d, e, f) PetscOptionsStringArray_Private(PetscOptionsObject, a, b, c, d, e, f) 411 #define PetscOptionsBoolArray(a, b, c, d, e, f) PetscOptionsBoolArray_Private(PetscOptionsObject, a, b, c, d, e, f) 412 #define PetscOptionsEnumArray(a, b, c, d, e, f, g) PetscOptionsEnumArray_Private(PetscOptionsObject, a, b, c, d, e, f, g) 413 #define PetscOptionsDeprecated(a, b, c, d) PetscOptionsDeprecated_Private(PetscOptionsObject, a, b, c, d) 414 #define PetscOptionsDeprecatedNoObject(a, b, c, d) PetscOptionsDeprecated_Private(NULL, a, b, c, d) 415 #endif /* PETSC_CLANG_STATIC_ANALYZER */ 416 417 PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscEnum, PetscEnum *, PetscBool *); 418 PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems *, const char[], const char[], const char[], PetscInt, PetscInt *, PetscBool *, PetscInt, PetscInt); 419 PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems *, const char[], const char[], const char[], PetscReal, PetscReal *, PetscBool *); 420 PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems *, const char[], const char[], const char[], PetscScalar, PetscScalar *, PetscBool *); 421 PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *); 422 PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems *, const char[], const char[], const char[], const char[], char *, size_t, PetscBool *); 423 PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool, PetscBool *, PetscBool *); 424 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *); 425 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *); 426 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool *); 427 PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems *, const char[], const char[], const char[], PetscFunctionList, const char[], char[], size_t, PetscBool *); 428 PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscInt, const char[], PetscInt *, PetscBool *); 429 PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscReal[], PetscInt *, PetscBool *); 430 PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscScalar[], PetscInt *, PetscBool *); 431 PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscInt[], PetscInt *, PetscBool *); 432 PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems *, const char[], const char[], const char[], char *[], PetscInt *, PetscBool *); 433 PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems *, const char[], const char[], const char[], PetscBool[], PetscInt *, PetscBool *); 434 PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems *, const char[], const char[], const char[], const char *const *, PetscEnum[], PetscInt *, PetscBool *); 435 PETSC_EXTERN PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems *, const char[], const char[], const char[], const char[]); 436 437 PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void); 438 439 PETSC_EXTERN PetscErrorCode PetscObjectAddOptionsHandler(PetscObject, PetscErrorCode (*)(PetscObject, PetscOptionItems *, void *), PetscErrorCode (*)(PetscObject, void *), void *); 440 PETSC_EXTERN PetscErrorCode PetscObjectProcessOptionsHandlers(PetscObject, PetscOptionItems *); 441 PETSC_EXTERN PetscErrorCode PetscObjectDestroyOptionsHandlers(PetscObject); 442 443 PETSC_EXTERN PetscErrorCode PetscOptionsLeftError(void); 444 #endif 445