Reading of Euler angles from the loadcase corrected.

This commit is contained in:
Mahesh Balasubramaniam 2012-08-02 17:46:50 +00:00
parent 3d7bc40520
commit 740357172a
1 changed files with 8 additions and 6 deletions

View File

@ -349,18 +349,20 @@ program DAMASK_spectral
case('guessreset','dropguessing') case('guessreset','dropguessing')
bc(loadcase)%followFormerTrajectory = .false. ! do not continue to predict deformation along former trajectory bc(loadcase)%followFormerTrajectory = .false. ! do not continue to predict deformation along former trajectory
case('euler') ! rotation of loadcase given in euler angles case('euler') ! rotation of loadcase given in euler angles
p = 0_pInt ! assuming values given in radians p = 1_pInt ! assuming values given in radians
l = 1_pInt ! assuming keyword indicating degree/radians l = 1_pInt ! assuming keyword indicating degree/radians
select case (IO_lc(IO_stringValue(line,positions,j+1_pInt))) select case (IO_lc(IO_stringValue(line,positions,j+1_pInt)))
case('deg','degree') case('deg','degree') ! for conversion from degree to radian
p = 1_pInt ! for conversion from degree to radian
case('rad','radian') case('rad','radian')
p = 0_pInt
case default case default
l = 0_pInt ! immediately reading in angles, assuming radians l = 0_pInt ! immediately reading in angles, assuming radians
end select end select
forall(k = 1_pInt:3_pInt) temp33_Real(k,1) = & forall(k = 1_pInt:3_pInt) temp33_Real(k,1) = IO_floatValue(line,positions,j+l+k)
IO_floatValue(line,positions,j+l+k) * real(p,pReal) * inRad if (p==1_pInt) temp33_Real = temp33_Real * inRad
bc(loadcase)%rotation = math_EulerToR(temp33_Real(:,1)) bc(loadcase)%rotation = math_EulerToR(temp33_Real(:,1))
print *,"euler angles", temp33_Real(:,1)
print *,"Rotation Matrix", bc(loadcase)%rotation
case('rotation','rot') ! assign values for the rotation of loadcase matrix case('rotation','rot') ! assign values for the rotation of loadcase matrix
temp_valueVector = 0.0_pReal temp_valueVector = 0.0_pReal
forall (k = 1_pInt:9_pInt) temp_valueVector(k) = IO_floatValue(line,positions,j+k) forall (k = 1_pInt:9_pInt) temp_valueVector(k) = IO_floatValue(line,positions,j+k)