DOLFIN User Manual - FEniCS Project
DOLFIN User Manual - FEniCS Project
DOLFIN User Manual - FEniCS Project
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, Wellsother tensor only involving integration of products of basis functions andtheir derivatives over the reference element.For efficiency in the computation of the element matrices and vectors, FFCprecomputes the tensors that are independent of the geometry of a certaincell.7.6 Assemble matrices and vectorsThe class FEM automates the assembly algorithm, constructing a linear systemof equations from a PDE, given in the form of a variational problem (7.2),with a bilinear form a(·, ·) and a linear form L(·).The classes BilinearForm and LinearForm are automatically generated byFFC, and to assemble the corresponding matrix and vector for the Poissonproblem (7.2) with source term f, we write:Poisson::BilinearForm a;Poisson::LinearForm L(f);Mesh mesh;Mat A;Vec b;FEM::assemble(a,L,A,b,mesh);In the assemble() function the element matrices and vectors are computedby calling the function eval() in the classes Bilinearform and Linearform.The eval() functions at a certain element in the assembly algorithm take asargument an AffineMap object, describing the mapping from the referenceelement to the actual element, by computing the Jacobian J of the mapping(also J −1 and det(J) are computed).48