← Back to team overview

dolfin team mailing list archive

Re: New Function implementation

 

I will definitely look at it.  I think it is a good idea.

However, I recently tried to compile, and I got an error with file used for dG. I can reproduce it if you want.

- Shawn

On Tue, 14 Oct 2008, Anders Logg wrote:

I've finished up the new implementation of the Function class.
It's untested, but I'm pretty sure it works... :-) I'm very happy with
the way it turned out.

Anyway, it would be good if anyone interested would review the design
and implementation (in detail, including function names etc).

The Function class is central so it would be good if we could agree on
a design and keep it stable for some time (like we've managed with the
linear algebra interfaces).

The main changes compared to the old/current design are as follows:

1. Introduction of a FunctionSpace class. A FunctionSpace is defined
by a Mesh, a FiniteElement and a DofMap.

2. Removal of the class hierarchy. Only one class Function remains.
This acts dynamically either as a user-defined function (if the vector
of coefficients is null) or as the old DiscreteFunction.

3. The proliferation of constructors has been removed. There is
essentially only one constructor, namely

 v = Function(V)

An additional class named Constant should be added to handle constant
functions, overloading eval() and providing a bunch of constructors
(scalar, vector, tensor).

When we've settled on the design/implementation of Function and
FunctionSpace, we need to do a round of editing of the DofMap class.

--
Anders



Follow ups

References