On Mon, Mar 03, 2014 at 01:00:13PM -0600, Douglas N Arnold wrote:
> > That looks good, but `P` is already used as a name for the P
> > elements in the latest draft so this does not seem to work out.
>
> Would it work if the syntax were
>
>    ("P-", cell, r, k=0)
>    ("P", cell, r, k=0)
>    ("Q-", cell, r, k=0)
>    ("S", cell, r, k=0)
>
> i.e., if the fourth argument is left out it defaults to 0.
> That way ("P", cell, r) would continue to have the same meaning.

Perhaps, but I'll let Martin think about the consequences. I support
this proposal if Martin thinks it can be handled without making the
handling of default arguments for FiniteElement in UFL overly
complex.

--
Anders


> > Are there other options? Something like
> >
> >    FEEC("P", cell, r, k)
>
> Of course I am happy to have FEEC built into the syntax
> if you and others think that is appropriate.
>
> On 03/03/2014 12:51 PM, Anders Logg wrote:
> >On Mon, Mar 03, 2014 at 12:21:11PM -0600, Douglas N Arnold wrote:
> >>>Are you happy with these names? Is `P Lambda` the best choice?
> >>>It seems a bit odd with a space in the name but I can't think of
> >>>anything better.
> >>
> >>Actually my choice would be
> >>
> >>  ("P-", cell, r, k)
> >>  ("P", cell, r, k)
> >>  ("Q-", cell, r, k)
> >>  ("S", cell, r, k)
> >>
> >>The Lambda is always present so conveys no information.
> >
> >That looks good, but `P` is already used as a name for the P
> >elements in the latest draft so this does not seem to work out.
> >
> >Are there other options? Something like
> >
> >   FEEC("P", cell, r, k)
> >
> >?
> >
> >--
> >Anders
> >
> >
> >>>Not that I'm aware of, but we could easily add a function `simplex`
> >>>which would allow this:
> >>>
> >>>FiniteElement("P Lambda", simplex(n), r, k)
> >>
> >>Seems like a good idea to me.
> >>
> >>On 03/03/2014 11:54 AM, Anders Logg wrote:
> >>>On Mon, Mar 03, 2014 at 09:49:39AM -0600, Douglas N Arnold wrote:
> >>>>Let me recall that there is one way to specify
> >>>>elements that is truly consistent and leads to
> >>>>dimension free code:
> >>>>
> >>>>  (name, cell, r, k)
> >>>>
> >>>>where name is 'P- Lambda' or 'P Lambda' for cell
> >>>>= 'interval', 'triangle', or 'tetrahedron',
> >>>>and name is 'Q- Lambda' or 'S Lambda' for
> >>>>cell = 'interval', 'quadrilateral', or
> >>>>'hexahedron'.  From one point of view
> >>>>(the one conveyed by the periodic table), everything
> >>>>else is a convenience alias.
> >>>
> >>>Are you happy with these names? Is `P Lambda` the best choice?
> >>>It seems a bit odd with a space in the name but I can't think of
> >>>anything better.
> >>>
> >>>>BTW, is there a dimension-independent way
> >>>>to refer to a simplex or cube, (e.g., (simplex, 2)
> >>>>instead of triangle) in UFL?  If you want code
> >>>>that changes dimension by just changing the one
> >>>>line "n = 2", I guess you need this.
> >>>
> >>>Not that I'm aware of, but we could easily add a function `simplex`
> >>>which would allow this:
> >>>
> >>>FiniteElement("P Lambda", simplex(n), r, k)
> >>>
> >>_______________________________________________
> >>fenics mailing list
> >>[email protected]
> >>http://fenicsproject.org/mailman/listinfo/fenics
> >
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to