diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index edf26af19..6f50a86f6 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -29,6 +29,7 @@ program DAMASK_spectral use grid_thermal_spectral use HDF5_utilities use results + use rotations implicit none @@ -79,6 +80,7 @@ program DAMASK_spectral character(len=6) :: loadcase_string character(len=1024) :: & incInfo + type(rotation) :: R type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases type(tLoadCase) :: newLoadCase type(tSolutionState), allocatable, dimension(:) :: solres @@ -234,8 +236,8 @@ program DAMASK_spectral do j = 1, 3 temp_valueVector(j) = IO_floatValue(line,chunkPos,i+k+j) enddo - if (l == 1) temp_valueVector(1:3) = temp_valueVector(1:3) * INRAD ! convert to rad - newLoadCase%rotation = math_EulerToR(temp_valueVector(1:3)) ! convert rad Eulers to rotation matrix + call R%fromEulerAngles(temp_valueVector(1:3),degrees=(l==1)) + newLoadCase%rotation = R%asRotationMatrix() case('rotation','rot') ! assign values for the rotation matrix temp_valueVector = 0.0_pReal do j = 1, 9 diff --git a/src/lattice.f90 b/src/lattice.f90 index 23786e76e..668c1e3c4 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -960,6 +960,7 @@ function lattice_C66_trans(Ntrans,C_parent66,structure_target, & real(pReal), dimension(6,6) :: C_bar66, C_target_unrotated66 real(pReal), dimension(3,3,3,3) :: C_target_unrotated real(pReal), dimension(3,3,sum(Ntrans)) :: Q,S + type(rotation) :: R real(pReal) :: a_bcc, a_fcc, CoverA_trans integer :: i @@ -1000,7 +1001,9 @@ function lattice_C66_trans(Ntrans,C_parent66,structure_target, & call buildTransformationSystem(Q,S,Ntrans,CoverA_trans,a_fcc,a_bcc) do i = 1, sum(Ntrans) - lattice_C66_trans(1:6,1:6,i) = math_sym3333to66(math_rotate_forward3333(C_target_unrotated,Q(1:3,1:3,i))) + call R%fromRotationMatrix(Q(1:3,1:3,i)) + lattice_C66_trans(1:6,1:6,i) & + = math_sym3333to66(math_rotate_forward3333(C_target_unrotated,R%asRotationMatrix())) enddo end function lattice_C66_trans