Standardize input options and clean up demos #188
Labels
cleanup
Refactor code
demo
enhancement
New feature or request
question
Further information is requested
Our demos do a lot of work that could be done automatically by the dycore during its initialization:
New Developments
As explained more in #211 and #197, we're rethinking the TDycore interface to simplify the dycore's role to set up a DM and hand it to a solver to run a simulation. In #212, we admit this lower-level approach won't work for everyone and plan to establish a separate high-level interface for folks who just want buttons for
initialize
,advance
/step
, andfinalize
.The solver-centric approach encourages us to focus on the DM as the problem speification, and the dycore as the thing that creates it from a user's description. This means that a DM originates from a dycore, and therefore that
TDySetDM
is a complication we don't need. See below for a description of how the dycore aims to create its DM given options.TDycore approach for setting options
We now rely on
TDySetFromOptions
to accept all command line options from the supported list.Options currently implemented
constant
orexponential
)If
-tdy_read_mesh
is supplied with a filename, the dycore creates a DM from the mesh in the given file. If this option is not given, the dycore creates a DM and applies all relevant PETSC DM options. The resulting mesh is then distributed, and any necessary overlapping mesh points are added.If no mesh options are given at all, the dycore generates its "default" mesh, which is an 8x8x8-cell unit cube. If you don't ask for anything, you can't really complain!
If you want to make a demo with a mesh of a fixed type for some exotic purpose, you can always get the dycore's DM using
TDyGetDM
beforeTDySetup
, and call PETSc'sDM*
functions to set it up.Options still to be implemented
In the cases of parameters accepting
<value_or_func>
, we break each argument up into two distinct arguments, e.g.-tdy_porosity_value <value>
and-tdy_porosity_func <func>
.Options to be deleted
The text was updated successfully, but these errors were encountered: