Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

18
  • 2
    $\begingroup$ The code seems to be incomplete. For instance, methodData is undefined. Please edit your post and add all relevant code. $\endgroup$ Commented Mar 21, 2019 at 9:23
  • 1
    $\begingroup$ When you use the method "Krylov" for transient PDE, it is usually a very good idea to supply the solution of the linear system of the previous time iteration as value for "StartingVector". You should also try to find suitable values for the "Tolerance" option; the default values are usually way too low. Moreover, using the backend SparseArray`KrylovLinearSolve directly is usually a bit faster and also allows for reusing the preconditioner (generated by SparseArray`SparseMatrixILU and applied with SparseArray`SparseMatrixApplyILU). $\endgroup$ Commented Mar 21, 2019 at 9:30
  • 2
    $\begingroup$ When you will have added the rest of the code I may show you how to use SparseArray`KrylovLinearSolve; so please ping me with @Henrik in a comment when you are done. $\endgroup$ Commented Mar 21, 2019 at 9:32
  • 2
    $\begingroup$ Well, then a complete code would help. I have to test against something... $\endgroup$ Commented Mar 21, 2019 at 12:26
  • 2
    $\begingroup$ I would be good if you could give a complete code, without it is just guessing. You could also split the InitilizePDECoefficient into a linear and a nonlinear part. Discretize the linear part before the loop and then do linearDiscretePDE["SystemMatrices"] + nonlinearDiscretePDE["SystemMatrices"]. Before using "Krylov" try Method->"Pardiso" for LinearSolve. $\endgroup$ Commented Mar 22, 2019 at 5:53