As always, thanks for the reply W. 

Yeah I was aiming to compute the smallest eigenvalue. 
I guess my tittle was off. I was just trying to aim to the fact that the 
stiffness matrix 
I wrote to an output file and then I read was singular. Could a problem on 
my part but I was still just checking since my changes
were minimal to the step example.
I'll double check what I did later too. 


best,
Abbas


On Monday, October 28, 2024 at 10:57:05 PM UTC+1 Wolfgang Bangerth wrote:

>
> 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/e190711f-68ec-4174-8ab8-1d7d813c2ba6n%40googlegroups.com.

Reply via email to