firedrakeproject/firedrake — pull request #72 by dorugeber (2013-11-14 10:03:10+00:00)
Title: restructured FunctionSpace __init__ logic

Little rearrangement. Essentially, the main condition in the __init__ is whether or not we're passing in a UFL element, or the family and degree as a string/int. This commit rearranges the code accordingly.

In addition, in the UFL element case, we were previously pulling apart the element and replacing it using the mesh's detected cell type. This gets even more painful once HDiv/HCurl and EnrichedElement are added. I think we can trust that, if the user goes to the trouble of making their own UFL element, they know what cell they want.