remove some unused variables, set default value for divergence calculation to 1.e-5 and made calculation independent of dim and res

This commit is contained in:
Martin Diehl 2013-03-12 18:48:28 +00:00
parent 5bc32daaa0
commit 1779510dda
4 changed files with 12 additions and 18 deletions

View File

@ -83,7 +83,7 @@ subroutine basic_init(temperature)
call Utilities_Init() call Utilities_Init()
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasic init -+>>>' write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasic init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
write(6,'(a16,a)') ' Current time : ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
write(6,'(a,3(f12.5)/)') ' scaledDim x y z:', scaledDim write(6,'(a,3(f12.5)/)') ' scaledDim x y z:', scaledDim
@ -208,13 +208,12 @@ type(tSolutionState) function &
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! loop variables, convergence etc. ! loop variables, convergence etc.
real(pReal) :: err_div, err_stress real(pReal) :: err_div, err_stress
integer(pInt) :: iter, row, column, i, j, k integer(pInt) :: iter, row, column
logical :: ForwardData logical :: ForwardData
real(pReal) :: & real(pReal) :: &
defgradDet, & defgradDet, &
defgradDetMax, & defgradDetMax, &
defgradDetMin defgradDetMin
real(pReal), dimension(3,3) :: temp33_Real
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! write restart information for spectral solver ! write restart information for spectral solver
@ -359,7 +358,7 @@ logical function basic_Converged(err_div,pAvgDiv,err_stress,pAvgStress)
basic_Converged = all([ err_div/pAvgDivL2/err_div_tol,& basic_Converged = all([ err_div/pAvgDivL2/err_div_tol,&
err_stress/err_stress_tol ] < 1.0_pReal) err_stress/err_stress_tol ] < 1.0_pReal)
write(6,'(/,a,f8.2,a,es11.5,a,es11.4,a)') ' error divergence = ', & write(6,'(/,a,f10.2,a,es11.5,a,es11.4,a)') ' error divergence = ', &
err_div/pAvgDivL2/err_div_tol, ' (',err_div/pAvgDivL2,' / m, tol =',err_div_tol,')' err_div/pAvgDivL2/err_div_tol, ' (',err_div/pAvgDivL2,' / m, tol =',err_div_tol,')'
write(6,'(a,f8.2,a,es11.5,a,es11.4,a)') ' error stress BC = ', & write(6,'(a,f8.2,a,es11.5,a,es11.4,a)') ' error stress BC = ', &
err_stress/err_stress_tol, ' (',err_stress, ' Pa , tol =',err_stress_tol,')' err_stress/err_stress_tol, ' (',err_stress, ' Pa , tol =',err_stress_tol,')'

View File

@ -105,7 +105,6 @@ subroutine basicPETSc_init(temperature)
temperature temperature
#include <finclude/petscdmda.h90> #include <finclude/petscdmda.h90>
#include <finclude/petscsnes.h90> #include <finclude/petscsnes.h90>
integer(pInt) :: i,j,k
real(pReal), dimension(3,3,res(1),res(2),res(3)) :: P real(pReal), dimension(3,3,res(1),res(2),res(3)) :: P
PetscScalar, dimension(:,:,:,:), pointer :: F PetscScalar, dimension(:,:,:,:), pointer :: F
PetscErrorCode :: ierr PetscErrorCode :: ierr
@ -118,7 +117,7 @@ subroutine basicPETSc_init(temperature)
call Utilities_init() call Utilities_init()
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasicPETSc init -+>>>' write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasicPETSc init -+>>>'
write(6,'(a)') ' $Id: DAMASK_spectral_SolverBasicPETSC.f90 1654 2012-08-03 09:25:48Z MPIE\m.diehl $' write(6,'(a)') ' $Id: DAMASK_spectral_SolverBasicPETSC.f90 1654 2012-08-03 09:25:48Z MPIE\m.diehl $'
write(6,'(a16,a)') ' Current time : ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
write(6,'(a,3(f12.5)/)') ' scaledDim x y z:', scaledDim write(6,'(a,3(f12.5)/)') ' scaledDim x y z:', scaledDim
@ -232,10 +231,6 @@ type(tSolutionState) function &
type(tBoundaryCondition), intent(in) :: P_BC,F_BC type(tBoundaryCondition), intent(in) :: P_BC,F_BC
real(pReal), dimension(3,3), intent(in) :: rotation_BC real(pReal), dimension(3,3), intent(in) :: rotation_BC
character(len=*), intent(in) :: incInfoIn character(len=*), intent(in) :: incInfoIn
!--------------------------------------------------------------------------------------------------
! loop variables, convergence etc.
real(pReal), dimension(3,3) :: temp33_Real
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! !

View File

