On 10/28/24 15:26, Abbas Ballout wrote:

I wanted to look at the determinant that results from discritizng the stokes problem so I started out with step22 and added this line right at the end of the assembly:
{
std::ofstream out("matrix.txt");
system_matrix.print(out);
out.close();
}
After writing out the matrix I read the file with a Julia code (I can attach it below if anyone wants to see) and it turns out the determinant is zero. Is that normal? The BCs should have been applied at the point right?

Things I have tried:
1) I tried the stokes from step 57 as well. Same thing
2) I plotted the sparsity pattern (attached below) and it's the same oneĀ  I got from gnuplot with a big zero block in the lower right corner.
3) I did the same thing with a laplace and I got the right determinant.

I am doing this because I want to to get the corcivity/LBB constant which is the smallest eigen/SVD value of the system. (mostly for the lols)

The determinant of large matrices can not be computed in a reasonable way. Take the matrix 0.1*I, for example. If the identity matrix I is of size n times n, then the determinant det(0.1*I)=0.1^n, which you cannot compute if n>310 because the smallest floating point number that can be represented is around 1e-308. Of course n=310 is a pretty small matrix.

There is of course also the issue that computing the determinant is an exceptionally expensive operation (at least n^3).

If you're interested in the smallest eigenvalue, compute that rather than the determinant.

Best
 W.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/2b97b2da-eaf6-4ded-b55d-9119fe67bd62%40colostate.edu.

Reply via email to