← Back to team overview

ffc team mailing list archive

Added computation of function interpolate() that takes as argument a [...]

 

Commit from logg (2005-05-17 01:18 CEST)
----------------

Added computation of function interpolate() that takes as argument a
user-defined function f and interpolates f onto the finite element space.

Seems to work nicely as far as I can see. The next step is to get this
into DOLFIN.

Example outputs:

Lagrange degree 3 on triangles:

c[0] = f(map(0.000000000000000e+00, 0.000000000000000e+00))
c[1] = f(map(1.000000000000000e+00, 0.000000000000000e+00))
c[2] = f(map(0.000000000000000e+00, 1.000000000000000e+00))
c[3] = f(map(6.666666666666667e-01, 3.333333333333333e-01))
c[4] = f(map(3.333333333333334e-01, 6.666666666666666e-01))
c[5] = f(map(0.000000000000000e+00, 3.333333333333333e-01))
c[6] = f(map(0.000000000000000e+00, 6.666666666666666e-01))
c[7] = f(map(3.333333333333333e-01, 0.000000000000000e+00))
c[8] = f(map(6.666666666666666e-01, 0.000000000000000e+00))
c[9] = f(map(3.333333333333333e-01, 3.333333333333333e-01))

Vector Lagrange degree 3 on triangles:

c[0] = f(map(0.000000000000000e+00, 0.000000000000000e+00), 0)
c[1] = f(map(1.000000000000000e+00, 0.000000000000000e+00), 0)
c[2] = f(map(0.000000000000000e+00, 1.000000000000000e+00), 0)
c[3] = f(map(6.666666666666667e-01, 3.333333333333333e-01), 0)
c[4] = f(map(3.333333333333334e-01, 6.666666666666666e-01), 0)
c[5] = f(map(0.000000000000000e+00, 3.333333333333333e-01), 0)
c[6] = f(map(0.000000000000000e+00, 6.666666666666666e-01), 0)
c[7] = f(map(3.333333333333333e-01, 0.000000000000000e+00), 0)
c[8] = f(map(6.666666666666666e-01, 0.000000000000000e+00), 0)
c[9] = f(map(3.333333333333333e-01, 3.333333333333333e-01), 0)
c[10] = f(map(0.000000000000000e+00, 0.000000000000000e+00), 1)
c[11] = f(map(1.000000000000000e+00, 0.000000000000000e+00), 1)
c[12] = f(map(0.000000000000000e+00, 1.000000000000000e+00), 1)
c[13] = f(map(6.666666666666667e-01, 3.333333333333333e-01), 1)
c[14] = f(map(3.333333333333334e-01, 6.666666666666666e-01), 1)
c[15] = f(map(0.000000000000000e+00, 3.333333333333333e-01), 1)
c[16] = f(map(0.000000000000000e+00, 6.666666666666666e-01), 1)
c[17] = f(map(3.333333333333333e-01, 0.000000000000000e+00), 1)
c[18] = f(map(6.666666666666666e-01, 0.000000000000000e+00), 1)
c[19] = f(map(3.333333333333333e-01, 3.333333333333333e-01), 1)

I have not verified that the points generated by FIAT following the
numbering convention in the FFC manual.

  ffc  src/ffc/compiler/dofmap.py         1.10
  ffc  src/ffc/compiler/finiteelement.py  1.18
+ ffc  src/ffc/compiler/interpolation.py  1.1