avoid code duplication
This commit is contained in:
parent
49bfdcecab
commit
3f96c12e06
|
@ -239,7 +239,7 @@ subroutine crystallite_init
|
|||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||
myNcomponents = homogenization_Ngrains(material_homogenizationAt(e))
|
||||
do i = FEsolving_execIP(1), FEsolving_execIP(2); do c = 1, myNcomponents
|
||||
crystallite_Fp0(1:3,1:3,c,i,e) = math_EulerToR(material_Eulers(1:3,c,i,e)) ! plastic def gradient reflects init orientation
|
||||
crystallite_Fp0(1:3,1:3,c,i,e) = material_orientation0(c,i,e)%asMatrix() ! plastic def gradient reflects init orientation
|
||||
crystallite_Fi0(1:3,1:3,c,i,e) = constitutive_initialFi(c,i,e)
|
||||
crystallite_F0(1:3,1:3,c,i,e) = math_I3
|
||||
crystallite_localPlasticity(c,i,e) = phase_localPlasticity(material_phaseAt(c,e))
|
||||
|
|
|
@ -174,8 +174,8 @@ module subroutine mech_RGC_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! assigning cluster orientations
|
||||
dependentState(homogenization_typeInstance(h))%orientation = spread(math_EulerToR(prm%angles*inRad),3,NofMyHomog)
|
||||
!dst%orientation = spread(math_EulerToR(prm%angles*inRad),3,NofMyHomog) ifort version 18.0.1 crashes (for whatever reason)
|
||||
dependentState(homogenization_typeInstance(h))%orientation = spread(eu2om(prm%angles*inRad),3,NofMyHomog)
|
||||
!dst%orientation = spread(eu2om(prm%angles*inRad),3,NofMyHomog) ifort version 18.0.1 crashes (for whatever reason)
|
||||
|
||||
end associate
|
||||
|
||||
|
|
34
src/math.f90
34
src/math.f90
|
@ -838,40 +838,6 @@ pure function math_Voigt66to3333(m66)
|
|||
end function math_Voigt66to3333
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief rotation matrix from Bunge-Euler (3-1-3) angles (in radians)
|
||||
!> @details deprecated
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
pure function math_EulerToR(Euler)
|
||||
|
||||
real(pReal), dimension(3), intent(in) :: Euler
|
||||
real(pReal), dimension(3,3) :: math_EulerToR
|
||||
real(pReal) :: c1, C, c2, s1, S, s2
|
||||
|
||||
c1 = cos(Euler(1))
|
||||
C = cos(Euler(2))
|
||||
c2 = cos(Euler(3))
|
||||
s1 = sin(Euler(1))
|
||||
S = sin(Euler(2))
|
||||
s2 = sin(Euler(3))
|
||||
|
||||
math_EulerToR(1,1) = c1*c2 -s1*C*s2
|
||||
math_EulerToR(1,2) = -c1*s2 -s1*C*c2
|
||||
math_EulerToR(1,3) = s1*S
|
||||
|
||||
math_EulerToR(2,1) = s1*c2 +c1*C*s2
|
||||
math_EulerToR(2,2) = -s1*s2 +c1*C*c2
|
||||
math_EulerToR(2,3) = -c1*S
|
||||
|
||||
math_EulerToR(3,1) = S*s2
|
||||
math_EulerToR(3,2) = S*c2
|
||||
math_EulerToR(3,3) = C
|
||||
|
||||
math_EulerToR = transpose(math_EulerToR) ! convert to passive rotation
|
||||
|
||||
end function math_EulerToR
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief draw a random sample from Gauss variable
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
! ###################################################################
|
||||
! Copyright (c) 2013-2014, Marc De Graef/Carnegie Mellon University
|
||||
! Modified 2017-2019, Martin Diehl/Max-Planck-Institut für Eisenforschung GmbH
|
||||
! Modified 2017-2020, Martin Diehl/Max-Planck-Institut für Eisenforschung GmbH
|
||||
! All rights reserved.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without modification, are
|
||||
|
@ -82,12 +82,11 @@ module rotations
|
|||
end type rotation
|
||||
|
||||
public :: &
|
||||
rotations_init
|
||||
|
||||
rotations_init, &
|
||||
eu2om
|
||||
|
||||
contains
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief doing self test
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue