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 typedef struct _n_PetscOptions* PetscOptions; 10 PETSC_EXTERN PetscErrorCode PetscOptionsCreate(PetscOptions*); 11 PETSC_EXTERN PetscErrorCode PetscOptionsPush(PetscOptions); 12 PETSC_EXTERN PetscErrorCode PetscOptionsPop(void); 13 PETSC_EXTERN PetscErrorCode PetscOptionsDestroy(PetscOptions*); 14 PETSC_EXTERN PetscErrorCode PetscOptionsCreateDefault(void); 15 PETSC_EXTERN PetscErrorCode PetscOptionsDestroyDefault(void); 16 17 PETSC_EXTERN PetscErrorCode PetscOptionsHasHelp(PetscOptions,PetscBool*); 18 PETSC_EXTERN PetscErrorCode PetscOptionsHasName(PetscOptions,const char[],const char[],PetscBool*); 19 PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(PetscOptions,const char[],const char [],PetscBool*,PetscBool*); 20 PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(PetscOptions,const char[],const char [],PetscInt*,PetscBool*); 21 PETSC_EXTERN PetscErrorCode PetscOptionsGetEnum(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscBool*); 22 PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(PetscOptions,const char[],const char[],const char*const*,PetscInt,PetscInt*,PetscBool*); 23 PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(PetscOptions,const char[],const char[],PetscReal*,PetscBool*); 24 PETSC_EXTERN PetscErrorCode PetscOptionsGetScalar(PetscOptions,const char[],const char[],PetscScalar*,PetscBool*); 25 PETSC_EXTERN PetscErrorCode PetscOptionsGetString(PetscOptions,const char[],const char[],char[],size_t,PetscBool*); 26 27 PETSC_EXTERN PetscErrorCode PetscOptionsGetBoolArray(PetscOptions,const char[],const char[],PetscBool [],PetscInt*,PetscBool*); 28 PETSC_EXTERN PetscErrorCode PetscOptionsGetEnumArray(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscInt*,PetscBool*); 29 PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(PetscOptions,const char[],const char[],PetscInt[],PetscInt*,PetscBool*); 30 PETSC_EXTERN PetscErrorCode PetscOptionsGetRealArray(PetscOptions,const char[],const char[],PetscReal[],PetscInt*,PetscBool*); 31 PETSC_EXTERN PetscErrorCode PetscOptionsGetScalarArray(PetscOptions,const char[],const char[],PetscScalar[],PetscInt*,PetscBool*); 32 PETSC_EXTERN PetscErrorCode PetscOptionsGetStringArray(PetscOptions,const char[],const char[],char*[],PetscInt*,PetscBool*); 33 34 PETSC_EXTERN PetscErrorCode PetscOptionsValidKey(const char[],PetscBool*); 35 PETSC_EXTERN PetscErrorCode PetscOptionsSetAlias(PetscOptions,const char[],const char[]); 36 PETSC_EXTERN PetscErrorCode PetscOptionsSetValue(PetscOptions,const char[],const char[]); 37 PETSC_EXTERN PetscErrorCode PetscOptionsClearValue(PetscOptions,const char[]); 38 PETSC_EXTERN PetscErrorCode PetscOptionsFindPair(PetscOptions,const char[],const char[],const char*[],PetscBool*); 39 40 PETSC_EXTERN PetscErrorCode PetscOptionsGetAll(PetscOptions,char*[]); 41 PETSC_EXTERN PetscErrorCode PetscOptionsAllUsed(PetscOptions,PetscInt*); 42 PETSC_EXTERN PetscErrorCode PetscOptionsUsed(PetscOptions,const char[],PetscBool*); 43 PETSC_EXTERN PetscErrorCode PetscOptionsLeft(PetscOptions); 44 PETSC_EXTERN PetscErrorCode PetscOptionsLeftGet(PetscOptions,PetscInt*,char***,char***); 45 PETSC_EXTERN PetscErrorCode PetscOptionsLeftRestore(PetscOptions,PetscInt*,char***,char***); 46 PETSC_EXTERN PetscErrorCode PetscOptionsView(PetscOptions,PetscViewer); 47 48 PETSC_EXTERN PetscErrorCode PetscOptionsReject(PetscOptions,const char[],const char[],const char[]); 49 PETSC_EXTERN PetscErrorCode PetscOptionsInsert(PetscOptions,int*,char***,const char[]); 50 PETSC_EXTERN PetscErrorCode PetscOptionsInsertFile(MPI_Comm,PetscOptions,const char[],PetscBool ); 51 #if defined(PETSC_HAVE_YAML) 52 PETSC_EXTERN PetscErrorCode PetscOptionsInsertFileYAML(MPI_Comm,const char[],PetscBool); 53 #endif 54 PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(PetscOptions,const char[]); 55 PETSC_EXTERN PetscErrorCode PetscOptionsClear(PetscOptions); 56 PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPush(PetscOptions,const char[]); 57 PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPop(PetscOptions); 58 59 PETSC_EXTERN PetscErrorCode PetscOptionsGetenv(MPI_Comm,const char[],char[],size_t,PetscBool*); 60 PETSC_EXTERN PetscErrorCode PetscOptionsStringToBool(const char[],PetscBool*); 61 PETSC_EXTERN PetscErrorCode PetscOptionsStringToInt(const char[],PetscInt*); 62 PETSC_EXTERN PetscErrorCode PetscOptionsStringToReal(const char[],PetscReal*); 63 PETSC_EXTERN PetscErrorCode PetscOptionsStringToScalar(const char[],PetscScalar*); 64 65 PETSC_EXTERN PetscErrorCode PetscOptionsMonitorSet(PetscErrorCode (*)(const char[], const char[], void*), void*, PetscErrorCode (*)(void**)); 66 PETSC_EXTERN PetscErrorCode PetscOptionsMonitorCancel(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 /* 76 See manual page for PetscOptionsBegin() 77 78 PetscOptionsItem and PetscOptionsItems are a single option (such as ksp_type) and a collection of such single 79 options being handled with a PetscOptionsBegin/End() 80 81 */ 82 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; 83 typedef struct _n_PetscOptionItem* PetscOptionItem; 84 struct _n_PetscOptionItem{ 85 char *option; 86 char *text; 87 void *data; /* used to hold the default value and then any value it is changed to by GUI */ 88 PetscFunctionList flist; /* used for available values for PetscOptionsList() */ 89 const char *const *list; /* used for available values for PetscOptionsEList() */ 90 char nlist; /* number of entries in list */ 91 char *man; 92 size_t arraylength; /* number of entries in data in the case that it is an array (of PetscInt etc) */ 93 PetscBool set; /* the user has changed this value in the GUI */ 94 PetscOptionType type; 95 PetscOptionItem next; 96 char *pman; 97 void *edata; 98 }; 99 100 typedef struct _p_PetscOptionItems { 101 PetscInt count; 102 PetscOptionItem next; 103 char *prefix,*pprefix; 104 char *title; 105 MPI_Comm comm; 106 PetscBool printhelp,changedmethod,alreadyprinted; 107 PetscObject object; 108 PetscOptions options; 109 } PetscOptionItems; 110 111 112 /*MC 113 PetscOptionsBegin - Begins a set of queries on the options database that are related and should be 114 displayed on the same window of a GUI that allows the user to set the options interactively. Often one should 115 use PetscObjectOptionsBegin() rather than this call. 116 117 Synopsis: 118 #include <petscoptions.h> 119 PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[]) 120 121 Collective 122 123 Input Parameters: 124 + comm - communicator that shares GUI 125 . prefix - options prefix for all options displayed on window (optional) 126 . title - short descriptive text, for example "Krylov Solver Options" 127 - mansec - section of manual pages for options, for example KSP (optional) 128 129 Level: intermediate 130 131 Notes: 132 The set of queries needs to be ended by a call to PetscOptionsEnd(). 133 134 One can add subheadings with PetscOptionsHead(). 135 136 Developer Notes: 137 PetscOptionsPublish is set in PetscOptionsCheckInitial_Private() with -saws_options. When PetscOptionsPublish is set the 138 loop between PetscOptionsBegin() and PetscOptionsEnd() is run THREE times with PetscOptionsPublishCount of values -1,0,1. 139 Otherwise the loop is run ONCE with a PetscOptionsPublishCount of 1. 140 + \-1 - PetscOptionsInt() etc. just call PetscOptionsGetInt() etc. 141 . 0 - The GUI objects are created in PetscOptionsInt() etc. and displayed in PetscOptionsEnd() and the options 142 database updated with user changes; PetscOptionsGetInt() etc. are also called. 143 - 1 - PetscOptionsInt() etc. again call PetscOptionsGetInt() etc. (possibly getting new values), in addition the help message and 144 default values are printed if -help was given. 145 When PetscOptionsObject.changedmethod is set this causes PetscOptionsPublishCount to be reset to -2 (so in the next loop iteration it is -1) 146 and the whole process is repeated. This is to handle when, for example, the KSPType is changed thus changing the list of 147 options available so they need to be redisplayed so the user can change the. Changing PetscOptionsObjects.changedmethod is never 148 currently set. 149 150 .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 151 PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 152 PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 153 PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 154 PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 155 PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 156 PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin() 157 158 M*/ 159 #define PetscOptionsBegin(comm,prefix,mess,sec) 0; do {\ 160 PetscOptionItems PetscOptionsObjectBase;\ 161 PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \ 162 PetscMemzero(PetscOptionsObject,sizeof(PetscOptionItems)); \ 163 for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\ 164 PetscErrorCode _5_ierr = PetscOptionsBegin_Private(PetscOptionsObject,comm,prefix,mess,sec);CHKERRQ(_5_ierr) 165 166 /*MC 167 PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be 168 displayed on the same window of a GUI that allows the user to set the options interactively. 169 170 Synopsis: 171 #include <petscoptions.h> 172 PetscErrorCode PetscObjectOptionsBegin(PetscObject obj) 173 174 Collective on obj 175 176 Input Parameters: 177 . obj - object to set options for 178 179 Level: intermediate 180 181 Notes: 182 Needs to be ended by a call the PetscOptionsEnd() 183 Can add subheadings with PetscOptionsHead() 184 185 .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 186 PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 187 PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 188 PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 189 PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 190 PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 191 PetscOptionsFList(), PetscOptionsEList() 192 193 M*/ 194 #define PetscObjectOptionsBegin(obj) 0; do { \ 195 PetscOptionItems PetscOptionsObjectBase;\ 196 PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \ 197 PetscOptionsObject->options = ((PetscObject)obj)->options; \ 198 for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\ 199 PetscErrorCode _5_ierr = PetscObjectOptionsBegin_Private(PetscOptionsObject,obj);CHKERRQ(_5_ierr) 200 201 /*MC 202 PetscOptionsEnd - Ends a set of queries on the options database that are related and should be 203 displayed on the same window of a GUI that allows the user to set the options interactively. 204 205 Collective on the comm used in PetscOptionsBegin() or obj used in PetscObjectOptionsBegin() 206 207 Synopsis: 208 #include <petscoptions.h> 209 PetscErrorCode PetscOptionsEnd(void) 210 211 Level: intermediate 212 213 Notes: 214 Needs to be preceded by a call to PetscOptionsBegin() or PetscObjectOptionsBegin() 215 216 .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 217 PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 218 PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 219 PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 220 PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 221 PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 222 PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin() 223 224 M*/ 225 #define PetscOptionsEnd() _5_ierr = PetscOptionsEnd_Private(PetscOptionsObject);CHKERRQ(_5_ierr);}} while (0) 226 227 PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *,MPI_Comm,const char[],const char[],const char[]); 228 PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscOptionItems *,PetscObject); 229 PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *); 230 PETSC_EXTERN PetscErrorCode PetscOptionsHead(PetscOptionItems *,const char[]); 231 232 /*MC 233 PetscOptionsTail - Ends a section of options begun with PetscOptionsHead() 234 See, for example, KSPSetFromOptions_GMRES(). 235 236 Collective on the comm used in PetscOptionsBegin() or obj used in PetscObjectOptionsBegin() 237 238 Synopsis: 239 #include <petscoptions.h> 240 PetscErrorCode PetscOptionsTail(void) 241 242 Level: intermediate 243 244 Notes: 245 Must be between a PetscOptionsBegin()/PetscObjectOptionsBegin() and a PetscOptionsEnd() 246 247 Must be preceded by a call to PetscOptionsHead() in the same function. 248 249 This needs to be used only if the code below PetscOptionsTail() can be run ONLY once. 250 See, for example, PCSetFromOptions_Composite(). This is a return(0) in it for early exit 251 from the function. 252 253 This is only for use with the PETSc options GUI 254 255 .seealso: PetscOptionsGetInt(), PetscOptionsGetReal(), 256 PetscOptionsHasName(), PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool(), 257 PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 258 PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 259 PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 260 PetscOptionsFList(), PetscOptionsEList(), PetscOptionsEnum() 261 M*/ 262 #define PetscOptionsTail() 0; do {if (PetscOptionsObject->count != 1) PetscFunctionReturn(0);} while(0) 263 264 #define PetscOptionsEnum(a,b,c,d,e,f,g) PetscOptionsEnum_Private(PetscOptionsObject,a,b,c,d,e,f,g) 265 #define PetscOptionsInt(a,b,c,d,e,f) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f,PETSC_MIN_INT,PETSC_MAX_INT) 266 #define PetscOptionsBoundedInt(a,b,c,d,e,f,g) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f,g,PETSC_MAX_INT) 267 #define PetscOptionsRangeInt(a,b,c,d,e,f,g,h) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 268 #define PetscOptionsReal(a,b,c,d,e,f) PetscOptionsReal_Private(PetscOptionsObject,a,b,c,d,e,f) 269 #define PetscOptionsScalar(a,b,c,d,e,f) PetscOptionsScalar_Private(PetscOptionsObject,a,b,c,d,e,f) 270 #define PetscOptionsName(a,b,c,d) PetscOptionsName_Private(PetscOptionsObject,a,b,c,d) 271 #define PetscOptionsString(a,b,c,d,e,f,g) PetscOptionsString_Private(PetscOptionsObject,a,b,c,d,e,f,g) 272 #define PetscOptionsBool(a,b,c,d,e,f) PetscOptionsBool_Private(PetscOptionsObject,a,b,c,d,e,f) 273 #define PetscOptionsBoolGroupBegin(a,b,c,d) PetscOptionsBoolGroupBegin_Private(PetscOptionsObject,a,b,c,d) 274 #define PetscOptionsBoolGroup(a,b,c,d) PetscOptionsBoolGroup_Private(PetscOptionsObject,a,b,c,d) 275 #define PetscOptionsBoolGroupEnd(a,b,c,d) PetscOptionsBoolGroupEnd_Private(PetscOptionsObject,a,b,c,d) 276 #define PetscOptionsFList(a,b,c,d,e,f,g,h) PetscOptionsFList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 277 #define PetscOptionsEList(a,b,c,d,e,f,g,h) PetscOptionsEList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 278 #define PetscOptionsRealArray(a,b,c,d,e,f) PetscOptionsRealArray_Private(PetscOptionsObject,a,b,c,d,e,f) 279 #define PetscOptionsScalarArray(a,b,c,d,e,f) PetscOptionsScalarArray_Private(PetscOptionsObject,a,b,c,d,e,f) 280 #define PetscOptionsIntArray(a,b,c,d,e,f) PetscOptionsIntArray_Private(PetscOptionsObject,a,b,c,d,e,f) 281 #define PetscOptionsStringArray(a,b,c,d,e,f) PetscOptionsStringArray_Private(PetscOptionsObject,a,b,c,d,e,f) 282 #define PetscOptionsBoolArray(a,b,c,d,e,f) PetscOptionsBoolArray_Private(PetscOptionsObject,a,b,c,d,e,f) 283 #define PetscOptionsEnumArray(a,b,c,d,e,f,g) PetscOptionsEnumArray_Private(PetscOptionsObject,a,b,c,d,e,f,g) 284 #define PetscOptionsDeprecated(a,b,c,d) PetscOptionsDeprecated_Private(PetscOptionsObject,a,b,c,d) 285 #define PetscOptionsDeprecatedNoObject(a,b,c,d) PetscOptionsDeprecated_Private(NULL,a,b,c,d) 286 287 288 PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum,PetscEnum*,PetscBool*); 289 PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt,PetscInt*,PetscBool*,PetscInt,PetscInt); 290 PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal,PetscReal*,PetscBool*); 291 PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar,PetscScalar*,PetscBool*); 292 PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*); 293 PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems*,const char[],const char[],const char[],const char[],char*,size_t,PetscBool*); 294 PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool ,PetscBool*,PetscBool*); 295 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*); 296 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*); 297 PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool*); 298 PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems*,const char[],const char[],const char[],PetscFunctionList,const char[],char[],size_t,PetscBool*); 299 PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems*,const char[],const char[],const char[],const char*const*,PetscInt,const char[],PetscInt*,PetscBool*); 300 PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal[],PetscInt*,PetscBool*); 301 PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar[],PetscInt*,PetscBool*); 302 PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt[],PetscInt*,PetscBool*); 303 PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems*,const char[],const char[],const char[],char*[],PetscInt*,PetscBool*); 304 PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool [],PetscInt*,PetscBool*); 305 PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum[],PetscInt*,PetscBool*); 306 PETSC_EXTERN PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems*,const char[],const char[],const char[],const char[]); 307 308 309 PETSC_EXTERN PetscErrorCode PetscOptionsSetFromOptions(PetscOptions); 310 PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void); 311 312 PETSC_EXTERN PetscErrorCode PetscObjectAddOptionsHandler(PetscObject,PetscErrorCode (*)(PetscOptionItems*,PetscObject,void*),PetscErrorCode (*)(PetscObject,void*),void*); 313 PETSC_EXTERN PetscErrorCode PetscObjectProcessOptionsHandlers(PetscOptionItems*,PetscObject); 314 PETSC_EXTERN PetscErrorCode PetscObjectDestroyOptionsHandlers(PetscObject); 315 316 #endif 317