Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ParameterSpace
class is factored out as a new object, supporting multi-dimensional parameter space.Initialization
ParameterSpace
is initiated with adict
-type variableconfig
, which specifies parameters:Specifying parameters
With yaml format, a typical
config
(for the examples ofburgers1d
) looks like:parameters
category provides a list of parameters we'd want to perform parametric sampling:name
specifies the name of the parameter, so that aPhysics
solver can read it.min
andmax
value specify the range of the parametertest_space_type
: if the test space if specified, then create 1d parameter space based on this type specification.uniform
: uniform grid space betweenmin
andmax
withsample_size
points.list
: uses the specified list of parameter values.test_space
specifies whether or not to use FOM solutions on parameter space for test, and what type of test space we'd use. Currently it only supportsgrid
type. Will have to support PR #3 .grid
-type spaceBy default,
ParameterSpace
creates the initial training samples and a test space as multi-dimensional grids. The dimension of parameter space is determined by the number of parameters specified in the inputconfig
.passing parameters to
Physics
ParameterSpace.getParameter
function converts a numpy 1d array of parameter into adict
, so thatPhysics
class can use parameters according to their names.Physics
class can use default parameter values if not all parameter values are provided.