[FEM] Elmer: fix for the Idrs method
- while adding support for the IDRS method I forgot to implement its mandatory parameter
This commit is contained in:
@@ -71,6 +71,12 @@ class Proxy(equation.Proxy):
|
||||
"Linear System",
|
||||
"Polynom degree for iterative method 'BiCGstabl'"
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyIntegerConstraint",
|
||||
"IdrsParameter",
|
||||
"Linear System",
|
||||
"Parameter for iterative method 'Idrs'"
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyEnumeration",
|
||||
"LinearDirectMethod",
|
||||
@@ -131,6 +137,7 @@ class Proxy(equation.Proxy):
|
||||
)
|
||||
|
||||
obj.BiCGstablDegree = (2, 2, 10, 1)
|
||||
obj.IdrsParameter = (2, 1, 10, 1)
|
||||
obj.LinearDirectMethod = LINEAR_DIRECT
|
||||
obj.LinearIterations = (500, 1, int(1e6), 50)
|
||||
obj.LinearIterativeMethod = LINEAR_ITERATIVE
|
||||
|
||||
@@ -1513,6 +1513,14 @@ class Writer(object):
|
||||
"and consult the Elmer docs."
|
||||
)
|
||||
)
|
||||
if not hasattr(equation, "IdrsParameter"):
|
||||
equation.addProperty(
|
||||
"App::PropertyIntegerConstraint",
|
||||
"IdrsParameter",
|
||||
"Linear System",
|
||||
"Parameter for iterative method 'Idrs'"
|
||||
)
|
||||
equation.IdrsParameter = (2, 1, 10, 1)
|
||||
|
||||
def _createLinearSolver(self, equation):
|
||||
# first check if we have to update
|
||||
@@ -1532,6 +1540,9 @@ class Writer(object):
|
||||
if equation.LinearIterativeMethod == "BiCGStabl":
|
||||
s["BiCGstabl polynomial degree"] = \
|
||||
equation.BiCGstablDegree
|
||||
if equation.LinearIterativeMethod == "Idrs":
|
||||
s["Idrs Parameter"] = \
|
||||
equation.IdrsParameter
|
||||
s["Linear System Max Iterations"] = \
|
||||
equation.LinearIterations
|
||||
s["Linear System Convergence Tolerance"] = \
|
||||
|
||||
Reference in New Issue
Block a user