In programmer's guide:
c_i =
In programmer's guide:
c_i = scale(a, b) = (a1*b1, a2*b2, a3*b3) I'm looking for a similar operation but with division operators. scalediv(a, b) = (a1/b1, a2/b2, a3/b3). Is there a function to do that? or I have to write a one? I intend to use it on 2 volVectorFields Thanks. Best regards, Maka 
I needed this in my developmen
I needed this in my development stuff a while back and it's been added to my development version. It's called invScale.
I would recommend thinking carefully if you really need it or not. If you do, you can grep and search because for proper functionality it needs to be added in 45 places. Good luck, Hrv 
I do not know how complicated
I do not know how complicated is your case, but can't you simply make d_i = 1/b_i and then a_i * d_i ?

Thanks Hrv, I will try it.
@
Thanks Hrv, I will try it.
@Krystian: the operation of scalar division is defined as tensor/scalar but not the opposite. As a result 1/tensor will give a compilation error. Best regards, Maka. 
Which is exactly what it shoul
Which is exactly what it should do. What do you mean by 1/tensor? The operation is not mathematically defined. You could ask for the inverse of the tensor, of course, but is that what you mean?
For that matter, scaling one vector by another componentwise probably is mathematically a bit dodgy as well. If you are looking for a transformation of the vector by different amounts in each direction, once again this would be a tensor operation. Gavin 
The operation of devision is n
The operation of devision is not defined for vector (example of a tensor) because it only has a meaning when they are parallel. But here what I'm after is not an legitimate operation on vector or tensor. I need a scaling FUNCTION, that can take on vector field and scale it by another vector field (element by element scalar division). Assume you have two terms in an equation and you explicitly want to see how they wait relative to each other during run time. Then you will not Hrv's invScale function. That was exactly my situation. Thanks Gavin and Krystian for your comments. Please feel free to criticize the need that I explained. At the moment, I'm recompiling after I added Hrv's function. Thanks for your help.
Best regards, Maka. 
If we have an equation:
s*T1=
If we have an equation:
s*T1=T2; where s is unknown scalar; T1 and T2 is two tensors; How can we calculate s by well defined mathematical operation? s=T2/T1; is not mathematically defined. Thanks. 
I think it should be:
s*T1*
I think it should be:
s*T1*inv(T1)= s*I=T2*inv(T1); Then we know X=s*I; s=sqrt(mag(X)/n); where n is the number of diagonal elements of the tensor I; is that correct? Thanks. 
I think it is:
s=tr(T2 & in
I think it is:
s=tr(T2 & inv(T1))/3; 
where can I find invScale function?

Anyone knows where can I find this scale function's header?

All times are GMT 4. The time now is 09:32. 