For some reason ufl.Function was renamed to ufl.Coefficient some years ago.
I don't believe I was part of the team at the time or at least I don't
remember what the motivation was. Can someone enlighten me as to why this
was done?

I'm now in the process of implementing several other new types in ufl that
will mirror types in dolfin. Naming of these types is a pain if they can't
have the same name as in dolfin.

We have this pattern today:

dolfin.Function inherits from ufl.Coefficient and cpp.Function

Which with the ufl.Function name would have been:

dolfin.Function inherits from ufl.Function and cpp.Function

however I'm not advocating renaming Coefficient to Function at the moment
(lots of work, no practical gain). What I worry about is creating bad names
for new classes.

Part one of my plan is this:

dolfin.Mesh inherits from ufl.Domain and cpp.Mesh (missing inheritance
today)
dolfin.MeshView inherits from ufl.Region and cpp.MeshView (neither exists
today)

Part two is this (simplified, ufl classes do not exist today):

dolfin.FunctionSpace inherits from ufl.FunctionSpace and cpp.FunctionSpace
dolfin.MixedFunctionSpace inherits from ufl.MixedFunctionSpace and
cpp.MixedFunctionSpace

I haven't been able to find a suitable alternative to FunctionSpace and
MixedFunctionSpace in ufl.

So the question is twofold:
- Is it a problem to have the same names in dolfin and ufl?
- If it is, can someone come up with an alternative name to FunctionSpace
for ufl?

Martin
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to