1f26ada1bSBarry Smith /* 237f753daSBarry Smith Routines to determine options set in the options database. 3f26ada1bSBarry Smith */ 40a835dfdSSatish Balay #if !defined(__PETSCOPTIONS_H) 50a835dfdSSatish Balay #define __PETSCOPTIONS_H 62c8e378dSBarry Smith #include <petscsys.h> 7c619b03eSJed Brown #include <petscviewertypes.h> 83a3b2205SBarry Smith 9014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsHasName(const char[],const char[],PetscBool *); 10014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(const char[],const char [],PetscInt *,PetscBool *); 11014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool *,PetscBool *); 12014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal *,PetscBool *); 13014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetScalar(const char[],const char[],PetscScalar *,PetscBool *); 14014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(const char[],const char[],PetscInt[],PetscInt *,PetscBool *); 15014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetRealArray(const char[],const char[],PetscReal[],PetscInt *,PetscBool *); 16eb4ae41dSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsGetScalarArray(const char[],const char[],PetscScalar[],PetscInt *,PetscBool *); 17014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetBoolArray(const char[],const char[],PetscBool [],PetscInt *,PetscBool *); 18014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool *); 19014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetStringArray(const char[],const char[],char*[],PetscInt*,PetscBool *); 20014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(const char[],const char[],const char*const*,PetscInt,PetscInt*,PetscBool *); 21014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetEnum(const char[],const char[],const char*const*,PetscEnum*,PetscBool *); 22d3e47460SLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscOptionsGetEnumArray(const char[],const char[],const char*const*,PetscEnum*,PetscInt *,PetscBool *); 23014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsValidKey(const char[],PetscBool *); 243a3b2205SBarry Smith 25014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsSetAlias(const char[],const char[]); 26014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsSetValue(const char[],const char[]); 27014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsClearValue(const char[]); 283a3b2205SBarry Smith 29014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsAllUsed(PetscInt*); 30014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsUsed(const char *,PetscBool*); 31014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsLeft(void); 32014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsView(PetscViewer); 334b0e389bSBarry Smith 34014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsCreate(void); 35014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsInsert(int*,char ***,const char[]); 36014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsInsertFile(MPI_Comm,const char[],PetscBool ); 373bcbd388SSean Farley #if defined(PETSC_HAVE_YAML) 38826011d7SBlaise Bourdin PETSC_EXTERN PetscErrorCode PetscOptionsInsertFileYAML(MPI_Comm,const char[],PetscBool); 393bcbd388SSean Farley #endif 40014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(const char[]); 41014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsDestroy(void); 42014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsClear(void); 43014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPush(const char[]); 44014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsPrefixPop(void); 455d0dffe5SBarry Smith 46014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsReject(const char[],const char[]); 47014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetAll(char*[]); 485d0dffe5SBarry Smith 49014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsGetenv(MPI_Comm,const char[],char[],size_t,PetscBool *); 50014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsStringToInt(const char[],PetscInt*); 51014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsStringToReal(const char[],PetscReal*); 52014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsStringToBool(const char[],PetscBool*); 532e8a6d31SBarry Smith 54014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsMonitorSet(PetscErrorCode (*)(const char[], const char[], void*), void *, PetscErrorCode (*)(void**)); 55014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsMonitorCancel(void); 56014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsMonitorDefault(const char[], const char[], void *); 57081c24baSBoyana Norris 58014dd563SJed Brown PETSC_EXTERN PetscBool PetscOptionsPublish; 59e55864a3SBarry Smith 60e55864a3SBarry Smith 61e55864a3SBarry Smith /* 62e55864a3SBarry Smith See manual page for PetscOptionsBegin() 63e55864a3SBarry Smith */ 64050cccc3SHong Zhang 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; 658c34d3f5SBarry Smith typedef struct _n_PetscOption* PetscOption; 668c34d3f5SBarry Smith struct _n_PetscOption{ 67e55864a3SBarry Smith char *option; 68e55864a3SBarry Smith char *text; 69e55864a3SBarry Smith void *data; /* used to hold the default value and then any value it is changed to by GUI */ 70e55864a3SBarry Smith PetscFunctionList flist; /* used for available values for PetscOptionsList() */ 71e55864a3SBarry Smith const char *const *list; /* used for available values for PetscOptionsEList() */ 72e55864a3SBarry Smith char nlist; /* number of entries in list */ 73e55864a3SBarry Smith char *man; 74e55864a3SBarry Smith size_t arraylength; /* number of entries in data in the case that it is an array (of PetscInt etc) */ 75e55864a3SBarry Smith PetscBool set; /* the user has changed this value in the GUI */ 76e55864a3SBarry Smith PetscOptionType type; 778c34d3f5SBarry Smith PetscOption next; 78e55864a3SBarry Smith char *pman; 79e55864a3SBarry Smith void *edata; 80e55864a3SBarry Smith }; 81e55864a3SBarry Smith 8240af2deaSMatthew G. Knepley typedef struct _p_PetscOptions { 83e55864a3SBarry Smith PetscInt count; 848c34d3f5SBarry Smith PetscOption next; 85e55864a3SBarry Smith char *prefix,*pprefix; 86e55864a3SBarry Smith char *title; 87e55864a3SBarry Smith MPI_Comm comm; 88e55864a3SBarry Smith PetscBool printhelp,changedmethod,alreadyprinted; 89e55864a3SBarry Smith PetscObject object; 908c34d3f5SBarry Smith } PetscOptions; 9130de9b25SBarry Smith 92*8c6bf8b2SFande Kong 9330de9b25SBarry Smith /*MC 9430de9b25SBarry Smith PetscOptionsBegin - Begins a set of queries on the options database that are related and should be 951957e957SBarry Smith displayed on the same window of a GUI that allows the user to set the options interactively. Often one should 961957e957SBarry Smith use PetscObjectOptionsBegin() rather than this call. 9730de9b25SBarry Smith 98f2ba6396SBarry Smith Synopsis: 99aaa7dc30SBarry Smith #include <petscoptions.h> 100f2ba6396SBarry Smith PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[]) 10130de9b25SBarry Smith 10230de9b25SBarry Smith Collective on MPI_Comm 10330de9b25SBarry Smith 10430de9b25SBarry Smith Input Parameters: 10530de9b25SBarry Smith + comm - communicator that shares GUI 10630de9b25SBarry Smith . prefix - options prefix for all options displayed on window 10730de9b25SBarry Smith . title - short descriptive text, for example "Krylov Solver Options" 10830de9b25SBarry Smith - mansec - section of manual pages for options, for example KSP 10930de9b25SBarry Smith 11030de9b25SBarry Smith Level: intermediate 11130de9b25SBarry Smith 11230de9b25SBarry Smith Notes: Needs to be ended by a call the PetscOptionsEnd() 11330de9b25SBarry Smith Can add subheadings with PetscOptionsHead() 11430de9b25SBarry Smith 115e78c4b8cSBarry Smith Developer notes: PetscOptionsPublish is set in PetscOptionsCheckInitial_Private() with -saws_options. When PetscOptionsPublish is set the 116aee2cecaSBarry Smith $ loop between PetscOptionsBegin() and PetscOptionsEnd() is run THREE times with PetscOptionsPublishCount of values -1,0,1 otherwise 117aee2cecaSBarry Smith $ the loop is run ONCE with a PetscOptionsPublishCount of 1. 118aee2cecaSBarry Smith $ = -1 : The PetscOptionsInt() etc just call the PetscOptionsGetInt() etc 119aee2cecaSBarry Smith $ = 0 : The GUI objects are created in PetscOptionsInt() etc and displayed in PetscOptionsEnd() and the options 120c8e70145SBarry Smith $ database updated updated with user changes; PetscOptionsGetInt() etc are also called 121c8e70145SBarry Smith $ = 1 : The PetscOptionsInt() etc again call the PetscOptionsGetInt() etc (possibly getting new values), in addition the help message and 122c8e70145SBarry Smith $ default values are printed if -help was given. 123538aa990SBarry Smith $ When PetscOptionsObject.changedmethod is set this causes PetscOptionsPublishCount to be reset to -2 (so in the next loop iteration it is -1) 124538aa990SBarry Smith $ and the whole process is repeated. This is to handle when, for example, the KSPType is changed thus changing the list of 125538aa990SBarry Smith $ options available so they need to be redisplayed so the user can change the. Chaning PetscOptionsObjects.changedmethod is never 126538aa990SBarry Smith $ currently set. 127aee2cecaSBarry Smith 128aee2cecaSBarry Smith 12930de9b25SBarry Smith .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 130acfcf0e5SJed Brown PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 131acfcf0e5SJed Brown PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 13230de9b25SBarry Smith PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 13330de9b25SBarry Smith PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 134acfcf0e5SJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 135a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin() 13630de9b25SBarry Smith 13730de9b25SBarry Smith M*/ 1383194b578SJed Brown #define PetscOptionsBegin(comm,prefix,mess,sec) 0; do {\ 1398c34d3f5SBarry Smith PetscOptions PetscOptionsObjectBase;\ 1408c34d3f5SBarry Smith PetscOptions *PetscOptionsObject = &PetscOptionsObjectBase; \ 1418c34d3f5SBarry Smith PetscMemzero(PetscOptionsObject,sizeof(PetscOptions)); \ 142e55864a3SBarry Smith for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\ 143e55864a3SBarry Smith PetscErrorCode _5_ierr = PetscOptionsBegin_Private(PetscOptionsObject,comm,prefix,mess,sec);CHKERRQ(_5_ierr); 14430de9b25SBarry Smith 1455fefd1ebSJed Brown /*MC 1465fefd1ebSJed Brown PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be 1475fefd1ebSJed Brown displayed on the same window of a GUI that allows the user to set the options interactively. 1485fefd1ebSJed Brown 149f2ba6396SBarry Smith Synopsis: 150aaa7dc30SBarry Smith #include <petscoptions.h> 151f2ba6396SBarry Smith PetscErrorCode PetscObjectOptionsBegin(PetscObject obj) 1525fefd1ebSJed Brown 1535fefd1ebSJed Brown Collective on PetscObject 1545fefd1ebSJed Brown 1555fefd1ebSJed Brown Input Parameters: 1565fefd1ebSJed Brown . obj - object to set options for 1575fefd1ebSJed Brown 1585fefd1ebSJed Brown Level: intermediate 1595fefd1ebSJed Brown 1605fefd1ebSJed Brown Notes: Needs to be ended by a call the PetscOptionsEnd() 1615fefd1ebSJed Brown Can add subheadings with PetscOptionsHead() 1625fefd1ebSJed Brown 1635fefd1ebSJed Brown .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 1645fefd1ebSJed Brown PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 1655fefd1ebSJed Brown PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 1665fefd1ebSJed Brown PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 1675fefd1ebSJed Brown PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 1685fefd1ebSJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 169a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList() 1705fefd1ebSJed Brown 1715fefd1ebSJed Brown M*/ 1723194b578SJed Brown #define PetscObjectOptionsBegin(obj) 0; do { \ 1738c34d3f5SBarry Smith PetscOptions PetscOptionsObjectBase;\ 1748c34d3f5SBarry Smith PetscOptions *PetscOptionsObject = &PetscOptionsObjectBase; \ 175e55864a3SBarry Smith for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\ 176e55864a3SBarry Smith PetscErrorCode _5_ierr = PetscObjectOptionsBegin_Private(PetscOptionsObject,obj);CHKERRQ(_5_ierr); 1773194b578SJed Brown 17830de9b25SBarry Smith /*MC 17930de9b25SBarry Smith PetscOptionsEnd - Ends a set of queries on the options database that are related and should be 18030de9b25SBarry Smith displayed on the same window of a GUI that allows the user to set the options interactively. 18130de9b25SBarry Smith 18230de9b25SBarry Smith Collective on the MPI_Comm used in PetscOptionsBegin() 18330de9b25SBarry Smith 184f2ba6396SBarry Smith Synopsis: 185aaa7dc30SBarry Smith #include <petscoptions.h> 186f2ba6396SBarry Smith PetscErrorCode PetscOptionsEnd(void) 18730de9b25SBarry Smith 18830de9b25SBarry Smith Level: intermediate 18930de9b25SBarry Smith 1901957e957SBarry Smith Notes: Needs to be preceded by a call to PetscOptionsBegin() or PetscObjectOptionsBegin() 19130de9b25SBarry Smith 19230de9b25SBarry Smith .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 193acfcf0e5SJed Brown PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 194acfcf0e5SJed Brown PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 19530de9b25SBarry Smith PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 19630de9b25SBarry Smith PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 197acfcf0e5SJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 198a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin() 19930de9b25SBarry Smith 20030de9b25SBarry Smith M*/ 201e55864a3SBarry Smith #define PetscOptionsEnd() _5_ierr = PetscOptionsEnd_Private(PetscOptionsObject);CHKERRQ(_5_ierr);}} while (0) 20230de9b25SBarry Smith 2038c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptions *,MPI_Comm,const char[],const char[],const char[]); 2048c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscOptions *,PetscObject); 2058c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptions *); 2068c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsHead(PetscOptions *,const char[]); 20730de9b25SBarry Smith 20830de9b25SBarry Smith /*MC 20930de9b25SBarry Smith PetscOptionsTail - Ends a section of options begun with PetscOptionsHead() 21030de9b25SBarry Smith See, for example, KSPSetFromOptions_GMRES(). 21130de9b25SBarry Smith 21230de9b25SBarry Smith Collective on the communicator passed in PetscOptionsBegin() 21330de9b25SBarry Smith 214f2ba6396SBarry Smith Synopsis: 215aaa7dc30SBarry Smith #include <petscoptions.h> 216f2ba6396SBarry Smith PetscErrorCode PetscOptionsTail(void) 21730de9b25SBarry Smith 21830de9b25SBarry Smith Level: intermediate 21930de9b25SBarry Smith 2201957e957SBarry Smith Notes: Must be between a PetscOptionsBegin()/PetscObjectOptionsBegin() and a PetscOptionsEnd() 22130de9b25SBarry Smith 22230de9b25SBarry Smith Must be preceded by a call to PetscOptionsHead() in the same function. 22330de9b25SBarry Smith 224b52f573bSBarry Smith This needs to be used only if the code below PetscOptionsTail() can be run ONLY once. 225b52f573bSBarry Smith See, for example, PCSetFromOptions_Composite(). This is a return(0) in it for early exit 226b52f573bSBarry Smith from the function. 227b52f573bSBarry Smith 22856752e42SBarry Smith This is only for use with the PETSc options GUI 229b52f573bSBarry Smith 23030de9b25SBarry Smith Concepts: options database^subheading 23130de9b25SBarry Smith 23230de9b25SBarry Smith .seealso: PetscOptionsGetInt(), PetscOptionsGetReal(), 233acfcf0e5SJed Brown PetscOptionsHasName(), PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool(), 23430de9b25SBarry Smith PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 23530de9b25SBarry Smith PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 236acfcf0e5SJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 237a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList(), PetscOptionsEnum() 23830de9b25SBarry Smith M*/ 239e55864a3SBarry Smith #define PetscOptionsTail() 0; {if (PetscOptionsObject->count != 1) PetscFunctionReturn(0);} 240186905e3SBarry Smith 241e55864a3SBarry Smith #define PetscOptionsEnum(a,b,c,d,e,f,g) PetscOptionsEnum_Private(PetscOptionsObject,a,b,c,d,e,f,g) 242e55864a3SBarry Smith #define PetscOptionsInt(a,b,c,d,e,f) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f) 243e55864a3SBarry Smith #define PetscOptionsReal(a,b,c,d,e,f) PetscOptionsReal_Private(PetscOptionsObject,a,b,c,d,e,f) 244e55864a3SBarry Smith #define PetscOptionsScalar(a,b,c,d,e,f) PetscOptionsScalar_Private(PetscOptionsObject,a,b,c,d,e,f) 245e55864a3SBarry Smith #define PetscOptionsName(a,b,c,d) PetscOptionsName_Private(PetscOptionsObject,a,b,c,d) 246e55864a3SBarry Smith #define PetscOptionsString(a,b,c,d,e,f,g) PetscOptionsString_Private(PetscOptionsObject,a,b,c,d,e,f,g) 247e55864a3SBarry Smith #define PetscOptionsBool(a,b,c,d,e,f) PetscOptionsBool_Private(PetscOptionsObject,a,b,c,d,e,f) 248e55864a3SBarry Smith #define PetscOptionsBoolGroupBegin(a,b,c,d) PetscOptionsBoolGroupBegin_Private(PetscOptionsObject,a,b,c,d) 249e55864a3SBarry Smith #define PetscOptionsBoolGroup(a,b,c,d) PetscOptionsBoolGroup_Private(PetscOptionsObject,a,b,c,d) 250e55864a3SBarry Smith #define PetscOptionsBoolGroupEnd(a,b,c,d) PetscOptionsBoolGroupEnd_Private(PetscOptionsObject,a,b,c,d) 25183355fc5SBarry Smith #define PetscOptionsFList(a,b,c,d,e,f,g,h) PetscOptionsFList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 252e55864a3SBarry Smith #define PetscOptionsEList(a,b,c,d,e,f,g,h) PetscOptionsEList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 253e55864a3SBarry Smith #define PetscOptionsRealArray(a,b,c,d,e,f) PetscOptionsRealArray_Private(PetscOptionsObject,a,b,c,d,e,f) 254050cccc3SHong Zhang #define PetscOptionsScalarArray(a,b,c,d,e,f) PetscOptionsScalarArray_Private(PetscOptionsObject,a,b,c,d,e,f) 255e55864a3SBarry Smith #define PetscOptionsIntArray(a,b,c,d,e,f) PetscOptionsIntArray_Private(PetscOptionsObject,a,b,c,d,e,f) 256e55864a3SBarry Smith #define PetscOptionsStringArray(a,b,c,d,e,f) PetscOptionsStringArray_Private(PetscOptionsObject,a,b,c,d,e,f) 257e55864a3SBarry Smith #define PetscOptionsBoolArray(a,b,c,d,e,f) PetscOptionsBoolArray_Private(PetscOptionsObject,a,b,c,d,e,f) 258d3e47460SLisandro Dalcin #define PetscOptionsEnumArray(a,b,c,d,e,f,g) PetscOptionsEnumArray_Private(PetscOptionsObject,a,b,c,d,e,f,g) 259e55864a3SBarry Smith 260e55864a3SBarry Smith 2618c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptions *,const char[],const char[],const char[],const char *const*,PetscEnum,PetscEnum*,PetscBool *); 2628c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptions *,const char[],const char[],const char[],PetscInt,PetscInt*,PetscBool *); 2638c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptions *,const char[],const char[],const char[],PetscReal,PetscReal*,PetscBool *); 2648c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptions *,const char[],const char[],const char[],PetscScalar,PetscScalar*,PetscBool *); 2658c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptions *,const char[],const char[],const char[],PetscBool *); 2668c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptions *,const char[],const char[],const char[],const char[],char*,size_t,PetscBool *); 2678c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptions *,const char[],const char[],const char[],PetscBool ,PetscBool *,PetscBool *); 2688c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptions *,const char[],const char[],const char[],PetscBool *); 2698c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptions *,const char[],const char[],const char[],PetscBool *); 2708c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptions *,const char[],const char[],const char[],PetscBool *); 2718c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptions *,const char[],const char[],const char[],PetscFunctionList,const char[],char[],size_t,PetscBool *); 2728c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptions *,const char[],const char[],const char[],const char*const*,PetscInt,const char[],PetscInt*,PetscBool *); 2738c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptions *,const char[],const char[],const char[],PetscReal[],PetscInt*,PetscBool *); 274050cccc3SHong Zhang PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptions *,const char[],const char[],const char[],PetscScalar[],PetscInt*,PetscBool *); 2758c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptions *,const char[],const char[],const char[],PetscInt[],PetscInt*,PetscBool *); 2768c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptions *,const char[],const char[],const char[],char*[],PetscInt*,PetscBool *); 2778c34d3f5SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptions *,const char[],const char[],const char[],PetscBool [],PetscInt*,PetscBool *); 278d3e47460SLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptions *,const char[],const char[],const char[],const char *const*,PetscEnum[],PetscInt*,PetscBool *); 279cffb1e40SBarry Smith 280e9fa29b7SSatish Balay 281014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsSetFromOptions(void); 282e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void); 283f8d0b74dSMatthew Knepley 2843a3b2205SBarry Smith #endif 285