Subject: [Ufl] Improved error check for restrictions

From: "Marie E. Rognes" <[email-masked]>
Date: Fri, 14 Oct 2011 15:47:27 +0200

What would be the right place to put a check on restriction arguments.

For instance, this

     from ufl import *
     V = FiniteElement("CG", "triangle", 1)
     v = TestFunction(V)
     a = v(' +')*dS

gives:

     Couldn't map 'v_{-2}' to a float, returning ufl object without 
evaluation.

which is a rather confusing message for newbies.

--
Marie

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Fri, 14 Oct 2011 16:04:24 +0200

Probably exproperators.py, look for __call__ and maybe '+'.

Martin

On 14 October 2011 15:47, Marie E. Rognes <[email-masked]> wrote:
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp
>

---

From: "Marie E. Rognes" <[email-masked]>
Date: Fri, 14 Oct 2011 16:20:40 +0200

> Probably exproperators.py, look for __call__ and maybe '+'.

Thanks -- so, what other types of arguments are __call__ supposed to allow?

--
Marie

> Martin
>
> On 14 October 2011 15:47, Marie E. Rognes<[email-masked]>  wrote: