← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Added __call__ operator to Function in PyDOLFIN

 

On Fri, Sep 04, 2009 at 03:34:14PM +0200, DOLFIN wrote:
> One or more new changesets pushed to the primary dolfin repository.
> A short summary of the last three changesets is included below.
>
> changeset:   6882:053d5de19d31c33ac41ef6240fc222ade638f45f
> tag:         tip
> user:        "Johan Hake <hake@xxxxxxxxx>"
> date:        Fri Sep 04 15:34:09 2009 +0200
> files:       demo/function/eval/python/demo.py site-packages/dolfin/function.py site-packages/dolfin/specialfunctions.py test/unit/function/python/test.py
> description:
> Added __call__ operator to Function in PyDOLFIN
>
>   We can now do stuff like:
>
>   >>> result = f(x)
>
>   where result is, well, the result. If scalar a scalar is returned. x can be
>   any of tuple, list or numpy.array.
>
>   >>> result = f(0.2,0.2)
>
>   will also work
>
>   The function can be evaluated into an already excisting numpy.array too.
>
>   >>> values = zeros(3)
>   >>> f(values,0.2,0.2,0.2)
>
>   Added checks for when the call operator is used in ufl forms. The use of
>   __call__ PyDOLFIN and ufl should be orthogonal on each others.

Thanks!

--
Anders


>
> changeset:   6881:717eaa11d058555afe871ab476ce02d472202d3d
> user:        Johannes Ring <johannr@xxxxxxxxx>
> date:        Thu Sep 03 11:10:26 2009 +0200
> files:       test/regression/test.py
> description:
> Re-enable intersection demo on Windows.
>
>
> changeset:   6880:05c3b21a0857553e9078598cdf491cf28d9f87ff
> user:        Johannes Ring <johannr@xxxxxxxxx>
> date:        Thu Sep 03 11:05:39 2009 +0200
> files:       demo/function/eval/cpp/main.cpp demo/function/eval/python/demo.py demo/mesh/intersection/cpp/main.cpp demo/mesh/intersection/python/demo.py
> description:
> Check for GTS support in demos (make buildbot happier).
>
> ----------------------------------------------------------------------
> For more details, visit http://www.fenics.org/hg/dolfin
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: signature.asc
Description: Digital signature


References