@@ -0,0 +1,1072 @@
+%22%22%22This demonstration generates the relevant code from the Slate%0Aexpressions. Note that this is for code only; it's not solving any%0Aparticular PDE with given data.%0A%0ASee the main hybrid-mixed folder for an actual solution to a%0Amixed system using hybridization and static condensation.%0A%22%22%22%0Afrom firedrake import *%0A%0Amesh = UnitSquareMesh(8, 8, quadrilateral=False)%0ART = FiniteElement(%22RT%22, triangle, 1)%0ADG = FiniteElement(%22DG%22, triangle, 0)%0AT = FiniteElement(%22HDiv Trace%22, triangle, 0)%0AU = FunctionSpace(mesh, RT)%0AV = FunctionSpace(mesh, DG)%0AM = FunctionSpace(mesh, T)%0AW = U * V%0A%0An = FacetNormal(mesh)%0Ap0 = Function(V)%0Ag = Function(V)%0Af = Function(V)%0Amu = Function(V)%0Ac = Function(V)%0Au, p = TrialFunctions(W)%0Aw, phi = TestFunctions(W)%0Agamma = TestFunction(M)%0A%0AA = Tensor(dot(w, mu*u)*dx - div(w)*p*dx%0A           + phi*div(u)*dx + phi*c*p*dx)%0AC = Tensor(gamma*dot(u, n)*dS + gamma*dot(u, n)*ds(2))%0AF = Tensor(-dot(w, n)*p0*ds(1) + phi*f*dx)%0AG = Tensor(gamma*g*ds(2))%0A%0AS = C * A.inv * C.T%0AE = C * A.inv * F - G%0ASmat = assemble(S).force_evaluation()%0AEvec = assemble(E).dat.data%0A

Add simple code generation script