Alexey Beshenov ha scritto:
> A more mathematically correct version:
>
> map (lambda([e], if freeof(A,e) or freeof(I,e) then e else
> limit(e, A, inf)), u);
>
Thank you, this works! But now there is another problem. A and I are not
the same for all the elements of the displacements vector u, but can
have subscripts, i.e. A[1], A[2], I[1], I[2], because each beam can have
its mechanical and geometric properties. So I've modified your code:
for i in BigAreas do
u : map (lambda([e], if freeof(i, e) or apply(freeof, endcons(e,
Inertia)) then e else limit(e, i, inf)), u);
where BigAreas is a list containing the area of elements for whom there
is the assumption A>>I, and Inertia is anoter list containig the
momentum of inertia of all the elements of the structure. The problem is in
apply(freeof, endcons(e, Inertia))
this is equivalent to write, in example
freeof(I[1], I[2], e)
Let us examine two particular cases:
(%i1) freeof(I[1], I[2], M*l2/(E*I));
(%o1) true
this is ok. But...
(%i2) freeof(I, I[2], M*l2/(E*I[1]));
(%o2) false
this is not the correct result. There is this problem if the expression
contains subscripts.
(%i1) freeof(I[1], I[1]);
(%o1) false
(%i2) freeof(I[1], I);
(%o2) true
(%i3) freeof(I, I[1]);
(%o3) false
%o1 and %o2 are correct, %o3 is wrong. Is it normal this behaviour?
Maybe I've made some bad coding, in my program I've used subscript not
only for lists and arrays, but also to distinguish the properties of
different element of the structure, so in this particular case I, I[1],
I[2] are separate entities. I[1] and I[2] don't indicate the first and
the second element of I. So the above result %o3 from freeof is correct?
But above all, why %o3 is false if %o2 is true?
Stefano