diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 416a08869..7443d4dc7 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -380,7 +380,7 @@ subroutine crystallite_init do e = FEsolving_execElem(1),FEsolving_execElem(2) myNcomponents = homogenization_Ngrains(material_homogenizationAt(e)) do i = FEsolving_execIP(1,e), FEsolving_execIP(2,e); do c = 1, myNcomponents - crystallite_Fp0(1:3,1:3,c,i,e) = material_orientation0(c,i,e)%asMatrix() ! plastic def gradient reflects init orientation + 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_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)) diff --git a/src/material.f90 b/src/material.f90 index 152f3f73f..68f71ea2a 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -169,6 +169,8 @@ module material microstructure_phase, & !< phase IDs of each microstructure microstructure_texture !< texture IDs of each microstructure + real(pReal), dimension(:,:,:,:), allocatable, public,protected :: & + material_Eulers type(Rotation), dimension(:), allocatable, private :: & texture_orientation !< Euler angles in material.config (possibly rotated for alignment) real(pReal), dimension(:,:), allocatable, private :: & @@ -316,6 +318,7 @@ subroutine material_init allocate(material_phaseAt(homogenization_maxNgrains,discretization_nElem), source=0) allocate(material_texture(homogenization_maxNgrains,discretization_nIP,discretization_nElem),source=0) !this is only needed by plasticity nonlocal allocate(material_orientation0(homogenization_maxNgrains,discretization_nIP,discretization_nElem)) + allocate(material_Eulers(3,homogenization_maxNgrains,discretization_nIP,discretization_nElem)) do e = 1, discretization_nElem do i = 1, discretization_nIP @@ -324,6 +327,7 @@ subroutine material_init material_phaseAt(c,e) = microstructure_phase(c,myMicro) material_texture(c,i,e) = microstructure_texture(c,myMicro) material_orientation0(c,i,e) = texture_orientation(material_texture(c,i,e)) + material_Eulers(1:3,c,i,e) = texture_orientation(material_texture(c,i,e))%asEulers() enddo enddo enddo