[petsc-users] PetscOptionsGetString Not Finding Option
Jared Crean
jcrean01 at gmail.com
Tue Nov 3 21:01:14 CST 2015
Hell Hong,
Is there a way to directly query the options database to get
the value of Petsc options? This is related to the discussion here:
http://lists.mcs.anl.gov/pipermail/petsc-dev/2015-July/017944.html . I
though PetscOptionsGetString and PetscOptionsSetValue would provide this
capability, but now it seems like petsc options cannot be accessed.
Jared Crean
On 11/01/2015 10:19 AM, Hong wrote:
> Jared :
> Either call KSPSetPCSide() or change
> const char name[] = "-ksp_pc_side"
> to a non-petsc option name, e.g., "-my_ksp_pc_side".
>
> Hong
>
> Hello,
> I am trying to use PetscOptionsGetString to retrieve the value
> of an option in the options database, but the value returned in
> the last argument indicates the option was not found. In the
> attached code (a modified version of ksp example 2), the string
> "-ksp_pc_side" is passed in as the argument name. If I run the code as
>
> ./jc2 -pc_type ilu -ksp_pc_side right
>
> I get the output:
>
> option -ksp_pc_side was found
>
> from line 71 of the file. Petsc does not complain of unused
> options when the program finishes. Am I using this function
> incorrectly?
>
> Jared Crean
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151103/1bc3b7c6/attachment.html>
More information about the petsc-users
mailing list