← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Added support for f.split()

 

On Saturday 06 December 2008 14:56:59 Anders Logg wrote:
> On Sat, Dec 06, 2008 at 12:05:41PM +0100, DOLFIN wrote:
> > One or more new changesets pushed to the primary dolfin repository.
> > A short summary of the last three changesets is included below.
> >
> > changeset:   5262:0e349fbe09ce4179252652fe5c1d58725951bc3f
> > tag:         tip
> > user:        "Johan Hake <hake@xxxxxxxxx>"
> > date:        Sat Dec 06 12:05:42 2008 +0100
> > files:       demo/pde/stokes/taylor-hood/python/demo.py
> > dolfin/function/SpecialFunctions.h dolfin/swig/dolfin_function_pre.i
> > site-packages/dolfin/function.py description:
> > Added support for f.split()
> >  - Renamed operator[] to f._sub instead of f.sub
> >  - f.sub(i) now returns an instantiated sub function
> >  - f.split() uses f.sub() to return a tuple of all sub functions
> >  - stoke/taylor-hood demo now runs.
>
> Excellent!
>
> It runs now but the solution looks completely crazy. The problem is
> that the boundary conditions are not set correctly since we use V and
> Q to set the boundary conditions for the sub systems and they don't
> know the offsets (DofMap::offset()).

The problem here is that these spaces need to be SubSpaces?

If that is the case, we could extract the subspaces after a MixedFunctionSpace 
is created and then store these in the spaces attribute, either as pure 
cpp.SubSpaces or add another python class, SubSpace, which is a cpp.SubSpace 
and stores the original ffc.element too, or something?

Johan


Follow ups

References