← Back to team overview

dolfin team mailing list archive

Re: New Function implementation

 

On Thu, Oct 16, 2008 at 03:38:01PM +0200, Martin Sandve Alnæs wrote:
> "in" is a reserved keyword in python. Suggestions: "f.in_space(V)" or
> "f.in_function_space(V)" or "f.member(V)"

How about keeping u.in(V) in C++ and then map it to something suitable
in Python so that one may write

  if u in V:
      ...

in Python. Does anyone know how to do that?

> As mentioned before, these are not threadsafe:
> 
>     /// Access current cell (available during assembly for
> user-defined function)
>     const Cell& cell() const;
> 
>     /// Access current facet (available during assembly for
> user-defined function)
>     uint facet() const;
> 
>     /// Access current facet normal (available during assembly for
> user-defined function)
>     Point normal() const;
> 
> If we keep these instead of making them arguments to eval,
> the user must create one Function for each thread to use
> it in a parallell shared memory application.

Not necessarily one Function for each thread, but it should be
possible to extend Function to keep one cell etc for each thread.
The variables are accessed by functions cell(), facet() so it should
be possible to hide it.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References