13.07.2015 Views

UFL Specification and User Manual 0.3 - FEniCS Project

UFL Specification and User Manual 0.3 - FEniCS Project

UFL Specification and User Manual 0.3 - FEniCS Project

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>UFL</strong> <strong>Specification</strong> <strong>and</strong> <strong>User</strong> <strong>Manual</strong> <strong>0.3</strong>Martin S. Alnæs, Anders Loggcell = triangleBDM1 = FiniteElement("Brezzi-Douglas-Marini", cell, 1)DG0 = FiniteElement("Discontinuous Lagrange", cell, 0)element = BDM1 * DG0(tau, w) = TestFunctions(element)(sigma, u) = TrialFunctions(element)f = Function(DG0)a = (dot(tau, sigma) - div(tau)*u + w*div(sigma))*dxL = w*f*dxThis example is implemented in the file mixed poisson.ufl in the collectionof demonstration forms included with the <strong>UFL</strong> source distribution.3.9 Poisson’s equation with DG elementsWe consider again Poisson’s equation, but now in an (interior penalty) discontinuousGalerkin formulation: Find u ∈ V = L 2 such thata(v,u) = L(v) ∀v ∈ V,where∫a(v,u;h) =Ω+ ∑ S∫+∫L(v;f,g) =∂Ω∇v ·∇udx∫−〈∇v〉·u n − v n ·〈∇u〉+(α/h)v n · u n dSS−∇v · u n − v n ·∇u+(γ/h)vuds∫vf dx+ vgds.Ω ∂Ω(3.22)69

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

Saved successfully!

Ooh no, something went wrong!