Skip to content

Commit

Permalink
[FEM] Elmer: use direct solving as default for stresses
Browse files Browse the repository at this point in the history
- direct solving is sometimes even 10 times faster (as fast as CCX) and as accurate as CCX
  • Loading branch information
donovaly committed Aug 4, 2022
1 parent 6af8a84 commit ba85817
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 25 deletions.
4 changes: 4 additions & 0 deletions src/Mod/Fem/femsolver/elmer/equations/elasticity.py
Expand Up @@ -83,6 +83,10 @@ def __init__(self, obj):
obj.EigenmodesCount = 5
obj.Priority = 10
obj.CalculatePrincipal = True
# according to the Elmer tutorial and forum, for stresses direct solving
# is recommended -> test showed 10 times faster and even more accurate
obj.LinearSolverType = "Direct"
obj.LinearDirectMethod = "Umfpack"


class ViewProxy(linear.ViewProxy, equationbase.ElasticityViewProxy):
Expand Down
7 changes: 2 additions & 5 deletions src/Mod/Fem/femtest/data/elmer/box_static_0_mm.sif
Expand Up @@ -15,13 +15,10 @@ Solver 1
Equation = String "Stress Solver"
Exec Solver = String "Always"
Linear System Abort Not Converged = Logical False
Linear System Convergence Tolerance = Real 1e-08
Linear System Iterative Method = String "BiCGStab"
Linear System Max Iterations = Integer 500
Linear System Direct Method = String "Umfpack"
Linear System Precondition Recompute = Integer 1
Linear System Preconditioning = String "ILU0"
Linear System Residual Output = Integer 1
Linear System Solver = String "Iterative"
Linear System Solver = String "Direct"
Optimize Bandwidth = Logical True
Procedure = File "StressSolve" "StressSolver"
Steady State Convergence Tolerance = Real 1e-05
Expand Down
Expand Up @@ -15,13 +15,10 @@ Solver 1
Equation = String "Stress Solver"
Exec Solver = String "Always"
Linear System Abort Not Converged = Logical False
Linear System Convergence Tolerance = Real 1e-08
Linear System Iterative Method = String "BiCGStab"
Linear System Max Iterations = Integer 500
Linear System Direct Method = String "Umfpack"
Linear System Precondition Recompute = Integer 1
Linear System Preconditioning = String "ILU0"
Linear System Residual Output = Integer 1
Linear System Solver = String "Iterative"
Linear System Solver = String "Direct"
Optimize Bandwidth = Logical True
Procedure = File "StressSolve" "StressSolver"
Steady State Convergence Tolerance = Real 1e-05
Expand Down
Expand Up @@ -15,13 +15,10 @@ Solver 1
Equation = String "Stress Solver"
Exec Solver = String "Always"
Linear System Abort Not Converged = Logical False
Linear System Convergence Tolerance = Real 1e-08
Linear System Iterative Method = String "BiCGStab"
Linear System Max Iterations = Integer 500
Linear System Direct Method = String "Umfpack"
Linear System Precondition Recompute = Integer 1
Linear System Preconditioning = String "ILU0"
Linear System Residual Output = Integer 1
Linear System Solver = String "Iterative"
Linear System Solver = String "Direct"
Optimize Bandwidth = Logical True
Procedure = File "StressSolve" "StressSolver"
Steady State Convergence Tolerance = Real 1e-05
Expand Down
Expand Up @@ -15,13 +15,10 @@ Solver 1
Equation = String "Stress Solver"
Exec Solver = String "Always"
Linear System Abort Not Converged = Logical False
Linear System Convergence Tolerance = Real 1e-08
Linear System Iterative Method = String "BiCGStab"
Linear System Max Iterations = Integer 500
Linear System Direct Method = String "Umfpack"
Linear System Precondition Recompute = Integer 1
Linear System Preconditioning = String "ILU0"
Linear System Residual Output = Integer 1
Linear System Solver = String "Iterative"
Linear System Solver = String "Direct"
Optimize Bandwidth = Logical True
Procedure = File "StressSolve" "StressSolver"
Steady State Convergence Tolerance = Real 1e-05
Expand Down
Expand Up @@ -15,13 +15,10 @@ Solver 1
Equation = String "Stress Solver"
Exec Solver = String "Always"
Linear System Abort Not Converged = Logical False
Linear System Convergence Tolerance = Real 1e-08
Linear System Iterative Method = String "BiCGStab"
Linear System Max Iterations = Integer 500
Linear System Direct Method = String "Umfpack"
Linear System Precondition Recompute = Integer 1
Linear System Preconditioning = String "ILU0"
Linear System Residual Output = Integer 1
Linear System Solver = String "Iterative"
Linear System Solver = String "Direct"
Optimize Bandwidth = Logical True
Procedure = File "StressSolve" "StressSolver"
Steady State Convergence Tolerance = Real 1e-05
Expand Down

0 comments on commit ba85817

Please sign in to comment.