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

Download this file

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

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks