1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/rotations.f90"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/rotations.f90"
100 write(6,
'(/,a)')
' <<<+- rotations init -+>>>';
flush(6)
168 class(
rotation),
intent(out) :: self
169 real(pReal),
dimension(4),
intent(in) :: qu
171 if (
dneq(norm2(qu),1.0_preal)) &
172 call io_error(402,ext_msg=
'fromQuaternion')
180 class(
rotation),
intent(out) :: self
181 real(pReal),
dimension(3),
intent(in) :: eu
182 logical,
intent(in),
optional :: degrees
184 real(pReal),
dimension(3) :: Eulers
186 if (.not.
present(degrees))
then
189 eulers = merge(eu*
inrad,eu,degrees)
192 if (any(eulers<0.0_preal) .or. any(eulers>2.0_preal*
pi) .or. eulers(2) >
pi) &
193 call io_error(402,ext_msg=
'fromEulers')
195 self%q =
eu2qu(eulers)
201 class(
rotation),
intent(out) :: self
202 real(pReal),
dimension(4),
intent(in) :: ax
203 logical,
intent(in),
optional :: degrees
204 integer,
intent(in),
optional :: P
207 real(pReal),
dimension(3) :: axis
209 if (.not.
present(degrees))
then
212 angle = merge(ax(4)*
inrad,ax(4),degrees)
215 if (.not.
present(p))
then
218 axis = ax(1:3) * merge(-1.0_preal,1.0_preal,p == 1)
219 if(
abs(p) /= 1)
call io_error(402,ext_msg=
'fromAxisAngle (P)')
222 if(
dneq(norm2(axis),1.0_preal) .or. angle < 0.0_preal .or. angle >
pi) &
223 call io_error(402,ext_msg=
'fromAxisAngle')
225 self%q =
ax2qu([axis,angle])
231 class(
rotation),
intent(out) :: self
232 real(pReal),
dimension(3,3),
intent(in) :: om
235 call io_error(402,ext_msg=
'fromMatrix')
246 pure elemental function rotrot__(self,R)
result(rRot)
249 class(
rotation),
intent(in) :: self,r
252 call rrot%standardize()
262 class(
rotation),
intent(inout) :: self
264 if (
real(self%q) < 0.0_preal) self%q = self%q%homomorphed()
273 pure function rotvector(self,v,active)
result(vRot)
275 real(
preal),
dimension(3) :: vrot
277 real(
preal),
intent(in),
dimension(3) :: v
278 logical,
intent(in),
optional :: active
280 real(
preal),
dimension(3) :: v_normed
284 if (
present(active))
then
285 passive = .not. active
290 if (
deq0(norm2(v)))
then
293 v_normed = v/norm2(v)
295 q = self%q * (
quaternion([0.0_preal, v_normed(1), v_normed(2), v_normed(3)]) *
conjg(self%q) )
297 q =
conjg(self%q) * (
quaternion([0.0_preal, v_normed(1), v_normed(2), v_normed(3)]) * self%q )
299 vrot = q%aimag()*norm2(v)
310 pure function rottensor2(self,T,active)
result(tRot)
312 real(
preal),
dimension(3,3) :: trot
314 real(
preal),
intent(in),
dimension(3,3) :: t
315 logical,
intent(in),
optional :: active
319 if (
present(active))
then
320 passive = .not. active
326 trot = matmul(matmul(self%asMatrix(),t),transpose(self%asMatrix()))
328 trot = matmul(matmul(transpose(self%asMatrix()),t),self%asMatrix())
340 pure function rottensor4(self,T,active)
result(tRot)
342 real(
preal),
dimension(3,3,3,3) :: trot
344 real(
preal),
intent(in),
dimension(3,3,3,3) :: t
345 logical,
intent(in),
optional :: active
347 real(
preal),
dimension(3,3) :: r
348 integer :: i,j,k,l,m,n,o,
p
350 if (
present(active))
then
351 r = merge(transpose(self%asMatrix()),self%asMatrix(),active)
357 do i = 1,3;
do j = 1,3;
do k = 1,3;
do l = 1,3
358 do m = 1,3;
do n = 1,3;
do o = 1,3;
do p = 1,3
359 trot(i,j,k,l) = trot(i,j,k,l) &
360 + r(i,m) * r(j,n) * r(k,o) * r(l,
p) * t(m,n,o,
p)
361 enddo; enddo; enddo; enddo; enddo; enddo; enddo;
enddo
373 real(
preal),
dimension(6,6) :: trot
375 real(
preal),
intent(in),
dimension(6,6) :: t
376 logical,
intent(in),
optional :: active
378 if (
present(active))
then
393 class(
rotation),
intent(in) :: self, other
404 pure function qu2om(qu)
result(om)
406 real(
preal),
intent(in),
dimension(4) :: qu
407 real(
preal),
dimension(3,3) :: om
411 qq = qu(1)**2-sum(qu(2:4)**2)
414 om(1,1) = qq+2.0_preal*qu(2)**2
415 om(2,2) = qq+2.0_preal*qu(3)**2
416 om(3,3) = qq+2.0_preal*qu(4)**2
418 om(1,2) = 2.0_preal*(qu(2)*qu(3)-qu(1)*qu(4))
419 om(2,3) = 2.0_preal*(qu(3)*qu(4)-qu(1)*qu(2))
420 om(3,1) = 2.0_preal*(qu(4)*qu(2)-qu(1)*qu(3))
421 om(2,1) = 2.0_preal*(qu(3)*qu(2)+qu(1)*qu(4))
422 om(3,2) = 2.0_preal*(qu(4)*qu(3)+qu(1)*qu(2))
423 om(1,3) = 2.0_preal*(qu(2)*qu(4)+qu(1)*qu(3))
425 if (
p < 0.0_preal) om = transpose(om)
434 pure function qu2eu(qu)
result(eu)
436 real(
preal),
intent(in),
dimension(4) :: qu
437 real(
preal),
dimension(3) :: eu
439 real(
preal) :: q12, q03, chi, chiinv
441 q03 = qu(1)**2+qu(4)**2
442 q12 = qu(2)**2+qu(3)**2
445 degenerated:
if (
deq0(chi))
then
446 eu = merge([atan2(-
p*2.0_preal*qu(1)*qu(4),qu(1)**2-qu(4)**2), 0.0_preal, 0.0_preal], &
447 [atan2( 2.0_preal*qu(2)*qu(3),qu(2)**2-qu(3)**2),
pi, 0.0_preal], &
450 chiinv = 1.0_preal/chi
451 eu = [atan2((-
p*qu(1)*qu(3)+qu(2)*qu(4))*chi, (-
p*qu(1)*qu(2)-qu(3)*qu(4))*chi ), &
452 atan2( 2.0_preal*chi, q03-q12 ), &
453 atan2((
p*qu(1)*qu(3)+qu(2)*qu(4))*chi, (-
p*qu(1)*qu(2)+qu(3)*qu(4))*chi )]
455 where(eu<0.0_preal) eu = mod(eu+2.0_preal*
pi,[2.0_preal*
pi,
pi,2.0_preal*
pi])
464 pure function qu2ax(qu)
result(ax)
466 real(
preal),
intent(in),
dimension(4) :: qu
467 real(
preal),
dimension(4) :: ax
469 real(
preal) :: omega, s
471 if (
deq0(sum(qu(2:4)**2)))
then
472 ax = [ 0.0_preal, 0.0_preal, 1.0_preal, 0.0_preal ]
473 elseif (
dneq0(qu(1)))
then
474 s = sign(1.0_preal,qu(1))/norm2(qu(2:4))
475 omega = 2.0_preal * acos(
math_clip(qu(1),-1.0_preal,1.0_preal))
476 ax = [ qu(2)*s, qu(3)*s, qu(4)*s, omega ]
478 ax = [ qu(2), qu(3), qu(4),
pi ]
488 pure function qu2ro(qu)
result(ro)
490 real(
preal),
intent(in),
dimension(4) :: qu
491 real(
preal),
dimension(4) :: ro
494 real(
preal),
parameter :: thr = 1.0e-8_preal
496 if (
abs(qu(1)) < thr)
then
497 ro = [qu(2), qu(3), qu(4), ieee_value(1.0_preal,ieee_positive_inf)]
501 ro = [0.0_preal, 0.0_preal,
p, 0.0_preal]
503 ro = [qu(2)/s,qu(3)/s,qu(4)/s, tan(acos(
math_clip(qu(1),-1.0_preal,1.0_preal)))]
515 pure function qu2ho(qu)
result(ho)
517 real(
preal),
intent(in),
dimension(4) :: qu
518 real(
preal),
dimension(3) :: ho
520 real(
preal) :: omega, f
522 omega = 2.0 * acos(
math_clip(qu(1),-1.0_preal,1.0_preal))
524 if (
deq0(omega))
then
525 ho = [ 0.0_preal, 0.0_preal, 0.0_preal ]
528 f = 0.75_preal * ( omega - sin(omega) )
529 ho = ho/norm2(ho)* f**(1.0_preal/3.0_preal)
539 pure function qu2cu(qu)
result(cu)
541 real(
preal),
intent(in),
dimension(4) :: qu
542 real(
preal),
dimension(3) :: cu
554 pure function om2qu(om)
result(qu)
556 real(
preal),
intent(in),
dimension(3,3) :: om
557 real(
preal),
dimension(4) :: qu
568 pure function om2eu(om)
result(eu)
570 real(
preal),
intent(in),
dimension(3,3) :: om
571 real(
preal),
dimension(3) :: eu
574 if (
abs(om(3,3)) < 1.0_preal)
then
575 zeta = 1.0_preal/sqrt(1.0_preal-om(3,3)**2.0_preal)
576 eu = [atan2(om(3,1)*zeta,-om(3,2)*zeta), &
578 atan2(om(1,3)*zeta, om(2,3)*zeta)]
580 eu = [atan2(om(1,2),om(1,1)), 0.5_preal*
pi*(1.0_preal-om(3,3)),0.0_preal ]
583 where(eu<0.0_preal) eu = mod(eu+2.0_preal*
pi,[2.0_preal*
pi,
pi,2.0_preal*
pi])
592 function om2ax(om)
result(ax)
594 real(
preal),
intent(in),
dimension(3,3) :: om
595 real(
preal),
dimension(4) :: ax
598 real(
preal),
dimension(3) :: wr, wi
599 real(
preal),
dimension((64+2)*3) :: work
600 real(
preal),
dimension(3,3) :: vr, devnull, om_
609 ax(4) = acos(
math_clip(t,-1.0_preal,1.0_preal))
611 if (
deq0(ax(4)))
then
612 ax(1:3) = [ 0.0_preal, 0.0_preal, 1.0_preal ]
614 call dgeev(
'N',
'V',3,om_,3,wr,wi,devnull,3,vr,3,work,
size(work,1),ierr)
615 if (ierr /= 0)
call io_error(401,ext_msg=
'Error in om2ax: DGEEV return not zero')
617 i = maxloc(merge(1,0,
ceq(cmplx(wr,wi,
preal),cmplx(1.0_preal,0.0_preal,
preal),tol=1.0e-14_preal)),dim=1)
621 if (i == 0)
call io_error(401,ext_msg=
'Error in om2ax Real: eigenvalue not found')
623 where (
dneq0([om(2,3)-om(3,2), om(3,1)-om(1,3), om(1,2)-om(2,1)])) &
624 ax(1:3) = sign(ax(1:3),-
p *[om(2,3)-om(3,2), om(3,1)-om(1,3), om(1,2)-om(2,1)])
634 pure function om2ro(om)
result(ro)
636 real(
preal),
intent(in),
dimension(3,3) :: om
637 real(
preal),
dimension(4) :: ro
648 function om2ho(om)
result(ho)
650 real(
preal),
intent(in),
dimension(3,3) :: om
651 real(
preal),
dimension(3) :: ho
662 function om2cu(om)
result(cu)
664 real(
preal),
intent(in),
dimension(3,3) :: om
665 real(
preal),
dimension(3) :: cu
676 pure function eu2qu(eu)
result(qu)
678 real(
preal),
intent(in),
dimension(3) :: eu
679 real(
preal),
dimension(4) :: qu
680 real(
preal),
dimension(3) :: ee
681 real(
preal) :: cphi, sphi
688 qu = [ cphi*cos(ee(1)+ee(3)), &
689 -
p*sphi*cos(ee(1)-ee(3)), &
690 -
p*sphi*sin(ee(1)-ee(3)), &
691 -
p*cphi*sin(ee(1)+ee(3))]
692 if(qu(1) < 0.0_preal) qu = qu * (-1.0_preal)
701 pure function eu2om(eu)
result(om)
703 real(
preal),
intent(in),
dimension(3) :: eu
704 real(
preal),
dimension(3,3) :: om
706 real(
preal),
dimension(3) :: c, s
711 om(1,1) = c(1)*c(3)-s(1)*s(3)*c(2)
712 om(1,2) = s(1)*c(3)+c(1)*s(3)*c(2)
714 om(2,1) = -c(1)*s(3)-s(1)*c(3)*c(2)
715 om(2,2) = -s(1)*s(3)+c(1)*c(3)*c(2)
721 where(
deq0(om)) om = 0.0_preal
730 pure function eu2ax(eu)
result(ax)
732 real(
preal),
intent(in),
dimension(3) :: eu
733 real(
preal),
dimension(4) :: ax
735 real(
preal) :: t, delta, tau, alpha, sigma
737 t = tan(eu(2)*0.5_preal)
738 sigma = 0.5_preal*(eu(1)+eu(3))
739 delta = 0.5_preal*(eu(1)-eu(3))
740 tau = sqrt(t**2+sin(sigma)**2)
742 alpha = merge(
pi, 2.0_preal*atan(tau/cos(sigma)),
deq(sigma,
pi*0.5_preal,tol=1.0e-15_preal))
744 if (
deq0(alpha))
then
745 ax = [ 0.0_preal, 0.0_preal, 1.0_preal, 0.0_preal ]
747 ax(1:3) = -
p/tau * [ t*cos(delta), t*sin(delta), sin(sigma) ]
749 if (alpha < 0.0_preal) ax = -ax
759 pure function eu2ro(eu)
result(ro)
761 real(
preal),
intent(in),
dimension(3) :: eu
762 real(
preal),
dimension(4) :: ro
765 if (ro(4) >=
pi)
then
766 ro(4) = ieee_value(ro(4),ieee_positive_inf)
767 elseif(
deq0(ro(4)))
then
768 ro = [ 0.0_preal, 0.0_preal,
p, 0.0_preal ]
770 ro(4) = tan(ro(4)*0.5_preal)
780 pure function eu2ho(eu)
result(ho)
782 real(
preal),
intent(in),
dimension(3) :: eu
783 real(
preal),
dimension(3) :: ho
794 function eu2cu(eu)
result(cu)
796 real(
preal),
intent(in),
dimension(3) :: eu
797 real(
preal),
dimension(3) :: cu
808 pure function ax2qu(ax)
result(qu)
810 real(
preal),
intent(in),
dimension(4) :: ax
811 real(
preal),
dimension(4) :: qu
816 if (
deq0(ax(4)))
then
817 qu = [ 1.0_preal, 0.0_preal, 0.0_preal, 0.0_preal ]
819 c = cos(ax(4)*0.5_preal)
820 s = sin(ax(4)*0.5_preal)
821 qu = [ c, ax(1)*s, ax(2)*s, ax(3)*s ]
831 pure function ax2om(ax)
result(om)
833 real(
preal),
intent(in),
dimension(4) :: ax
834 real(
preal),
dimension(3,3) :: om
836 real(
preal) :: q, c, s, omc
842 om(1,1) = ax(1)**2*omc + c
843 om(2,2) = ax(2)**2*omc + c
844 om(3,3) = ax(3)**2*omc + c
847 om(1,2) = q + s*ax(3)
848 om(2,1) = q - s*ax(3)
851 om(2,3) = q + s*ax(1)
852 om(3,2) = q - s*ax(1)
855 om(3,1) = q + s*ax(2)
856 om(1,3) = q - s*ax(2)
858 if (
p > 0.0_preal) om = transpose(om)
867 pure function ax2eu(ax)
result(eu)
869 real(
preal),
intent(in),
dimension(4) :: ax
870 real(
preal),
dimension(3) :: eu
881 pure function ax2ro(ax)
result(ro)
883 real(
preal),
intent(in),
dimension(4) :: ax
884 real(
preal),
dimension(4) :: ro
886 real(
preal),
parameter :: thr = 1.0e-7_preal
888 if (
deq0(ax(4)))
then
889 ro = [ 0.0_preal, 0.0_preal,
p, 0.0_preal ]
893 ro(4) = merge(ieee_value(ro(4),ieee_positive_inf),tan(ax(4)*0.5_preal),
abs(ax(4)-
pi) < thr)
903 pure function ax2ho(ax)
result(ho)
905 real(
preal),
intent(in),
dimension(4) :: ax
906 real(
preal),
dimension(3) :: ho
910 f = 0.75_preal * ( ax(4) - sin(ax(4)) )
911 f = f**(1.0_preal/3.0_preal)
921 function ax2cu(ax)
result(cu)
923 real(
preal),
intent(in),
dimension(4) :: ax
924 real(
preal),
dimension(3) :: cu
935 pure function ro2qu(ro)
result(qu)
937 real(
preal),
intent(in),
dimension(4) :: ro
938 real(
preal),
dimension(4) :: qu
949 pure function ro2om(ro)
result(om)
951 real(
preal),
intent(in),
dimension(4) :: ro
952 real(
preal),
dimension(3,3) :: om
963 pure function ro2eu(ro)
result(eu)
965 real(
preal),
intent(in),
dimension(4) :: ro
966 real(
preal),
dimension(3) :: eu
977 pure function ro2ax(ro)
result(ax)
979 real(
preal),
intent(in),
dimension(4) :: ro
980 real(
preal),
dimension(4) :: ax
982 real(
preal) :: ta, angle
986 if (.not. ieee_is_finite(ta))
then
987 ax = [ ro(1), ro(2), ro(3),
pi ]
988 elseif (
deq0(ta))
then
989 ax = [ 0.0_preal, 0.0_preal, 1.0_preal, 0.0_preal ]
991 angle = 2.0_preal*atan(ta)
992 ta = 1.0_preal/norm2(ro(1:3))
993 ax = [ ro(1)/ta, ro(2)/ta, ro(3)/ta, angle ]
1003 pure function ro2ho(ro)
result(ho)
1005 real(
preal),
intent(in),
dimension(4) :: ro
1006 real(
preal),
dimension(3) :: ho
1010 if (
deq0(norm2(ro(1:3))))
then
1011 ho = [ 0.0_preal, 0.0_preal, 0.0_preal ]
1013 f = merge(2.0_preal*atan(ro(4)) - sin(2.0_preal*atan(ro(4))),
pi, ieee_is_finite(ro(4)))
1014 ho = ro(1:3) * (0.75_preal*f)**(1.0_preal/3.0_preal)
1024 pure function ro2cu(ro)
result(cu)
1026 real(
preal),
intent(in),
dimension(4) :: ro
1027 real(
preal),
dimension(3) :: cu
1038 pure function ho2qu(ho)
result(qu)
1040 real(
preal),
intent(in),
dimension(3) :: ho
1041 real(
preal),
dimension(4) :: qu
1052 pure function ho2om(ho)
result(om)
1054 real(
preal),
intent(in),
dimension(3) :: ho
1055 real(
preal),
dimension(3,3) :: om
1066 pure function ho2eu(ho)
result(eu)
1068 real(
preal),
intent(in),
dimension(3) :: ho
1069 real(
preal),
dimension(3) :: eu
1080 pure function ho2ax(ho)
result(ax)
1082 real(
preal),
intent(in),
dimension(3) :: ho
1083 real(
preal),
dimension(4) :: ax
1086 real(
preal) :: hmag_squared, s, hm
1087 real(
preal),
parameter,
dimension(16) :: &
1088 tfit = [ 1.0000000000018852_preal, -0.5000000002194847_preal, &
1089 -0.024999992127593126_preal, -0.003928701544781374_preal, &
1090 -0.0008152701535450438_preal, -0.0002009500426119712_preal, &
1091 -0.00002397986776071756_preal, -0.00008202868926605841_preal, &
1092 +0.00012448715042090092_preal, -0.0001749114214822577_preal, &
1093 +0.0001703481934140054_preal, -0.00012062065004116828_preal, &
1094 +0.000059719705868660826_preal, -0.00001980756723965647_preal, &
1095 +0.000003953714684212874_preal, -0.00000036555001439719544_preal ]
1098 hmag_squared = sum(ho**2.0_preal)
1099 if (
deq0(hmag_squared))
then
1100 ax = [ 0.0_preal, 0.0_preal, 1.0_preal, 0.0_preal ]
1105 s = tfit(1) + tfit(2) * hmag_squared
1107 hm = hm*hmag_squared
1108 s = s + tfit(i) * hm
1110 ax = [ho/sqrt(hmag_squared), 2.0_preal*acos(s)]
1120 pure function ho2ro(ho)
result(ro)
1122 real(
preal),
intent(in),
dimension(3) :: ho
1123 real(
preal),
dimension(4) :: ro
1134 pure function ho2cu(ho)
result(cu)
1136 real(
preal),
intent(in),
dimension(3) :: ho
1137 real(
preal),
dimension(3) :: cu
1148 pure function cu2qu(cu)
result(qu)
1150 real(
preal),
intent(in),
dimension(3) :: cu
1151 real(
preal),
dimension(4) :: qu
1162 pure function cu2om(cu)
result(om)
1164 real(
preal),
intent(in),
dimension(3) :: cu
1165 real(
preal),
dimension(3,3) :: om
1176 pure function cu2eu(cu)
result(eu)
1178 real(
preal),
intent(in),
dimension(3) :: cu
1179 real(
preal),
dimension(3) :: eu
1190 function cu2ax(cu)
result(ax)
1192 real(
preal),
intent(in),
dimension(3) :: cu
1193 real(
preal),
dimension(4) :: ax
1204 pure function cu2ro(cu)
result(ro)
1206 real(
preal),
intent(in),
dimension(3) :: cu
1207 real(
preal),
dimension(4) :: ro
1218 pure function cu2ho(cu)
result(ho)
1220 real(
preal),
intent(in),
dimension(3) :: cu
1221 real(
preal),
dimension(3) :: ho
1234 real(pReal),
dimension(4) :: qu, ax, ro
1235 real(pReal),
dimension(3) :: x, eu, ho, v3
1236 real(pReal),
dimension(3,3) :: om, t33
1237 real(pReal),
dimension(3,3,3,3) :: t3333
1238 character(len=pStringLen) :: msg
1253 qu =
eu2qu([0.0_preal,0.0_preal,0.0_preal])
1257 qu = [0.0_preal,0.0_preal,1.0_preal,0.0_preal]
1259 qu =
ro2qu([1.0_preal,0.0_preal,0.0_preal,ieee_value(1.0_preal, ieee_positive_inf)])
1261 qu =
ax2qu([1.0_preal,0.0_preal,0.0_preal,0.0_preal])
1263 call random_number(x)
1265 b = sqrt(1-0_preal -x(3))
1266 qu = [cos(2.0_preal*
pi*x(1))*a,&
1267 sin(2.0_preal*
pi*x(2))*b,&
1268 cos(2.0_preal*
pi*x(2))*b,&
1269 sin(2.0_preal*
pi*x(1))*a]
1270 if(qu(1)<0.0_preal) qu = qu * (-1.0_preal)
1273 if(
dneq0(norm2(
om2qu(
qu2om(qu))-qu),1.0e-12_preal)) msg = trim(msg)//
'om2qu/qu2om,'
1274 if(
dneq0(norm2(
eu2qu(
qu2eu(qu))-qu),1.0e-12_preal)) msg = trim(msg)//
'eu2qu/qu2eu,'
1275 if(
dneq0(norm2(
ax2qu(
qu2ax(qu))-qu),1.0e-12_preal)) msg = trim(msg)//
'ax2qu/qu2ax,'
1276 if(
dneq0(norm2(
ro2qu(
qu2ro(qu))-qu),1.0e-12_preal)) msg = trim(msg)//
'ro2qu/qu2ro,'
1277 if(
dneq0(norm2(
ho2qu(
qu2ho(qu))-qu),1.0e-7_preal)) msg = trim(msg)//
'ho2qu/qu2ho,'
1278 if(
dneq0(norm2(
cu2qu(
qu2cu(qu))-qu),1.0e-7_preal)) msg = trim(msg)//
'cu2qu/qu2cu,'
1316 call r%fromMatrix(om)
1318 call random_number(v3)
1319 if(all(
dneq(r%rotVector(r%rotVector(v3),active=.true.),v3,1.0e-12_preal))) &
1320 msg = trim(msg)//
'rotVector,'
1322 call random_number(t33)
1323 if(all(
dneq(r%rotTensor2(r%rotTensor2(t33),active=.true.),t33,1.0e-12_preal))) &
1324 msg = trim(msg)//
'rotTensor2,'
1326 call random_number(t3333)
1327 if(all(
dneq(r%rotTensor4(r%rotTensor4(t3333),active=.true.),t3333,1.0e-12_preal))) &
1328 msg = trim(msg)//
'rotTensor4,'
1330 if(len_trim(msg) /= 0)
call io_error(0,ext_msg=msg)