2.4.2. The Options Database

Up: Contents Next: Vectors Previous: Include Files

As shown in Figure 3 , the user can input control data at run time using the options database. In this example the command OptionsGetInt(PETSC_NULL,"-n",&n,&flg); checks whether the user has provided a command line option to set the value of n, the problem dimension. If so, the variable n is set accordingly; otherwise, n remains unchanged. A complete description of the options database may be found in Section Runtime Options .


Up: Contents Next: Vectors Previous: Include Files