diff --git a/PRIVATE b/PRIVATE index 89eb15f1d..08e226ec7 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 89eb15f1d771279be8ff444202c32b6797e77bd7 +Subproject commit 08e226ec735589123dd67f3e0a5bc447c3dda812 diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 3930e0002..fda9d7b9a 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -168,7 +168,7 @@ program DAMASK_grid !-------------------------------------------------------------------------------------------------- ! initialize field solver information if (solver%get_asString('thermal',defaultVal = 'n/a') == 'spectral') nActiveFields = nActiveFields + 1 - if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1 + if (solver%get_asString('damage', defaultVal = 'n/a') == 'spectral') nActiveFields = nActiveFields + 1 allocate(solres(nActiveFields)) allocate(ID(nActiveFields)) @@ -178,7 +178,7 @@ program DAMASK_grid field = field + 1 ID(field) = FIELD_THERMAL_ID endif thermalActive - damageActive: if (any(damage_type == DAMAGE_nonlocal_ID)) then + damageActive: if (solver%get_asString('damage',defaultVal = 'n/a') == 'spectral') then field = field + 1 ID(field) = FIELD_DAMAGE_ID endif damageActive diff --git a/src/homogenization.f90 b/src/homogenization.f90 index d5fdbd5cb..4c7200eed 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -37,7 +37,7 @@ module homogenization integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable :: & thermal_type !< thermal transport model - integer(kind(DAMAGE_none_ID)), dimension(:), allocatable, public, protected :: & + integer(kind(DAMAGE_none_ID)), dimension(:), allocatable :: & damage_type !< nonlocal damage model integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable :: & homogenization_type !< type of each homogenization @@ -582,9 +582,7 @@ subroutine material_parseHomogenization if(homog%contains('damage')) then homogDamage => homog%get('damage') select case (homogDamage%get_asString('type')) - case('none') - damage_type(h) = DAMAGE_none_ID - case('nonlocal') + case('pass') damage_type(h) = DAMAGE_nonlocal_ID case default call IO_error(500,ext_msg=homogDamage%get_asString('type')) diff --git a/src/material.f90 b/src/material.f90 index c7d24b6f0..aecfaa1dd 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -17,7 +17,7 @@ module material private integer, dimension(:), allocatable, public, protected :: & - homogenization_Nconstituents !< number of grains in each homogenization + homogenization_Nconstituents !< number of grains in each homogenization character(len=:), public, protected, allocatable, dimension(:) :: & material_name_phase, & !< name of each phase @@ -30,7 +30,7 @@ module material material_homogenizationAt, & !< homogenization ID of each element material_homogenizationAt2, & !< per cell material_homogenizationMemberAt2 !< cell - integer, dimension(:,:), allocatable, public, protected :: & ! (ip,elem) + integer, dimension(:,:), allocatable :: & ! (ip,elem) material_homogenizationMemberAt !< position of the element within its homogenization instance integer, dimension(:,:), allocatable, public, protected :: & ! (constituent,elem) material_phaseAt, & !< phase ID of each element diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index 601618425..464e57339 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -1822,16 +1822,13 @@ subroutine storeGeometry(ph) integer, intent(in) :: ph integer :: ip, el, ce, co + real(pReal), dimension(:), allocatable :: V + - ce = 0 - do el = 1, size(material_homogenizationMemberAt,2) - do ip = 1, size(material_homogenizationMemberAt,1) - ce = ce + 1 - do co = 1, homogenization_maxNconstituents - if(material_phaseAt2(co,ce) == ph) then - geom(ph)%V_0(material_phaseMemberAt2(co,ce)) = IPvolume(ip,el) - endif - enddo + V = reshape(IPvolume,[product(shape(IPvolume))]) + do ce = 1, size(material_homogenizationMemberAt2,1) + do co = 1, homogenization_maxNconstituents + if(material_phaseAt2(co,ce) == ph) geom(ph)%V_0(material_phaseMemberAt2(co,ce)) = V(ce) enddo enddo