← Back to team overview

dolfin team mailing list archive

Re: Using a ufc::function in place of dolfin::Function?

 

On Mon, May 05, 2008 at 10:28:38PM +0200, Martin Sandve Alnæs wrote:
> If I have a ufc::function object, is there presently a way to use it
> in DOLFIN?

The way it's used right now is that a UserFunction is a subclass of
ufc::function.

> If not, will it be simple to add e.g. an UFCFunction class to the
> Function hierarchy?

Yes, I guess so. Just create a UFCFunction class that implements the
GenericFunction interface. Then add a constructor to Function that
takes whatever data you think is appropriate (like a reference to a
ufc::function) and instantiates Function::f to a UFCFunction*.

-- 
Anders


> SFC has code for generating and compiling ufc::function objects, to
> speed up assembly.
> 


References