~ubuntu-branches/ubuntu/wily/ffc/wily

« back to all changes in this revision

Viewing changes to demo/Conditional.ufl

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2013-06-26 14:48:32 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130626144832-1xd8htax4s3utybz
Tags: 1.2.0-1
* New upstream release.
* debian/control:
  - Bump required version for python-ufc, python-fiat, python-instant
    and python-ufl in Depends field.
  - Bump Standards-Version to 3.9.4.
  - Remove DM-Upload-Allowed field.
  - Bump required debhelper version in Build-Depends.
  - Remove cdbs from Build-Depends.
  - Use canonical URIs for Vcs-* fields.
* debian/compat: Bump to compatibility level 9.
* debian/rules: Rewrite for debhelper (drop cdbs).

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
element = FiniteElement("Lagrange", triangle, 2)
23
23
 
24
24
v = TestFunction(element)
 
25
g = Constant(triangle)
25
26
 
26
27
x = triangle.x
27
28
c0 = conditional(le( (x[0]-0.33)**2 + (x[1]-0.67)**2,  0.015), -1.0, 5.0)
32
33
t2 = And(t0, Not(t1))
33
34
t = conditional(And(ge( x[1] - x[0] - 0.05 + 0.55,  0.0), t2), -1.0, 0.0)
34
35
 
35
 
f = c + t
 
36
k = conditional(gt(1,0),g,g+1)
 
37
 
 
38
f = c + t + k
36
39
 
37
40
L = v*f*dx
38
41