clearer code

homogenization is defined per element, not per IP
hence, use material_homogenizationAt instead of deprecated
material_homog which pretends a dependency on the integration point
This commit is contained in:
Martin Diehl 2018-10-04 06:39:03 +02:00
parent df473302f4
commit dc289a278b
3 changed files with 17 additions and 15 deletions

View File

@ -314,7 +314,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
thermal_type, &
THERMAL_conduction_ID, &
phase_Nsources, &
material_homog
material_homogenizationAt
use config, only: &
material_Nhomogenization
use crystallite, only: &
@ -503,7 +503,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
if (.not. parallelExecution) then
chosenThermal1: select case (thermal_type(mesh_element(3,elCP)))
case (THERMAL_conduction_ID) chosenThermal1
temperature(material_homog(ip,elCP))%p(thermalMapping(material_homog(ip,elCP))%p(ip,elCP)) = &
temperature(material_homogenizationAt(elCP))%p(thermalMapping(material_homogenizationAt(elCP))%p(ip,elCP)) = &
temperature_inp
end select chosenThermal1
materialpoint_F0(1:3,1:3,ip,elCP) = ffn
@ -516,7 +516,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
CPFEM_dcsde(1:6,1:6,ip,elCP) = CPFEM_odd_jacobian * math_identity2nd(6)
chosenThermal2: select case (thermal_type(mesh_element(3,elCP)))
case (THERMAL_conduction_ID) chosenThermal2
temperature(material_homog(ip,elCP))%p(thermalMapping(material_homog(ip,elCP))%p(ip,elCP)) = &
temperature(material_homogenizationAt(elCP))%p(thermalMapping(material_homogenizationAt(elCP))%p(ip,elCP)) = &
temperature_inp
end select chosenThermal2
materialpoint_F0(1:3,1:3,ip,elCP) = ffn

View File

@ -386,7 +386,7 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el)
use material, only: &
phase_plasticity, &
material_phase, &
material_homog, &
material_homogenizationAt, &
temperature, &
thermalMapping, &
PLASTICITY_dislotwin_ID, &
@ -413,7 +413,7 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el)
real(pReal), intent(in), dimension(:,:,:,:) :: &
orientations !< crystal orientations as quaternions
ho = material_homog(ip,el)
ho = material_homogenizationAt(el)
tme = thermalMapping(ho)%p(ip,el)
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
@ -444,7 +444,7 @@ subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, S6, Fi, ipc, ip, e
phase_plasticity, &
phase_plasticityInstance, &
material_phase, &
material_homog, &
material_homogenizationAt, &
temperature, &
thermalMapping, &
PLASTICITY_NONE_ID, &
@ -494,7 +494,7 @@ subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, S6, Fi, ipc, ip, e
integer(pInt) :: &
i, j, instance, of
ho = material_homog(ip,el)
ho = material_homogenizationAt(el)
tme = thermalMapping(ho)%p(ip,el)
S = math_Mandel6to33(S6)
@ -752,7 +752,7 @@ subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip
math_I3
use material, only: &
material_phase, &
material_homog, &
material_homogenizationAt, &
phase_NstiffnessDegradations, &
phase_stiffnessDegradation, &
damage, &
@ -783,8 +783,7 @@ subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip
integer(pInt) :: &
i, j
ho = material_homog(ip,el)
ho = material_homogenizationAt(el)
C = math_Mandel66to3333(constitutive_homogenizedC(ipc,ip,el))
DegradationLoop: do d = 1_pInt, phase_NstiffnessDegradations(material_phase(ipc,ip,el))
@ -835,7 +834,7 @@ subroutine constitutive_collectDotState(S6, FeArray, Fi, FpArray, subdt, subfrac
phase_source, &
phase_Nsources, &
material_phase, &
material_homog, &
material_homogenizationAt, &
temperature, &
thermalMapping, &
homogenization_maxNgrains, &
@ -895,7 +894,7 @@ subroutine constitutive_collectDotState(S6, FeArray, Fi, FpArray, subdt, subfrac
s, & !< counter in source loop
instance, of
ho = material_homog( ip,el)
ho = material_homogenizationAt(el)
tme = thermalMapping(ho)%p(ip,el)
Mp = math_mul33x33(math_mul33x33(transpose(Fi),Fi),math_Mandel6to33(S6))
@ -1054,7 +1053,7 @@ function constitutive_postResults(S6, Fi, FeArray, ipc, ip, el)
phase_source, &
phase_Nsources, &
material_phase, &
material_homog, &
material_homogenizationAt, &
temperature, &
thermalMapping, &
homogenization_maxNgrains, &
@ -1117,7 +1116,7 @@ function constitutive_postResults(S6, Fi, FeArray, ipc, ip, el)
Mp = math_mul33x33(math_mul33x33(transpose(Fi),Fi),math_Mandel6to33(S6))
ho = material_homog( ip,el)
ho = material_homogenizationAt(el)
tme = thermalMapping(ho)%p(ip,el)
startPos = 1_pInt

View File

@ -169,6 +169,7 @@ module material
homogenization_maxNgrains !< max number of grains in any USED homogenization
integer(pInt), dimension(:), allocatable, public, protected :: &
material_homogenizationAt, & !< homogenization ID of each element (copy of mesh_homogenizationAt)
phase_Nsources, & !< number of source mechanisms active in each phase
phase_Nkinematics, & !< number of kinematic mechanisms active in each phase
phase_NstiffnessDegradations, & !< number of stiffness degradation mechanisms active in each phase
@ -199,9 +200,10 @@ module material
integer(pInt), dimension(:,:,:), allocatable, public :: &
material_phase !< phase (index) of each grain,IP,element
! DEPRECATED. DID WE EVER ALLOWED DIFFERENT HOMOGENIZATION SCHEMES WITHIN ONE ELEMENT?
! BEGIN DEPRECATED: use material_homogenizationAt
integer(pInt), dimension(:,:), allocatable, public :: &
material_homog !< homogenization (index) of each IP,element
! END DEPRECATED
type(tPlasticState), allocatable, dimension(:), public :: &
plasticState
type(tSourceState), allocatable, dimension(:), public :: &
@ -1132,6 +1134,7 @@ subroutine material_populateGrains
allocate(material_volume(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(material_phase(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0_pInt)
allocate(material_homog(mesh_maxNips,mesh_NcpElems), source=0_pInt)
allocate(material_homogenizationAt,source=mesh_homogenizationAt)
allocate(material_texture(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0_pInt)
allocate(material_EulerAngles(3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0.0_pReal)