← Back to team overview

yade-dev team mailing list archive

wm3 weirdness (wigendecomposition) ?!

 

Hello, would someone be that kind and try the following wm3 code?

	#define MAT(_M) std::cerr<<#_M "=(("\
		<<_M(0,0)<<" "<<_M(0,1)<<" "<<_M(0,2)<<\
		")("<<_M(1,0)<<" "<<_M(1,1)<<" "<<_M(1,2)<<")("\
		<<_M(2,0)<<" "<<_M(2,1)<<" "<<_M(2,2)<<"))"<<std::endl;
	Matrix3f I1(1,0,0,0,1,0,0,0,1); Matrix3f I2, R;
	I1.EigenDecomposition(R,I2);
	MAT(I1); MAT(I2); MAT(R);

The correct results should be I1==I2 (since I1 is diagonal) and 
R=identity (for the same reason; it is rotation matrix). My results, 
however, are (they are the same for Matrix3d, in case you wonder):

I1=((1 0 0)(0 1 0)(0 0 1))
I2=((1 0 0)(0 1 0)(0 0 1))
R=((1 nan nan)(0 nan nan)(0 nan nan))

Am I doing something wrong?!

Thanks, Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



Follow ups