12.07.2015 Views

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

SHOW MORE
SHOW LESS

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, Wells7.4 Compiling the variational form with FFCIn <strong>DOLFIN</strong> a PDE is defined in variational form using tensor notation in a.form file, which is compiled using FFC.In the language of FFC, with V h = ˆV h the space of piecewise linear Lagrangefinite elements on a tetrahedral mesh, (7.5) is defined as:element = FiniteElement("Lagrange", "tetrahedron", 1)v = BasisFunction(element)u = BasisFunction(element)f = Function(element)a = v.dx(i)*u.dx(i)*dxL = v*f*dxwhere *dx signifies integration over the domain Ω, and the finite elementspace is constructed using FIAT. <strong>DOLFIN</strong> is not communicating directlywith FIAT, but only through FFC in the definition of the variational form inthe .form file.Compiling the .form file with# ffc Poisson.formgenerates a file Poisson.h, containing classes for the bilinear form a(·, ·) andthe linear form L(·), and classes for the finite element spaces V h and ˆV h .7.5 Element matrices and vectorsThe element matrices and vectors for a given cell may be factored into twotensors, with one tensor depending on the geometry of the cell, and the47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!