← Back to team overview

dolfin team mailing list archive

Re: Strange error from function.py

 

On Wed, Dec 03, 2008 at 12:24:38PM +0100, Martin Sandve Alnæs wrote:
> 2008/12/3 Anders Logg <logg@xxxxxxxxx>:
> > Another thing I've been wondering about is the renaming of
> > dolfin::Function to dolfin.cpp_Function. Is this really necessary?
> >
> > If we just removed the renaming, I guess it would still work out. So
> > we would create classes in function.py that inherit from ffc.Function
> > and dolfin.Function (instead of dolfin.cpp_Function).
> 
> How?

By just writing dolfin.Function instead of dolfin.cpp_Function in
function.py.

In function.py, we import the SWIG-generated module "dolfin":

import dolfin;

This module may then contain a class named "Function" which is the
SWIG-generated wrapper for dolfin::Function (currently named
cpp_Function). We may then define a class named "Function" in the
function.py module, and this is the class that we import in the
top-level __init__.py (not the one from dolfin.dolfin).

Does it make sense?

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References