Assemble diagonal matrix
Asked by
Claas Abert
Hi,
I'd like to solve a PDE with constraints on the nodes of the mesh.
The resulting matrix would look like this
|A B|
|B^t 0|
where A is the result of a fenics assembly A=assemble(a) and B is diagonal.
Is there a way/what is the best way to assemble a diagonal matrix in FEniCS?
So far my idea would be to
a) use a mixed formulation, but I couldn't figure out how to formulate the constraint on the nodes (without integration)
b) use CBC.Block and the diag command, but the resulting B seems to be stored as dense numpy matrix
Any hints are appreciated.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Joachim Haga
- Solved:
- Last query:
- Last reply:
To post a message you must log in.