[petsc-dev] PetscOptionsGetString

Satish Balay balay at mcs.anl.gov
Fri Apr 15 18:54:12 CDT 2011


Hm - if you have:

char Mode [64];

you should be using:

PetscOptionsGetString(PETSC_NULL,"-Mode",&Mode,64,&flag);

You can check an example - say src/ksp/ksp/examples/tutorials/ex10.c

Satish


On Fri, 15 Apr 2011, Shiyuan wrote:

> Hi,
> In the version of 3.1-p5, PetscOptionsGetString() can be used to get a char
> input. It seems that it doesn't work any more in development version.
>  PetscOptionsGetString(PETSC_NULL,"-Mode",&Mode,1,&flag);
> This gives me a \0. How can I get the input of only one character in dev?
> Thanks.
> 




More information about the petsc-dev mailing list