[Getdp] functions Tensor, TensorDiag not recognized
Christophe Geuzaine
geuzaine at acm.caltech.edu
Wed Oct 23 07:30:45 CEST 2002
Michael J. Rivard wrote:
> 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{}).
OK. But you could also define *functions*, i.e. (note the brackets),
T1[] = TensorDiag[1, 1, 0];
T2[] = Tensor[0, -1, 0, 1, 0, 0, 0, 0, 0];
and use "T1[]" and "T2[]" in your formulation.
Christophe
>
> 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
>
>
>
> _______________________________________________
> GetDP mailing list
> GetDP at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp
>
--
Christophe Geuzaine
Tel: (626) 395-4552 http://www.geuz.org
Fax: (626) 578-0124 mailto:geuzaine at acm.caltech.edu