Different results when running Stokes equation example

More
4 years 6 months ago #2661 by dong
I tried to run the example in 2.6 Stokes equations

The results that I got in line 8 was different from what it was in the documentation.
Code:
V.ndof = 1664 , Q.ndof = 2334 --------------------------------------------------------------------------- NgException Traceback (most recent call last) <ipython-input-8-4e71f02dc134> in <module> 4 X = FESpace([V,V,Q]) 5 ----> 6 gfu = SolveStokes(X) <ipython-input-6-abe06cca85c3> in SolveStokes(X) 12 res = gfu.vec.CreateVector() 13 res.data = -a.mat * gfu.vec ---> 14 inv = a.mat.Inverse(freedofs=X.FreeDofs(), inverse="umfpack") 15 gfu.vec.data += inv * res 16 NgException: UmfpackInverse: Numeric factorization failed.
It should be V.ndof = 1660 , Q.ndof = 2328.

Could you tell me why i got this error and how to fix this problem? Thank you so much.
Attachments:
More
4 years 6 months ago #2662 by joachim
easy fix: don't use continuous P2 for velocity, and discontinuous P1 for pressure.

NGSolve and Umfpack are correctly telling that this is an unstable method (even leading to a singular matrix).

Joachim
More
4 years 6 months ago - 4 years 6 months ago #2663 by dong
I'm sorry what I meant was V.ndof = 1664 , Q.ndof = 2334 in my results, and V.ndof = 1660 , Q.ndof = 2328 in the documentation while the codes are the same.
Last edit: 4 years 6 months ago by dong.
More
4 years 6 months ago #2665 by hvwahl
Since the output from the docu was created, the mesh generation will have probably changed slightly, such that the slightly different numbers of dofs is be due do slightly different generated meshes.
More
4 years 6 months ago #2666 by christopher
I assume you have an older ngsolve version installed, since your output matches the one of older ngsolve documentations.
The following user(s) said Thank You: dong
More
4 years 6 months ago #2687 by dong
Thank you. I installed the newest version and I got the same result in the documentation.
Time to create page: 0.109 seconds