Closed hrani closed 4 years ago
~Fix are pending in #405~. Related to #405 but not a bug.
~Duplicate of #401~. Related to #401 but not a bug.
For this particular example, you can set expr
to 0
. Empty expression is a warning.
moose.Neutral('/m')
moose.CubeMesh('/m/c')
f = moose.Function('/m/c/f')
f.expr = '0' # don't leave it blank.
moose.showfield(f)
When one created a new function object one can't expect to fill the values before hand. Default values need to be filled.
Ok. The old behaviour in 3.1.5 is that if expression is not set it is 0. I'll update #405 to change this behaviour.
[dilawars@localhost ~]$ PYTHONPATH='' python3
Python 3.8.2 (default, Mar 05 2020, 18:58:42) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import moose
>>> f = moose.Function('f1')
>>> moose.showfields(f)
[ /f[0] ]
className = Function
derivative = 0.0
dt = 0.1
expr = 0
fieldIndex = 0
idValue = 452
independent = x0
index = 0
mode = 1
name = f
numData = 1
numField = 1
numVars = 0
path = /f[0]
rate = 0.0
tick = 12
value = 0.0
>>>
Fix are pending in #405 . Once travis passes it, please review and merge it.
With the latest fix/feature for function, now when created a new instance of function, getting error as
` functionerror.txt
`