From f28fe0812e6ea8501071a2dc4d4af4e1f388fa9b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 22 Dec 2020 19:24:00 +0100 Subject: [PATCH] sorting --- src/constitutive.f90 | 36 +++--------------------------------- src/constitutive_mech.f90 | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 34 insertions(+), 39 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index b4a638575..2423b5af8 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -351,22 +351,6 @@ module constitutive integer, intent(in) :: e, i, g end subroutine integrateStateFPI - module subroutine integrateStateEuler(g,i,e) - integer, intent(in) :: e, i, g - end subroutine integrateStateEuler - - module subroutine integrateStateAdaptiveEuler(g,i,e) - integer, intent(in) :: e, i, g - end subroutine integrateStateAdaptiveEuler - - module subroutine integrateStateRK4(g,i,e) - integer, intent(in) :: e, i, g - end subroutine integrateStateRK4 - - module subroutine integrateStateRKCK45(g,i,e) - integer, intent(in) :: e, i, g - end subroutine integrateStateRKCK45 - end interface @@ -696,7 +680,7 @@ end function constitutive_thermal_collectDotState !> @brief for constitutive models having an instantaneous change of state !> will return false if delta state is not needed/supported by the constitutive model !-------------------------------------------------------------------------------------------------- -function constitutive_deltaState_source(Fe, ipc, ip, el, phase, of) result(broken) +function constitutive_damage_deltaState(Fe, ipc, ip, el, phase, of) result(broken) integer, intent(in) :: & ipc, & !< component-ID of integration point @@ -735,7 +719,7 @@ function constitutive_deltaState_source(Fe, ipc, ip, el, phase, of) result(broke enddo SourceLoop -end function constitutive_deltaState_source +end function constitutive_damage_deltaState !-------------------------------------------------------------------------------------------------- @@ -918,20 +902,6 @@ subroutine crystallite_init if(num%nState < 1) call IO_error(301,ext_msg='nState') if(num%nStress< 1) call IO_error(301,ext_msg='nStress') - select case(num_crystallite%get_asString('integrator',defaultVal='FPI')) - case('FPI') - integrateState => integrateStateFPI - case('Euler') - integrateState => integrateStateEuler - case('AdaptiveEuler') - integrateState => integrateStateAdaptiveEuler - case('RK4') - integrateState => integrateStateRK4 - case('RKCK45') - integrateState => integrateStateRKCK45 - case default - call IO_error(301,ext_msg='integrator') - end select phases => config_material%get('phase') @@ -1505,7 +1475,7 @@ subroutine integrateSourceState(g,i,e) enddo if(crystallite_converged(g,i,e)) then - broken = constitutive_deltaState_source(crystallite_Fe(1:3,1:3,g,i,e),g,i,e,p,c) + broken = constitutive_damage_deltaState(crystallite_Fe(1:3,1:3,g,i,e),g,i,e,p,c) exit iteration endif diff --git a/src/constitutive_mech.f90 b/src/constitutive_mech.f90 index 6da151c9d..0af2621c0 100644 --- a/src/constitutive_mech.f90 +++ b/src/constitutive_mech.f90 @@ -133,7 +133,7 @@ submodule(constitutive) constitutive_mech el !< current element number end subroutine plastic_nonlocal_LpAndItsTangent - module subroutine plastic_isotropic_dotState(Mp,instance,of) + module subroutine plastic_isotropic_dotState(Mp,instance,of) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress integer, intent(in) :: & @@ -220,7 +220,7 @@ submodule(constitutive) constitutive_mech el !< current element number end subroutine plastic_nonlocal_dependentState - module subroutine plastic_kinehardening_deltaState(Mp,instance,of) + module subroutine plastic_kinehardening_deltaState(Mp,instance,of) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress integer, intent(in) :: & @@ -289,6 +289,7 @@ module subroutine mech_init p, & stiffDegradationCtr class(tNode), pointer :: & + num_crystallite, & phases, & phase, & mech, & @@ -358,6 +359,30 @@ module subroutine mech_init phase_plasticityInstance(p) = count(phase_plasticity(1:p) == phase_plasticity(p)) enddo + num_crystallite => config_numerics%get('crystallite',defaultVal=emptyDict) + + select case(num_crystallite%get_asString('integrator',defaultVal='FPI')) + + case('FPI') + integrateState => integrateStateFPI + + case('Euler') + integrateState => integrateStateEuler + + case('AdaptiveEuler') + integrateState => integrateStateAdaptiveEuler + + case('RK4') + integrateState => integrateStateRK4 + + case('RKCK45') + integrateState => integrateStateRKCK45 + + case default + call IO_error(301,ext_msg='integrator') + + end select + end subroutine mech_init @@ -1024,7 +1049,7 @@ end subroutine integrateStateFPI !-------------------------------------------------------------------------------------------------- !> @brief integrate state with 1st order explicit Euler method !-------------------------------------------------------------------------------------------------- -module subroutine integrateStateEuler(g,i,e) +subroutine integrateStateEuler(g,i,e) integer, intent(in) :: & e, & !< element index in element loop @@ -1062,7 +1087,7 @@ end subroutine integrateStateEuler !-------------------------------------------------------------------------------------------------- !> @brief integrate stress, state with 1st order Euler method with adaptive step size !-------------------------------------------------------------------------------------------------- -module subroutine integrateStateAdaptiveEuler(g,i,e) +subroutine integrateStateAdaptiveEuler(g,i,e) integer, intent(in) :: & e, & !< element index in element loop @@ -1115,7 +1140,7 @@ end subroutine integrateStateAdaptiveEuler !--------------------------------------------------------------------------------------------------- !> @brief Integrate state (including stress integration) with the classic Runge Kutta method !--------------------------------------------------------------------------------------------------- -module subroutine integrateStateRK4(g,i,e) +subroutine integrateStateRK4(g,i,e) integer, intent(in) :: g,i,e @@ -1138,7 +1163,7 @@ end subroutine integrateStateRK4 !--------------------------------------------------------------------------------------------------- !> @brief Integrate state (including stress integration) with the Cash-Carp method !--------------------------------------------------------------------------------------------------- -module subroutine integrateStateRKCK45(g,i,e) +subroutine integrateStateRKCK45(g,i,e) integer, intent(in) :: g,i,e