no silent crash

This commit is contained in:
Martin Diehl 2020-07-13 21:13:53 +02:00
parent 3150673f2d
commit 8de3b67c26
4 changed files with 9 additions and 1 deletions

View File

@ -529,6 +529,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'unknown material parameter:'
case (211)
msg = 'material parameter out of bounds:'
case (212)
msg = 'nonlocal model not supported'
!--------------------------------------------------------------------------------------------------
! numerics error messages

View File

@ -387,6 +387,10 @@ module subroutine plastic_nonlocal_init
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
plasticState(p)%nonlocal = config%KeyExists('/nonlocal/')
if(plasticState(p)%nonlocal .and. .not. allocated(geometry_plastic_nonlocal_IPneighborhood)) &
call IO_error(212,ext_msg='IPneighborhood does not exist')
plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention
st0%rho => plasticState(p)%state0 (0*prm%sum_N_sl+1:10*prm%sum_N_sl,:)

View File

@ -118,6 +118,7 @@ subroutine discretization_grid_init(restart)
call results_addAttribute('origin',origin, 'geometry')
call results_closeJobFile
endif
!--------------------------------------------------------------------------------------------------
! geometry information required by the nonlocal CP model
call geometry_plastic_nonlocal_setIPvolume(reshape([(product(mySize/real(myGrid,pReal)),j=1,product(myGrid))], &

View File

@ -119,6 +119,7 @@ subroutine discretization_marc_init
unscaledNormals = IPareaNormal(elem,nElems,connectivity_cell,node0_cell)
call geometry_plastic_nonlocal_setIParea(norm2(unscaledNormals,1))
call geometry_plastic_nonlocal_setIPareaNormal(unscaledNormals/spread(norm2(unscaledNormals,1),1,3))
!call geometry_plastic_nonlocal_setIPneighborhood ToDo: Support nonlocal
call geometry_plastic_nonlocal_results
end subroutine discretization_marc_init