sanity checks
This commit is contained in:
parent
1e2df54bb0
commit
e455dd4b9a
|
@ -138,6 +138,11 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS
|
||||||
num_commercialFEM => numerics_root%get('commercialFEM',defaultVal=emptyDict)
|
num_commercialFEM => numerics_root%get('commercialFEM',defaultVal=emptyDict)
|
||||||
iJacoStiffness = num_commercialFEM%get_asInt('ijacostiffness',defaultVal=1)
|
iJacoStiffness = num_commercialFEM%get_asInt('ijacostiffness',defaultVal=1)
|
||||||
|
|
||||||
|
!----------------------------------------------------------------------
|
||||||
|
! sanity check
|
||||||
|
if (iJacoStiffness < 1) call IO_error(301,ext_msg='iJacoStiffness')
|
||||||
|
!----------------------------------------------------------------------
|
||||||
|
|
||||||
elCP = mesh_FEM2DAMASK_elem(elFE)
|
elCP = mesh_FEM2DAMASK_elem(elFE)
|
||||||
|
|
||||||
if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0_pInt &
|
if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0_pInt &
|
||||||
|
|
|
@ -7,6 +7,7 @@ module damage_nonlocal
|
||||||
use material
|
use material
|
||||||
use config
|
use config
|
||||||
use numerics
|
use numerics
|
||||||
|
use YAML_types
|
||||||
use crystallite
|
use crystallite
|
||||||
use lattice
|
use lattice
|
||||||
use source_damage_isoBrittle
|
use source_damage_isoBrittle
|
||||||
|
@ -138,6 +139,13 @@ function damage_nonlocal_getDiffusion(ip,el)
|
||||||
integer :: &
|
integer :: &
|
||||||
homog, &
|
homog, &
|
||||||
grain
|
grain
|
||||||
|
real(pReal) :: &
|
||||||
|
charLength !< characteristic length scale for gradient problems
|
||||||
|
class(tNode), pointer :: &
|
||||||
|
num_generic
|
||||||
|
|
||||||
|
num_generic => numerics_root%get('generic',defaultVal= emptyDict)
|
||||||
|
charLength = num_generic%get_asFloat('charLength',defaultVal=1.0_pReal)
|
||||||
|
|
||||||
homog = material_homogenizationAt(el)
|
homog = material_homogenizationAt(el)
|
||||||
damage_nonlocal_getDiffusion = 0.0_pReal
|
damage_nonlocal_getDiffusion = 0.0_pReal
|
||||||
|
|
|
@ -108,7 +108,7 @@ subroutine grid_mech_spectral_basic_init
|
||||||
write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
|
||||||
num_grid => numerics_root%get('grid',defaultVal=emptyDict)
|
num_grid => numerics_root%get('grid',defaultVal=emptyDict)
|
||||||
num%update_gamma = num_grid%get_asInt('update_gamma',defaultVal=0) > 0 !ToDo: Make boolean
|
num%update_gamma = num_grid%get_asBool('update_gamma',defaultVal=.false.)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set default and user defined options for PETSc
|
! set default and user defined options for PETSc
|
||||||
|
|
|
@ -114,7 +114,7 @@ subroutine grid_mech_spectral_polarisation_init
|
||||||
write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
|
||||||
num_grid => numerics_root%get('grid',defaultVal=emptyDict)
|
num_grid => numerics_root%get('grid',defaultVal=emptyDict)
|
||||||
num%update_gamma = num_grid%get_asInt('update_gamma',defaultVal=0) > 0
|
num%update_gamma = num_grid%get_asBool('update_gamma',defaultVal=.false.)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set default and user defined options for PETSc
|
! set default and user defined options for PETSc
|
||||||
|
@ -517,6 +517,12 @@ subroutine formResidual(in, FandF_tau, &
|
||||||
polarAlpha = num_grid%get_asFloat('polaralpha',defaultVal=1.0_pReal)
|
polarAlpha = num_grid%get_asFloat('polaralpha',defaultVal=1.0_pReal)
|
||||||
polarBeta = num_grid%get_asFloat('polarbeta', defaultVal=1.0_pReal)
|
polarBeta = num_grid%get_asFloat('polarbeta', defaultVal=1.0_pReal)
|
||||||
|
|
||||||
|
!-----------------------------------------------------------------------------------------------
|
||||||
|
! sanity checks
|
||||||
|
if (polarAlpha <= 0.0_pReal .or. polarAlpha > 2.0_pReal) call IO_error(301,ext_msg='polarAlpha')
|
||||||
|
if (polarBeta < 0.0_pReal .or. polarBeta > 2.0_pReal) call IO_error(301,ext_msg='polarBeta')
|
||||||
|
!------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
F => FandF_tau(1:3,1:3,1,&
|
F => FandF_tau(1:3,1:3,1,&
|
||||||
XG_RANGE,YG_RANGE,ZG_RANGE)
|
XG_RANGE,YG_RANGE,ZG_RANGE)
|
||||||
F_tau => FandF_tau(1:3,1:3,2,&
|
F_tau => FandF_tau(1:3,1:3,2,&
|
||||||
|
|
|
@ -27,7 +27,6 @@ module numerics
|
||||||
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
||||||
real(pReal), protected, public :: &
|
real(pReal), protected, public :: &
|
||||||
numerics_unitlength = 1.0_pReal, & !< determines the physical length of one computational length unit
|
numerics_unitlength = 1.0_pReal, & !< determines the physical length of one computational length unit
|
||||||
charLength = 1.0_pReal, & !< characteristic length scale for gradient problems
|
|
||||||
residualStiffness = 1.0e-6_pReal !< non-zero residual damage
|
residualStiffness = 1.0e-6_pReal !< non-zero residual damage
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -63,7 +62,7 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine numerics_init
|
subroutine numerics_init
|
||||||
!$ integer :: gotDAMASK_NUM_THREADS = 1
|
!$ integer :: gotDAMASK_NUM_THREADS = 1
|
||||||
integer :: i,j, ierr
|
integer :: i, ierr
|
||||||
character(len=:), allocatable :: &
|
character(len=:), allocatable :: &
|
||||||
numerics_input, &
|
numerics_input, &
|
||||||
numerics_inFlow, &
|
numerics_inFlow, &
|
||||||
|
@ -129,8 +128,6 @@ subroutine numerics_init
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! gradient parameter
|
! gradient parameter
|
||||||
case ('charLength')
|
|
||||||
charLength = num_generic%get_asFloat(key)
|
|
||||||
case ('residualStiffness')
|
case ('residualStiffness')
|
||||||
residualStiffness = num_generic%get_asFloat(key)
|
residualStiffness = num_generic%get_asFloat(key)
|
||||||
endselect
|
endselect
|
||||||
|
@ -147,7 +144,6 @@ subroutine numerics_init
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! gradient parameter
|
! gradient parameter
|
||||||
write(6,'(a24,1x,es8.1)') ' charLength: ',charLength
|
|
||||||
write(6,'(a24,1x,es8.1)') ' residualStiffness: ',residualStiffness
|
write(6,'(a24,1x,es8.1)') ' residualStiffness: ',residualStiffness
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue