Skip to content

Generating Griffin solver options file from PyARC based on current schema

Kumar, Shikhar requested to merge pygriffin_solver_options into pygriffin_initial

This PR generates Griffin solver options file from PyARC based on the current schema found in PyARC/etc/arc.sch

A few notes

  • The output file is named griffin_options.i and can be combined with griffin_mesh.i to run griffin with mesh and solver options as griffin-opt -i griffin_mesh.i griffin_options. Alternatively, if the mesh is defined as an exodus file, then griffin_mesh.i should have the following block:
[Mesh]
  type = FileMeshGenerator
  file = exodus_file.e
[]
  • There should be additional checks to make sure variables such as executioner_vars, transport_systems_vars, scheme_vars are consistent with the schema in PyARC/etc/arc.sh.
  • I will add more tests for validating the other options defined under griffin_solver_options.
  • It would also be helpful to have some sort of map between variable name as defined in the PyARC schema and in Griffin, in case there is a variable name change to Griffin that occurs down the line
  • The logic for griffin_solver_options.executioner.petsc_option is still pending and will be done once the structure of this variable is defined in the schema.
  • As discussed with @pshriwise, the function PyGriffinConnect.generate_griffin_solver_options should be moved over to PyGriffin down the road so that generating solver options could be defined in PyARC (which imports the PyGriffin module) as:
def generate_solver_options():
    pygriffin.load_from_son # loads PyGriffin object from son input
    pygriffin.export_to_griffin # export PyGriffin objects as griffin output

Merge request reports