You can make up your own options and provide them in YAML format then query 
for them in your PETSc code using the routines Blaise pointed out.  There is no 
restriction that the arguments need to be only pre-defined PETSc options. 

  Barry

  As documented the YAML format supported is very simple.


> On Dec 20, 2020, at 10:56 AM, Blaise A Bourdin <[email protected]> wrote:
> 
> Have a look at the options related functions in the system section of the man 
> pages: 
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/index.html
> You can get options from the petsc option database and pass them to your user 
> code.
> You can also use petscBag to pass a C struct or a fortran derived type to 
> your user code.
> 
> Regards,
> Blaise
> 
>> On Dec 20, 2020, at 10:03 AM, sthavishtha bhopalam <[email protected]> 
>> wrote:
>> 
>> Hello PETSc users!
>> 
>> I wanted to know how one could parse user-defined variables (not the inbuilt 
>> PETSc options) in a PETSc code using YAML? Any suggestions? To my knowledge, 
>> the existing YAML parser in PETSc solely reads the PETSc options like snes, 
>> ksp, pc etc. as described here 
>> (https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2020-August/042074.html)
>>  but is incapable to read user-defined variables, which may be specific to a 
>> code. 
>> 
>> Thanks
>> -------------------------------------------
>> Regards
>> 
>> Sthavishtha
>> 
>> 
>> 
>> 
> 
> -- 
> A.K. & Shirley Barton Professor of  Mathematics
> Adjunct Professor of Mechanical Engineering
> Adjunct of the Center for Computation & Technology
> Louisiana State University, Lockett Hall Room 344, Baton Rouge, LA 70803, USA
> Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 Web 
> http://www.math.lsu.edu/~bourdin
> 

Reply via email to