← Back to team overview

dolfin team mailing list archive

Re: FunctionSpaces and User-defined functions

 

On Tue, Oct 06, 2009 at 10:07:59AM -0500, Andy Ray Terrel wrote:
> In previous versions of DOLFIN, a user was able to define a function
> (overloading eval) and then use it in several forms, even when the
> forms had different function spaces.  It seems that currently a
> FunctionSpace gets attached to the user function and then I get a
> runtime error when it is used in another form.  Is there a way to tell
> the function to delete the current function space?
>
> Any help is appreciated.

Which version are you using? 0.9.3 or hg tip?

We've been redesigning the function classes since 0.9.3 to make these
things work better. In particular, a user must now subclass a new
class named Expression which never has a FunctionSpace attached to it
so you should be able to use it in many forms, as long as the shape
(rank and dimension) of the expression matches.

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References