← Back to team overview

ufl team mailing list archive

Re: Dyadic notation

 

On Mon, Jan 14, 2008 at 09:31:03PM +0100, Martin Sandve Alnæs wrote:
> I suggest adding dyadic notation to UFL as well, something like:
> 
> ei(i) -> unit vector in direction i
> eij(i,j) -> unit 2nd order tensor in direction i,j
> 
> i.e. eij(i,j) == outer(ei(i), ej(j))
>
> # defining a vector by adding components:
> uu = u*ei(0) + v*ei(1) + w*ei(2)
> 
> # defining a diagonal matrix:
> sigma_0 = T * (a*eii(0,0) + b*eii(1,1) + c*eii(2,2))
> 
> # defining a direction vector from an angle:
> d = cos(theta)*ei(0) + sin(theta)*ei(1)

Sounds good.

How does one write the identity matrix?

-- 
Anders


Follow ups

References