2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Managing of parameters related to numerics
!--------------------------------------------------------------------------------------------------
2012-03-07 15:37:29 +05:30
module numerics
2013-01-10 03:49:32 +05:30
use prec , only : &
pInt , &
pReal
2009-06-15 18:41:21 +05:30
2013-01-10 03:49:32 +05:30
implicit none
private
character ( len = 64 ) , parameter , private :: &
2013-03-28 15:32:11 +05:30
numerics_CONFIGFILE = 'numerics.config' !< name of configuration file
2009-06-15 18:41:21 +05:30
2013-01-10 03:49:32 +05:30
integer ( pInt ) , protected , public :: &
2013-03-28 15:32:11 +05:30
iJacoStiffness = 1_pInt , & !< frequency of stiffness update
iJacoLpresiduum = 1_pInt , & !< frequency of Jacobian update of residuum in Lp
nMPstate = 10_pInt , & !< materialpoint state loop limit
nCryst = 20_pInt , & !< crystallite loop limit (only for debugging info, loop limit is determined by "subStepMinCryst")
nState = 10_pInt , & !< state loop limit
nStress = 40_pInt , & !< stress loop limit
2013-03-28 16:07:00 +05:30
pert_method = 1_pInt , & !< method used in perturbation technique for tangent
2017-11-08 01:26:28 +05:30
randomSeed = 0_pInt , & !< fixed seeding for pseudo-random number generator, Default 0: use random seed
2014-10-10 18:38:34 +05:30
worldrank = 0_pInt , & !< MPI worldrank (/=0 for MPI simulations only)
2019-02-23 01:07:41 +05:30
worldsize = 0_pInt , & !< MPI worldsize (/=0 for MPI simulations only)
numerics_integrator = 1_pInt !< method used for state integration Default 1: fix-point iteration
2016-12-23 18:50:29 +05:30
integer ( 4 ) , protected , public :: &
2013-09-26 22:51:46 +05:30
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
2013-01-10 03:49:32 +05:30
real ( pReal ) , protected , public :: &
2013-03-28 15:32:11 +05:30
relevantStrain = 1.0e-7_pReal , & !< strain increment considered significant (used by crystallite to determine whether strain inc is considered significant)
defgradTolerance = 1.0e-7_pReal , & !< deviation of deformation gradient that is still allowed (used by CPFEM to determine outdated ffn1)
pert_Fg = 1.0e-7_pReal , & !< strain perturbation for FEM Jacobi
subStepMinCryst = 1.0e-3_pReal , & !< minimum (relative) size of sub-step allowed during cutback in crystallite
subStepMinHomog = 1.0e-3_pReal , & !< minimum (relative) size of sub-step allowed during cutback in homogenization
subStepSizeCryst = 0.25_pReal , & !< size of first substep when cutback in crystallite
subStepSizeHomog = 0.25_pReal , & !< size of first substep when cutback in homogenization
2017-04-26 22:48:47 +05:30
subStepSizeLp = 0.5_pReal , & !< size of first substep when cutback in Lp calculation
2017-04-28 18:01:03 +05:30
subStepSizeLi = 0.5_pReal , & !< size of first substep when cutback in Li calculation
2013-03-28 15:32:11 +05:30
stepIncreaseCryst = 1.5_pReal , & !< increase of next substep size when previous substep converged in crystallite
stepIncreaseHomog = 1.5_pReal , & !< increase of next substep size when previous substep converged in homogenization
rTol_crystalliteState = 1.0e-6_pReal , & !< relative tolerance in crystallite state loop
rTol_crystalliteStress = 1.0e-6_pReal , & !< relative tolerance in crystallite stress loop
aTol_crystalliteStress = 1.0e-8_pReal , & !< absolute tolerance in crystallite stress loop, Default 1.0e-8: residuum is in Lp and hence strain is on this order
numerics_unitlength = 1.0_pReal , & !< determines the physical length of one computational length unit
absTol_RGC = 1.0e+4_pReal , & !< absolute tolerance of RGC residuum
relTol_RGC = 1.0e-3_pReal , & !< relative tolerance of RGC residuum
absMax_RGC = 1.0e+10_pReal , & !< absolute maximum of RGC residuum
relMax_RGC = 1.0e+2_pReal , & !< relative maximum of RGC residuum
pPert_RGC = 1.0e-7_pReal , & !< perturbation for computing RGC penalty tangent
xSmoo_RGC = 1.0e-5_pReal , & !< RGC penalty smoothing parameter (hyperbolic tangent)
viscPower_RGC = 1.0e+0_pReal , & !< power (sensitivity rate) of numerical viscosity in RGC scheme, Default 1.0e0: Newton viscosity (linear model)
viscModus_RGC = 0.0e+0_pReal , & !< stress modulus of RGC numerical viscosity, Default 0.0e0: No viscosity is applied
refRelaxRate_RGC = 1.0e-3_pReal , & !< reference relaxation rate in RGC viscosity
maxdRelax_RGC = 1.0e+0_pReal , & !< threshold of maximum relaxation vector increment (if exceed this then cutback)
maxVolDiscr_RGC = 1.0e-5_pReal , & !< threshold of maximum volume discrepancy allowed
volDiscrMod_RGC = 1.0e+12_pReal , & !< stiffness of RGC volume discrepancy (zero = without volume discrepancy constraint)
2014-06-25 04:48:07 +05:30
volDiscrPow_RGC = 5.0_pReal , & !< powerlaw penalty for volume discrepancy
2014-12-02 22:47:35 +05:30
charLength = 1.0_pReal , & !< characteristic length scale for gradient problems
residualStiffness = 1.0e-6_pReal !< non-zero residual damage
2013-03-28 15:32:11 +05:30
logical , protected , public :: &
2013-04-16 22:37:27 +05:30
usePingPong = . true . , &
2014-10-01 17:59:12 +05:30
numerics_timeSyncing = . false . !< flag indicating if time synchronization in crystallite is used for nonlocal plasticity
2012-06-15 21:40:21 +05:30
2015-05-28 22:32:23 +05:30
!--------------------------------------------------------------------------------------------------
! field parameters:
real ( pReal ) , protected , public :: &
err_struct_tolAbs = 1.0e-10_pReal , & !< absolute tolerance for mechanical equilibrium
err_struct_tolRel = 1.0e-4_pReal , & !< relative tolerance for mechanical equilibrium
err_thermal_tolAbs = 1.0e-2_pReal , & !< absolute tolerance for thermal equilibrium
err_thermal_tolRel = 1.0e-6_pReal , & !< relative tolerance for thermal equilibrium
err_damage_tolAbs = 1.0e-2_pReal , & !< absolute tolerance for damage evolution
2019-03-07 11:39:00 +05:30
err_damage_tolRel = 1.0e-6_pReal !< relative tolerance for damage evolution
2015-05-28 22:32:23 +05:30
integer ( pInt ) , protected , public :: &
itmax = 250_pInt , & !< maximum number of iterations
itmin = 1_pInt , & !< minimum number of iterations
stagItMax = 10_pInt , & !< max number of field level staggered iterations
2019-03-07 11:39:00 +05:30
maxCutBack = 3_pInt !< max number of cut backs
2015-05-28 22:32:23 +05:30
2013-03-28 15:32:11 +05:30
!--------------------------------------------------------------------------------------------------
! spectral parameters:
2012-06-15 21:40:21 +05:30
#ifdef Spectral
2013-01-10 03:49:32 +05:30
real ( pReal ) , protected , public :: &
2018-08-21 02:04:43 +05:30
err_div_tolAbs = 1.0e-4_pReal , & !< absolute tolerance for equilibrium
2013-08-07 22:50:05 +05:30
err_div_tolRel = 5.0e-4_pReal , & !< relative tolerance for equilibrium
err_curl_tolAbs = 1.0e-10_pReal , & !< absolute tolerance for compatibility
err_curl_tolRel = 5.0e-4_pReal , & !< relative tolerance for compatibility
err_stress_tolAbs = 1.0e3_pReal , & !< absolute tolerance for fullfillment of stress BC
err_stress_tolRel = 0.01_pReal , & !< relative tolerance for fullfillment of stress BC
2013-03-28 15:32:11 +05:30
fftw_timelimit = - 1.0_pReal , & !< sets the timelimit of plan creation for FFTW, see manual on www.fftw.org, Default -1.0: disable timelimit
rotation_tol = 1.0e-12_pReal , & !< tolerance of rotation specified in loadcase, Default 1.0e-12: first guess
polarAlpha = 1.0_pReal , & !< polarization scheme parameter 0.0 < alpha < 2.0. alpha = 1.0 ==> AL scheme, alpha = 2.0 ==> accelerated scheme
polarBeta = 1.0_pReal !< polarization scheme parameter 0.0 < beta < 2.0. beta = 1.0 ==> AL scheme, beta = 2.0 ==> accelerated scheme
2013-01-10 03:49:32 +05:30
character ( len = 64 ) , private :: &
2013-03-28 15:32:11 +05:30
fftw_plan_mode = 'FFTW_PATIENT' !< reads the planing-rigor flag, see manual on www.fftw.org, Default FFTW_PATIENT: use patient planner flag
2013-01-10 03:49:32 +05:30
character ( len = 64 ) , protected , public :: &
2018-05-26 15:38:28 +05:30
spectral_solver = 'basic' , & !< spectral solution method
2016-10-19 17:37:54 +05:30
spectral_derivative = 'continuous' !< spectral spatial derivative method
2013-01-10 03:49:32 +05:30
character ( len = 1024 ) , protected , public :: &
2015-06-09 18:58:50 +05:30
petsc_defaultOptions = ' - mech_snes_type ngmres &
2015-06-03 23:00:31 +05:30
& - damage_snes_type ngmres &
2015-06-09 18:58:50 +05:30
& - thermal_snes_type ngmres ' , &
petsc_options = ''
2013-01-10 03:49:32 +05:30
integer ( pInt ) , protected , public :: &
2013-03-28 15:32:11 +05:30
fftw_planner_flag = 32_pInt , & !< conversion of fftw_plan_mode to integer, basically what is usually done in the include file of fftw
2013-04-10 15:49:16 +05:30
divergence_correction = 2_pInt !< correct divergence calculation in fourier space 0: no correction, 1: size scaled to 1, 2: size scaled to Npoints
logical , protected , public :: &
2018-02-16 20:06:18 +05:30
continueCalculation = . false . , & !< false:exit if BVP solver does not converge, true: continue calculation despite BVP solver not converging
2013-03-28 15:32:11 +05:30
memory_efficient = . true . , & !< for fast execution (pre calculation of gamma_hat), Default .true.: do not precalculate
update_gamma = . false . !< update gamma operator with current stiffness, Default .false.: use initial stiffness
2012-10-02 20:56:56 +05:30
#endif
2011-02-07 20:05:42 +05:30
2014-06-06 06:08:29 +05:30
!--------------------------------------------------------------------------------------------------
! FEM parameters:
#ifdef FEM
2015-05-28 22:32:23 +05:30
integer ( pInt ) , protected , public :: &
integrationOrder = 2_pInt , & !< order of quadrature rule required
2018-09-20 11:56:59 +05:30
structOrder = 2_pInt !< order of displacement shape functions
2015-05-28 22:32:23 +05:30
logical , protected , public :: &
BBarStabilisation = . false .
2014-10-21 21:55:53 +05:30
character ( len = 4096 ) , protected , public :: &
2015-06-09 18:58:50 +05:30
petsc_defaultOptions = ' - mech_snes_type newtonls &
2014-12-08 21:07:44 +05:30
& - mech_snes_linesearch_type cp &
& - mech_snes_ksp_ew &
& - mech_snes_ksp_ew_rtol0 0.01 &
& - mech_snes_ksp_ew_rtolmax 0.01 &
& - mech_ksp_type fgmres &
& - mech_ksp_max_it 25 &
& - mech_pc_type ml &
& - mech_mg_levels_ksp_type chebyshev &
& - mech_mg_levels_pc_type sor &
2018-09-15 18:44:48 +05:30
& - mech_pc_ml_nullspace user ' , &
2015-06-09 18:58:50 +05:30
petsc_options = ''
2014-06-06 06:08:29 +05:30
#endif
2013-01-10 03:49:32 +05:30
public :: numerics_init
2012-10-02 20:56:56 +05:30
contains
2009-11-10 19:06:27 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
!> @brief reads in parameters from numerics.config and sets openMP related parameters. Also does
! a sanity check
!--------------------------------------------------------------------------------------------------
2012-03-07 15:37:29 +05:30
subroutine numerics_init
2012-12-15 23:37:49 +05:30
use IO , only : &
2013-06-27 00:49:00 +05:30
IO_read , &
2012-12-15 23:37:49 +05:30
IO_error , &
IO_open_file_stat , &
IO_isBlank , &
IO_stringPos , &
IO_stringValue , &
IO_lc , &
IO_floatValue , &
IO_intValue , &
2013-02-25 22:04:59 +05:30
IO_warning , &
2013-12-11 22:19:20 +05:30
IO_timeStamp , &
IO_EOF
2018-05-17 15:34:21 +05:30
#ifdef PETSc
#include <petsc/finclude/petscsys.h>
use petscsys
#endif
2019-02-03 18:00:04 +05:30
!$ use OMP_LIB, only: omp_set_num_threads
2012-06-15 21:40:21 +05:30
implicit none
2015-08-28 13:08:48 +05:30
integer ( pInt ) , parameter :: FILEUNIT = 300_pInt
2012-03-07 15:37:29 +05:30
!$ integer :: gotDAMASK_NUM_THREADS = 1
2014-06-06 06:08:29 +05:30
integer :: i , ierr ! no pInt
2015-08-28 13:08:48 +05:30
integer ( pInt ) , allocatable , dimension ( : ) :: chunkPos
2013-07-31 20:33:38 +05:30
character ( len = 65536 ) :: &
tag , &
line
2012-06-12 15:14:05 +05:30
!$ character(len=6) DAMASK_NumThreadsString ! environment variable DAMASK_NUM_THREADS
2009-08-27 21:00:40 +05:30
2014-10-10 18:38:34 +05:30
#ifdef PETSc
2014-10-10 01:53:06 +05:30
call MPI_Comm_rank ( PETSC_COMM_WORLD , worldrank , ierr ) ; CHKERRQ ( ierr )
call MPI_Comm_size ( PETSC_COMM_WORLD , worldsize , ierr ) ; CHKERRQ ( ierr )
2014-10-10 18:38:34 +05:30
#endif
2016-06-29 20:05:49 +05:30
write ( 6 , '(/,a)' ) ' <<<+- numerics init -+>>>'
2014-10-10 18:38:34 +05:30
2012-01-31 01:46:19 +05:30
!$ call GET_ENVIRONMENT_VARIABLE(NAME='DAMASK_NUM_THREADS',VALUE=DAMASK_NumThreadsString,STATUS=gotDAMASK_NUM_THREADS) ! get environment variable DAMASK_NUM_THREADS...
2014-02-28 16:00:07 +05:30
!$ if(gotDAMASK_NUM_THREADS /= 0) then ! could not get number of threads, set it to 1
2013-02-21 03:26:59 +05:30
!$ call IO_warning(35_pInt,ext_msg='BEGIN:'//DAMASK_NumThreadsString//':END')
2016-12-23 18:50:29 +05:30
!$ DAMASK_NumThreadsInt = 1_4
2014-02-28 16:00:07 +05:30
!$ else
!$ read(DAMASK_NumThreadsString,'(i6)') DAMASK_NumThreadsInt ! read as integer
2016-12-23 18:50:29 +05:30
!$ if (DAMASK_NumThreadsInt < 1_4) DAMASK_NumThreadsInt = 1_4 ! in case of string conversion fails, set it to one
2014-02-28 16:00:07 +05:30
!$ endif
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution
2010-12-02 16:34:29 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! try to open the config file
2013-12-11 22:19:20 +05:30
fileExists : if ( IO_open_file_stat ( FILEUNIT , numerics_configFile ) ) then
2017-04-25 16:04:14 +05:30
write ( 6 , '(a,/)' ) ' using values from config file'
flush ( 6 )
2012-02-13 23:11:27 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! read variables from config file and overwrite default parameters if keyword is present
2012-03-07 15:37:29 +05:30
line = ''
2013-12-11 22:19:20 +05:30
do while ( trim ( line ) / = IO_EOF ) ! read thru sections of phase part
line = IO_read ( FILEUNIT )
2013-07-31 20:33:38 +05:30
do i = 1 , len ( line )
if ( line ( i : i ) == '=' ) line ( i : i ) = ' ' ! also allow keyword = value version
enddo
2013-02-11 15:14:17 +05:30
if ( IO_isBlank ( line ) ) cycle ! skip empty lines
2015-08-28 13:08:48 +05:30
chunkPos = IO_stringPos ( line )
tag = IO_lc ( IO_stringValue ( line , chunkPos , 1_pInt ) ) ! extract key
2012-03-07 15:37:29 +05:30
select case ( tag )
case ( 'relevantstrain' )
2015-08-28 13:08:48 +05:30
relevantStrain = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'defgradtolerance' )
2015-08-28 13:08:48 +05:30
defgradTolerance = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'ijacostiffness' )
2015-08-28 13:08:48 +05:30
iJacoStiffness = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'ijacolpresiduum' )
2015-08-28 13:08:48 +05:30
iJacoLpresiduum = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'pert_fg' )
2015-08-28 13:08:48 +05:30
pert_Fg = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'pert_method' )
2015-08-28 13:08:48 +05:30
pert_method = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'nmpstate' )
2015-08-28 13:08:48 +05:30
nMPstate = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'ncryst' )
2015-08-28 13:08:48 +05:30
nCryst = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'nstate' )
2015-08-28 13:08:48 +05:30
nState = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'nstress' )
2015-08-28 13:08:48 +05:30
nStress = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'substepmincryst' )
2015-08-28 13:08:48 +05:30
subStepMinCryst = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'substepsizecryst' )
2015-08-28 13:08:48 +05:30
subStepSizeCryst = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'stepincreasecryst' )
2015-08-28 13:08:48 +05:30
stepIncreaseCryst = IO_floatValue ( line , chunkPos , 2_pInt )
2017-04-26 22:48:47 +05:30
case ( 'substepsizelp' )
subStepSizeLp = IO_floatValue ( line , chunkPos , 2_pInt )
2017-04-28 18:01:03 +05:30
case ( 'substepsizeli' )
subStepSizeLi = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'substepminhomog' )
2015-08-28 13:08:48 +05:30
subStepMinHomog = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'substepsizehomog' )
2015-08-28 13:08:48 +05:30
subStepSizeHomog = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'stepincreasehomog' )
2015-08-28 13:08:48 +05:30
stepIncreaseHomog = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'rtol_crystallitestate' )
2015-08-28 13:08:48 +05:30
rTol_crystalliteState = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'rtol_crystallitestress' )
2015-08-28 13:08:48 +05:30
rTol_crystalliteStress = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'atol_crystallitestress' )
2015-08-28 13:08:48 +05:30
aTol_crystalliteStress = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'integrator' )
2018-08-05 20:36:03 +05:30
numerics_integrator = IO_intValue ( line , chunkPos , 2_pInt )
2013-05-17 23:22:46 +05:30
case ( 'usepingpong' )
2015-08-28 13:08:48 +05:30
usepingpong = IO_intValue ( line , chunkPos , 2_pInt ) > 0_pInt
2012-09-24 21:52:25 +05:30
case ( 'unitlength' )
2015-08-28 13:08:48 +05:30
numerics_unitlength = IO_floatValue ( line , chunkPos , 2_pInt )
2009-07-31 17:32:20 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! RGC parameters
2012-03-07 15:37:29 +05:30
case ( 'atol_rgc' )
2015-08-28 13:08:48 +05:30
absTol_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'rtol_rgc' )
2015-08-28 13:08:48 +05:30
relTol_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'amax_rgc' )
2015-08-28 13:08:48 +05:30
absMax_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'rmax_rgc' )
2015-08-28 13:08:48 +05:30
relMax_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'perturbpenalty_rgc' )
2015-08-28 13:08:48 +05:30
pPert_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'relevantmismatch_rgc' )
2015-08-28 13:08:48 +05:30
xSmoo_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'viscositypower_rgc' )
2015-08-28 13:08:48 +05:30
viscPower_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'viscositymodulus_rgc' )
2015-08-28 13:08:48 +05:30
viscModus_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'refrelaxationrate_rgc' )
2015-08-28 13:08:48 +05:30
refRelaxRate_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'maxrelaxation_rgc' )
2015-08-28 13:08:48 +05:30
maxdRelax_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'maxvoldiscrepancy_rgc' )
2015-08-28 13:08:48 +05:30
maxVolDiscr_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'voldiscrepancymod_rgc' )
2015-08-28 13:08:48 +05:30
volDiscrMod_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'discrepancypower_rgc' )
2015-08-28 13:08:48 +05:30
volDiscrPow_RGC = IO_floatValue ( line , chunkPos , 2_pInt )
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
2013-03-28 15:32:11 +05:30
! random seeding parameter
2017-11-08 01:26:28 +05:30
case ( 'random_seed' , 'fixed_seed' )
randomSeed = IO_intValue ( line , chunkPos , 2_pInt )
2013-02-11 15:14:17 +05:30
2014-06-25 04:48:07 +05:30
!--------------------------------------------------------------------------------------------------
! gradient parameter
case ( 'charlength' )
2015-08-28 13:08:48 +05:30
charLength = IO_floatValue ( line , chunkPos , 2_pInt )
2014-12-02 22:47:35 +05:30
case ( 'residualstiffness' )
2015-08-28 13:08:48 +05:30
residualStiffness = IO_floatValue ( line , chunkPos , 2_pInt )
2014-06-25 04:48:07 +05:30
2015-05-28 22:32:23 +05:30
!--------------------------------------------------------------------------------------------------
! field parameters
case ( 'err_struct_tolabs' )
2015-08-28 13:08:48 +05:30
err_struct_tolAbs = IO_floatValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'err_struct_tolrel' )
2015-08-28 13:08:48 +05:30
err_struct_tolRel = IO_floatValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'err_thermal_tolabs' )
2015-08-28 13:08:48 +05:30
err_thermal_tolabs = IO_floatValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'err_thermal_tolrel' )
2015-08-28 13:08:48 +05:30
err_thermal_tolrel = IO_floatValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'err_damage_tolabs' )
2015-08-28 13:08:48 +05:30
err_damage_tolabs = IO_floatValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'err_damage_tolrel' )
2015-08-28 13:08:48 +05:30
err_damage_tolrel = IO_floatValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'itmax' )
2015-08-28 13:08:48 +05:30
itmax = IO_intValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'itmin' )
2015-08-28 13:08:48 +05:30
itmin = IO_intValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'maxcutback' )
2015-08-28 13:08:48 +05:30
maxCutBack = IO_intValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
case ( 'maxstaggerediter' )
2015-08-28 13:08:48 +05:30
stagItMax = IO_intValue ( line , chunkPos , 2_pInt )
2015-05-28 22:32:23 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! spectral parameters
2012-06-15 21:40:21 +05:30
#ifdef Spectral
2013-08-07 22:50:05 +05:30
case ( 'err_div_tolabs' )
2015-08-28 13:08:48 +05:30
err_div_tolAbs = IO_floatValue ( line , chunkPos , 2_pInt )
2013-08-07 22:50:05 +05:30
case ( 'err_div_tolrel' )
2015-08-28 13:08:48 +05:30
err_div_tolRel = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'err_stress_tolrel' )
2015-08-28 13:08:48 +05:30
err_stress_tolrel = IO_floatValue ( line , chunkPos , 2_pInt )
2012-04-11 18:27:25 +05:30
case ( 'err_stress_tolabs' )
2015-08-28 13:08:48 +05:30
err_stress_tolabs = IO_floatValue ( line , chunkPos , 2_pInt )
2014-03-31 15:34:11 +05:30
case ( 'continuecalculation' )
2018-02-16 20:06:18 +05:30
continueCalculation = IO_intValue ( line , chunkPos , 2_pInt ) > 0_pInt
2012-03-07 15:37:29 +05:30
case ( 'memory_efficient' )
2018-02-16 20:06:18 +05:30
memory_efficient = IO_intValue ( line , chunkPos , 2_pInt ) > 0_pInt
2012-03-07 15:37:29 +05:30
case ( 'fftw_timelimit' )
2015-08-28 13:08:48 +05:30
fftw_timelimit = IO_floatValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'fftw_plan_mode' )
2015-08-28 13:08:48 +05:30
fftw_plan_mode = IO_lc ( IO_stringValue ( line , chunkPos , 2_pInt ) )
2015-12-14 23:42:09 +05:30
case ( 'spectralderivative' )
spectral_derivative = IO_lc ( IO_stringValue ( line , chunkPos , 2_pInt ) )
2012-03-07 15:37:29 +05:30
case ( 'divergence_correction' )
2015-08-28 13:08:48 +05:30
divergence_correction = IO_intValue ( line , chunkPos , 2_pInt )
2012-03-07 15:37:29 +05:30
case ( 'update_gamma' )
2018-02-16 20:06:18 +05:30
update_gamma = IO_intValue ( line , chunkPos , 2_pInt ) > 0_pInt
2012-08-29 00:49:47 +05:30
case ( 'petsc_options' )
2015-08-28 13:08:48 +05:30
petsc_options = trim ( line ( chunkPos ( 4 ) : ) )
2014-09-04 01:29:47 +05:30
case ( 'spectralsolver' , 'myspectralsolver' )
2015-08-28 13:08:48 +05:30
spectral_solver = IO_lc ( IO_stringValue ( line , chunkPos , 2_pInt ) )
2013-08-07 22:50:05 +05:30
case ( 'err_curl_tolabs' )
2015-08-28 13:08:48 +05:30
err_curl_tolAbs = IO_floatValue ( line , chunkPos , 2_pInt )
2013-08-07 22:50:05 +05:30
case ( 'err_curl_tolrel' )
2015-08-28 13:08:48 +05:30
err_curl_tolRel = IO_floatValue ( line , chunkPos , 2_pInt )
2013-02-28 23:05:02 +05:30
case ( 'polaralpha' )
2015-08-28 13:08:48 +05:30
polarAlpha = IO_floatValue ( line , chunkPos , 2_pInt )
2013-02-28 23:05:02 +05:30
case ( 'polarbeta' )
2015-08-28 13:08:48 +05:30
polarBeta = IO_floatValue ( line , chunkPos , 2_pInt )
2014-10-01 17:59:12 +05:30
#else
2013-08-07 22:50:05 +05:30
case ( 'err_div_tolabs' , 'err_div_tolrel' , 'err_stress_tolrel' , 'err_stress_tolabs' , & ! found spectral parameter for FEM build
2015-05-28 22:32:23 +05:30
'memory_efficient' , 'fftw_timelimit' , 'fftw_plan_mode' , &
2014-09-04 01:29:47 +05:30
'divergence_correction' , 'update_gamma' , 'spectralfilter' , 'myfilter' , &
2013-08-08 14:43:29 +05:30
'err_curl_tolabs' , 'err_curl_tolrel' , &
2015-05-28 22:32:23 +05:30
'polaralpha' , 'polarbeta' )
2013-03-28 15:32:11 +05:30
call IO_warning ( 40_pInt , ext_msg = tag )
2012-06-15 21:40:21 +05:30
#endif
2014-06-06 06:08:29 +05:30
!--------------------------------------------------------------------------------------------------
! FEM parameters
#ifdef FEM
case ( 'integrationorder' )
2015-08-28 13:08:48 +05:30
integrationorder = IO_intValue ( line , chunkPos , 2_pInt )
2014-06-06 06:08:29 +05:30
case ( 'structorder' )
2015-08-28 13:08:48 +05:30
structorder = IO_intValue ( line , chunkPos , 2_pInt )
2015-06-09 18:58:50 +05:30
case ( 'petsc_options' )
2015-08-28 13:08:48 +05:30
petsc_options = trim ( line ( chunkPos ( 4 ) : ) )
2014-12-08 21:57:23 +05:30
case ( 'bbarstabilisation' )
2015-08-28 13:08:48 +05:30
BBarStabilisation = IO_intValue ( line , chunkPos , 2_pInt ) > 0_pInt
2014-10-01 17:59:12 +05:30
#else
2019-03-08 01:21:14 +05:30
case ( 'integrationorder' , 'structorder' , 'thermalorder' , 'damageorder' , &
'bbarstabilisation' )
2014-06-06 06:08:29 +05:30
call IO_warning ( 40_pInt , ext_msg = tag )
#endif
2013-08-08 14:43:29 +05:30
case default ! found unknown keyword
2013-03-28 15:32:11 +05:30
call IO_error ( 300_pInt , ext_msg = tag )
2018-10-09 02:31:27 +05:30
end select
2012-03-07 15:37:29 +05:30
enddo
2013-12-11 22:19:20 +05:30
close ( FILEUNIT )
2013-02-11 15:14:17 +05:30
else fileExists
write ( 6 , '(a,/)' ) ' using standard values'
2014-02-06 16:11:34 +05:30
flush ( 6 )
2013-02-11 15:14:17 +05:30
endif fileExists
2012-06-15 21:40:21 +05:30
#ifdef Spectral
2013-08-08 14:43:29 +05:30
select case ( IO_lc ( fftw_plan_mode ) ) ! setting parameters for the plan creation of FFTW. Basically a translation from fftw3.f
2014-10-10 18:38:34 +05:30
case ( 'estimate' , 'fftw_estimate' ) ! ordered from slow execution (but fast plan creation) to fast execution
2013-03-28 15:32:11 +05:30
fftw_planner_flag = 64_pInt
case ( 'measure' , 'fftw_measure' )
fftw_planner_flag = 0_pInt
case ( 'patient' , 'fftw_patient' )
fftw_planner_flag = 32_pInt
case ( 'exhaustive' , 'fftw_exhaustive' )
fftw_planner_flag = 8_pInt
case default
call IO_warning ( warning_ID = 47_pInt , ext_msg = trim ( IO_lc ( fftw_plan_mode ) ) )
fftw_planner_flag = 32_pInt
2012-03-07 15:37:29 +05:30
end select
2012-06-15 21:40:21 +05:30
#endif
2012-11-28 00:06:55 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
2013-03-28 15:32:11 +05:30
! writing parameters to output
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,es8.1)' ) ' relevantStrain: ' , relevantStrain
write ( 6 , '(a24,1x,es8.1)' ) ' defgradTolerance: ' , defgradTolerance
write ( 6 , '(a24,1x,i8)' ) ' iJacoStiffness: ' , iJacoStiffness
write ( 6 , '(a24,1x,i8)' ) ' iJacoLpresiduum: ' , iJacoLpresiduum
write ( 6 , '(a24,1x,es8.1)' ) ' pert_Fg: ' , pert_Fg
write ( 6 , '(a24,1x,i8)' ) ' pert_method: ' , pert_method
write ( 6 , '(a24,1x,i8)' ) ' nCryst: ' , nCryst
write ( 6 , '(a24,1x,es8.1)' ) ' subStepMinCryst: ' , subStepMinCryst
write ( 6 , '(a24,1x,es8.1)' ) ' subStepSizeCryst: ' , subStepSizeCryst
write ( 6 , '(a24,1x,es8.1)' ) ' stepIncreaseCryst: ' , stepIncreaseCryst
2017-04-26 22:48:47 +05:30
write ( 6 , '(a24,1x,es8.1)' ) ' subStepSizeLp: ' , subStepSizeLp
2017-04-28 18:01:03 +05:30
write ( 6 , '(a24,1x,es8.1)' ) ' subStepSizeLi: ' , subStepSizeLi
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,i8)' ) ' nState: ' , nState
write ( 6 , '(a24,1x,i8)' ) ' nStress: ' , nStress
write ( 6 , '(a24,1x,es8.1)' ) ' rTol_crystalliteState: ' , rTol_crystalliteState
write ( 6 , '(a24,1x,es8.1)' ) ' rTol_crystalliteStress: ' , rTol_crystalliteStress
write ( 6 , '(a24,1x,es8.1)' ) ' aTol_crystalliteStress: ' , aTol_crystalliteStress
2019-02-23 01:07:41 +05:30
write ( 6 , '(a24,1x,i8)' ) ' integrator: ' , numerics_integrator
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,L8)' ) ' use ping pong scheme: ' , usepingpong
write ( 6 , '(a24,1x,es8.1,/)' ) ' unitlength: ' , numerics_unitlength
2013-03-28 15:32:11 +05:30
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,es8.1)' ) ' subStepMinHomog: ' , subStepMinHomog
write ( 6 , '(a24,1x,es8.1)' ) ' subStepSizeHomog: ' , subStepSizeHomog
write ( 6 , '(a24,1x,es8.1)' ) ' stepIncreaseHomog: ' , stepIncreaseHomog
write ( 6 , '(a24,1x,i8,/)' ) ' nMPstate: ' , nMPstate
2009-07-31 17:32:20 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! RGC parameters
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,es8.1)' ) ' aTol_RGC: ' , absTol_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' rTol_RGC: ' , relTol_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' aMax_RGC: ' , absMax_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' rMax_RGC: ' , relMax_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' perturbPenalty_RGC: ' , pPert_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' relevantMismatch_RGC: ' , xSmoo_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' viscosityrate_RGC: ' , viscPower_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' viscositymodulus_RGC: ' , viscModus_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' maxrelaxation_RGC: ' , maxdRelax_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' maxVolDiscrepancy_RGC: ' , maxVolDiscr_RGC
write ( 6 , '(a24,1x,es8.1)' ) ' volDiscrepancyMod_RGC: ' , volDiscrMod_RGC
write ( 6 , '(a24,1x,es8.1,/)' ) ' discrepancyPower_RGC: ' , volDiscrPow_RGC
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! Random seeding parameter
2018-10-09 02:31:27 +05:30
write ( 6 , '(a16,1x,i16,/)' ) ' random_seed: ' , randomSeed
2017-11-08 01:26:28 +05:30
if ( randomSeed < = 0_pInt ) &
write ( 6 , '(a,/)' ) ' random seed will be generated!'
2014-11-03 16:06:07 +05:30
!--------------------------------------------------------------------------------------------------
! gradient parameter
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,es8.1)' ) ' charLength: ' , charLength
write ( 6 , '(a24,1x,es8.1)' ) ' residualStiffness: ' , residualStiffness
2014-11-03 16:06:07 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! openMP parameter
2016-06-29 20:05:49 +05:30
!$ write(6,'(a24,1x,i8,/)') ' number of threads: ',DAMASK_NumThreadsInt
2010-10-13 21:34:44 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
2015-05-28 22:32:23 +05:30
! field parameters
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,i8)' ) ' itmax: ' , itmax
write ( 6 , '(a24,1x,i8)' ) ' itmin: ' , itmin
write ( 6 , '(a24,1x,i8)' ) ' maxCutBack: ' , maxCutBack
write ( 6 , '(a24,1x,i8)' ) ' maxStaggeredIter: ' , stagItMax
write ( 6 , '(a24,1x,es8.1)' ) ' err_struct_tolAbs: ' , err_struct_tolAbs
write ( 6 , '(a24,1x,es8.1)' ) ' err_struct_tolRel: ' , err_struct_tolRel
write ( 6 , '(a24,1x,es8.1)' ) ' err_thermal_tolabs: ' , err_thermal_tolabs
write ( 6 , '(a24,1x,es8.1)' ) ' err_thermal_tolrel: ' , err_thermal_tolrel
write ( 6 , '(a24,1x,es8.1)' ) ' err_damage_tolabs: ' , err_damage_tolabs
write ( 6 , '(a24,1x,es8.1)' ) ' err_damage_tolrel: ' , err_damage_tolrel
2015-05-28 22:32:23 +05:30
!--------------------------------------------------------------------------------------------------
! spectral parameters
#ifdef Spectral
2018-02-16 20:06:18 +05:30
write ( 6 , '(a24,1x,L8)' ) ' continueCalculation: ' , continueCalculation
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,L8)' ) ' memory_efficient: ' , memory_efficient
write ( 6 , '(a24,1x,i8)' ) ' divergence_correction: ' , divergence_correction
write ( 6 , '(a24,1x,a)' ) ' spectral_derivative: ' , trim ( spectral_derivative )
if ( fftw_timelimit < 0.0_pReal ) then
write ( 6 , '(a24,1x,L8)' ) ' fftw_timelimit: ' , . false .
else
write ( 6 , '(a24,1x,es8.1)' ) ' fftw_timelimit: ' , fftw_timelimit
endif
write ( 6 , '(a24,1x,a)' ) ' fftw_plan_mode: ' , trim ( fftw_plan_mode )
write ( 6 , '(a24,1x,i8)' ) ' fftw_planner_flag: ' , fftw_planner_flag
write ( 6 , '(a24,1x,L8,/)' ) ' update_gamma: ' , update_gamma
write ( 6 , '(a24,1x,es8.1)' ) ' err_stress_tolAbs: ' , err_stress_tolAbs
write ( 6 , '(a24,1x,es8.1)' ) ' err_stress_tolRel: ' , err_stress_tolRel
write ( 6 , '(a24,1x,es8.1)' ) ' err_div_tolAbs: ' , err_div_tolAbs
write ( 6 , '(a24,1x,es8.1)' ) ' err_div_tolRel: ' , err_div_tolRel
write ( 6 , '(a24,1x,es8.1)' ) ' err_curl_tolAbs: ' , err_curl_tolAbs
write ( 6 , '(a24,1x,es8.1)' ) ' err_curl_tolRel: ' , err_curl_tolRel
write ( 6 , '(a24,1x,es8.1)' ) ' polarAlpha: ' , polarAlpha
write ( 6 , '(a24,1x,es8.1)' ) ' polarBeta: ' , polarBeta
write ( 6 , '(a24,1x,a)' ) ' spectral solver: ' , trim ( spectral_solver )
write ( 6 , '(a24,1x,a)' ) ' PETSc_options: ' , trim ( petsc_defaultOptions ) / / ' ' / / trim ( petsc_options )
2012-08-29 00:49:47 +05:30
#endif
2010-12-02 16:34:29 +05:30
2014-06-06 06:08:29 +05:30
!--------------------------------------------------------------------------------------------------
! spectral parameters
#ifdef FEM
2016-06-29 20:05:49 +05:30
write ( 6 , '(a24,1x,i8)' ) ' integrationOrder: ' , integrationOrder
write ( 6 , '(a24,1x,i8)' ) ' structOrder: ' , structOrder
write ( 6 , '(a24,1x,a)' ) ' PETSc_options: ' , trim ( petsc_defaultOptions ) / / ' ' / / trim ( petsc_options )
write ( 6 , '(a24,1x,L8)' ) ' B-Bar stabilisation: ' , BBarStabilisation
2014-06-06 06:08:29 +05:30
#endif
2014-10-10 18:38:34 +05:30
2014-06-06 06:08:29 +05:30
2013-02-11 15:14:17 +05:30
!--------------------------------------------------------------------------------------------------
! sanity checks
2012-03-07 15:37:29 +05:30
if ( relevantStrain < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'relevantStrain' )
if ( defgradTolerance < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'defgradTolerance' )
if ( iJacoStiffness < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'iJacoStiffness' )
if ( iJacoLpresiduum < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'iJacoLpresiduum' )
if ( pert_Fg < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'pert_Fg' )
if ( pert_method < = 0_pInt . or . pert_method > = 4_pInt ) &
call IO_error ( 301_pInt , ext_msg = 'pert_method' )
if ( nMPstate < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'nMPstate' )
if ( nCryst < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'nCryst' )
if ( nState < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'nState' )
if ( nStress < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'nStress' )
if ( subStepMinCryst < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'subStepMinCryst' )
if ( subStepSizeCryst < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'subStepSizeCryst' )
if ( stepIncreaseCryst < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'stepIncreaseCryst' )
2017-04-26 22:48:47 +05:30
if ( subStepSizeLp < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'subStepSizeLp' )
2017-04-28 18:01:03 +05:30
if ( subStepSizeLi < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'subStepSizeLi' )
2012-03-07 15:37:29 +05:30
if ( subStepMinHomog < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'subStepMinHomog' )
if ( subStepSizeHomog < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'subStepSizeHomog' )
if ( stepIncreaseHomog < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'stepIncreaseHomog' )
if ( rTol_crystalliteState < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'rTol_crystalliteState' )
if ( rTol_crystalliteStress < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'rTol_crystalliteStress' )
if ( aTol_crystalliteStress < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'aTol_crystalliteStress' )
2019-02-23 01:07:41 +05:30
if ( numerics_integrator < = 0_pInt . or . numerics_integrator > = 6_pInt ) &
2012-03-07 15:37:29 +05:30
call IO_error ( 301_pInt , ext_msg = 'integrator' )
2012-09-24 21:52:25 +05:30
if ( numerics_unitlength < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'unitlength' )
2012-03-07 15:37:29 +05:30
if ( absTol_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'absTol_RGC' )
if ( relTol_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'relTol_RGC' )
if ( absMax_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'absMax_RGC' )
if ( relMax_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'relMax_RGC' )
if ( pPert_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'pPert_RGC' )
if ( xSmoo_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'xSmoo_RGC' )
if ( viscPower_RGC < 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'viscPower_RGC' )
if ( viscModus_RGC < 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'viscModus_RGC' )
if ( refRelaxRate_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'refRelaxRate_RGC' )
if ( maxdRelax_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'maxdRelax_RGC' )
if ( maxVolDiscr_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'maxVolDiscr_RGC' )
if ( volDiscrMod_RGC < 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'volDiscrMod_RGC' )
if ( volDiscrPow_RGC < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'volDiscrPw_RGC' )
2015-06-09 18:58:50 +05:30
if ( residualStiffness < 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'residualStiffness' )
2013-03-28 21:34:47 +05:30
if ( itmax < = 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'itmax' )
2014-06-06 14:27:24 +05:30
if ( itmin > itmax . or . itmin < 1_pInt ) call IO_error ( 301_pInt , ext_msg = 'itmin' )
2015-05-28 22:32:23 +05:30
if ( maxCutBack < 0_pInt ) call IO_error ( 301_pInt , ext_msg = 'maxCutBack' )
if ( stagItMax < 0_pInt ) call IO_error ( 301_pInt , ext_msg = 'maxStaggeredIter' )
if ( err_struct_tolRel < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_struct_tolRel' )
if ( err_struct_tolAbs < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_struct_tolAbs' )
if ( err_thermal_tolabs < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_thermal_tolabs' )
if ( err_thermal_tolrel < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_thermal_tolrel' )
if ( err_damage_tolabs < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_damage_tolabs' )
if ( err_damage_tolrel < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_damage_tolrel' )
#ifdef Spectral
2013-01-16 16:10:53 +05:30
if ( divergence_correction < 0_pInt . or . &
2013-04-10 15:49:16 +05:30
divergence_correction > 2_pInt ) call IO_error ( 301_pInt , ext_msg = 'divergence_correction' )
2012-04-11 22:58:08 +05:30
if ( update_gamma . and . &
. not . memory_efficient ) call IO_error ( error_ID = 847_pInt )
2013-09-17 14:49:16 +05:30
if ( err_stress_tolrel < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_stress_tolRel' )
if ( err_stress_tolabs < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_stress_tolAbs' )
2017-03-08 23:42:05 +05:30
if ( err_div_tolRel < 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_div_tolRel' )
2013-09-17 14:49:16 +05:30
if ( err_div_tolAbs < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_div_tolAbs' )
2017-03-08 23:42:05 +05:30
if ( err_curl_tolRel < 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_curl_tolRel' )
2013-08-07 22:50:05 +05:30
if ( err_curl_tolAbs < = 0.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'err_curl_tolAbs' )
2013-02-28 23:05:02 +05:30
if ( polarAlpha < = 0.0_pReal . or . &
polarAlpha > 2.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'polarAlpha' )
2013-08-07 22:50:05 +05:30
if ( polarBeta < 0.0_pReal . or . &
2018-02-16 20:06:18 +05:30
polarBeta > 2.0_pReal ) call IO_error ( 301_pInt , ext_msg = 'polarBeta' )
2012-08-29 00:49:47 +05:30
#endif
2012-03-07 15:37:29 +05:30
end subroutine numerics_init
2009-06-15 18:41:21 +05:30
2012-03-07 15:37:29 +05:30
end module numerics