Re: [petsc-users] read argument from an XML file

2020-08-23 Thread Blaise A Bourdin
Note that the YAML parser simply reads the yaml file, converts it into a petsc option string which is later parsed by your code. Some of the advanced features of YAML, which do not translate easily into petsc options (sequences, tags, and anchors, for instance) are not implemented. Still, I

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Jed Brown
Alex Fleeter writes: > Thanks, we will try that. I have never used YAML before. It's meant to be more human-readable than XML, and is widely used these days. > Anyway, we feel using command line arguments is a bit old fashioned. It can > be quite desirable to set parameters from a

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Barry Smith
Alex, If you are ok with plan text you can also put all your "command line arguments" in a text file (using # for comment lines) like -ksp_rtol 1.e-3 # very tight tolerance for SNES -snes_rtol 1.e-12 and provide the file to PETSc via the command line argument :-) -options_file filename

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Alex Fleeter
Thanks, we will try that. I have never used YAML before. Anyway, we feel using command line arguments is a bit old fashioned. It can be quite desirable to set parameters from a human-readable file. On Thu, Aug 20, 2020 at 9:38 PM Jed Brown wrote: > You can read from a YAML file with

Re: [petsc-users] read argument from an XML file

2020-08-20 Thread Jed Brown
You can read from a YAML file with -options_file_yaml file.yaml or via https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sys/PetscOptionsInsertFileYAML.html Would this work for you or do you really want XML? Alex Fleeter writes: > Hi: > > Does PETSc have or plan to enable reading

[petsc-users] read argument from an XML file

2020-08-20 Thread Alex Fleeter
Hi: Does PETSc have or plan to enable reading arguments from an XML file? Something like the Teuchos package in Trilinos. Thanks, AF