doxygen comments for homogenization.f90, unified naming ip->i, el->e

This commit is contained in:
Martin Diehl 2013-01-29 10:28:01 +00:00
parent 97eb6d6f68
commit 08a2aa79f7
4 changed files with 424 additions and 349 deletions

View File

@ -143,7 +143,7 @@ program DAMASK_spectral_Driver
read(myUnit,'(a1024)',END = 100) line read(myUnit,'(a1024)',END = 100) line
if (IO_isBlank(line)) cycle ! skip empty lines if (IO_isBlank(line)) cycle ! skip empty lines
positions = IO_stringPos(line,maxNchunks) positions = IO_stringPos(line,maxNchunks)
do i = 1_pInt, maxNchunks, 1_pInt ! reading compulsory parameters for loadcase do i = 1_pInt, maxNchunks ! reading compulsory parameters for loadcase
select case (IO_lc(IO_stringValue(line,positions,i))) select case (IO_lc(IO_stringValue(line,positions,i)))
case('l','velocitygrad','velgrad','velocitygradient') case('l','velocitygrad','velgrad','velocitygradient')
N_l = N_l + 1_pInt N_l = N_l + 1_pInt
@ -374,7 +374,7 @@ program DAMASK_spectral_Driver
endif endif
timeinc = timeinc / 2.0_pReal**real(cutBackLevel,pReal) ! depending on cut back level, decrease time step timeinc = timeinc / 2.0_pReal**real(cutBackLevel,pReal) ! depending on cut back level, decrease time step
if(totalIncsCounter >= restartInc) then ! do calculations (otherwise just forwarding) forwarding: if(totalIncsCounter >= restartInc) then
stepFraction = 0_pInt stepFraction = 0_pInt
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! loop over sub incs ! loop over sub incs
@ -472,10 +472,10 @@ program DAMASK_spectral_Driver
restartWrite = .true. restartWrite = .true.
lastRestartWritten = inc lastRestartWritten = inc
endif endif
else !just time forwarding else forwarding
time = time + timeinc time = time + timeinc
guess = .true. guess = .true.
endif ! end calculation/forwarding endif forwarding
enddo incLooping enddo incLooping
enddo loadCaseLooping enddo loadCaseLooping

View File

@ -6,7 +6,7 @@
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH !> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Basic scheme solver !> @brief Basic scheme solver
!> @details this solver follows closely the original large strain formulation presented by !> @details this solver follows closely the original large strain formulation presented by
!> Suquet. The iterative procedure is solved using a fix-point iteration !> Suquet. The iterative procedure is solved using a fix-point iteration.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module DAMASK_spectral_SolverBasic module DAMASK_spectral_SolverBasic
use prec, only: & use prec, only: &

View File

@ -797,6 +797,7 @@ logical function IO_globalTagInPart(myFile,part,myTag)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief locate at most N space-separated parts in line return array containing number of parts !> @brief locate at most N space-separated parts in line return array containing number of parts
!> in line and the left/right positions of at most N to be used by IO_xxxVal !> in line and the left/right positions of at most N to be used by IO_xxxVal
!> IMPORTANT: first element contains number of chunks!
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
pure function IO_stringPos(line,N) pure function IO_stringPos(line,N)

View File

