From 020ef64d7d2a732ac4fe891bcad33bda69d8e08a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 18 Nov 2021 17:44:06 +0100 Subject: [PATCH] explicit conversions --- src/lattice.f90 | 5 +++-- src/phase_mechanical_elastic.f90 | 2 +- src/rotations.f90 | 19 ------------------- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 11d1dca0f..7fa6b8ab5 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -505,6 +505,7 @@ function lattice_C66_twin(Ntwin,C66,lattice,CoverA) type(rotation) :: R integer :: i + select case(lattice) case('cF') coordinateSystem = buildCoordinateSystem(Ntwin,FCC_NSLIPSYSTEM,FCC_SYSTEMTWIN,& @@ -521,7 +522,7 @@ function lattice_C66_twin(Ntwin,C66,lattice,CoverA) do i = 1, sum(Ntwin) 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 end function lattice_C66_twin @@ -580,7 +581,7 @@ function lattice_C66_trans(Ntrans,C_parent66,lattice_target, & do i = 1, sum(Ntrans) 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 end function lattice_C66_trans diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index 55aa4cefb..8ab6884f9 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -64,7 +64,7 @@ end subroutine elastic_init !-------------------------------------------------------------------------------------------------- !> @brief Return 6x6 elasticity tensor. !-------------------------------------------------------------------------------------------------- -function elastic_C66(ph,en) result(C66) +module function elastic_C66(ph,en) result(C66) integer, intent(in) :: & ph, & diff --git a/src/rotations.f90 b/src/rotations.f90 index 1ca114acb..e73fb2782 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -75,7 +75,6 @@ module rotations procedure, public :: rotVector procedure, public :: rotTensor2 procedure, public :: rotTensor4 - procedure, public :: rotTensor4sym procedure, public :: misorientation procedure, public :: standardize end type rotation @@ -371,24 +370,6 @@ pure function rotTensor4(self,T,active) result(tRot) 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 !---------------------------------------------------------------------------------------------------