| Thread Previous • Date Previous • Date Next • Thread Next |
I've put up a preliminary version of NewFunction. To begin with, let's keep it simple and not do the envelope-letter hierarchy of classes until we know which types of functions we need. To do assembly, we really only need to implement project(), which computes the projection of the function to the current cell. In the simplest case when the cell belongs to the mesh on which the function is defined, it's just a matter of picking the values by calling NewFiniteElement::dof(). We might want to wait with the general case. Evaluation of the function (which is not implemented) is really only needed for post-processing, like saving the values of the function at the vertices. For functions appearing in forms, I suggest that the class Form contains a list of pointers to NewFunctions. The constructor of a form then takes as arguments a number of NewFunctions and the pointer of each is added to the list. Then Form::update() can iterate over all the functions in the list and call NewFunction::project() to compute the local values. I can fix this since some of this code needs to be generated by FFC. /Anders
| Thread Previous • Date Previous • Date Next • Thread Next |