cleaning: comments added
This commit is contained in:
parent
f6355d199a
commit
d4d29ff376
|
@ -126,7 +126,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS
|
|||
|
||||
integer(pInt) elCP, & ! crystal plasticity element number
|
||||
i, j, k, l, m, n, ph, homog, mySource, &
|
||||
iJacoStiffness
|
||||
iJacoStiffness !< frequency of stiffness update
|
||||
logical updateJaco ! flag indicating if Jacobian has to be updated
|
||||
|
||||
real(pReal), parameter :: ODD_STRESS = 1e15_pReal, & !< return value for stress if terminallyIll
|
||||
|
@ -134,14 +134,13 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS
|
|||
|
||||
class(tNode), pointer :: &
|
||||
num_commercialFEM
|
||||
|
||||
|
||||
!------------------------------------------------------------------------------
|
||||
! read numerical parameters and do sanity check
|
||||
num_commercialFEM => numerics_root%get('commercialFEM',defaultVal=emptyDict)
|
||||
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)
|
||||
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
module damage_local
|
||||
use prec
|
||||
use IO
|
||||
use material
|
||||
use config
|
||||
use numerics
|
||||
use YAML_types
|
||||
use source_damage_isoBrittle
|
||||
use source_damage_isoDuctile
|
||||
use source_damage_anisoBrittle
|
||||
|
@ -83,8 +85,15 @@ function damage_local_updateState(subdt, ip, el)
|
|||
homog, &
|
||||
offset
|
||||
real(pReal) :: &
|
||||
phi, phiDot, dPhiDot_dPhi
|
||||
phi, phiDot, dPhiDot_dPhi, &
|
||||
residualStiffness !< non-zero residual damage
|
||||
class(tNode), pointer :: &
|
||||
num_generic
|
||||
|
||||
num_generic => numerics_root%get('generic',defaultVal=emptyDict)
|
||||
residualStiffness = num_generic%get_asFloat('residualStiffness', defaultVal=1.0e-6_pReal)
|
||||
if (residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness')
|
||||
|
||||
homog = material_homogenizationAt(el)
|
||||
offset = material_homogenizationMemberAt(ip,el)
|
||||
phi = damageState(homog)%subState0(1,offset)
|
||||
|
|
|
@ -11,10 +11,12 @@ module grid_damage_spectral
|
|||
use PETScsnes
|
||||
|
||||
use prec
|
||||
use IO
|
||||
use spectral_utilities
|
||||
use discretization_grid
|
||||
use damage_nonlocal
|
||||
use numerics
|
||||
use YAML_types
|
||||
|
||||
implicit none
|
||||
private
|
||||
|
@ -236,8 +238,15 @@ subroutine formResidual(in,x_scal,f_scal,dummy,ierr)
|
|||
PetscObject :: dummy
|
||||
PetscErrorCode :: ierr
|
||||
integer :: i, j, k, cell
|
||||
real(pReal) :: phiDot, dPhiDot_dPhi, mobility
|
||||
|
||||
real(pReal) :: phiDot, dPhiDot_dPhi, mobility, &
|
||||
residualStiffness !< non-zero residual damage
|
||||
class(tNode), pointer :: &
|
||||
num_generic
|
||||
|
||||
num_generic => numerics_root%get('generic',defaultVal=emptyDict)
|
||||
residualStiffness = num_generic%get_asFloat('residualStiffness', defaultVal=1.0e-6_pReal)
|
||||
if (residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness')
|
||||
|
||||
phi_current = x_scal
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! evaluate polarization field
|
||||
|
|
|
@ -508,8 +508,8 @@ subroutine formResidual(in, FandF_tau, &
|
|||
class(tNode), pointer :: &
|
||||
num_grid
|
||||
real(pReal) :: &
|
||||
polarAlpha, &
|
||||
polarBeta
|
||||
polarAlpha, & !< polarization scheme parameter 0.0 < alpha < 2.0. alpha = 1.0 ==> AL scheme, alpha = 2.0 ==> accelerated scheme
|
||||
polarBeta !< polarization scheme parameter 0.0 < beta < 2.0. beta = 1.0 ==> AL scheme, beta = 2.0 ==> accelerated scheme
|
||||
integer :: &
|
||||
i, j, k, e
|
||||
|
||||
|
|
|
@ -90,7 +90,9 @@ contains
|
|||
subroutine math_init
|
||||
|
||||
real(pReal), dimension(4) :: randTest
|
||||
integer :: randSize,randomSeed
|
||||
integer :: &
|
||||
randSize, &
|
||||
randomSeed !< fixed seeding for pseudo-random number generator, Default 0: use random seed
|
||||
integer, dimension(:), allocatable :: randInit
|
||||
class(tNode), pointer :: &
|
||||
num_generic
|
||||
|
|
|
@ -104,7 +104,7 @@ subroutine utilities_init
|
|||
character(len=pStringLen) :: petsc_optionsOrder
|
||||
class(tNode), pointer :: &
|
||||
numerics_mesh
|
||||
integer :: structOrder
|
||||
integer :: structOrder !< order of displacement shape functions
|
||||
|
||||
PetscErrorCode :: ierr
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ subroutine discretization_mesh_init(restart)
|
|||
|
||||
class(tNode), pointer :: &
|
||||
numerics_mesh
|
||||
integer :: integrationOrder
|
||||
integer :: integrationOrder !< order of quadrature rule required
|
||||
|
||||
numerics_mesh => numerics_root%get('mesh',defaultVal=emptyDict)
|
||||
integrationOrder = numerics_mesh%get_asInt('integrationorder',defaultVal = 2)
|
||||
|
|
|
@ -97,7 +97,7 @@ subroutine FEM_mech_init(fieldBC)
|
|||
|
||||
class(tNode), pointer :: &
|
||||
numerics_mesh
|
||||
integer :: integrationOrder
|
||||
integer :: integrationOrder !< order of quadrature rule required
|
||||
|
||||
write(6,'(/,a)') ' <<<+- FEM_mech init -+>>>'; flush(6)
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ module numerics
|
|||
worldsize = 1 !< MPI worldsize (/=1 for MPI simulations only)
|
||||
integer(4), protected, public :: &
|
||||
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
||||
real(pReal), protected, public :: &
|
||||
residualStiffness = 1.0e-6_pReal !< non-zero residual damage
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! field parameters:
|
||||
|
@ -65,8 +63,7 @@ subroutine numerics_init
|
|||
numerics_inFlow, &
|
||||
key
|
||||
class (tNode), pointer :: &
|
||||
num_grid, &
|
||||
num_generic
|
||||
num_grid
|
||||
logical :: fexist
|
||||
!$ character(len=6) DAMASK_NumThreadsString ! environment variable DAMASK_NUM_THREADS
|
||||
|
||||
|
@ -111,25 +108,11 @@ subroutine numerics_init
|
|||
#endif
|
||||
endselect
|
||||
enddo
|
||||
|
||||
num_generic => numerics_root%get('generic',defaultVal=emptyDict)
|
||||
do i=1,num_generic%length
|
||||
key = num_generic%getKey(i)
|
||||
select case(key)
|
||||
case ('residualStiffness')
|
||||
residualStiffness = num_generic%get_asFloat(key)
|
||||
endselect
|
||||
enddo
|
||||
|
||||
else fileExists
|
||||
write(6,'(a,/)') ' using standard values'
|
||||
flush(6)
|
||||
endif fileExists
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! gradient parameter
|
||||
write(6,'(a24,1x,es8.1)') ' residualStiffness: ',residualStiffness
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! openMP parameter
|
||||
!$ write(6,'(a24,1x,i8,/)') ' number of threads: ',DAMASK_NumThreadsInt
|
||||
|
@ -146,7 +129,6 @@ subroutine numerics_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! sanity checks
|
||||
if (residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness')
|
||||
if (itmax <= 1) call IO_error(301,ext_msg='itmax')
|
||||
if (itmin > itmax .or. itmin < 1) call IO_error(301,ext_msg='itmin')
|
||||
|
||||
|
|
Loading…
Reference in New Issue