polishing
RGC numerics is still annoying (and was probably never used in the last 10 years)
This commit is contained in:
parent
5cc64fc958
commit
d97f515b77
|
@ -66,15 +66,13 @@ module homogenization
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
interface
|
||||
|
||||
module subroutine mechanical_init(num_homog)
|
||||
class(tNode), pointer, intent(in) :: &
|
||||
num_homog !< pointer to mechanical homogenization numerics data
|
||||
module subroutine mechanical_init()
|
||||
end subroutine mechanical_init
|
||||
|
||||
module subroutine thermal_init
|
||||
module subroutine thermal_init()
|
||||
end subroutine thermal_init
|
||||
|
||||
module subroutine damage_init
|
||||
module subroutine damage_init()
|
||||
end subroutine damage_init
|
||||
|
||||
module subroutine mechanical_partition(subF,ce)
|
||||
|
@ -204,15 +202,15 @@ subroutine homogenization_init()
|
|||
|
||||
allocate(homogState (size(material_name_homogenization)))
|
||||
allocate(damageState_h (size(material_name_homogenization)))
|
||||
call material_parseHomogenization()
|
||||
call parseHomogenization()
|
||||
|
||||
num_homog => config_numerics%get('homogenization',defaultVal=emptyDict)
|
||||
num_homogGeneric => num_homog%get('generic',defaultVal=emptyDict)
|
||||
|
||||
num%nMPstate = num_homogGeneric%get_asInt('nMPstate',defaultVal=10)
|
||||
num%nMPstate = num_homogGeneric%get_asInt('nMPstate',defaultVal=10)
|
||||
if (num%nMPstate < 1) call IO_error(301,ext_msg='nMPstate')
|
||||
|
||||
call mechanical_init(num_homog)
|
||||
call mechanical_init()
|
||||
call thermal_init()
|
||||
call damage_init()
|
||||
|
||||
|
@ -323,13 +321,13 @@ subroutine homogenization_mechanical_response2(Delta_t,FEsolving_execIP,FEsolvin
|
|||
elementLooping3: do el = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||
IpLooping3: do ip = FEsolving_execIP(1),FEsolving_execIP(2)
|
||||
ce = (el-1)*discretization_nIPs + ip
|
||||
ho = material_homogenizationID(ce)
|
||||
do co = 1, homogenization_Nconstituents(ho)
|
||||
call crystallite_orientations(co,ip,el)
|
||||
enddo
|
||||
call mechanical_homogenize(Delta_t,ce)
|
||||
enddo IpLooping3
|
||||
enddo elementLooping3
|
||||
ho = material_homogenizationID(ce)
|
||||
do co = 1, homogenization_Nconstituents(ho)
|
||||
call crystallite_orientations(co,ip,el)
|
||||
end do
|
||||
call mechanical_homogenize(Delta_t,ce)
|
||||
end do IpLooping3
|
||||
end do elementLooping3
|
||||
!$OMP END PARALLEL DO
|
||||
|
||||
|
||||
|
@ -447,7 +445,7 @@ end subroutine homogenization_restartRead
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief parses the homogenization part from the material configuration
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine material_parseHomogenization
|
||||
subroutine parseHomogenization
|
||||
|
||||
class(tNode), pointer :: &
|
||||
material_homogenization, &
|
||||
|
@ -459,8 +457,8 @@ subroutine material_parseHomogenization
|
|||
|
||||
material_homogenization => config_material%get('homogenization')
|
||||
|
||||
allocate(thermal_type(size(material_name_homogenization)), source=THERMAL_isothermal_ID)
|
||||
allocate(damage_type (size(material_name_homogenization)), source=DAMAGE_none_ID)
|
||||
allocate(thermal_type(size(material_name_homogenization)),source=THERMAL_isothermal_ID)
|
||||
allocate(damage_type (size(material_name_homogenization)),source=DAMAGE_none_ID)
|
||||
|
||||
do h=1, size(material_name_homogenization)
|
||||
homog => material_homogenization%get(h)
|
||||
|
@ -486,7 +484,7 @@ subroutine material_parseHomogenization
|
|||
endif
|
||||
enddo
|
||||
|
||||
end subroutine material_parseHomogenization
|
||||
end subroutine parseHomogenization
|
||||
|
||||
|
||||
end module homogenization
|
||||
|
|
|
@ -7,15 +7,13 @@ submodule(homogenization) mechanical
|
|||
|
||||
interface
|
||||
|
||||
module subroutine pass_init
|
||||
module subroutine pass_init()
|
||||
end subroutine pass_init
|
||||
|
||||
module subroutine isostrain_init
|
||||
module subroutine isostrain_init()
|
||||
end subroutine isostrain_init
|
||||
|
||||
module subroutine RGC_init(num_homogMech)
|
||||
class(tNode), pointer, intent(in) :: &
|
||||
num_homogMech !< pointer to mechanical homogenization numerics data
|
||||
module subroutine RGC_init()
|
||||
end subroutine RGC_init
|
||||
|
||||
|
||||
|
@ -60,27 +58,20 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Allocate variables and set parameters.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module subroutine mechanical_init(num_homog)
|
||||
|
||||
class(tNode), pointer, intent(in) :: &
|
||||
num_homog
|
||||
|
||||
class(tNode), pointer :: &
|
||||
num_homogMech
|
||||
module subroutine mechanical_init()
|
||||
|
||||
print'(/,1x,a)', '<<<+- homogenization:mechanical init -+>>>'
|
||||
|
||||
call material_parseHomogenization2()
|
||||
call parseMechanical()
|
||||
|
||||
allocate(homogenization_dPdF(3,3,3,3,discretization_nIPs*discretization_Nelems), source=0.0_pReal)
|
||||
homogenization_F0 = spread(math_I3,3,discretization_nIPs*discretization_Nelems) ! initialize to identity
|
||||
homogenization_F = homogenization_F0 ! initialize to identity
|
||||
allocate(homogenization_P(3,3,discretization_nIPs*discretization_Nelems), source=0.0_pReal)
|
||||
allocate(homogenization_dPdF(3,3,3,3,discretization_Ncells), source=0.0_pReal)
|
||||
homogenization_F0 = spread(math_I3,3,discretization_Ncells)
|
||||
homogenization_F = homogenization_F0
|
||||
allocate(homogenization_P(3,3,discretization_Ncells),source=0.0_pReal)
|
||||
|
||||
num_homogMech => num_homog%get('mech',defaultVal=emptyDict)
|
||||
if (any(homogenization_type == HOMOGENIZATION_NONE_ID)) call pass_init
|
||||
if (any(homogenization_type == HOMOGENIZATION_ISOSTRAIN_ID)) call isostrain_init
|
||||
if (any(homogenization_type == HOMOGENIZATION_RGC_ID)) call RGC_init(num_homogMech)
|
||||
if (any(homogenization_type == HOMOGENIZATION_NONE_ID)) call pass_init()
|
||||
if (any(homogenization_type == HOMOGENIZATION_ISOSTRAIN_ID)) call isostrain_init()
|
||||
if (any(homogenization_type == HOMOGENIZATION_RGC_ID)) call RGC_init()
|
||||
|
||||
end subroutine mechanical_init
|
||||
|
||||
|
@ -210,7 +201,7 @@ end subroutine mechanical_results
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief parses the homogenization part from the material configuration
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine material_parseHomogenization2()
|
||||
subroutine parseMechanical()
|
||||
|
||||
class(tNode), pointer :: &
|
||||
material_homogenization, &
|
||||
|
@ -238,7 +229,7 @@ subroutine material_parseHomogenization2()
|
|||
end select
|
||||
end do
|
||||
|
||||
end subroutine material_parseHomogenization2
|
||||
end subroutine parseMechanical
|
||||
|
||||
|
||||
end submodule mechanical
|
||||
|
|
|
@ -71,10 +71,7 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief allocates all necessary fields, reads information from material configuration file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module subroutine RGC_init(num_homogMech)
|
||||
|
||||
class(tNode), pointer, intent(in) :: &
|
||||
num_homogMech !< pointer to mechanical homogenization numerics data
|
||||
module subroutine RGC_init()
|
||||
|
||||
integer :: &
|
||||
ho, &
|
||||
|
@ -82,6 +79,8 @@ module subroutine RGC_init(num_homogMech)
|
|||
sizeState, nIntFaceTot
|
||||
|
||||
class (tNode), pointer :: &
|
||||
num_homogenization, &
|
||||
num_mechanical, &
|
||||
num_RGC, & ! pointer to RGC numerics data
|
||||
material_homogenization, &
|
||||
homog, &
|
||||
|
@ -105,7 +104,9 @@ module subroutine RGC_init(num_homogMech)
|
|||
allocate(state0(material_homogenization%length))
|
||||
allocate(dependentState(material_homogenization%length))
|
||||
|
||||
num_RGC => num_homogMech%get('RGC',defaultVal=emptyDict)
|
||||
num_homogenization => config_numerics%get('homogenization',defaultVal=emptyDict)
|
||||
num_mechanical => num_homogenization%get('mechanical',defaultVal=emptyDict)
|
||||
num_RGC => num_mechanical%get('RGC',defaultVal=emptyDict)
|
||||
|
||||
num%atol = num_RGC%get_asFloat('atol', defaultVal=1.0e+4_pReal)
|
||||
num%rtol = num_RGC%get_asFloat('rtol', defaultVal=1.0e-3_pReal)
|
||||
|
@ -171,8 +172,8 @@ module subroutine RGC_init(num_homogMech)
|
|||
allocate(homogState(ho)%state0 (sizeState,Nmembers), source=0.0_pReal)
|
||||
allocate(homogState(ho)%state (sizeState,Nmembers), source=0.0_pReal)
|
||||
|
||||
stt%relaxationVector => homogState(ho)%state(1:nIntFaceTot,:)
|
||||
st0%relaxationVector => homogState(ho)%state0(1:nIntFaceTot,:)
|
||||
stt%relaxationVector => homogState(ho)%state(1:nIntFaceTot,:)
|
||||
st0%relaxationVector => homogState(ho)%state0(1:nIntFaceTot,:)
|
||||
|
||||
allocate(dst%volumeDiscrepancy( Nmembers), source=0.0_pReal)
|
||||
allocate(dst%relaxationRate_avg( Nmembers), source=0.0_pReal)
|
||||
|
|
Loading…
Reference in New Issue