← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Extend FunctionSpace constructor to handle simple initialization like

 

On Wed, Nov 26, 2008 at 04:31:48PM +0100, Martin Sandve Alnæs wrote:
> 2008/11/26 DOLFIN <dolfin@xxxxxxxxxx>:
> > One or more new changesets pushed to the primary dolfin repository.
> > A short summary of the last three changesets is included below.
> >
> > changeset:   5205:64dce861eecc204ed5527b0fda5574d2cd836ac6
> > tag:         tip
> > user:        Anders Logg <logg@xxxxxxxxx>
> > date:        Wed Nov 26 16:11:23 2008 +0100
> > files:       demo/pde/poisson/python/demo.py site-packages/dolfin/function.py site-packages/dolfin/functionspace.py
> > description:
> > Extend FunctionSpace constructor to handle simple initialization like
> >
> >  V = FunctionSpace(mesh, "Lagrange", 1)
> >
> > No need anymore to create elements in PyDOLFIN, except when mixed elements
> > are used.
> >
> > It would be good to support some simple creation of vector-valued function
> > spaces. How should this look? One option could be
> >
> >  V = VectorFunctionSpace(mesh, "Lagrange", 1)
> >
> > ?
> 
> It doesn't make sense to have two different ways to do this, it only
> makes special cases slightly more compact at the cost of more
> confusion about how to do things. I say _either_ the function space
> _always_ takes an element as input, _or_ the function space hierarchy
> mirrors the entire finite element hierarchy, including
> TensorFunctionSpace and MixedFunctionSpace.

Good. Hake and I discussed last week to extend FunctionSpace with
__add__ etc to mirror the syntax for elements that we have in the form
compiler language(s).

It would be good to avoid using FiniteElement in the Python interface
since it is only a place-holder. It's only use is to instantiate a
FunctionSpace.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References