@ -25,43 +25,61 @@
!> @brief homogenization manager, organizing deformation partitioning and stress homogenization !> @brief homogenization manager, organizing deformation partitioning and stress homogenization
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module homogenization module homogenization
use prec, only: &
use prec, only: pInt,pReal,p_vec pInt, &
pReal, &
p_vec
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! General variables for the homogenization at a material point ! General variables for the homogenization at a material point
implicit none implicit none
type(p_vec), dimension(:,:), allocatable :: homogenization_state0, & !< pointer array to homogenization state at start of FE increment private
homogenization_subState0, & !< pointer array to homogenization state at start of homogenization increment type(p_vec), dimension(:,:), allocatable, public :: &
homogenization_state !< pointer array to current homogenization state (end of converged time step) homogenization_state0 !< pointer array to homogenization state at start of FE increment
integer(pInt), dimension(:,:), allocatable :: homogenization_sizeState, & !< size of state array per grain real(pReal), dimension(:,:), allocatable, public :: &
homogenization_sizePostResults !< size of postResults array per material point materialpoint_Temperature !< temperature at IP
real(pReal), dimension(:,:,:,:), allocatable, public :: &
real(pReal), dimension(:,:,:,:,:,:), allocatable :: materialpoint_dPdF !< tangent of first P--K stress at IP materialpoint_F0, & !< def grad of IP at start of FE increment
real(pReal), dimension(:,:,:,:), allocatable :: materialpoint_F0, & !< def grad of IP at start of FE increment
materialpoint_F, & !< def grad of IP to be reached at end of FE increment materialpoint_F, & !< def grad of IP to be reached at end of FE increment
materialpoint_subF0, & !< def grad of IP at beginning of homogenization increment
materialpoint_subF, & !< def grad of IP to be reached at end of homog inc
materialpoint_P !< first P--K stress of IP materialpoint_P !< first P--K stress of IP
real(pReal), dimension(:,:), allocatable :: materialpoint_Temperature, & !< temperature at IP real(pReal), dimension(:,:,:,:,:,:), allocatable, public :: &
materialpoint_dPdF !< tangent of first P--K stress at IP
real(pReal), dimension(:,:,:), allocatable, public :: &
materialpoint_results !< results array of material point
type(p_vec), dimension(:,:), allocatable, public, protected :: &
homogenization_state !< pointer array to current homogenization state (end of converged time step)
integer(pInt), dimension(:,:), allocatable, public, protected :: &
homogenization_sizeState !< size of state array per grain
integer(pInt), public, protected :: &
materialpoint_sizeResults, &
homogenization_maxSizePostResults
type(p_vec), dimension(:,:), allocatable, private :: &
homogenization_subState0 !< pointer array to homogenization state at start of homogenization increment
real(pReal), dimension(:,:,:,:), allocatable, private :: &
materialpoint_subF0, & !< def grad of IP at beginning of homogenization increment
materialpoint_subF !< def grad of IP to be reached at end of homog inc
real(pReal), dimension(:,:), allocatable, private :: &
materialpoint_subFrac, & materialpoint_subFrac, &
materialpoint_subStep, & materialpoint_subStep, &
materialpoint_subdt materialpoint_subdt
integer(pInt), dimension(:,:), allocatable, private :: &
real(pReal), dimension(:,:,:), allocatable :: materialpoint_results !< results array of material point homogenization_sizePostResults !< size of postResults array per material point
integer(pInt), private :: &
logical, dimension(:,:), allocatable :: materialpoint_requested, & homogenization_maxSizeState
logical, dimension(:,:), allocatable, private :: &
materialpoint_requested, &
materialpoint_converged materialpoint_converged
logical, dimension(:,:,:), allocatable :: materialpoint_doneAndHappy logical, dimension(:,:,:), allocatable, private :: &
integer(pInt) homogenization_maxSizeState, & materialpoint_doneAndHappy
homogenization_maxSizePostResults, &
materialpoint_sizeResults public :: &
!-------------------------------------------------------------------------------------------------- homogenization_init, &
! functions and subroutines in the module
public :: homogenization_init, &
materialpoint_stressAndItsTangent, & materialpoint_stressAndItsTangent, &
materialpoint_postResults materialpoint_postResults
private :: homogenization_partitionDeformation, & private :: &
homogenization_partitionDeformation, &
homogenization_updateState, & homogenization_updateState, &
homogenization_averageStressAndItsTangent, & homogenization_averageStressAndItsTangent, &
homogenization_averageTemperature, & homogenization_averageTemperature, &
@ -75,24 +93,39 @@ contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine homogenization_init(Temperature) subroutine homogenization_init(Temperature)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment) use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use math, only: math_I3 use math, only: &
use debug, only: debug_level, debug_homogenization, debug_levelBasic math_I3
use IO, only: IO_error, IO_open_file, IO_open_jobFile_stat, IO_write_jobFile, & use debug, only: &
debug_level, &
debug_homogenization, &
debug_levelBasic
use IO, only: &
IO_error, &
IO_open_file, &
IO_open_jobFile_stat, &
IO_write_jobFile, &
IO_write_jobBinaryIntFile IO_write_jobBinaryIntFile
use mesh, only: mesh_maxNips,mesh_NcpElems,mesh_element,FE_Nips,FE_geomtype use mesh, only: &
mesh_maxNips, &
mesh_NcpElems, &
mesh_element, &
FE_Nips, &
FE_geomtype
use constitutive, only: &
constitutive_maxSizePostResults
use crystallite, only: &
crystallite_maxSizePostResults
use material use material
use constitutive, only: constitutive_maxSizePostResults
use crystallite, only: crystallite_maxSizePostResults
use homogenization_isostrain use homogenization_isostrain
use homogenization_RGC use homogenization_RGC
implicit none implicit none
real(pReal) Temperature real(pReal) Temperature
integer(pInt), parameter :: fileunit = 200 integer(pInt), parameter :: fileunit = 200_pInt
integer(pInt) e,i,p,myInstance integer(pInt) e,i,p,myInstance
integer(pInt), dimension(:,:), pointer :: thisSize integer(pInt), dimension(:,:), pointer :: thisSize
character(len=64), dimension(:,:), pointer :: thisOutput character(len=64), dimension(:,:), pointer :: thisOutput
logical knownHomogenization logical :: knownHomogenization
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! parse homogenization from config file ! parse homogenization from config file
@ -168,16 +201,14 @@ subroutine homogenization_init(Temperature)
allocate(materialpoint_doneAndHappy(2,mesh_maxNips,mesh_NcpElems)) allocate(materialpoint_doneAndHappy(2,mesh_maxNips,mesh_NcpElems))
materialpoint_doneAndHappy = .true. materialpoint_doneAndHappy = .true.
forall (i = 1:mesh_maxNips,e = 1:mesh_NcpElems) materialpoint_F0 = spread(spread(math_I3,3,mesh_maxNips),4,mesh_NcpElems) ! initialize to identity
materialpoint_F0(1:3,1:3,i,e) = math_I3 materialpoint_F = materialpoint_F0
materialpoint_F(1:3,1:3,i,e) = math_I3
end forall
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! allocate and initialize global state and postrestuls variables ! allocate and initialize global state and postrestuls variables
do e = 1,mesh_NcpElems ! loop over elements elementLooping: do e = 1,mesh_NcpElems
myInstance = homogenization_typeInstance(mesh_element(3,e)) myInstance = homogenization_typeInstance(mesh_element(3,e))
do i = 1,FE_Nips(FE_geomtype(mesh_element(2,e))) ! loop over IPs IpLooping: do i = 1,FE_Nips(FE_geomtype(mesh_element(2,e)))
select case(homogenization_type(mesh_element(3,e))) select case(homogenization_type(mesh_element(3,e)))
case (homogenization_isostrain_label) case (homogenization_isostrain_label)
if (homogenization_isostrain_sizeState(myInstance) > 0_pInt) then if (homogenization_isostrain_sizeState(myInstance) > 0_pInt) then
@ -200,8 +231,8 @@ subroutine homogenization_init(Temperature)
case default case default
call IO_error(500_pInt,ext_msg=homogenization_type(mesh_element(3,e))) ! unknown homogenization call IO_error(500_pInt,ext_msg=homogenization_type(mesh_element(3,e))) ! unknown homogenization
end select end select
enddo enddo IpLooping
enddo enddo elementLooping
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! write state size file out ! write state size file out
@ -217,11 +248,8 @@ subroutine homogenization_init(Temperature)
+ 1 + constitutive_maxSizePostResults) ! constitutive size & constitutive results + 1 + constitutive_maxSizePostResults) ! constitutive size & constitutive results
allocate(materialpoint_results(materialpoint_sizeResults,mesh_maxNips,mesh_NcpElems)) allocate(materialpoint_results(materialpoint_sizeResults,mesh_maxNips,mesh_NcpElems))
write(6,'(/,a)') ' <<<+- homogenization init -+>>>'
!$OMP CRITICAL (write2out) write(6,'(a)') ' $Id$'
write(6,*)
write(6,*) '<<<+- homogenization init -+>>>'
write(6,*) '$Id$'
#include "compilation_info.f90" #include "compilation_info.f90"
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then
write(6,'(a32,1x,7(i8,1x))') 'homogenization_state0: ', shape(homogenization_state0) write(6,'(a32,1x,7(i8,1x))') 'homogenization_state0: ', shape(homogenization_state0)
@ -250,7 +278,6 @@ subroutine homogenization_init(Temperature)
write(6,'(a32,1x,7(i8,1x))') 'maxSizePostResults: ', homogenization_maxSizePostResults write(6,'(a32,1x,7(i8,1x))') 'maxSizePostResults: ', homogenization_maxSizePostResults
endif endif
flush(6) flush(6)
!$OMP END CRITICAL (write2out)
end subroutine homogenization_init end subroutine homogenization_init
@ -259,24 +286,30 @@ end subroutine homogenization_init
!> @brief parallelized calculation of stress and corresponding tangent at material points !> @brief parallelized calculation of stress and corresponding tangent at material points
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine materialpoint_stressAndItsTangent(updateJaco,dt) subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
use numerics, only: &
use numerics, only: subStepMinHomog, & subStepMinHomog, &
subStepSizeHomog, & subStepSizeHomog, &
stepIncreaseHomog, & stepIncreaseHomog, &
nHomog, & nHomog, &
nMPstate nMPstate
use math, only: math_transpose33 use math, only: &
use FEsolving, only: FEsolving_execElem, & math_transpose33
use FEsolving, only: &
FEsolving_execElem, &
FEsolving_execIP, & FEsolving_execIP, &
terminallyIll terminallyIll
use mesh, only: mesh_element, & use mesh, only: &
mesh_element, &
mesh_NcpElems, & mesh_NcpElems, &
mesh_maxNips mesh_maxNips
use material, only: homogenization_Ngrains use material, only: &
use constitutive, only: constitutive_state0, & homogenization_Ngrains
use constitutive, only: &
constitutive_state0, &
constitutive_partionedState0, & constitutive_partionedState0, &
constitutive_state constitutive_state
use crystallite, only: crystallite_Temperature, & use crystallite, only: &
crystallite_Temperature, &
crystallite_F0, & crystallite_F0, &
crystallite_Fp0, & crystallite_Fp0, &
crystallite_Fp, & crystallite_Fp, &
@ -298,7 +331,8 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
crystallite_converged, & crystallite_converged, &
crystallite_stressAndItsTangent, & crystallite_stressAndItsTangent, &
crystallite_orientations crystallite_orientations
use debug, only: debug_level, & use debug, only: &
debug_level, &
debug_homogenization, & debug_homogenization, &
debug_levelBasic, & debug_levelBasic, &
debug_levelSelective, & debug_levelSelective, &
@ -306,14 +340,20 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
debug_i, & debug_i, &
debug_MaterialpointLoopDistribution, & debug_MaterialpointLoopDistribution, &
debug_MaterialpointStateLoopDistribution debug_MaterialpointStateLoopDistribution
use math, only: math_pDecomposition use math, only: &
math_pDecomposition
implicit none implicit none
real(pReal), intent(in) :: dt !< time increment real(pReal), intent(in) :: dt !< time increment
logical, intent(in) :: updateJaco !< initiating Jacobian update logical, intent(in) :: updateJaco !< initiating Jacobian update
logical :: rate_sensitivity logical :: rate_sensitivity
integer(pInt) NiterationHomog,NiterationMPstate integer(pInt) :: &
integer(pInt) g,i,e,myNgrains NiterationHomog, &
NiterationMPstate, &
g, & !< grain number
i, & !< integration point number
e, & !< element number
myNgrains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! initialize to starting condition ! initialize to starting condition
@ -331,7 +371,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
endif endif
!--------------------------------------------------------------------------------------------------
! initialize restoration points of ... ! initialize restoration points of ...
do e = FEsolving_execElem(1),FEsolving_execElem(2) do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e)) myNgrains = homogenization_Ngrains(mesh_element(3,e))
@ -357,17 +397,15 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
NiterationHomog = 0_pInt NiterationHomog = 0_pInt
!-------------------------------------------------------------------------------------------------- cutBackLooping: do while (.not. terminallyIll .and. &
! cutback loop any(materialpoint_subStep(:,FEsolving_execELem(1):FEsolving_execElem(2)) > subStepMinHomog))
do while (.not. terminallyIll .and. &
any(materialpoint_subStep(:,FEsolving_execELem(1):FEsolving_execElem(2)) > subStepMinHomog)) ! cutback loop for material points
!$OMP PARALLEL DO PRIVATE(myNgrains) !$OMP PARALLEL DO PRIVATE(myNgrains)
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed elementLooping1: do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e)) myNgrains = homogenization_Ngrains(mesh_element(3,e))
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed IpLooping1: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
if ( materialpoint_converged(i,e) ) then converged: if ( materialpoint_converged(i,e) ) then
#ifndef _OPENMP #ifndef _OPENMP
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt & if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt &
.and. ((e == debug_e .and. i == debug_i) & .and. ((e == debug_e .and. i == debug_i) &
@ -378,6 +416,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
endif endif
#endif #endif
!--------------------------------------------------------------------------------------------------
! calculate new subStep and new subFrac ! calculate new subStep and new subFrac
materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e) materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e)
!$OMP FLUSH(materialpoint_subFrac) !$OMP FLUSH(materialpoint_subFrac)
@ -385,8 +424,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
stepIncreaseHomog*materialpoint_subStep(i,e)) ! introduce flexibility for step increase/acceleration stepIncreaseHomog*materialpoint_subStep(i,e)) ! introduce flexibility for step increase/acceleration
!$OMP FLUSH(materialpoint_subStep) !$OMP FLUSH(materialpoint_subStep)
! still stepping needed steppingNeeded: if (materialpoint_subStep(i,e) > subStepMinHomog) then
if (materialpoint_subStep(i,e) > subStepMinHomog) then
! wind forward grain starting point of... ! wind forward grain starting point of...
crystallite_partionedTemperature0(1:myNgrains,i,e) = crystallite_Temperature(1:myNgrains,i,e) ! ...temperatures crystallite_partionedTemperature0(1:myNgrains,i,e) = crystallite_Temperature(1:myNgrains,i,e) ! ...temperatures
@ -400,17 +438,16 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
homogenization_subState0(i,e)%p = homogenization_state(i,e)%p ! ...internal state of homog scheme homogenization_subState0(i,e)%p = homogenization_state(i,e)%p ! ...internal state of homog scheme
materialpoint_subF0(1:3,1:3,i,e) = materialpoint_subF(1:3,1:3,i,e) ! ...def grad materialpoint_subF0(1:3,1:3,i,e) = materialpoint_subF(1:3,1:3,i,e) ! ...def grad
!$OMP FLUSH(materialpoint_subF0) !$OMP FLUSH(materialpoint_subF0)
elseif (materialpoint_requested(i,e)) then ! this materialpoint just converged ! already at final time (??) elseif (materialpoint_requested(i,e)) then steppingNeeded ! already at final time (??)
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionHomog) !$OMP CRITICAL (distributionHomog)
debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = & debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = &
debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1 debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1
!$OMP END CRITICAL (distributionHomog) !$OMP END CRITICAL (distributionHomog)
endif endif
endif endif steppingNeeded
! materialpoint didn't converge, so we need a cutback here else converged
else
if ( (myNgrains == 1_pInt .and. materialpoint_subStep(i,e) <= 1.0 ) .or. & ! single grain already tried internal subStepping in crystallite if ( (myNgrains == 1_pInt .and. materialpoint_subStep(i,e) <= 1.0 ) .or. & ! single grain already tried internal subStepping in crystallite
subStepSizeHomog * materialpoint_subStep(i,e) <= subStepMinHomog ) then ! would require too small subStep subStepSizeHomog * materialpoint_subStep(i,e) <= subStepMinHomog ) then ! would require too small subStep
! cutback makes no sense ! cutback makes no sense
@ -437,6 +474,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
endif endif
#endif #endif
!--------------------------------------------------------------------------------------------------
! restore... ! restore...
crystallite_Temperature(1:myNgrains,i,e) = crystallite_partionedTemperature0(1:myNgrains,i,e) ! ...temperatures crystallite_Temperature(1:myNgrains,i,e) = crystallite_partionedTemperature0(1:myNgrains,i,e) ! ...temperatures
! ...initial def grad unchanged ! ...initial def grad unchanged
@ -448,42 +486,36 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
if (homogenization_sizeState(i,e) > 0_pInt) & if (homogenization_sizeState(i,e) > 0_pInt) &
homogenization_state(i,e)%p = homogenization_subState0(i,e)%p ! ...internal state of homog scheme homogenization_state(i,e)%p = homogenization_subState0(i,e)%p ! ...internal state of homog scheme
endif endif
endif endif converged
if (materialpoint_subStep(i,e) > subStepMinHomog) then if (materialpoint_subStep(i,e) > subStepMinHomog) then
materialpoint_requested(i,e) = .true. materialpoint_requested(i,e) = .true.
materialpoint_subF(1:3,1:3,i,e) = materialpoint_subF0(1:3,1:3,i,e) + & materialpoint_subF(1:3,1:3,i,e) = materialpoint_subF0(1:3,1:3,i,e) + &
materialpoint_subStep(i,e) * (materialpoint_F(1:3,1:3,i,e) - materialpoint_F0(1:3,1:3,i,e)) materialpoint_subStep(i,e) * (materialpoint_F(1:3,1:3,i,e) - materialpoint_F0(1:3,1:3,i,e))
materialpoint_subdt(i,e) = materialpoint_subStep(i,e) * dt materialpoint_subdt(i,e) = materialpoint_subStep(i,e) * dt
materialpoint_doneAndHappy(1:2,i,e) = (/.false.,.true./) materialpoint_doneAndHappy(1:2,i,e) = [.false.,.true.]
endif endif
enddo ! loop IPs enddo IpLooping1
enddo ! loop elements enddo elementLooping1
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
! ------ convergence loop material point homogenization ------
NiterationMPstate = 0_pInt NiterationMPstate = 0_pInt
do while (.not. terminallyIll .and. & convergenceLooping: do while (.not. terminallyIll .and. &
any( materialpoint_requested(:,FEsolving_execELem(1):FEsolving_execElem(2)) & any( materialpoint_requested(:,FEsolving_execELem(1):FEsolving_execElem(2)) &
.and. .not. materialpoint_doneAndHappy(1,:,FEsolving_execELem(1):FEsolving_execElem(2)) & .and. .not. materialpoint_doneAndHappy(1,:,FEsolving_execELem(1):FEsolving_execElem(2)) &
) .and. & ) .and. &
NiterationMPstate < nMPstate) ! convergence loop for materialpoint NiterationMPstate < nMPstate)
NiterationMPstate = NiterationMPstate + 1 NiterationMPstate = NiterationMPstate + 1
! --+>> deformation partitioning <<+-- !--------------------------------------------------------------------------------------------------
! ! deformation partitioning
! based on materialpoint_subF0,.._subF, ! based on materialpoint_subF0,.._subF,crystallite_partionedF0, and homogenization_state,
! crystallite_partionedF0,
! homogenization_state
! results in crystallite_partionedF ! results in crystallite_partionedF
!$OMP PARALLEL DO PRIVATE(myNgrains) !$OMP PARALLEL DO PRIVATE(myNgrains)
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed elementLooping2: do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e)) myNgrains = homogenization_Ngrains(mesh_element(3,e))
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed IpLooping2: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
if ( materialpoint_requested(i,e) .and. & ! process requested but... if ( materialpoint_requested(i,e) .and. & ! process requested but...
.not. materialpoint_doneAndHappy(1,i,e)) then ! ...not yet done material points .not. materialpoint_doneAndHappy(1,i,e)) then ! ...not yet done material points
call homogenization_partitionDeformation(i,e) ! partition deformation onto constituents call homogenization_partitionDeformation(i,e) ! partition deformation onto constituents
@ -492,28 +524,26 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
else else
crystallite_requested(1:myNgrains,i,e) = .false. ! calculation for constituents not required anymore crystallite_requested(1:myNgrains,i,e) = .false. ! calculation for constituents not required anymore
endif endif
enddo enddo IpLooping2
enddo enddo elementLooping2
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
!--------------------------------------------------------------------------------------------------
! --+>> crystallite integration <<+-- ! crystallite integration
!
! based on crystallite_partionedF0,.._partionedF ! based on crystallite_partionedF0,.._partionedF
! incrementing by crystallite_dt ! incrementing by crystallite_dt
rate_sensitivity = .false. ! request rate sensitive contribution to dPdF rate_sensitivity = .false. ! request rate sensitive contribution to dPdF
call crystallite_stressAndItsTangent(updateJaco,rate_sensitivity) ! request stress and tangent calculation for constituent grains call crystallite_stressAndItsTangent(updateJaco,rate_sensitivity) ! request stress and tangent calculation for constituent grains
!--------------------------------------------------------------------------------------------------
! --+>> state update <<+-- ! state update
!$OMP PARALLEL DO !$OMP PARALLEL DO
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed elementLooping3: do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed IpLooping3: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
if ( materialpoint_requested(i,e) .and. & if ( materialpoint_requested(i,e) .and. &
.not. materialpoint_doneAndHappy(1,i,e)) then .not. materialpoint_doneAndHappy(1,i,e)) then
if (.not. all(crystallite_converged(:,i,e))) then if (.not. all(crystallite_converged(:,i,e))) then
materialpoint_doneAndHappy(1:2,i,e) = (/.true.,.false./) materialpoint_doneAndHappy(1:2,i,e) = [.true.,.false.]
materialpoint_converged(i,e) = .false. materialpoint_converged(i,e) = .false.
else else
materialpoint_doneAndHappy(1:2,i,e) = homogenization_updateState(i,e) materialpoint_doneAndHappy(1:2,i,e) = homogenization_updateState(i,e)
@ -524,39 +554,36 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then
!$OMP CRITICAL (distributionMPState) !$OMP CRITICAL (distributionMPState)
debug_MaterialpointStateLoopdistribution(NiterationMPstate) = & debug_MaterialpointStateLoopdistribution(NiterationMPstate) = &
debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1 debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1_pInt
!$OMP END CRITICAL (distributionMPState) !$OMP END CRITICAL (distributionMPState)
endif endif
endif endif
endif endif
enddo enddo IpLooping3
enddo enddo elementLooping3
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
enddo ! homogenization convergence loop enddo convergenceLooping
NiterationHomog = NiterationHomog + 1_pInt NiterationHomog = NiterationHomog + 1_pInt
enddo ! cutback loop enddo cutBackLooping
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
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed elementLooping4: do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed IpLooping4: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
call homogenization_averageStressAndItsTangent(i,e) call homogenization_averageStressAndItsTangent(i,e)
call homogenization_averageTemperature(i,e) call homogenization_averageTemperature(i,e)
enddo; enddo enddo IpLooping4
enddo elementLooping4
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
else else
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write(6,*) write(6,'(/,a,/)') '<< HOMOG >> Material Point terminally ill'
write(6,'(a)') '<< HOMOG >> Material Point terminally ill'
write(6,*)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
endif endif
return
end subroutine materialpoint_stressAndItsTangent end subroutine materialpoint_stressAndItsTangent
@ -565,22 +592,37 @@ end subroutine materialpoint_stressAndItsTangent
!> @brief parallelized calculation of result array at material points !> @brief parallelized calculation of result array at material points
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine materialpoint_postResults(dt) subroutine materialpoint_postResults(dt)
use FEsolving, only: &
FEsolving_execElem, &
FEsolving_execIP
use mesh, only: &
mesh_element
use material, only: &
homogenization_Ngrains, &
microstructure_crystallite
use constitutive, only: &
constitutive_sizePostResults, &
constitutive_postResults
use crystallite, only: &
crystallite_sizePostResults, &
crystallite_postResults
use FEsolving, only: FEsolving_execElem, FEsolving_execIP
use mesh, only: mesh_element
use material, only: homogenization_Ngrains, microstructure_crystallite
use constitutive, only: constitutive_sizePostResults, constitutive_postResults
use crystallite, only: crystallite_sizePostResults, crystallite_postResults
implicit none implicit none
real(pReal), intent(in) :: dt real(pReal), intent(in) :: dt
integer(pInt) g,i,e,thePos,theSize,myNgrains,myCrystallite integer(pInt) :: &
thePos, &
theSize, &
myNgrains, &
myCrystallite, &
g, & !< grain number
i, & !< integration point number
e !< element number
!$OMP PARALLEL DO PRIVATE(myNgrains,myCrystallite,thePos,theSize) !$OMP PARALLEL DO PRIVATE(myNgrains,myCrystallite,thePos,theSize)
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed elementLooping: do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e)) myNgrains = homogenization_Ngrains(mesh_element(3,e))
myCrystallite = microstructure_crystallite(mesh_element(4,e)) myCrystallite = microstructure_crystallite(mesh_element(4,e))
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed IpLooping: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
thePos = 0_pInt thePos = 0_pInt
theSize = homogenization_sizePostResults(i,e) theSize = homogenization_sizePostResults(i,e)
@ -595,13 +637,13 @@ subroutine materialpoint_postResults(dt)
materialpoint_results(thePos+1,i,e) = real(myNgrains,pReal) ! tell number of grains at materialpoint materialpoint_results(thePos+1,i,e) = real(myNgrains,pReal) ! tell number of grains at materialpoint
thePos = thePos + 1_pInt thePos = thePos + 1_pInt
do g = 1,myNgrains ! loop over all grains grainLooping :do g = 1,myNgrains
theSize = (1 + crystallite_sizePostResults(myCrystallite)) + (1 + constitutive_sizePostResults(g,i,e)) theSize = (1 + crystallite_sizePostResults(myCrystallite)) + (1 + constitutive_sizePostResults(g,i,e))
materialpoint_results(thePos+1:thePos+theSize,i,e) = crystallite_postResults(dt,g,i,e) ! tell crystallite results materialpoint_results(thePos+1:thePos+theSize,i,e) = crystallite_postResults(dt,g,i,e) ! tell crystallite results
thePos = thePos + theSize thePos = thePos + theSize
enddo enddo grainLooping
enddo enddo IpLooping
enddo enddo elementLooping
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
end subroutine materialpoint_postResults end subroutine materialpoint_postResults
@ -610,38 +652,44 @@ end subroutine materialpoint_postResults
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief partition material point def grad onto constituents !> @brief partition material point def grad onto constituents
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine homogenization_partitionDeformation(ip,el) subroutine homogenization_partitionDeformation(i,e)
use mesh, only: &
use mesh, only: mesh_element mesh_element
use material, only: homogenization_type, homogenization_maxNgrains use material, only: &
use crystallite, only: crystallite_partionedF0,crystallite_partionedF homogenization_type, &
use homogenization_isostrain homogenization_maxNgrains
use homogenization_RGC use crystallite, only: &
crystallite_partionedF0, &
crystallite_partionedF
use homogenization_isostrain, only: &
homogenization_isostrain_label, &
homogenization_isostrain_partitionDeformation
use homogenization_RGC, only: &
homogenization_RGC_label, &
homogenization_RGC_partitionDeformation
implicit none implicit none
integer(pInt), intent(in) :: &
i, & !< integration point
e !< element number
integer(pInt), intent(in) :: ip, & !< integration point chosenHomogenization: select case(homogenization_type(mesh_element(3,e)))
el !< element case (homogenization_isostrain_label) chosenHomogenization
select case(homogenization_type(mesh_element(3,el)))
case (homogenization_isostrain_label)
!* isostrain
call homogenization_isostrain_partitionDeformation(& call homogenization_isostrain_partitionDeformation(&
crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,i,e), &
crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,ip,el),& crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,i,e),&
materialpoint_subF(1:3,1:3,ip,el),& materialpoint_subF(1:3,1:3,i,e),&
homogenization_state(ip,el), & homogenization_state(i,e), &
ip, & i, &
el) e)
!* RGC homogenization case (homogenization_RGC_label) chosenHomogenization
case (homogenization_RGC_label) call homogenization_RGC_partitionDeformation(crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,i,e), &
call homogenization_RGC_partitionDeformation(crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,i,e),&
crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,ip,el),& materialpoint_subF(1:3,1:3,i,e),&
materialpoint_subF(1:3,1:3,ip,el),& homogenization_state(i,e), &
homogenization_state(ip,el), & i, &
ip, & e)
el) end select chosenHomogenization
end select
end subroutine homogenization_partitionDeformation end subroutine homogenization_partitionDeformation
@ -650,42 +698,51 @@ end subroutine homogenization_partitionDeformation
!> @brief update the internal state of the homogenization scheme and tell whether "done" and !> @brief update the internal state of the homogenization scheme and tell whether "done" and
!> "happy" with result !> "happy" with result
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function homogenization_updateState(ip,el) function homogenization_updateState(i,e)
use mesh, only: mesh_element use mesh, only: &
use material, only: homogenization_type, homogenization_maxNgrains mesh_element
use crystallite, only: crystallite_P,crystallite_dPdF,crystallite_partionedF,crystallite_partionedF0 use material, only: &
homogenization_type, &
use homogenization_isostrain homogenization_maxNgrains
use homogenization_RGC use crystallite, only: &
crystallite_P, &
crystallite_dPdF, &
crystallite_partionedF,&
crystallite_partionedF0
use homogenization_isostrain, only: &
homogenization_isostrain_updateState, &
homogenization_isostrain_label
use homogenization_RGC, only: &
homogenization_RGC_updateState, &
homogenization_RGC_label
implicit none implicit none
integer(pInt), intent(in) :: ip, & !< integration point integer(pInt), intent(in) :: &
el !< element i, & !< integration point
e !< element number
logical, dimension(2) :: homogenization_updateState logical, dimension(2) :: homogenization_updateState
select case(homogenization_type(mesh_element(3,el))) chosenHomogenization: select case(homogenization_type(mesh_element(3,e)))
!* isostrain case (homogenization_isostrain_label) chosenHomogenization
case (homogenization_isostrain_label)
homogenization_updateState = & homogenization_updateState = &
homogenization_isostrain_updateState( homogenization_state(ip,el), & homogenization_isostrain_updateState( homogenization_state(i,e), &
crystallite_P(1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_P(1:3,1:3,1:homogenization_maxNgrains,i,e), &
crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,i,e), &
ip, & i, &
el) e)
!* RGC homogenization case (homogenization_RGC_label) chosenHomogenization
case (homogenization_RGC_label)
homogenization_updateState = & homogenization_updateState = &
homogenization_RGC_updateState( homogenization_state(ip,el), & homogenization_RGC_updateState( homogenization_state(i,e), &
homogenization_subState0(ip,el), & homogenization_subState0(i,e), &
crystallite_P(1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_P(1:3,1:3,1:homogenization_maxNgrains,i,e), &
crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,i,e), &
crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,ip,el),& crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,i,e),&
materialpoint_subF(1:3,1:3,ip,el),& materialpoint_subF(1:3,1:3,i,e),&
materialpoint_subdt(ip,el), & materialpoint_subdt(i,e), &
crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,ip,el), & crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,i,e), &
ip, & i, &
el) e)
end select end select chosenHomogenization
end function homogenization_updateState end function homogenization_updateState
@ -693,93 +750,110 @@ end function homogenization_updateState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief derive average stress and stiffness from constituent quantities !> @brief derive average stress and stiffness from constituent quantities
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine homogenization_averageStressAndItsTangent(ip,el) subroutine homogenization_averageStressAndItsTangent(i,e)
use mesh, only: mesh_element use mesh, only: &
use material, only: homogenization_type, homogenization_maxNgrains mesh_element
use crystallite, only: crystallite_P,crystallite_dPdF use material, only: &
homogenization_type, &
homogenization_maxNgrains
use crystallite, only: &
crystallite_P,crystallite_dPdF
use homogenization_isostrain, only: &
homogenization_isostrain_averageStressAndItsTangent, &
homogenization_isostrain_label
use homogenization_RGC, only: &
homogenization_RGC_averageStressAndItsTangent, &
homogenization_RGC_label
use homogenization_RGC
use homogenization_isostrain
implicit none implicit none
integer(pInt), intent(in) :: &
i, & !< integration point
e !< element number
integer(pInt), intent(in) :: ip, & !< integration point chosenHomogenization: select case(homogenization_type(mesh_element(3,e)))
el !< element case (homogenization_isostrain_label) chosenHomogenization
call homogenization_isostrain_averageStressAndItsTangent(materialpoint_P(1:3,1:3,i,e), &
select case(homogenization_type(mesh_element(3,el))) materialpoint_dPdF(1:3,1:3,1:3,1:3,i,e),&
!* isostrain crystallite_P(1:3,1:3,1:homogenization_maxNgrains,i,e), &
case (homogenization_isostrain_label) crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,i,e), &
call homogenization_isostrain_averageStressAndItsTangent(materialpoint_P(1:3,1:3,ip,el), & i, &
materialpoint_dPdF(1:3,1:3,1:3,1:3,ip,el),& e)
crystallite_P(1:3,1:3,1:homogenization_maxNgrains,ip,el), & case (homogenization_RGC_label) chosenHomogenization
crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,ip,el), & call homogenization_RGC_averageStressAndItsTangent( materialpoint_P(1:3,1:3,i,e), &
ip, & materialpoint_dPdF(1:3,1:3,1:3,1:3,i,e),&
el) crystallite_P(1:3,1:3,1:homogenization_maxNgrains,i,e), &
!* RGC homogenization crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,i,e), &
case (homogenization_RGC_label) i, &
call homogenization_RGC_averageStressAndItsTangent( materialpoint_P(1:3,1:3,ip,el), & e)
materialpoint_dPdF(1:3,1:3,1:3,1:3,ip,el),& end select chosenHomogenization
crystallite_P(1:3,1:3,1:homogenization_maxNgrains,ip,el), &
crystallite_dPdF(1:3,1:3,1:3,1:3,1:homogenization_maxNgrains,ip,el), &
ip, &
el)
end select
end subroutine homogenization_averageStressAndItsTangent end subroutine homogenization_averageStressAndItsTangent
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief derive average stress and stiffness from constituent quantities !> @brief derive average temperature from constituent quantities
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine homogenization_averageTemperature(ip,el) subroutine homogenization_averageTemperature(i,e)
use mesh, only: mesh_element use mesh, only: &
use material, only: homogenization_type, homogenization_maxNgrains mesh_element
use crystallite, only: crystallite_Temperature use material, only: &
homogenization_type, &
homogenization_maxNgrains
use crystallite, only: &
crystallite_Temperature
use homogenization_isostrain, only: &
homogenization_isostrain_averageTemperature, &
homogenization_isostrain_label
use homogenization_RGC, only: &
homogenization_RGC_averageTemperature, &
homogenization_RGC_label
use homogenization_isostrain
use homogenization_RGC
implicit none implicit none
integer(pInt), intent(in) :: &
i, & !< integration point
e !< element number
integer(pInt), intent(in) :: ip, & !< integration point chosenHomogenization: select case(homogenization_type(mesh_element(3,e)))
el !< element case (homogenization_isostrain_label) chosenHomogenization
materialpoint_Temperature(i,e) = &
select case(homogenization_type(mesh_element(3,el))) homogenization_isostrain_averageTemperature(crystallite_Temperature(1:homogenization_maxNgrains,i,e), i, e)
!* isostrain case (homogenization_RGC_label) chosenHomogenization
case (homogenization_isostrain_label) materialpoint_Temperature(i,e) = &
materialpoint_Temperature(ip,el) = & homogenization_RGC_averageTemperature(crystallite_Temperature(1:homogenization_maxNgrains,i,e), i, e)
homogenization_isostrain_averageTemperature(crystallite_Temperature(1:homogenization_maxNgrains,ip,el), ip, el) end select chosenHomogenization
!* RGC homogenization
case (homogenization_RGC_label)
materialpoint_Temperature(ip,el) = &
homogenization_RGC_averageTemperature(crystallite_Temperature(1:homogenization_maxNgrains,ip,el), ip, el)
end select
end subroutine homogenization_averageTemperature end subroutine homogenization_averageTemperature
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of homogenization results for post file inclusion. call only, !> @brief return array of homogenization results for post file inclusion. call only,
!> if homogenization_sizePostResults(ip,el) > 0 !! !> if homogenization_sizePostResults(i,e) > 0 !!
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function homogenization_postResults(ip,el) function homogenization_postResults(i,e)
use mesh, only: mesh_element use mesh, only: &
use material, only: homogenization_type mesh_element
use homogenization_isostrain use material, only: &
use homogenization_RGC homogenization_type
use homogenization_isostrain, only: &
homogenization_isostrain_postResults, &
homogenization_isostrain_label
use homogenization_RGC, only: &
homogenization_RGC_postResults, &
homogenization_RGC_label
implicit none implicit none
integer(pInt), intent(in) :: ip, & !< integration point integer(pInt), intent(in) :: &
el !< element i, & !< integration point
real(pReal), dimension(homogenization_sizePostResults(ip,el)) :: homogenization_postResults e !< element number
real(pReal), dimension(homogenization_sizePostResults(i,e)) :: homogenization_postResults
homogenization_postResults = 0.0_pReal homogenization_postResults = 0.0_pReal
select case (homogenization_type(mesh_element(3,el))) chosenHomogenization: select case (homogenization_type(mesh_element(3,e)))
!* isostrain case (homogenization_isostrain_label) chosenHomogenization
case (homogenization_isostrain_label) homogenization_postResults = homogenization_isostrain_postResults(homogenization_state(i,e),i,e)
homogenization_postResults = homogenization_isostrain_postResults(homogenization_state(ip,el),ip,el) case (homogenization_RGC_label) chosenHomogenization
!* RGC homogenization homogenization_postResults = homogenization_RGC_postResults(homogenization_state(i,e),i,e)
case (homogenization_RGC_label) end select chosenHomogenization
homogenization_postResults = homogenization_RGC_postResults(homogenization_state(ip,el),ip,el)
end select
end function homogenization_postResults end function homogenization_postResults