one loop is enough

This commit is contained in:
Martin Diehl 2020-12-23 14:37:12 +01:00
parent be4616368b
commit 12b1c7e641
3 changed files with 17 additions and 19 deletions

View File

@ -3,6 +3,13 @@
!---------------------------------------------------------------------------------------------------- !----------------------------------------------------------------------------------------------------
submodule(constitutive) constitutive_mech submodule(constitutive) constitutive_mech
enum, bind(c); enumerator :: &
ELASTICITY_UNDEFINED_ID, &
ELASTICITY_HOOKE_ID, &
STIFFNESS_DEGRADATION_UNDEFINED_ID, &
STIFFNESS_DEGRADATION_DAMAGE_ID
end enum
integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable :: & integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable :: &
phase_elasticity !< elasticity of each phase phase_elasticity !< elasticity of each phase
integer(kind(SOURCE_undefined_ID)), dimension(:,:), allocatable :: & integer(kind(SOURCE_undefined_ID)), dimension(:,:), allocatable :: &

View File

@ -164,11 +164,13 @@ subroutine materialpoint_stressAndItsTangent(dt)
integer :: ce integer :: ce
!--------------------------------------------------------------------------------------------------
! initialize restoration points !$OMP PARALLEL DO PRIVATE(ce,myNgrains,NiterationMPstate,NiterationHomog)
do el = FEsolving_execElem(1),FEsolving_execElem(2) do el = FEsolving_execElem(1),FEsolving_execElem(2)
do ip = FEsolving_execIP(1),FEsolving_execIP(2); do ip = FEsolving_execIP(1),FEsolving_execIP(2);
!--------------------------------------------------------------------------------------------------
! initialize restoration points
call constitutive_initializeRestorationPoints(ip,el) call constitutive_initializeRestorationPoints(ip,el)
subFrac(ip,el) = 0.0_pReal subFrac(ip,el) = 0.0_pReal
@ -183,19 +185,12 @@ subroutine materialpoint_stressAndItsTangent(dt)
if (damageState(material_homogenizationAt(el))%sizeState > 0) & if (damageState(material_homogenizationAt(el))%sizeState > 0) &
damageState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el)) = & damageState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el)) = &
damageState(material_homogenizationAt(el))%State0( :,material_homogenizationMemberAt(ip,el)) damageState(material_homogenizationAt(el))%State0( :,material_homogenizationMemberAt(ip,el))
enddo
enddo
NiterationHomog = 0 NiterationHomog = 0
cutBackLooping: do while (.not. terminallyIll .and. & cutBackLooping: do while (.not. terminallyIll .and. subStep(ip,el) > num%subStepMinHomog)
any(subStep(FEsolving_execIP(1):FEsolving_execIP(2),&
FEsolving_execElem(1):FEsolving_execElem(2)) > num%subStepMinHomog))
!$OMP PARALLEL DO PRIVATE(ce,myNgrains,NiterationMPstate)
elementLooping1: do el = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Nconstituents(material_homogenizationAt(el)) myNgrains = homogenization_Nconstituents(material_homogenizationAt(el))
IpLooping1: do ip = FEsolving_execIP(1),FEsolving_execIP(2)
if (converged(ip,el)) then if (converged(ip,el)) then
subFrac(ip,el) = subFrac(ip,el) + subStep(ip,el) subFrac(ip,el) = subFrac(ip,el) + subStep(ip,el)
@ -283,14 +278,16 @@ subroutine materialpoint_stressAndItsTangent(dt)
endif endif
enddo convergenceLooping enddo convergenceLooping
enddo IpLooping1
enddo elementLooping1
!$OMP END PARALLEL DO
NiterationHomog = NiterationHomog + 1 NiterationHomog = NiterationHomog + 1
enddo cutBackLooping enddo cutBackLooping
enddo
enddo
!$OMP END PARALLEL DO
if (.not. terminallyIll ) then if (.not. terminallyIll ) then
call crystallite_orientations() ! calculate crystal orientations call crystallite_orientations() ! calculate crystal orientations
!$OMP PARALLEL DO !$OMP PARALLEL DO

View File

@ -5,12 +5,6 @@
submodule(homogenization) homogenization_mech submodule(homogenization) homogenization_mech
enum, bind(c); enumerator :: &
ELASTICITY_UNDEFINED_ID, &
ELASTICITY_HOOKE_ID, &
STIFFNESS_DEGRADATION_UNDEFINED_ID, &
STIFFNESS_DEGRADATION_DAMAGE_ID
end enum
interface interface
module subroutine mech_none_init module subroutine mech_none_init