I've tried adding a new class Constant in function.py: class Constant(ffc.Constant, dolfin.cpp_Function):
def __init__(self, domain, value):
"Create constant-valued function."
print domain
print value
#ffc.Constant.__init__(self, domain)
#dolfin.cpp_Constant.__init__(self, value)
But I get the following error message:
File
"/scratch/fenics/dolfin/dolfin-dev/local/lib/python2.5/site-packages/dolfin/function.py",
line 411, in <module>
class Constant(ffc.Constant, dolfin.cpp_Function):
TypeError: Error when calling the metaclass bases
function() argument 1 must be code, not str
How is this possible? There should be no metaclasses involved here
(except the built-in Python metaclass type that is always there).
--
Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
