← Back to team overview

dolfin team mailing list archive

Re: [FFC-dev] [HG FFC] Restrictions appears to be working for the Poisson demo.

 



Garth N. Wells wrote:


Kent Andre wrote:
Not sure what we have to do actually. I suppose I want get any clue from the
  demo/function/restriction

demo?
I see that Kent has modified the dolfin.FunctionSpace to reflect the present (broken) implementation of restriction, anything in that line? Should such an implementation has been done in FunctionSpaceBase instead of FunctionSpace? Kent?

Johan


This restriction is different in the sense that the restriction is made
by the standard element on a sub mesh.
The restriction in focus now is on the complete mesh but for only
a part of the element.
Combined, these two features will be very powerful. I guess the sub-mesh restriction stuff is broken due to the parallel mesh.


I've attached an example solver. To make it work for P^k with k > 2 we need to restrict some functions to cell facets. Using FFC, we do

    scalar  = FiniteElement("Lagrange", "triangle", 3)
    dscalar = FiniteElement("Discontinuous Lagrange", "triangle", 3)

    # This syntax restricts the space 'scalar' to cell facets.
    mixed = scalar["facet"] + dscalar

In PyDOLFIN we could do

    V_dg = FunctionSpace(mesh, "DG", 3)
    V_cg = FunctionSpace(mesh, "CG", 3, "facet")

    mixed = V_cg + V_dg


I see now that we need to have the above option since the everything (e.g. the dof map) is created and compiled inside functionspace.py.

Garth

or

    V_dg = FunctionSpace(mesh, "DG", 3)
    V_cg = FunctionSpace(mesh, "CG", 3)

    mixed = V_cg["scalar"] + V_dg

Garth

Kent

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev


------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev



Follow ups

References