~ubuntu-branches/ubuntu/raring/ffc/raring

« back to all changes in this revision

Viewing changes to demo/RestrictedElement.ufl

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2010-07-01 19:54:32 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100701195432-xz3gw5nprdj79jcb
Tags: 0.9.3-1
* New upstream release.
* debian/control:
  - Minor fix in Vcs fields.
  - Bump Standards-Version to 3.9.0 (no changes needed).
  - Update version for python-ufc, python-fiat, and python-ufl in
    Depends field.
* Switch to dpkg-source 3.0 (quilt) format.
* Update debian/copyright and debian/copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2009 Kristian B. Oelgaard (k.b.oelgaard@tudelft.nl)
 
2
# Licensed under the GNU GPL version 3 or any later version
 
3
#
 
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.
 
7
#
 
8
# Compile this form with FFC: ffc RestrictedElement.ufl
 
9
 
 
10
# Restricted element
 
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
 
15
 
 
16
#CG = FiniteElement("Lagrange", triangle, 4)
 
17
#CG_R = CG["facet"]
 
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
 
21
 
 
22
# Mixed element
 
23
#CG = FiniteElement("Lagrange", triangle, 4)
 
24
#CG_R = CG["facet"]
 
25
#ME = CG * CG_R
 
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
 
29