Find true degree of freedom #2936
-
Hello, I am new to computational mechanics, so hope my question is not too silly. I am trying to build a simple direct solver, instead of using the iterative solver. The reason is that the direct solver is usually faster than the iterative solver. I am using ex2 as an example. My code works ok when I disable the mesh refinement(section 4), I compared it with the result calculated by PCG, they are quite similar. But when I enable the mesh refinement, my _A(defined below, the reduced stiffness matrix) becomes singular. I look the code of GetEssentialTrueDofs(), but I could grasp what exactly is done to calculate the true dofs? Also, what boundary conditions should be added to prevent the singular matrix problem? Here is my code of direct solver:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I see that you are using a direct dense matrix solver -- this will become very slow very quickly with refinement -- the inversion has complexity If you want to use a direct solver, a much better solution is to use a direct sparse solver such as UMFPACK from the SuiteSparse library. We have support for UMFPACK in MFEM and, in fact, Lines 202 to 206 in 1d03963 |
Beta Was this translation helpful? Give feedback.
-
This answers my questions, Thanks! |
Beta Was this translation helpful? Give feedback.
This answers my questions, Thanks!