Lagrange

class dolfin.cpp.function.Lagrange(*args)

Bases: dolfin.cpp.common.Variable

Lagrange polynomial (basis) with given degree q determined by n = q + 1 nodal points.

Example: q = 1 (n = 2)

Lagrange p(1); p.set(0, 0.0); p.set(1, 1.0);

It is the callers reponsibility that the points are distinct.

This creates a Lagrange polynomial (actually two Lagrange polynomials):

p(0,x) = 1 - x (one at x = 0, zero at x = 1) p(1,x) = x (zero at x = 0, one at x = 1)

Overloaded versions

  • Lagrange(q)

    Constructor

  • Lagrange(p)

    Copy constructor

ddx()

Return derivate of polynomial i at given point x

degree()

Return degree

dqdx()

Return derivative q (a constant) of polynomial

eval()

Return value of polynomial i at given point x

point()

Return point

set()

Specify point

size()

Return number of points

thisown

The membership flag