[Getdp] functions Tensor, TensorDiag not recognized
Michael J. Rivard
rivard at sbcglobal.net
Wed Oct 23 06:39:38 CEST 2002
I solved the problem by replacing T1 and T2 in my formulation with
TensorDiag[1, 1, 0] and Tensor[0, -1, 0, 1, 0, 0, 0, 0, 0],
respectively. The documentation says that only basic math functions can
be used in constant expressions, and non-constant expressions can only
appear in certain blocks (such as Galerkin{}).
Mike
On Tue, 2002-10-22 at 19:44, Michael J. Rivard wrote:
> Hi,
>
> I am using getdp version 0.85, RPM release 1. In my problem formulation
> I define two constant tensors, T1 and T2, using the statements
>
> T1 = TensorDiag[1, 1, 0];
> T2 = Tensor[0, -1, 0, 1, 0, 0, 0, 0, 0];
>
> However, getdp complains that the "constant" TensorDiag is undefined!
> When I tried to work around that problem by changing the definition of
> T1 to
>
> T1 = Tensor[1,0,0, 0,1,0, 0,0,0];
>
> getdp then complained that the "constant" Tensor is undefined.
>
> While we're on the subject of tensors:
>
> 1.) Is T = Tensor[a,b,c,d,e,f,g,h,i] equivalent to (in matrix notation)
>
> | a b c |
> | d e f | ?
> | g h i |
>
> 2.) Given T above and p = Vector[j, k, l], is T*p a vector, and is it
> equivalent to the matrix product
>
> | a b c | | j |
> | d e f | * | k | ?
> | g h i | | l |
>
> 3.) Given T and p above, is p*T a vector, and is it equivalent to the
> matrix product
>
> | a b c |
> [ j k l ] * | d e f | ?
> | g h i |
>
> 4.) Given T above and U = Tensor[m,n,o,p,q,r,s,t,u], is T*U a tensor,
> and is it equivalent to
>
> | a b c | | m n o |
> | d e f | * | p q r | ?
> | g h i | | s t u |
>
> -Mike
>
>
> _______________________________________________
> GetDP mailing list
> GetDP at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp