Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[7e9223]: devel / example / Darcy-Stokes / P2P0 / DS.ufl Maximize Restore History

Download this file

DS.ufl    18 lines (12 with data), 426 Bytes

# P2-P0 finite element
P2 = VectorElement("CG", triangle, 2)
P0  = FiniteElement("DG", triangle, 0)

R = FiniteElement ("R", triangle, 0)

W = MixedElement ([P2, P0, R])

(u, p, c) = TrialFunctions(W)
(v, q, d) = TestFunctions(W)

f = Coefficient(P2)
g = Coefficient(P0)
ep  = Constant(triangle)

a = (dot(u, v) + ep*ep*div(u)*div(v) + ep*ep*dot(rot(u), rot(v)) + div(v)*p - div(u)*q + p*d + q*c)*dx
L = (dot (f, v) - g*q)*dx