This forum has been archived. All content is frozen. Please use KDE Discuss instead.

sparse matrix condensation & pivoting solver

Tags: None
(comma "," separated)
eudoxos
Registered Member
Posts
36
Karma
0
Hi there,

I am working on a solver for implicit mechanical system (kind-of FEM, if you are familar with that) of the form Ku=f -- you can imagine a mass-spring system, where K is stiffness matrix, u are unknown displacements and f are nodal forces.

The procedure I want to use is: 1. get all possible degrees of freedom, assemble matrix K0 for them; 2. for some dofs, the "unknowns" are known by virtue of boundary conditions; corresponding lines and columns are elminated from the system ("condensation"). 3. Solve the system.

My questions:

(a) does eigen have some support for condensation of sparse matrices, i.e. for saying: cancel those lines and columns? (Later, I will rewrite the code to do the condensation during the assembly, this is for the start...).

(b) Sometimes, the system is only solvable up to a few constants due to insufficient boundary conditions (periodic space, or a group of particles which is floating in space). Someone told me I needed pivoting solver, and simply assign zero to unknowns where zero pivot is encountered. Is there an example of doing that? Or perhaps just some reference?

Cheers!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Hi,

(a) nope, you will have to move the constant part on the right hand side by yourself, though I agree that could be quite convenient for rapid prototyping.

(b) I think that a LDLt decomposition with pivoting is not possible with a direct sparse solver because we already have to reorder the columns to reduce the fill-in. On the other hand LU with partial pivoting is possible (e.g., you can permute the rows to reduce the fill-in and permute the columns for the accuracy). SuperLU does that (see our SparseLU<..., SuperLU> wrapper. However, you will probably have to tweak the solving step yourself to skip the null space.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar