Good think I brought this up. Let's get this synchronized. No reason to
duplicate work. We can discuss the plan on petsc-dev
Why not just have PetscOptionsInsert() and have it auto-detect the file
format making life easier for user than remembering half-a-dozen function names?
Barry
On Mar 14, 2011, at 3:31 PM, Blaise Bourdin wrote:
> Hi,
>
> No, I had no idea that Sean was bringing an LSU student to work on this.
>
> I have a sophomore CS student starting right now. The idea is to implement
> PetscOptionsInsertJSONFile(MPI_Comm comm,const char file[],const char
> section[],PetscBool require)
> where every child of section would be parsed an inserted.
> i.e. parsing the following json file with section="petsc"
> {
> "version": "1.0",
> "encoding": "UTF-8",
> "mystuff": {
> "key1": "val1",
> "key2": [ "a", "b", "c"]
> },
> "petsc": {
> "sub1": {
> "key1": "val1",
> "key2": [ "a", "b", "c"]
> },
> "sub2": {
> "key1": "val1",
> "key2": [ "a", "b", "c"]
> },
> }
>
> would have exactly the same result as using
> -sub1_key1 val1 -sub1_key2 a,b,c -sub2_key1 val1 -sub2_key2 a,b,c
> on the command line.
>
> My goal is to be able to use a single json file to control an entire
> computation (mesh generation, preprocessing, analysis, postprocessing,
> visualization). It seems to me that this is implementable with minor
> incursions into the petsc code base.
>
> Blaise
>
>>
>> Is this in any related to Sean's plan to have this done this summer with a
>> student from LSU?
>>
>> I could assume, likely correctly, this is one and the same project, I just
>> want to make sure.
>>
>> Barry
>>
>> On Mar 14, 2011, at 1:31 PM, Matthew Knepley wrote:
>>
>>> Does anyone have a favorite? Blaise is going to have a student add JSON
>>> support
>>> to PetscOptions.
>>>
>>> Matt
>>>
>>> --
>>> What most experimenters take for granted before they begin their
>>> experiments is infinitely more interesting than any results to which their
>>> experiments lead.
>>> -- Norbert Wiener
>>
>
> --
> Department of Mathematics and Center for Computation & Technology
> Louisiana State University, Baton Rouge, LA 70803, USA
> Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276
> http://www.math.lsu.edu/~bourdin
>
>
>
>
>
>
>