consistent indentation
This commit is contained in:
parent
4aa52fa83f
commit
148440c16e
|
@ -8,8 +8,7 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module homogenization_RGC
|
module homogenization_RGC
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pReal, &
|
pReal
|
||||||
pInt
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
@ -818,7 +817,7 @@ function homogenization_RGC_updateState(P,F,F0,avgF,dt,dPdF,ip,el)
|
||||||
nVect = interfaceNormal(intFace,instance,of)
|
nVect = interfaceNormal(intFace,instance,of)
|
||||||
iGNghb3 = iGrain3 ! identify the neighboring grain across the interface
|
iGNghb3 = iGrain3 ! identify the neighboring grain across the interface
|
||||||
iGNghb3(abs(intFace(1))) = iGNghb3(abs(intFace(1))) &
|
iGNghb3(abs(intFace(1))) = iGNghb3(abs(intFace(1))) &
|
||||||
+ int(real(intFace(1),pReal)/real(abs(intFace(1)),pReal),pInt)
|
+ int(real(intFace(1),pReal)/real(abs(intFace(1)),pReal))
|
||||||
where(iGNghb3 < 1) iGNghb3 = nGDim
|
where(iGNghb3 < 1) iGNghb3 = nGDim
|
||||||
where(iGNghb3 >nGDim) iGNghb3 = 1
|
where(iGNghb3 >nGDim) iGNghb3 = 1
|
||||||
iGNghb = grain3to1(iGNghb3,prm%Nconstituents) ! get the ID of the neighboring grain
|
iGNghb = grain3to1(iGNghb3,prm%Nconstituents) ! get the ID of the neighboring grain
|
||||||
|
|
|
@ -5,96 +5,94 @@
|
||||||
!> @brief Isostrain (full constraint Taylor assuption) homogenization scheme
|
!> @brief Isostrain (full constraint Taylor assuption) homogenization scheme
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module homogenization_isostrain
|
module homogenization_isostrain
|
||||||
use prec, only: &
|
|
||||||
pInt
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
enum, bind(c)
|
enum, bind(c)
|
||||||
enumerator :: &
|
enumerator :: &
|
||||||
parallel_ID, &
|
parallel_ID, &
|
||||||
average_ID
|
average_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters !< container type for internal constitutive parameters
|
type, private :: tParameters !< container type for internal constitutive parameters
|
||||||
integer :: &
|
integer :: &
|
||||||
Nconstituents
|
Nconstituents
|
||||||
integer(kind(average_ID)) :: &
|
integer(kind(average_ID)) :: &
|
||||||
mapping
|
mapping
|
||||||
end type
|
end type
|
||||||
|
|
||||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
homogenization_isostrain_init, &
|
homogenization_isostrain_init, &
|
||||||
homogenization_isostrain_partitionDeformation, &
|
homogenization_isostrain_partitionDeformation, &
|
||||||
homogenization_isostrain_averageStressAndItsTangent
|
homogenization_isostrain_averageStressAndItsTangent
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief allocates all neccessary fields, reads information from material configuration file
|
!> @brief allocates all neccessary fields, reads information from material configuration file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_isostrain_init()
|
subroutine homogenization_isostrain_init
|
||||||
use debug, only: &
|
use debug, only: &
|
||||||
debug_HOMOGENIZATION, &
|
debug_HOMOGENIZATION, &
|
||||||
debug_level, &
|
debug_level, &
|
||||||
debug_levelBasic
|
debug_levelBasic
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error
|
IO_error
|
||||||
use material, only: &
|
use material, only: &
|
||||||
homogenization_type, &
|
homogenization_type, &
|
||||||
material_homogenizationAt, &
|
material_homogenizationAt, &
|
||||||
homogState, &
|
homogState, &
|
||||||
HOMOGENIZATION_ISOSTRAIN_ID, &
|
HOMOGENIZATION_ISOSTRAIN_ID, &
|
||||||
HOMOGENIZATION_ISOSTRAIN_LABEL, &
|
HOMOGENIZATION_ISOSTRAIN_LABEL, &
|
||||||
homogenization_typeInstance
|
homogenization_typeInstance
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_homogenization
|
config_homogenization
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer :: &
|
|
||||||
Ninstance, &
|
|
||||||
h, &
|
|
||||||
NofMyHomog
|
|
||||||
character(len=65536) :: &
|
|
||||||
tag = ''
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_ISOSTRAIN_label//' init -+>>>'
|
|
||||||
|
|
||||||
Ninstance = int(count(homogenization_type == HOMOGENIZATION_ISOSTRAIN_ID),pInt)
|
|
||||||
if (iand(debug_level(debug_HOMOGENIZATION),debug_levelBasic) /= 0) &
|
|
||||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
|
||||||
|
|
||||||
allocate(param(Ninstance)) ! one container of parameters per instance
|
|
||||||
|
|
||||||
do h = 1, size(homogenization_type)
|
|
||||||
if (homogenization_type(h) /= HOMOGENIZATION_ISOSTRAIN_ID) cycle
|
|
||||||
|
|
||||||
associate(prm => param(homogenization_typeInstance(h)),&
|
|
||||||
config => config_homogenization(h))
|
|
||||||
|
|
||||||
prm%Nconstituents = config_homogenization(h)%getInt('nconstituents')
|
implicit none
|
||||||
tag = 'sum'
|
integer :: &
|
||||||
select case(trim(config%getString('mapping',defaultVal = tag)))
|
Ninstance, &
|
||||||
case ('sum')
|
h, &
|
||||||
prm%mapping = parallel_ID
|
NofMyHomog
|
||||||
case ('avg')
|
character(len=65536) :: &
|
||||||
prm%mapping = average_ID
|
tag = ''
|
||||||
case default
|
|
||||||
call IO_error(211,ext_msg=trim(tag)//' ('//HOMOGENIZATION_isostrain_label//')')
|
write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_ISOSTRAIN_label//' init -+>>>'
|
||||||
end select
|
|
||||||
|
Ninstance = count(homogenization_type == HOMOGENIZATION_ISOSTRAIN_ID)
|
||||||
NofMyHomog = count(material_homogenizationAt == h)
|
if (iand(debug_level(debug_HOMOGENIZATION),debug_levelBasic) /= 0) &
|
||||||
homogState(h)%sizeState = 0
|
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||||
homogState(h)%sizePostResults = 0
|
|
||||||
allocate(homogState(h)%state0 (0,NofMyHomog))
|
allocate(param(Ninstance)) ! one container of parameters per instance
|
||||||
allocate(homogState(h)%subState0(0,NofMyHomog))
|
|
||||||
allocate(homogState(h)%state (0,NofMyHomog))
|
do h = 1, size(homogenization_type)
|
||||||
|
if (homogenization_type(h) /= HOMOGENIZATION_ISOSTRAIN_ID) cycle
|
||||||
|
|
||||||
|
associate(prm => param(homogenization_typeInstance(h)),&
|
||||||
|
config => config_homogenization(h))
|
||||||
|
|
||||||
end associate
|
prm%Nconstituents = config_homogenization(h)%getInt('nconstituents')
|
||||||
|
tag = 'sum'
|
||||||
enddo
|
select case(trim(config%getString('mapping',defaultVal = tag)))
|
||||||
|
case ('sum')
|
||||||
|
prm%mapping = parallel_ID
|
||||||
|
case ('avg')
|
||||||
|
prm%mapping = average_ID
|
||||||
|
case default
|
||||||
|
call IO_error(211,ext_msg=trim(tag)//' ('//HOMOGENIZATION_isostrain_label//')')
|
||||||
|
end select
|
||||||
|
|
||||||
|
NofMyHomog = count(material_homogenizationAt == h)
|
||||||
|
homogState(h)%sizeState = 0
|
||||||
|
homogState(h)%sizePostResults = 0
|
||||||
|
allocate(homogState(h)%state0 (0,NofMyHomog))
|
||||||
|
allocate(homogState(h)%subState0(0,NofMyHomog))
|
||||||
|
allocate(homogState(h)%state (0,NofMyHomog))
|
||||||
|
|
||||||
|
end associate
|
||||||
|
|
||||||
|
enddo
|
||||||
|
|
||||||
end subroutine homogenization_isostrain_init
|
end subroutine homogenization_isostrain_init
|
||||||
|
|
||||||
|
@ -103,15 +101,15 @@ end subroutine homogenization_isostrain_init
|
||||||
!> @brief partitions the deformation gradient onto the constituents
|
!> @brief partitions the deformation gradient onto the constituents
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_isostrain_partitionDeformation(F,avgF)
|
subroutine homogenization_isostrain_partitionDeformation(F,avgF)
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pReal
|
pReal
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
real(pReal), dimension (:,:,:), intent(out) :: F !< partitioned deformation gradient
|
||||||
|
|
||||||
|
real(pReal), dimension (3,3), intent(in) :: avgF !< average deformation gradient at material point
|
||||||
|
|
||||||
implicit none
|
F = spread(avgF,3,size(F,3))
|
||||||
real(pReal), dimension (:,:,:), intent(out) :: F !< partitioned deformation gradient
|
|
||||||
|
|
||||||
real(pReal), dimension (3,3), intent(in) :: avgF !< average deformation gradient at material point
|
|
||||||
|
|
||||||
F = spread(avgF,3,size(F,3))
|
|
||||||
|
|
||||||
end subroutine homogenization_isostrain_partitionDeformation
|
end subroutine homogenization_isostrain_partitionDeformation
|
||||||
|
|
||||||
|
@ -120,29 +118,29 @@ end subroutine homogenization_isostrain_partitionDeformation
|
||||||
!> @brief derive average stress and stiffness from constituent quantities
|
!> @brief derive average stress and stiffness from constituent quantities
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_isostrain_averageStressAndItsTangent(avgP,dAvgPdAvgF,P,dPdF,instance)
|
subroutine homogenization_isostrain_averageStressAndItsTangent(avgP,dAvgPdAvgF,P,dPdF,instance)
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pReal
|
pReal
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
implicit none
|
real(pReal), dimension (:,:,:), intent(in) :: P !< partitioned stresses
|
||||||
real(pReal), dimension (3,3), intent(out) :: avgP !< average stress at material point
|
real(pReal), dimension (:,:,:,:,:), intent(in) :: dPdF !< partitioned stiffnesses
|
||||||
real(pReal), dimension (3,3,3,3), intent(out) :: dAvgPdAvgF !< average stiffness at material point
|
integer, intent(in) :: instance
|
||||||
|
|
||||||
real(pReal), dimension (:,:,:), intent(in) :: P !< partitioned stresses
|
|
||||||
real(pReal), dimension (:,:,:,:,:), intent(in) :: dPdF !< partitioned stiffnesses
|
|
||||||
integer, intent(in) :: instance
|
|
||||||
|
|
||||||
associate(prm => param(instance))
|
|
||||||
|
|
||||||
select case (prm%mapping)
|
associate(prm => param(instance))
|
||||||
case (parallel_ID)
|
|
||||||
avgP = sum(P,3)
|
select case (prm%mapping)
|
||||||
dAvgPdAvgF = sum(dPdF,5)
|
case (parallel_ID)
|
||||||
case (average_ID)
|
avgP = sum(P,3)
|
||||||
avgP = sum(P,3) /real(prm%Nconstituents,pReal)
|
dAvgPdAvgF = sum(dPdF,5)
|
||||||
dAvgPdAvgF = sum(dPdF,5)/real(prm%Nconstituents,pReal)
|
case (average_ID)
|
||||||
end select
|
avgP = sum(P,3) /real(prm%Nconstituents,pReal)
|
||||||
|
dAvgPdAvgF = sum(dPdF,5)/real(prm%Nconstituents,pReal)
|
||||||
end associate
|
end select
|
||||||
|
|
||||||
|
end associate
|
||||||
|
|
||||||
end subroutine homogenization_isostrain_averageStressAndItsTangent
|
end subroutine homogenization_isostrain_averageStressAndItsTangent
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue