Dear Prof Bangerth,
Thanks for your reply. Aye, you are absolutely correct!
I checked my global mass matrix and confirmed that it is indeed singular.
Then, I found out that my local mass matrices are also singular, which
explains the issue. After printing out the local matrices, I realised I had
made a dumb mistake in the assembly process. The pattern for this 3D
problem I obtained was:
*AAABBB...*
*AAABBB*
*AAABBB*
*BBBCCC*
*BBBCCC*
*BBBCCC*
which is clearly incorrect and is of course singular... The pattern is
supposed to be:
*A00B00...*
*0A00B0*
*00A00B*
*B00C00*
*0B00C0*
*00B00C*
The reason is that I mistakenly used the same approach in step-36 to
assemble my mass matrix,
*cell_mass_matrix(i, j) += rho * fe_values.shape_value(i, q_point) *
fe_values.shape_value(j, q_point) * fe_values.JxW(q_point);*
and this needs to be modified in the 3D dynamic problem as follows:
*cell_mass_matrix(i, j) += ((i % dim == j % dim)?
rho * fe_values.shape_value(i, q_point) *
fe_values.shape_value(j, q_point) * fe_values.JxW(q_point):
0); *
Now my code is running well, and all 6 rigid body modes correctly
identified. Tbh, my way is not wise, but hope it is helpful to others
encountering the same issue.
Best regards,
Yuchen Liu
On Monday, 14 July 2025 at 10:52:14 UTC+1 Wolfgang Bangerth wrote:
> On 7/13/25 06:35, yuchen liu wrote:
> >
> > I am solving the eigenvalues for a linear elastic solid body, where free
> > boundaries are applied (zero Neumann). This project follows the tutorial
> > step-36 and step-17 using Lame parameters for isotropic materials.
> >
> > Unfortunately, or I deserve it as a newbie, got a petsc error about zero
> > pivot, which I presume is due to the six rigid body modes. The website
> below
> > mentions creating nullspace, but I have no idea how to do it.
> Additionally, I
> > want to see how many rigid modes I have to ensure my boundary conditions
> are
> > applied correctly. The reason is that I previously encountered three
> rigid
> > modes, which is so wrong for free vibration, due to improperly indexed
> > Jacobian (not dealii). Can anyone help on this or generally offer some
> > suggestions? I would greatly appreciate that in advance.
> >
> > [0]PETSC ERROR: Zero pivot in LU factorization:
> > https://petsc.org/release/faq/#zeropivot
> > [0]PETSC ERROR: Zero pivot row 1 value 4.23516e-22 tolerance 2.22045e-14
> >
> > Please forgive me for being greedy here, this wee project will be the
> basement
> > of my next electromechanical problem, which highly depends on static
> > condensation with an inhomogeneous rhs vector. If anyone has found
> something
> > similar or might be helpful in tutorials, please let me know, thanks!
>
> Yuchen,
> a typical eigenproblem is of the form
> A x = lambda M x
> and the requirement is that M is a definite matrix that can be inverted,
> whereas A can have a nullspace (which then corresponds to zero
> eigenvalues).
> My *expectation* (which may not correspond to the truth) is that the
> eigensolver should then only apply an LU decomposition to the M matrix,
> but
> not to the A matrix. But the A matrix is the one that has the rigid body
> motions as nullspace. I would try and ascertain first that M is in fact
> invertible.
>
> Best
> W.
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> www: http://www.math.colostate.edu/~bangerth/
>
>
>
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/dealii/0e61e2d5-345e-4db4-b609-13eefde4d6ffn%40googlegroups.com.