-
Notifications
You must be signed in to change notification settings - Fork 5
Main driver and input parsing
In this tutorial, we run the following commands:
cd examples/poisson ../../bin/main -i poisson.yml ../../bin/main -i poisson.yml -f visualization/file_path/prefix=other_output
bin/main
is the main executable that handles the entire workflow from sample generation to ROM prediction.
Syntax:
main -i input_file -f key1=val1:key2=val2:...
bin/main
mainly takes the options from a YAML-based input file. One example of running a full order model (FOM) single prediction of Poisson equation can be found in examples/poisson
. From the built directory,
cd examples/poisson
../../bin/main -i poisson.yml
In essence, this reads a mesh file meshes/test.2x2.mesh
, refines it 5 times, and solves FOM Poisson equation with a parameterized problem poisson0
. The corresponding solution is visualized with paraview file named paraview_output
, shown as below:
It is possible to overwrite an input option in runtime, not changing the original input file. This can be done by using forced input argument. The syntax is:
main -i input_file -f key1=val1:key2=val2:...
The command above will read the option from input file
, overwrite the option key1
, key2
, ... to have a value val1
, val2
, ... respectively, then run the normal workflow. The YAML levels of key1
is specified by /
.
For example, the file name for visualization is set in the examples/poisson/poisson.yml
as
visualization:
file_path:
prefix: paraview_output
If we want to change the file name of the visualization on runtime, we can run the following command:
../../bin/main -i poisson.yml -f visualization/file_path/prefix=other_output
This will save the visualization at other_output
, instead of the original paraview_output
. This does not change the input file itself.