ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #00582
Re: abs
On Thu, Jan 01, 2009 at 07:21:28PM +0100, Martin Sandve Alnæs wrote:
> On Thu, Jan 1, 2009 at 5:54 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> > On Thu, Jan 01, 2009 at 04:43:24PM +0100, Martin Sandve Alnæs wrote:
> >> UFL supports absolute values of any scalar expression.
> >>
> >> Martin
> >
> > What about vectors/tensors?
> >
> > Perhaps we could add a mechanism for applying scalar-to-scalar
> > operators to all elements of a tensor (like .* etc in MATLAB).
> >
> > Maybe something like this:
> >
> > _.abs(expression)
> >
> > We can have a module named _ that contains special versions of all
> > operators.
>
> With current features, this can be expressed like:
>
> as_tensor(abs(expression[i,j]), (i,j))
Nice. That should be enough.
--
Anders
> But in the case of abs, abs(expression) should be fine.
Attachment:
signature.asc
Description: Digital signature
References
-
abs
From: Garth N. Wells, 2008-12-31
-
Re: abs
From: Martin Sandve Alnæs, 2009-01-01
-
Re: abs
From: Anders Logg, 2009-01-01
-
Re: abs
From: Martin Sandve Alnæs, 2009-01-01