~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/function/ConstantFunction.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:  2006-02-09
5
 
// Last changed: 2008-03-11
 
5
// Last changed: 2008-03-17
6
6
 
7
7
#ifndef __CONSTANT_FUNCTION_H
8
8
#define __CONSTANT_FUNCTION_H
32
32
    uint dim(uint i) const;
33
33
 
34
34
    /// Interpolate function to vertices of mesh
35
 
    void interpolate(real* values);
 
35
    void interpolate(real* values) const;
36
36
 
37
37
    /// Interpolate function to finite element space on cell
38
38
    void interpolate(real* coefficients,
39
39
                     const ufc::cell& cell,
40
 
                     const ufc::finite_element& finite_element);
 
40
                     const ufc::finite_element& finite_element) const;
41
41
 
42
42
    /// Evaluate function at given point
43
43
    void eval(real* values, const real* x) const;
53
53
    real value;
54
54
 
55
55
    // Size of value (number of entries in tensor value)
56
 
    uint size;
 
56
    mutable uint size;
57
57
 
58
58
  };
59
59