This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

assemble_system

0 votes

Hi all,

Can anyone give some information about how the assemble_system works? How the assemble_system generate the stiff matrix and load vector with the given bilinear, linear form and boundary condition? Thanks a lot.

asked Oct 18, 2013 by jying FEniCS User (2,020 points)

2 Answers

+2 votes

The point is that matrix and vector are assembled together which

  • saves resources
  • enables application of BC in a symmetric way

For details read dolfin/fem/SystemAssembler.cpp and relevant header files.

answered Oct 18, 2013 by Jan Blechta FEniCS Expert (51,420 points)
+2 votes

For each element assemble_system assembles both
the local matrix A_e and local vector b_e. Then it
enforces the Dirichlet conditions in a symmetric fashion
(i.e. it performs a partial Gaussian elimination to
make the element matrix symmetric). Finally, it assembles
the element matrices and vectors into the global matrix A and
the global vector b.

answered Oct 21, 2013 by Kent-Andre Mardal FEniCS Expert (14,380 points)
...