explicit conversions

This commit is contained in:
Martin Diehl 2021-11-18 17:44:06 +01:00
parent 8a8fdfc93c
commit 020ef64d7d
3 changed files with 4 additions and 22 deletions

View File

@ -505,6 +505,7 @@ function lattice_C66_twin(Ntwin,C66,lattice,CoverA)
type(rotation) :: R type(rotation) :: R
integer :: i integer :: i
select case(lattice) select case(lattice)
case('cF') case('cF')
coordinateSystem = buildCoordinateSystem(Ntwin,FCC_NSLIPSYSTEM,FCC_SYSTEMTWIN,& coordinateSystem = buildCoordinateSystem(Ntwin,FCC_NSLIPSYSTEM,FCC_SYSTEMTWIN,&
@ -521,7 +522,7 @@ function lattice_C66_twin(Ntwin,C66,lattice,CoverA)
do i = 1, sum(Ntwin) do i = 1, sum(Ntwin)
call R%fromAxisAngle([coordinateSystem(1:3,2,i),PI],P=1) ! ToDo: Why always 180 deg? call R%fromAxisAngle([coordinateSystem(1:3,2,i),PI],P=1) ! ToDo: Why always 180 deg?
lattice_C66_twin(1:6,1:6,i) = R%rotTensor4sym(C66) lattice_C66_twin(1:6,1:6,i) = math_sym3333to66(R%rotTensor4(math_66toSym3333(C66)))
enddo enddo
end function lattice_C66_twin end function lattice_C66_twin
@ -580,7 +581,7 @@ function lattice_C66_trans(Ntrans,C_parent66,lattice_target, &
do i = 1, sum(Ntrans) do i = 1, sum(Ntrans)
call R%fromMatrix(Q(1:3,1:3,i)) call R%fromMatrix(Q(1:3,1:3,i))
lattice_C66_trans(1:6,1:6,i) = R%rotTensor4sym(C_target_unrotated66) lattice_C66_trans(1:6,1:6,i) = math_sym3333to66(R%rotTensor4(math_66toSym3333(C_target_unrotated66)))
enddo enddo
end function lattice_C66_trans end function lattice_C66_trans

View File

@ -64,7 +64,7 @@ end subroutine elastic_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Return 6x6 elasticity tensor. !> @brief Return 6x6 elasticity tensor.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function elastic_C66(ph,en) result(C66) module function elastic_C66(ph,en) result(C66)
integer, intent(in) :: & integer, intent(in) :: &
ph, & ph, &

View File

@ -75,7 +75,6 @@ module rotations
procedure, public :: rotVector procedure, public :: rotVector
procedure, public :: rotTensor2 procedure, public :: rotTensor2
procedure, public :: rotTensor4 procedure, public :: rotTensor4
procedure, public :: rotTensor4sym
procedure, public :: misorientation procedure, public :: misorientation
procedure, public :: standardize procedure, public :: standardize
end type rotation end type rotation
@ -371,24 +370,6 @@ pure function rotTensor4(self,T,active) result(tRot)
end function rotTensor4 end function rotTensor4
!---------------------------------------------------------------------------------------------------
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief rotate a symmetric rank-4 tensor stored as (6,6) passively (default) or actively
!! ToDo: Need to check active/passive !!!
!---------------------------------------------------------------------------------------------------
pure function rotTensor4sym(self,T,active) result(tRot)
real(pReal), dimension(6,6) :: tRot
class(rotation), intent(in) :: self
real(pReal), intent(in), dimension(6,6) :: T
logical, intent(in), optional :: active
tRot = math_sym3333to66(rotTensor4(self,math_66toSym3333(T),active))
end function rotTensor4sym
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
!> @brief misorientation !> @brief misorientation
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------