[FEM] Elmer: fix small number property handling
- use an expression as discussed: https://forum.freecadweb.org/viewtopic.php?p=613897#p613897
This commit is contained in:
@@ -105,7 +105,11 @@ class Proxy(equation.Proxy):
|
||||
"Linear System",
|
||||
""
|
||||
)
|
||||
obj.LinearTolerance = 1e-8
|
||||
# we must set an expression because we don't have a UI, the user has to
|
||||
# view and edit the tolerance via the property editor and this does not
|
||||
# yet allow to view and edit small numbers in scientific notation
|
||||
# forum thread: https://forum.freecadweb.org/viewtopic.php?p=613897#p613897
|
||||
obj.setExpression('LinearTolerance', "1e-8")
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"LinearIterations",
|
||||
@@ -119,7 +123,8 @@ class Proxy(equation.Proxy):
|
||||
"Steady State",
|
||||
""
|
||||
)
|
||||
obj.SteadyStateTolerance = 1e-5
|
||||
# same as with LinearTolerance
|
||||
obj.setExpression('SteadyStateTolerance', "1e-5")
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
"Stabilize",
|
||||
|
||||
@@ -70,11 +70,15 @@ class Proxy(linear.Proxy):
|
||||
"Nonlinear System",
|
||||
""
|
||||
)
|
||||
obj.NonlinearTolerance = 1e-8
|
||||
obj.NonlinearIterations = 500
|
||||
obj.RelaxationFactor = 1
|
||||
obj.NonlinearNewtonAfterIterations = 3
|
||||
obj.NonlinearNewtonAfterTolerance = 1e-3
|
||||
# for small numbers we must set an expression because we don't have a UI,
|
||||
# the user has to view and edit the tolerance via the property editor and
|
||||
# this does not yet allow to view and edit small numbers in scientific notation
|
||||
# forum thread: https://forum.freecadweb.org/viewtopic.php?p=613897#p613897
|
||||
obj.setExpression('NonlinearTolerance', "1e-8")
|
||||
obj.setExpression('NonlinearNewtonAfterTolerance', "1e-3")
|
||||
obj.setExpression('RelaxationFactor', "1.0") # must often be < 1 down to 0.01
|
||||
|
||||
|
||||
class ViewProxy(linear.ViewProxy):
|
||||
|
||||
Reference in New Issue
Block a user