Problem description file handling.
Short syntax: key is suffixed with ‘__<number>’ to prevent collisions with long syntax keys -> both cases can be used in a single input.
Problem configuration, corresponding to an input (problem description file). It validates the input using lists of required and other keywords that have to/can appear in the input. Default keyword lists can be obtained by sfepy.base.conf.get_standard_keywords().
ProblemConf instance is used to construct a Problem instance via Problem.from_conf(conf).
Add missing values from another problem configuration.
Missing keys/values are added also to values that are dictionaries.
Parameters: | conf : ProblemConf instance
|
---|
Loads the problem definition from a file.
The filename can either contain plain definitions, or it can contain the define() function, in which case it will be called to return the input definitions.
The job of the define() function is to return a dictionary of parameters. How the dictionary is constructed is not our business, but the usual way is to simply have a function define() along these lines in the input file:
def define():
options = {
'save_eig_vectors' : None,
'eigen_solver' : 'eigen1',
}
region_2 = {
'name' : 'Surface',
'select' : 'nodes of surface',
}
return locals()
Optionally, the define() function can accept additional arguments that should be defined using the define_args tuple or dictionary.
Utility function, a wrapper around ProblemConf.from_file() with possible override taken from options.
Get a function object given its name.
It can be either in ProblemConf.funmod, or a ProblemConf attribute directly.
Parameters: | name : str or function or None
|
---|---|
Returns: | fun : function or None
|
Return item with name item_name in configuration group given by key.
Return a dictionary that can be used to construct/override a ProblemConf instance based on options.
See --conf and --options options of the simple.py script.