-
Notifications
You must be signed in to change notification settings - Fork 5
Sample generation
In order to run sample generation, we set the option main/mode
to be sample_generation
in the input file. In the example of examples/poisson/poisson.sample.yml
,
main:
mode: sample_generation
use_rom: true
solver: poisson
There are two types of sampling:
-
base
sample generator that samples over uniform grid points on parameter space -
random
sample generator that randomly choose the parameter values over a uniform random distribution
In the example of examples/poisson/poisson.sample.yml
, we use base
sample generator, saving snapshots in the name of poisson0
,
sample_generation:
type: base
file_path:
prefix: "poisson0"
The list of parameters to be sampled is specified in the input file under sample_generation/parameter
. In the example of examples/poisson/poisson.sample.yml
, we sample over one parameter:
sample_generation:
parameters:
- key: single_run/poisson0/k
type: double
sample_size: 3
minimum: 2.0
maximum: 3.0
For each parameter listed, base
sample generator creates an 1D uniform grid space between minimum
and maximum
with the specified sample_size
. In sample generation, base
sample generator replaces the value of key
in the input file, and executes a single-run. Running the main driver with this input file
cd examples/poisson/
../../bin/main -i poisson.sample.yml
executes three single-runs that solve for Poisson equation with a sample value for parameter single_run/poisson0/k
.
Technically, any option within the input file can be chosen as a sampling parameter. Currently, however, we only support double
and filename
type of input options.
If multiple base
sample generator creates an