~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/function/GenericFunction.h

  • Committer: Anders Logg
  • Date: 2008-03-17 14:59:22 UTC
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: logg@simula.no-20080317145922-83cfli6k6ev22qu7
Implement evaluation of Functions at arbitrary points.
Now, f.eval(x) works for any x inside the mesh. Broken
in Python since FFC does not generate evaluate_basis
by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
// Licensed under the GNU LGPL Version 2.1.
3
3
//
4
4
// First added:  2005-11-28
5
 
// Last changed: 2008-03-11
 
5
// Last changed: 2008-03-17
6
6
 
7
7
#ifndef __GENERIC_FUNCTION_H
8
8
#define __GENERIC_FUNCTION_H
35
35
    virtual uint dim(uint i) const = 0;
36
36
 
37
37
    /// Interpolate function to vertices of mesh
38
 
    virtual void interpolate(real* values) = 0;
 
38
    virtual void interpolate(real* values) const = 0;
39
39
 
40
40
    /// Interpolate function to finite element space on cell
41
41
    virtual void interpolate(real* coefficients,
42
42
                             const ufc::cell& cell,
43
 
                             const ufc::finite_element& finite_element) = 0;
 
43
                             const ufc::finite_element& finite_element) const = 0;
44
44
 
45
45
    /// Evaluate function at given point
46
46
    virtual void eval(real* values, const real* x) const = 0;