← Back to team overview

ufl team mailing list archive

Re: [HG UFL] Implemented better version of tuple syntax:

 

On Tue, Mar 31, 2009 at 08:39:42PM +0200, Johan Hake wrote:
> On Tuesday 31 March 2009 17:13:13 Martin Sandve Alnæs wrote:
> > On Tue, Mar 31, 2009 at 3:55 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> > > On Tue, Mar 31, 2009 at 01:06:36PM +0200, Martin Sandve Alnæs wrote:
> > >> On Mon, Mar 30, 2009 at 7:48 PM,  <logg@xxxxxxxxx> wrote:
> > >> >> I'm ok with the "forms / (a,L,M)" feature, and that pretty much
> > >> >> solves the interpretation problem for (u,v) in that context.
> > >> >> We should also have an optional list "elements" like "forms".
> > >> >> I like
> > >> >>   forms = [a, L]
> > >> >> better, quotes are unnecessary.
> > >> >
> > >> > ok!
> > >> >
> > >> >> In the context of PyDOLFIN, PyDOLFIN can itself check for
> > >> >> tuple or Form, so we don't need to check it everywhere.
> > >> >
> > >> > I don't think DOLFIN should need to check for this. Wouldn't it be
> > >> > better to let the form compiler handle it?
> > >> >
> > >> > Which interfaces does SFC have? FFC has two interfaces:
> > >> >
> > >> > 1. The compile() command in FFC (takes a single object or list of
> > >> > objects)
> > >>
> > >> compile is a builtin function in Python, so this should be renamed.
> > >
> > > Good point. I've been told this before (by Rob). Do you have a good
> > > suggestion for a better name?
> >
> > I have
> > def generate_code(input, options=None):
> > def jit(input, options=None):
> 
> Will this be different if we let ufc take care of the jit compilation? 
> 
> I think,
> 
>   def generate_code(input, options=None):

I think it should be made more explicit:

  def compile_form(form, options=None)
  def compile_forms(forms, options=None)
  def compile_element(element, options=None)
  def compile_elements(elements, options=None)

>   def signature(input, options=None):
> 
> make sense then.

This looks like a function that just computes a signature.

To match the above functions, we could have

  def jit_form(form, options=None)
  def jit_forms(forms, options=None)
  def jit_element(element, options=None)
  def jit_elements(elements, options=None)

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References