1
# Copyright (C) 2009 Kristian B. Oelgaard (k.b.oelgaard@tudelft.nl)
2
# Licensed under the GNU GPL version 3 or any later version
4
# Restriction of a finite element.
5
# The below syntax show how one can restrict a higher order Lagrange element
6
# to only take into account those DOFs that live on the facets.
8
# Compile this form with FFC: ffc RestrictedElement.ufl
11
CG_R = FiniteElement("Lagrange", triangle, 4)["facet"]
12
u_r = TrialFunction(CG_R)
13
v_r = TestFunction(CG_R)
14
a = avg(v_r)*avg(u_r)*dS + v_r*u_r*ds
16
#CG = FiniteElement("Lagrange", triangle, 4)
18
#u_r = TrialFunction(CG_R)
19
#v_r = TestFunction(CG_R)
20
#a = v_r('+')*u_r('+')*dS + v_r('-')*u_r('-')*dS + v_r*u_r*ds
23
#CG = FiniteElement("Lagrange", triangle, 4)
26
#u, u_r = TrialFunctions(ME)
27
#v, v_r = TestFunctions(ME)
28
#a = v*u*dx + v_r('+')*u_r('+')*dS + v_r('+')*u_r('+')*dS + v_r*u_r*ds