@ -22,7 +22,7 @@ nStress 40 # stress loop limit
rTol_crystalliteState 1.0e-6 # relative tolerance in crystallite state loop (abs tol provided by constitutive law) rTol_crystalliteState 1.0e-6 # relative tolerance in crystallite state loop (abs tol provided by constitutive law)
rTol_crystalliteStress 1.0e-6 # relative tolerance in crystallite stress loop (Lp residuum) rTol_crystalliteStress 1.0e-6 # relative tolerance in crystallite stress loop (Lp residuum)
aTol_crystalliteStress 1.0e-8 # absolute tolerance in crystallite stress loop (Lp residuum!) aTol_crystalliteStress 1.0e-8 # absolute tolerance in crystallite stress loop (Lp residuum!)
rTol_crystalliteTemperature 1.0e-6 # relative tolerance in crystallite state/temperature loop rTol_crystalliteTemperature 1.0e-6 # relative tolerance in crystallite state/temperature loop
## homogenization numerical parameters ## ## homogenization numerical parameters ##
nHomog 20 # homogenization loop limit (only for debugging info, loop limit is determined by "subStepMinHomog") nHomog 20 # homogenization loop limit (only for debugging info, loop limit is determined by "subStepMinHomog")
@ -53,7 +53,7 @@ discrepancyPower_RGC 5.0
fixed_seed 0 # put any number larger than zero, integer, if you want to have a pseudo random distribution fixed_seed 0 # put any number larger than zero, integer, if you want to have a pseudo random distribution
## spectral parameters ## ## spectral parameters ##
err_div_tol 0.1 # Div(P)/avg(P)*meter err_div_tol 1.0e-5 # Div(P)/avg(P)*meter
err_stress_tolrel 0.01 # relative tolerance for fulfillment of stress BC err_stress_tolrel 0.01 # relative tolerance for fulfillment of stress BC
err_stress_tolabs 9.9e40 # absolute tolerance for fulfillment of stress BC err_stress_tolabs 9.9e40 # absolute tolerance for fulfillment of stress BC
err_f_tol 1e-6 # tolerance for compatible and incompatible deformation gradient fields in AL solver err_f_tol 1e-6 # tolerance for compatible and incompatible deformation gradient fields in AL solver
@ -66,7 +66,7 @@ itmin 2 # Minimum iteration number
maxCutBack 3 # maximum cut back level (0: 1, 1: 0.5, 2: 0.25, etc) maxCutBack 3 # maximum cut back level (0: 1, 1: 0.5, 2: 0.25, etc)
memory_efficient 1 # Precalculate Gamma-operator (81 double per point) memory_efficient 1 # Precalculate Gamma-operator (81 double per point)
update_gamma 0 # Update Gamma-operator with current dPdF (not possible if memory_efficient=1) update_gamma 0 # Update Gamma-operator with current dPdF (not possible if memory_efficient=1)
divergence_correction 0 # Use dimension-independent divergence criterion divergence_correction 2 # Use dimension-independent divergence criterion
myspectralsolver basic # Type of spectral solver (basic: basic, basicPETSc: basic with PETSc, AL: augmented Lagrange) myspectralsolver basic # Type of spectral solver (basic: basic, basicPETSc: basic with PETSc, AL: augmented Lagrange)
myfilter none # Type of filtering method to mitigate Gibb's phenomenon (none, cosine, ...) myfilter none # Type of filtering method to mitigate Gibb's phenomenon (none, cosine, ...)
petsc_options -snes_type ngmres -snes_ngmres_anderson # PetSc solver options petsc_options -snes_type ngmres -snes_ngmres_anderson # PetSc solver options

View File

@ -86,11 +86,11 @@ module numerics
!* spectral parameters: !* spectral parameters:
#ifdef Spectral #ifdef Spectral
real(pReal), protected, public :: & real(pReal), protected, public :: &
err_div_tol = 0.1_pReal, & !< Div(P)/avg(P)*meter err_div_tol = 1.0e-5_pReal, & !< Div(P)/avg(P)*meter
err_stress_tolrel = 0.01_pReal, & !< relative tolerance for fullfillment of stress BC, Default: 0.01 allowing deviation of 1% of maximum stress err_stress_tolrel = 0.01_pReal, & !< relative tolerance for fullfillment of stress BC, Default: 0.01 allowing deviation of 1% of maximum stress
err_stress_tolabs = huge(1.0_pReal), & !< absolute tolerance for fullfillment of stress BC, Default: 0.01 allowing deviation of 1% of maximum stress err_stress_tolabs = huge(1.0_pReal), & !< absolute tolerance for fullfillment of stress BC, Default: 0.01 allowing deviation of 1% of maximum stress
err_f_tol = 1e-6_pReal, & err_f_tol = 1.0e-6_pReal, &
err_p_tol = 1e-5_pReal, & err_p_tol = 1.0e-5_pReal, &
fftw_timelimit = -1.0_pReal, & !< sets the timelimit of plan creation for FFTW, see manual on www.fftw.org, Default -1.0: disable timelimit 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 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 polarAlpha = 1.0_pReal, & !< polarization scheme parameter 0.0 < alpha < 2.0. alpha = 1.0 ==> AL scheme, alpha = 2.0 ==> accelerated scheme
@ -109,7 +109,7 @@ module numerics
itmin = 2_pInt, & !< minimum number of iterations itmin = 2_pInt, & !< minimum number of iterations
maxCutBack = 3_pInt, & !< max number of cut backs maxCutBack = 3_pInt, & !< max number of cut backs
regridMode = 0_pInt, & !< 0: no regrid; 1: regrid if DAMASK doesn't converge; 2: regrid if DAMASK or BVP Solver doesn't converge regridMode = 0_pInt, & !< 0: no regrid; 1: regrid if DAMASK doesn't converge; 2: regrid if DAMASK or BVP Solver doesn't converge
divergence_correction = 0_pInt !< correct divergence calculation in fourier space 0: no correction, 1: dimension scaled to 1, 2: dimension scaled to Npoints divergence_correction = 2_pInt !< correct divergence calculation in fourier space 0: no correction, 1: dimension scaled to 1, 2: dimension scaled to Npoints, 3: dimension scaled to sqrt(Npoints)
logical, protected , public :: & logical, protected , public :: &
memory_efficient = .true., & !< for fast execution (pre calculation of gamma_hat), Default .true.: do not precalculate 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 update_gamma = .false. !< update gamma operator with current stiffness, Default .false.: use initial stiffness