do initialization later

This commit is contained in:
Martin Diehl 2020-12-15 14:01:39 +01:00
parent 872ceac855
commit d7f035235c
3 changed files with 29 additions and 17 deletions

View File

@ -93,6 +93,7 @@ subroutine CPFEM_initAll
call homogenization_init call homogenization_init
call CPFEM_init call CPFEM_init
call config_deallocate call config_deallocate
call crystallite_setInitialValues ! ToDo: MD More general approach needed
end subroutine CPFEM_initAll end subroutine CPFEM_initAll

View File

@ -67,6 +67,7 @@ subroutine CPFEM_initAll
call homogenization_init call homogenization_init
call CPFEM_init call CPFEM_init
call config_deallocate call config_deallocate
call crystallite_setInitialValues ! ToDo: MD More general approach needed
end subroutine CPFEM_initAll end subroutine CPFEM_initAll

View File

@ -115,6 +115,7 @@ module crystallite
public :: & public :: &
crystallite_init, & crystallite_init, &
crystallite_setInitialValues, &
crystallite_stress, & crystallite_stress, &
crystallite_stressTangent, & crystallite_stressTangent, &
crystallite_orientations, & crystallite_orientations, &
@ -136,9 +137,7 @@ contains
subroutine crystallite_init subroutine crystallite_init
integer :: & integer :: &
c, & !< counter in integration point component loop p, &
i, & !< counter in integration point loop
e, & !< counter in element loop
cMax, & !< maximum number of integration point components cMax, & !< maximum number of integration point components
iMax, & !< maximum number of integration points iMax, & !< maximum number of integration points
eMax !< maximum number of elements eMax !< maximum number of elements
@ -237,19 +236,38 @@ subroutine crystallite_init
phases => config_material%get('phase') phases => config_material%get('phase')
allocate(output_constituent(phases%length)) allocate(output_constituent(phases%length))
do c = 1, phases%length do p = 1, phases%length
phase => phases%get(c) phase => phases%get(p)
mech => phase%get('mechanics',defaultVal = emptyDict) mech => phase%get('mechanics',defaultVal = emptyDict)
#if defined(__GFORTRAN__) #if defined(__GFORTRAN__)
output_constituent(c)%label = output_asStrings(mech) output_constituent(p)%label = output_asStrings(mech)
#else #else
output_constituent(c)%label = mech%get_asStrings('output',defaultVal=emptyStringArray) output_constituent(p)%label = mech%get_asStrings('output',defaultVal=emptyStringArray)
#endif #endif
enddo enddo
#ifdef DEBUG
if (debugCrystallite%basic) then
print'(a42,1x,i10)', ' # of elements: ', eMax
print'(a42,1x,i10)', ' # of integration points/element: ', iMax
print'(a42,1x,i10)', 'max # of constituents/integration point: ', cMax
flush(IO_STDOUT)
endif
#endif
end subroutine crystallite_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! initialize !> @brief Set initial values
!--------------------------------------------------------------------------------------------------
subroutine crystallite_setInitialValues
integer :: &
c, & !< counter in integration point component loop
i, & !< counter in integration point loop
e !< counter in element loop
!$OMP PARALLEL DO PRIVATE(i,c) !$OMP PARALLEL DO PRIVATE(i,c)
do e = FEsolving_execElem(1),FEsolving_execElem(2) do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1), FEsolving_execIP(2); do c = 1, homogenization_Nconstituents(material_homogenizationAt(e)) do i = FEsolving_execIP(1), FEsolving_execIP(2); do c = 1, homogenization_Nconstituents(material_homogenizationAt(e))
@ -287,16 +305,8 @@ subroutine crystallite_init
enddo enddo
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
#ifdef DEBUG
if (debugCrystallite%basic) then
print'(a42,1x,i10)', ' # of elements: ', eMax
print'(a42,1x,i10)', ' # of integration points/element: ', iMax
print'(a42,1x,i10)', 'max # of constituents/integration point: ', cMax
flush(IO_STDOUT)
endif
#endif
end subroutine crystallite_init end subroutine crystallite_setInitialValues
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------