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 34*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsCreateDefault(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[]); 41*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsDestroyDefault(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() 63*4416b707SBarry Smith 64*4416b707SBarry Smith PetscOptionsItem and PetscOptionsItems are a single option (such as ksp_type) and a collection of such single 65*4416b707SBarry Smith options being handled with a PetscOptionsBegin/End() 66*4416b707SBarry Smith 67e55864a3SBarry Smith */ 68050cccc3SHong 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; 69*4416b707SBarry Smith typedef struct _n_PetscOptionItem* PetscOptionItem; 70*4416b707SBarry Smith struct _n_PetscOptionItem{ 71e55864a3SBarry Smith char *option; 72e55864a3SBarry Smith char *text; 73e55864a3SBarry Smith void *data; /* used to hold the default value and then any value it is changed to by GUI */ 74e55864a3SBarry Smith PetscFunctionList flist; /* used for available values for PetscOptionsList() */ 75e55864a3SBarry Smith const char *const *list; /* used for available values for PetscOptionsEList() */ 76e55864a3SBarry Smith char nlist; /* number of entries in list */ 77e55864a3SBarry Smith char *man; 78e55864a3SBarry Smith size_t arraylength; /* number of entries in data in the case that it is an array (of PetscInt etc) */ 79e55864a3SBarry Smith PetscBool set; /* the user has changed this value in the GUI */ 80e55864a3SBarry Smith PetscOptionType type; 81*4416b707SBarry Smith PetscOptionItem next; 82e55864a3SBarry Smith char *pman; 83e55864a3SBarry Smith void *edata; 84e55864a3SBarry Smith }; 85e55864a3SBarry Smith 86*4416b707SBarry Smith typedef struct _p_PetscOptionItems { 87e55864a3SBarry Smith PetscInt count; 88*4416b707SBarry Smith PetscOptionItem next; 89e55864a3SBarry Smith char *prefix,*pprefix; 90e55864a3SBarry Smith char *title; 91e55864a3SBarry Smith MPI_Comm comm; 92e55864a3SBarry Smith PetscBool printhelp,changedmethod,alreadyprinted; 93e55864a3SBarry Smith PetscObject object; 94*4416b707SBarry Smith } PetscOptionItems; 9530de9b25SBarry Smith 968c6bf8b2SFande Kong 9730de9b25SBarry Smith /*MC 9830de9b25SBarry Smith PetscOptionsBegin - Begins a set of queries on the options database that are related and should be 991957e957SBarry Smith displayed on the same window of a GUI that allows the user to set the options interactively. Often one should 1001957e957SBarry Smith use PetscObjectOptionsBegin() rather than this call. 10130de9b25SBarry Smith 102f2ba6396SBarry Smith Synopsis: 103aaa7dc30SBarry Smith #include <petscoptions.h> 104f2ba6396SBarry Smith PetscErrorCode PetscOptionsBegin(MPI_Comm comm,const char prefix[],const char title[],const char mansec[]) 10530de9b25SBarry Smith 10630de9b25SBarry Smith Collective on MPI_Comm 10730de9b25SBarry Smith 10830de9b25SBarry Smith Input Parameters: 10930de9b25SBarry Smith + comm - communicator that shares GUI 11030de9b25SBarry Smith . prefix - options prefix for all options displayed on window 11130de9b25SBarry Smith . title - short descriptive text, for example "Krylov Solver Options" 11230de9b25SBarry Smith - mansec - section of manual pages for options, for example KSP 11330de9b25SBarry Smith 11430de9b25SBarry Smith Level: intermediate 11530de9b25SBarry Smith 11630de9b25SBarry Smith Notes: Needs to be ended by a call the PetscOptionsEnd() 11730de9b25SBarry Smith Can add subheadings with PetscOptionsHead() 11830de9b25SBarry Smith 119e78c4b8cSBarry Smith Developer notes: PetscOptionsPublish is set in PetscOptionsCheckInitial_Private() with -saws_options. When PetscOptionsPublish is set the 120aee2cecaSBarry Smith $ loop between PetscOptionsBegin() and PetscOptionsEnd() is run THREE times with PetscOptionsPublishCount of values -1,0,1 otherwise 121aee2cecaSBarry Smith $ the loop is run ONCE with a PetscOptionsPublishCount of 1. 122aee2cecaSBarry Smith $ = -1 : The PetscOptionsInt() etc just call the PetscOptionsGetInt() etc 123aee2cecaSBarry Smith $ = 0 : The GUI objects are created in PetscOptionsInt() etc and displayed in PetscOptionsEnd() and the options 124c8e70145SBarry Smith $ database updated updated with user changes; PetscOptionsGetInt() etc are also called 125c8e70145SBarry Smith $ = 1 : The PetscOptionsInt() etc again call the PetscOptionsGetInt() etc (possibly getting new values), in addition the help message and 126c8e70145SBarry Smith $ default values are printed if -help was given. 127538aa990SBarry Smith $ When PetscOptionsObject.changedmethod is set this causes PetscOptionsPublishCount to be reset to -2 (so in the next loop iteration it is -1) 128538aa990SBarry Smith $ and the whole process is repeated. This is to handle when, for example, the KSPType is changed thus changing the list of 129538aa990SBarry Smith $ options available so they need to be redisplayed so the user can change the. Chaning PetscOptionsObjects.changedmethod is never 130538aa990SBarry Smith $ currently set. 131aee2cecaSBarry Smith 132aee2cecaSBarry Smith 13330de9b25SBarry Smith .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 134acfcf0e5SJed Brown PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 135acfcf0e5SJed Brown PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 13630de9b25SBarry Smith PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 13730de9b25SBarry Smith PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 138acfcf0e5SJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 139a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin() 14030de9b25SBarry Smith 14130de9b25SBarry Smith M*/ 1423194b578SJed Brown #define PetscOptionsBegin(comm,prefix,mess,sec) 0; do {\ 143*4416b707SBarry Smith PetscOptionItems PetscOptionsObjectBase;\ 144*4416b707SBarry Smith PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \ 145*4416b707SBarry Smith PetscMemzero(PetscOptionsObject,sizeof(PetscOptionItems)); \ 146e55864a3SBarry Smith for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\ 147e55864a3SBarry Smith PetscErrorCode _5_ierr = PetscOptionsBegin_Private(PetscOptionsObject,comm,prefix,mess,sec);CHKERRQ(_5_ierr); 14830de9b25SBarry Smith 1495fefd1ebSJed Brown /*MC 1505fefd1ebSJed Brown PetscObjectOptionsBegin - Begins a set of queries on the options database that are related and should be 1515fefd1ebSJed Brown displayed on the same window of a GUI that allows the user to set the options interactively. 1525fefd1ebSJed Brown 153f2ba6396SBarry Smith Synopsis: 154aaa7dc30SBarry Smith #include <petscoptions.h> 155f2ba6396SBarry Smith PetscErrorCode PetscObjectOptionsBegin(PetscObject obj) 1565fefd1ebSJed Brown 1575fefd1ebSJed Brown Collective on PetscObject 1585fefd1ebSJed Brown 1595fefd1ebSJed Brown Input Parameters: 1605fefd1ebSJed Brown . obj - object to set options for 1615fefd1ebSJed Brown 1625fefd1ebSJed Brown Level: intermediate 1635fefd1ebSJed Brown 1645fefd1ebSJed Brown Notes: Needs to be ended by a call the PetscOptionsEnd() 1655fefd1ebSJed Brown Can add subheadings with PetscOptionsHead() 1665fefd1ebSJed Brown 1675fefd1ebSJed Brown .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 1685fefd1ebSJed Brown PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 1695fefd1ebSJed Brown PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 1705fefd1ebSJed Brown PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 1715fefd1ebSJed Brown PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 1725fefd1ebSJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 173a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList() 1745fefd1ebSJed Brown 1755fefd1ebSJed Brown M*/ 1763194b578SJed Brown #define PetscObjectOptionsBegin(obj) 0; do { \ 177*4416b707SBarry Smith PetscOptionItems PetscOptionsObjectBase;\ 178*4416b707SBarry Smith PetscOptionItems *PetscOptionsObject = &PetscOptionsObjectBase; \ 179e55864a3SBarry Smith for (PetscOptionsObject->count=(PetscOptionsPublish?-1:1); PetscOptionsObject->count<2; PetscOptionsObject->count++) {\ 180e55864a3SBarry Smith PetscErrorCode _5_ierr = PetscObjectOptionsBegin_Private(PetscOptionsObject,obj);CHKERRQ(_5_ierr); 1813194b578SJed Brown 18230de9b25SBarry Smith /*MC 18330de9b25SBarry Smith PetscOptionsEnd - Ends a set of queries on the options database that are related and should be 18430de9b25SBarry Smith displayed on the same window of a GUI that allows the user to set the options interactively. 18530de9b25SBarry Smith 18630de9b25SBarry Smith Collective on the MPI_Comm used in PetscOptionsBegin() 18730de9b25SBarry Smith 188f2ba6396SBarry Smith Synopsis: 189aaa7dc30SBarry Smith #include <petscoptions.h> 190f2ba6396SBarry Smith PetscErrorCode PetscOptionsEnd(void) 19130de9b25SBarry Smith 19230de9b25SBarry Smith Level: intermediate 19330de9b25SBarry Smith 1941957e957SBarry Smith Notes: Needs to be preceded by a call to PetscOptionsBegin() or PetscObjectOptionsBegin() 19530de9b25SBarry Smith 19630de9b25SBarry Smith .seealso: PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetInt(), 197acfcf0e5SJed Brown PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() 198acfcf0e5SJed Brown PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), 19930de9b25SBarry Smith PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 20030de9b25SBarry Smith PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 201acfcf0e5SJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 202a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList(), PetscObjectOptionsBegin() 20330de9b25SBarry Smith 20430de9b25SBarry Smith M*/ 205e55864a3SBarry Smith #define PetscOptionsEnd() _5_ierr = PetscOptionsEnd_Private(PetscOptionsObject);CHKERRQ(_5_ierr);}} while (0) 20630de9b25SBarry Smith 207*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBegin_Private(PetscOptionItems *,MPI_Comm,const char[],const char[],const char[]); 208*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscObjectOptionsBegin_Private(PetscOptionItems *,PetscObject); 209*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnd_Private(PetscOptionItems *); 210*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsHead(PetscOptionItems *,const char[]); 21130de9b25SBarry Smith 21230de9b25SBarry Smith /*MC 21330de9b25SBarry Smith PetscOptionsTail - Ends a section of options begun with PetscOptionsHead() 21430de9b25SBarry Smith See, for example, KSPSetFromOptions_GMRES(). 21530de9b25SBarry Smith 21630de9b25SBarry Smith Collective on the communicator passed in PetscOptionsBegin() 21730de9b25SBarry Smith 218f2ba6396SBarry Smith Synopsis: 219aaa7dc30SBarry Smith #include <petscoptions.h> 220f2ba6396SBarry Smith PetscErrorCode PetscOptionsTail(void) 22130de9b25SBarry Smith 22230de9b25SBarry Smith Level: intermediate 22330de9b25SBarry Smith 2241957e957SBarry Smith Notes: Must be between a PetscOptionsBegin()/PetscObjectOptionsBegin() and a PetscOptionsEnd() 22530de9b25SBarry Smith 22630de9b25SBarry Smith Must be preceded by a call to PetscOptionsHead() in the same function. 22730de9b25SBarry Smith 228b52f573bSBarry Smith This needs to be used only if the code below PetscOptionsTail() can be run ONLY once. 229b52f573bSBarry Smith See, for example, PCSetFromOptions_Composite(). This is a return(0) in it for early exit 230b52f573bSBarry Smith from the function. 231b52f573bSBarry Smith 23256752e42SBarry Smith This is only for use with the PETSc options GUI 233b52f573bSBarry Smith 23430de9b25SBarry Smith Concepts: options database^subheading 23530de9b25SBarry Smith 23630de9b25SBarry Smith .seealso: PetscOptionsGetInt(), PetscOptionsGetReal(), 237acfcf0e5SJed Brown PetscOptionsHasName(), PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool(), 23830de9b25SBarry Smith PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), 23930de9b25SBarry Smith PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), 240acfcf0e5SJed Brown PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), 241a264d7a6SBarry Smith PetscOptionsFList(), PetscOptionsEList(), PetscOptionsEnum() 24230de9b25SBarry Smith M*/ 243e55864a3SBarry Smith #define PetscOptionsTail() 0; {if (PetscOptionsObject->count != 1) PetscFunctionReturn(0);} 244186905e3SBarry Smith 245e55864a3SBarry Smith #define PetscOptionsEnum(a,b,c,d,e,f,g) PetscOptionsEnum_Private(PetscOptionsObject,a,b,c,d,e,f,g) 246e55864a3SBarry Smith #define PetscOptionsInt(a,b,c,d,e,f) PetscOptionsInt_Private(PetscOptionsObject,a,b,c,d,e,f) 247e55864a3SBarry Smith #define PetscOptionsReal(a,b,c,d,e,f) PetscOptionsReal_Private(PetscOptionsObject,a,b,c,d,e,f) 248e55864a3SBarry Smith #define PetscOptionsScalar(a,b,c,d,e,f) PetscOptionsScalar_Private(PetscOptionsObject,a,b,c,d,e,f) 249e55864a3SBarry Smith #define PetscOptionsName(a,b,c,d) PetscOptionsName_Private(PetscOptionsObject,a,b,c,d) 250e55864a3SBarry Smith #define PetscOptionsString(a,b,c,d,e,f,g) PetscOptionsString_Private(PetscOptionsObject,a,b,c,d,e,f,g) 251e55864a3SBarry Smith #define PetscOptionsBool(a,b,c,d,e,f) PetscOptionsBool_Private(PetscOptionsObject,a,b,c,d,e,f) 252e55864a3SBarry Smith #define PetscOptionsBoolGroupBegin(a,b,c,d) PetscOptionsBoolGroupBegin_Private(PetscOptionsObject,a,b,c,d) 253e55864a3SBarry Smith #define PetscOptionsBoolGroup(a,b,c,d) PetscOptionsBoolGroup_Private(PetscOptionsObject,a,b,c,d) 254e55864a3SBarry Smith #define PetscOptionsBoolGroupEnd(a,b,c,d) PetscOptionsBoolGroupEnd_Private(PetscOptionsObject,a,b,c,d) 25583355fc5SBarry Smith #define PetscOptionsFList(a,b,c,d,e,f,g,h) PetscOptionsFList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 256e55864a3SBarry Smith #define PetscOptionsEList(a,b,c,d,e,f,g,h) PetscOptionsEList_Private(PetscOptionsObject,a,b,c,d,e,f,g,h) 257e55864a3SBarry Smith #define PetscOptionsRealArray(a,b,c,d,e,f) PetscOptionsRealArray_Private(PetscOptionsObject,a,b,c,d,e,f) 258050cccc3SHong Zhang #define PetscOptionsScalarArray(a,b,c,d,e,f) PetscOptionsScalarArray_Private(PetscOptionsObject,a,b,c,d,e,f) 259e55864a3SBarry Smith #define PetscOptionsIntArray(a,b,c,d,e,f) PetscOptionsIntArray_Private(PetscOptionsObject,a,b,c,d,e,f) 260e55864a3SBarry Smith #define PetscOptionsStringArray(a,b,c,d,e,f) PetscOptionsStringArray_Private(PetscOptionsObject,a,b,c,d,e,f) 261e55864a3SBarry Smith #define PetscOptionsBoolArray(a,b,c,d,e,f) PetscOptionsBoolArray_Private(PetscOptionsObject,a,b,c,d,e,f) 262d3e47460SLisandro Dalcin #define PetscOptionsEnumArray(a,b,c,d,e,f,g) PetscOptionsEnumArray_Private(PetscOptionsObject,a,b,c,d,e,f,g) 263e55864a3SBarry Smith 264e55864a3SBarry Smith 265*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnum_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum,PetscEnum*,PetscBool *); 266*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsInt_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt,PetscInt*,PetscBool *); 267*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsReal_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal,PetscReal*,PetscBool *); 268*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsScalar_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar,PetscScalar*,PetscBool *); 269*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsName_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *); 270*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsString_Private(PetscOptionItems*,const char[],const char[],const char[],const char[],char*,size_t,PetscBool *); 271*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBool_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool ,PetscBool *,PetscBool *); 272*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupBegin_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *); 273*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroup_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *); 274*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolGroupEnd_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool *); 275*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsFList_Private(PetscOptionItems*,const char[],const char[],const char[],PetscFunctionList,const char[],char[],size_t,PetscBool *); 276*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEList_Private(PetscOptionItems*,const char[],const char[],const char[],const char*const*,PetscInt,const char[],PetscInt*,PetscBool *); 277*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsRealArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscReal[],PetscInt*,PetscBool *); 278*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsScalarArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscScalar[],PetscInt*,PetscBool *); 279*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsIntArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscInt[],PetscInt*,PetscBool *); 280*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsStringArray_Private(PetscOptionItems*,const char[],const char[],const char[],char*[],PetscInt*,PetscBool *); 281*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsBoolArray_Private(PetscOptionItems*,const char[],const char[],const char[],PetscBool [],PetscInt*,PetscBool *); 282*4416b707SBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsEnumArray_Private(PetscOptionItems*,const char[],const char[],const char[],const char *const*,PetscEnum[],PetscInt*,PetscBool *); 283cffb1e40SBarry Smith 284e9fa29b7SSatish Balay 285014dd563SJed Brown PETSC_EXTERN PetscErrorCode PetscOptionsSetFromOptions(void); 286e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PetscOptionsSAWsDestroy(void); 287f8d0b74dSMatthew Knepley 2883a3b2205SBarry Smith #endif 289