passing in instance simplifies things a lot
This commit is contained in:
parent
a0c3a65b39
commit
08c692bfc1
|
@ -913,6 +913,7 @@ subroutine homogenization_partitionDeformation(ip,el)
|
|||
use material, only: &
|
||||
homogenization_type, &
|
||||
homogenization_maxNgrains, &
|
||||
homogenization_typeInstance, &
|
||||
HOMOGENIZATION_NONE_ID, &
|
||||
HOMOGENIZATION_ISOSTRAIN_ID, &
|
||||
HOMOGENIZATION_RGC_ID
|
||||
|
@ -927,6 +928,8 @@ subroutine homogenization_partitionDeformation(ip,el)
|
|||
integer(pInt), intent(in) :: &
|
||||
ip, & !< integration point
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
instance
|
||||
|
||||
chosenHomogenization: select case(homogenization_type(mesh_element(3,el)))
|
||||
|
||||
|
@ -936,10 +939,12 @@ subroutine homogenization_partitionDeformation(ip,el)
|
|||
spread(materialpoint_subF(1:3,1:3,ip,el),3,1)
|
||||
|
||||
case (HOMOGENIZATION_ISOSTRAIN_ID) chosenHomogenization
|
||||
instance = homogenization_typeInstance(mesh_element(3,el))
|
||||
call homogenization_isostrain_partitionDeformation(&
|
||||
crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), &
|
||||
materialpoint_subF(1:3,1:3,ip,el),&
|
||||
el)
|
||||
instance)
|
||||
|
||||
case (HOMOGENIZATION_RGC_ID) chosenHomogenization
|
||||
call homogenization_RGC_partitionDeformation(&
|
||||
crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), &
|
||||
|
@ -1041,6 +1046,7 @@ subroutine homogenization_averageStressAndItsTangent(ip,el)
|
|||
mesh_element
|
||||
use material, only: &
|
||||
homogenization_type, &
|
||||
homogenization_typeInstance, &
|
||||
homogenization_maxNgrains, &
|
||||
HOMOGENIZATION_NONE_ID, &
|
||||
HOMOGENIZATION_ISOSTRAIN_ID, &
|
||||
|
@ -1056,6 +1062,8 @@ subroutine homogenization_averageStressAndItsTangent(ip,el)
|
|||
integer(pInt), intent(in) :: &
|
||||
ip, & !< integration point
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
instance
|
||||
|
||||
chosenHomogenization: select case(homogenization_type(mesh_element(3,el)))
|
||||
case (HOMOGENIZATION_NONE_ID) chosenHomogenization
|
||||
|
@ -1064,12 +1072,14 @@ subroutine homogenization_averageStressAndItsTangent(ip,el)
|
|||
= sum(crystallite_dPdF(1:3,1:3,1:3,1:3,1:1,ip,el),5)
|
||||
|
||||
case (HOMOGENIZATION_ISOSTRAIN_ID) chosenHomogenization
|
||||
instance = homogenization_typeInstance(mesh_element(3,el))
|
||||
call homogenization_isostrain_averageStressAndItsTangent(&
|
||||
materialpoint_P(1:3,1:3,ip,el), &
|
||||
materialpoint_dPdF(1:3,1:3,1:3,1:3,ip,el),&
|
||||
crystallite_P(1:3,1:3,1:homogenization_maxNgrains,ip,el), &
|
||||
crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,ip,el), &
|
||||
el)
|
||||
instance)
|
||||
|
||||
case (HOMOGENIZATION_RGC_ID) chosenHomogenization
|
||||
call homogenization_RGC_averageStressAndItsTangent(&
|
||||
materialpoint_P(1:3,1:3,ip,el), &
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
||||
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
||||
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||
!> @brief Isostrain (full constraint Taylor assuption) homogenization scheme
|
||||
|
@ -117,25 +118,19 @@ end subroutine homogenization_isostrain_init
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief partitions the deformation gradient onto the constituents
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_isostrain_partitionDeformation(F,avgF,el)
|
||||
subroutine homogenization_isostrain_partitionDeformation(F,avgF,instance)
|
||||
use prec, only: &
|
||||
pReal
|
||||
use mesh, only: &
|
||||
mesh_element
|
||||
use material, only: &
|
||||
homogenization_maxNgrains, &
|
||||
homogenization_typeInstance
|
||||
homogenization_maxNgrains
|
||||
|
||||
implicit none
|
||||
real(pReal), dimension (3,3,homogenization_maxNgrains), intent(out) :: F !< partioned def grad per grain
|
||||
real(pReal), dimension (3,3), intent(in) :: avgF !< my average def grad
|
||||
integer(pInt), intent(in) :: instance
|
||||
type(tParameters) :: &
|
||||
prm
|
||||
integer(pInt) :: &
|
||||
el, &
|
||||
instance
|
||||
|
||||
instance = homogenization_typeInstance(mesh_element(3,el))
|
||||
associate(prm => param(instance))
|
||||
F(1:3,1:3,1:prm%Nconstituents) = spread(avgF,3,prm%Nconstituents)
|
||||
if (homogenization_maxNgrains > prm%Nconstituents) &
|
||||
|
@ -148,27 +143,21 @@ end subroutine homogenization_isostrain_partitionDeformation
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief derive average stress and stiffness from constituent quantities
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_isostrain_averageStressAndItsTangent(avgP,dAvgPdAvgF,P,dPdF,el)
|
||||
subroutine homogenization_isostrain_averageStressAndItsTangent(avgP,dAvgPdAvgF,P,dPdF,instance)
|
||||
use prec, only: &
|
||||
pReal
|
||||
use mesh, only: &
|
||||
mesh_element
|
||||
use material, only: &
|
||||
homogenization_maxNgrains, &
|
||||
homogenization_typeInstance
|
||||
homogenization_maxNgrains
|
||||
|
||||
implicit none
|
||||
real(pReal), dimension (3,3), intent(out) :: avgP !< average stress at material point
|
||||
real(pReal), dimension (3,3,3,3), intent(out) :: dAvgPdAvgF !< average stiffness at material point
|
||||
real(pReal), dimension (3,3,homogenization_maxNgrains), intent(in) :: P !< array of current grain stresses
|
||||
real(pReal), dimension (3,3,3,3,homogenization_maxNgrains), intent(in) :: dPdF !< array of current grain stiffnesses
|
||||
integer(pInt), intent(in) :: instance
|
||||
type(tParameters) :: &
|
||||
prm
|
||||
integer(pInt) :: &
|
||||
el, &
|
||||
instance
|
||||
|
||||
instance = homogenization_typeInstance(mesh_element(3,el))
|
||||
associate(prm => param(instance))
|
||||
select case (prm%mapping)
|
||||
case (parallel_ID)
|
||||
|
|
Loading…
Reference in New Issue