[petsc-users] Parsing user-defined variables using YAML

Blaise A Bourdin bourdin at lsu.edu
Sun Dec 20 10:56:43 CST 2020


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 <sthavishthabr at gmail.com> 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



More information about the petsc-users mailing list