changed naming convention (keeping backward compatibility in numerics.config):
myspectralsolver --> spectral_solver (called "spectralsolver") myfilter --> spectral_filter (called "spectralfilter")
This commit is contained in:
parent
79f572f869
commit
6612603a23
|
@ -48,7 +48,7 @@ program DAMASK_spectral_Driver
|
||||||
restartInc
|
restartInc
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
maxCutBack, &
|
maxCutBack, &
|
||||||
mySpectralSolver, &
|
spectral_solver, &
|
||||||
continueCalculation
|
continueCalculation
|
||||||
use homogenization, only: &
|
use homogenization, only: &
|
||||||
materialpoint_sizeResults, &
|
materialpoint_sizeResults, &
|
||||||
|
@ -121,12 +121,12 @@ program DAMASK_spectral_Driver
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
currentLoadcase = 0_pInt, & !< current load case
|
currentLoadcase = 0_pInt, & !< current load case
|
||||||
inc, & !< current increment in current load case
|
inc, & !< current increment in current load case
|
||||||
totalIncsCounter = 0_pInt, & !< total No. of increments
|
totalIncsCounter = 0_pInt, & !< total # of increments
|
||||||
convergedCounter = 0_pInt, & !< No. of converged increments
|
convergedCounter = 0_pInt, & !< # of converged increments
|
||||||
notConvergedCounter = 0_pInt, & !< No. of non-converged increments
|
notConvergedCounter = 0_pInt, & !< # of non-converged increments
|
||||||
resUnit = 0_pInt, & !< file unit for results writing
|
resUnit = 0_pInt, & !< file unit for results writing
|
||||||
statUnit = 0_pInt, & !< file unit for statistics output
|
statUnit = 0_pInt, & !< file unit for statistics output
|
||||||
lastRestartWritten = 0_pInt !< total increment No. at which last restart information was written
|
lastRestartWritten = 0_pInt !< total increment # at which last restart information was written
|
||||||
character(len=6) :: loadcase_string
|
character(len=6) :: loadcase_string
|
||||||
character(len=1024) :: incInfo !< string parsed to solution with information about current load case
|
character(len=1024) :: incInfo !< string parsed to solution with information about current load case
|
||||||
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
|
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
|
||||||
|
@ -313,7 +313,7 @@ program DAMASK_spectral_Driver
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! doing initialization depending on selected solver
|
! doing initialization depending on selected solver
|
||||||
select case (myspectralsolver)
|
select case (spectral_solver)
|
||||||
case (DAMASK_spectral_SolverBasic_label)
|
case (DAMASK_spectral_SolverBasic_label)
|
||||||
call basic_init(loadCases(1)%temperature)
|
call basic_init(loadCases(1)%temperature)
|
||||||
#ifdef PETSc
|
#ifdef PETSc
|
||||||
|
@ -329,7 +329,7 @@ program DAMASK_spectral_Driver
|
||||||
call Polarisation_init(loadCases(1)%temperature)
|
call Polarisation_init(loadCases(1)%temperature)
|
||||||
#endif
|
#endif
|
||||||
case default
|
case default
|
||||||
call IO_error(error_ID = 891, ext_msg = trim(myspectralsolver))
|
call IO_error(error_ID = 891, ext_msg = trim(spectral_solver))
|
||||||
end select
|
end select
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -368,11 +368,7 @@ program DAMASK_spectral_Driver
|
||||||
! loopping over loadcases
|
! loopping over loadcases
|
||||||
loadCaseLooping: do currentLoadCase = 1_pInt, size(loadCases)
|
loadCaseLooping: do currentLoadCase = 1_pInt, size(loadCases)
|
||||||
time0 = time ! currentLoadCase start time
|
time0 = time ! currentLoadCase start time
|
||||||
if (loadCases(currentLoadCase)%followFormerTrajectory) then
|
guess = loadCases(currentLoadCase)%followFormerTrajectory ! change of load case? homogeneous guess for the first inc
|
||||||
guess = .true.
|
|
||||||
else
|
|
||||||
guess = .false. ! change of load case, homogeneous guess for the first inc
|
|
||||||
endif
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! loop oper incs defined in input file for current currentLoadCase
|
! loop oper incs defined in input file for current currentLoadCase
|
||||||
|
@ -412,7 +408,7 @@ program DAMASK_spectral_Driver
|
||||||
remainingLoadCaseTime = time0 - time + loadCases(currentLoadCase)%time + timeInc
|
remainingLoadCaseTime = time0 - time + loadCases(currentLoadCase)%time + timeInc
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! forward solution
|
! forward solution
|
||||||
select case(myspectralsolver)
|
select case(spectral_solver)
|
||||||
case (DAMASK_spectral_SolverBasic_label)
|
case (DAMASK_spectral_SolverBasic_label)
|
||||||
#ifdef PETSc
|
#ifdef PETSc
|
||||||
case (DAMASK_spectral_SolverBasicPETSC_label)
|
case (DAMASK_spectral_SolverBasicPETSC_label)
|
||||||
|
@ -454,7 +450,7 @@ program DAMASK_spectral_Driver
|
||||||
',a,'//IO_intOut(stepFraction)//',a,'//IO_intOut(subStepFactor**cutBackLevel)//')') &
|
',a,'//IO_intOut(stepFraction)//',a,'//IO_intOut(subStepFactor**cutBackLevel)//')') &
|
||||||
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
|
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
|
||||||
'-',stepFraction, '/', subStepFactor**cutBackLevel
|
'-',stepFraction, '/', subStepFactor**cutBackLevel
|
||||||
select case(myspectralsolver)
|
select case(spectral_solver)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! calculate solution
|
! calculate solution
|
||||||
|
@ -550,7 +546,7 @@ program DAMASK_spectral_Driver
|
||||||
enddo incLooping
|
enddo incLooping
|
||||||
enddo loadCaseLooping
|
enddo loadCaseLooping
|
||||||
|
|
||||||
select case (myspectralsolver)
|
select case (spectral_solver)
|
||||||
case (DAMASK_spectral_SolverBasic_label)
|
case (DAMASK_spectral_SolverBasic_label)
|
||||||
call basic_destroy()
|
call basic_destroy()
|
||||||
#ifdef PETSc
|
#ifdef PETSc
|
||||||
|
|
|
@ -962,7 +962,7 @@ real(pReal) function utilities_getFilter(k)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error
|
IO_error
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
myfilter
|
spectral_filter
|
||||||
use math, only: &
|
use math, only: &
|
||||||
PI
|
PI
|
||||||
|
|
||||||
|
@ -971,7 +971,7 @@ real(pReal) function utilities_getFilter(k)
|
||||||
|
|
||||||
utilities_getFilter = 1.0_pReal
|
utilities_getFilter = 1.0_pReal
|
||||||
|
|
||||||
select case (myfilter)
|
select case (spectral_filter)
|
||||||
case ('none') ! default, no weighting
|
case ('none') ! default, no weighting
|
||||||
case ('cosine') ! cosine curve with 1 for avg and zero for highest freq
|
case ('cosine') ! cosine curve with 1 for avg and zero for highest freq
|
||||||
utilities_getFilter = product(1.0_pReal + cos(PI*k*scaledGeomSize/grid))/8.0_pReal
|
utilities_getFilter = product(1.0_pReal + cos(PI*k*scaledGeomSize/grid))/8.0_pReal
|
||||||
|
@ -979,7 +979,7 @@ real(pReal) function utilities_getFilter(k)
|
||||||
utilities_getFilter = 1.0_pReal/(1.0_pReal + &
|
utilities_getFilter = 1.0_pReal/(1.0_pReal + &
|
||||||
(k(1)*k(1) + k(2)*k(2) + k(3)*k(3)))
|
(k(1)*k(1) + k(2)*k(2) + k(3)*k(3)))
|
||||||
case default
|
case default
|
||||||
call IO_error(error_ID = 892_pInt, ext_msg = trim(myfilter))
|
call IO_error(error_ID = 892_pInt, ext_msg = trim(spectral_filter))
|
||||||
end select
|
end select
|
||||||
|
|
||||||
end function utilities_getFilter
|
end function utilities_getFilter
|
||||||
|
|
|
@ -1410,7 +1410,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
|
||||||
IO_write_jobFile, &
|
IO_write_jobFile, &
|
||||||
IO_error
|
IO_error
|
||||||
use numerics, only: &
|
use numerics, only: &
|
||||||
mySpectralSolver
|
spectral_solver
|
||||||
use math, only: &
|
use math, only: &
|
||||||
math_periodicNearestNeighbor, &
|
math_periodicNearestNeighbor, &
|
||||||
math_mul33x3
|
math_mul33x3
|
||||||
|
@ -1482,7 +1482,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! read in deformation gradient to calculate coordinates, shape depend of selected solver
|
! read in deformation gradient to calculate coordinates, shape depend of selected solver
|
||||||
select case(myspectralsolver)
|
select case(spectral_solver)
|
||||||
case('basic')
|
case('basic')
|
||||||
allocate(spectralF33(3,3,grid(1),grid(2),grid(3)))
|
allocate(spectralF33(3,3,grid(1),grid(2),grid(3)))
|
||||||
call IO_read_realFile(FILEUNIT,'F',trim(getSolverJobName()),size(spectralF33))
|
call IO_read_realFile(FILEUNIT,'F',trim(getSolverJobName()),size(spectralF33))
|
||||||
|
@ -1634,7 +1634,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! set F to average values
|
! set F to average values
|
||||||
select case(myspectralsolver)
|
select case(spectral_solver)
|
||||||
case('basic')
|
case('basic')
|
||||||
allocate(spectralF33New(3,3,resNew(1),resNew(2),resNew(3)))
|
allocate(spectralF33New(3,3,resNew(1),resNew(2),resNew(3)))
|
||||||
spectralF33New = spread(spread(spread(Favg,3,resNew(1)),4,resNew(2)),5,resNew(3))
|
spectralF33New = spread(spread(spread(Favg,3,resNew(1)),4,resNew(2)),5,resNew(3))
|
||||||
|
|
|
@ -84,8 +84,8 @@ module numerics
|
||||||
character(len=64), private :: &
|
character(len=64), private :: &
|
||||||
fftw_plan_mode = 'FFTW_PATIENT' !< reads the planing-rigor flag, see manual on www.fftw.org, Default FFTW_PATIENT: use patient planner flag
|
fftw_plan_mode = 'FFTW_PATIENT' !< reads the planing-rigor flag, see manual on www.fftw.org, Default FFTW_PATIENT: use patient planner flag
|
||||||
character(len=64), protected, public :: &
|
character(len=64), protected, public :: &
|
||||||
myspectralsolver = 'basic' , & !< spectral solution method
|
spectral_solver = 'basic' , & !< spectral solution method
|
||||||
myfilter = 'none' !< spectral filtering method
|
spectral_filter = 'none' !< spectral filtering method
|
||||||
character(len=1024), protected, public :: &
|
character(len=1024), protected, public :: &
|
||||||
petsc_options = '-snes_type ngmres &
|
petsc_options = '-snes_type ngmres &
|
||||||
&-snes_ngmres_anderson '
|
&-snes_ngmres_anderson '
|
||||||
|
@ -328,8 +328,8 @@ subroutine numerics_init
|
||||||
fftw_timelimit = IO_floatValue(line,positions,2_pInt)
|
fftw_timelimit = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('fftw_plan_mode')
|
case ('fftw_plan_mode')
|
||||||
fftw_plan_mode = IO_lc(IO_stringValue(line,positions,2_pInt))
|
fftw_plan_mode = IO_lc(IO_stringValue(line,positions,2_pInt))
|
||||||
case ('myfilter')
|
case ('spectralfilter','myfilter')
|
||||||
myfilter = IO_lc(IO_stringValue(line,positions,2_pInt))
|
spectral_filter = IO_lc(IO_stringValue(line,positions,2_pInt))
|
||||||
case ('divergence_correction')
|
case ('divergence_correction')
|
||||||
divergence_correction = IO_intValue(line,positions,2_pInt)
|
divergence_correction = IO_intValue(line,positions,2_pInt)
|
||||||
case ('update_gamma')
|
case ('update_gamma')
|
||||||
|
@ -337,8 +337,8 @@ subroutine numerics_init
|
||||||
#ifdef PETSc
|
#ifdef PETSc
|
||||||
case ('petsc_options')
|
case ('petsc_options')
|
||||||
petsc_options = trim(line(positions(4):))
|
petsc_options = trim(line(positions(4):))
|
||||||
case ('myspectralsolver')
|
case ('spectralsolver','myspectralsolver')
|
||||||
myspectralsolver = IO_lc(IO_stringValue(line,positions,2_pInt))
|
spectral_solver = IO_lc(IO_stringValue(line,positions,2_pInt))
|
||||||
case ('err_curl_tolabs')
|
case ('err_curl_tolabs')
|
||||||
err_curl_tolAbs = IO_floatValue(line,positions,2_pInt)
|
err_curl_tolAbs = IO_floatValue(line,positions,2_pInt)
|
||||||
case ('err_curl_tolrel')
|
case ('err_curl_tolrel')
|
||||||
|
@ -349,7 +349,7 @@ subroutine numerics_init
|
||||||
polarBeta = IO_floatValue(line,positions,2_pInt)
|
polarBeta = IO_floatValue(line,positions,2_pInt)
|
||||||
#endif
|
#endif
|
||||||
#ifndef PETSc
|
#ifndef PETSc
|
||||||
case ('myspectralsolver', 'petsc_options', &
|
case ('spectralsolver', 'myspectralsolver', 'petsc_options', &
|
||||||
'err_curl_tolabs','err_curl_tolrel','polaralpha','polarBeta') ! found PETSc parameter, but compiled without PETSc
|
'err_curl_tolabs','err_curl_tolrel','polaralpha','polarBeta') ! found PETSc parameter, but compiled without PETSc
|
||||||
call IO_warning(41_pInt,ext_msg=tag)
|
call IO_warning(41_pInt,ext_msg=tag)
|
||||||
#endif
|
#endif
|
||||||
|
@ -357,7 +357,7 @@ subroutine numerics_init
|
||||||
#ifndef Spectral
|
#ifndef Spectral
|
||||||
case ('err_div_tolabs','err_div_tolrel','err_stress_tolrel','err_stress_tolabs',& ! found spectral parameter for FEM build
|
case ('err_div_tolabs','err_div_tolrel','err_stress_tolrel','err_stress_tolabs',& ! found spectral parameter for FEM build
|
||||||
'itmax', 'itmin','memory_efficient','fftw_timelimit','fftw_plan_mode', &
|
'itmax', 'itmin','memory_efficient','fftw_timelimit','fftw_plan_mode', &
|
||||||
'divergence_correction','update_gamma','myfilter', &
|
'divergence_correction','update_gamma','spectralfilter','myfilter', &
|
||||||
'err_curl_tolabs','err_curl_tolrel', &
|
'err_curl_tolabs','err_curl_tolrel', &
|
||||||
'maxcutback','polaralpha','polarbeta')
|
'maxcutback','polaralpha','polarbeta')
|
||||||
call IO_warning(40_pInt,ext_msg=tag)
|
call IO_warning(40_pInt,ext_msg=tag)
|
||||||
|
@ -496,7 +496,7 @@ subroutine numerics_init
|
||||||
write(6,'(a24,1x,i8)') ' continueCalculation: ',continueCalculation
|
write(6,'(a24,1x,i8)') ' continueCalculation: ',continueCalculation
|
||||||
write(6,'(a24,1x,L8)') ' memory_efficient: ',memory_efficient
|
write(6,'(a24,1x,L8)') ' memory_efficient: ',memory_efficient
|
||||||
write(6,'(a24,1x,i8)') ' divergence_correction: ',divergence_correction
|
write(6,'(a24,1x,i8)') ' divergence_correction: ',divergence_correction
|
||||||
write(6,'(a24,1x,a)') ' myfilter: ',trim(myfilter)
|
write(6,'(a24,1x,a)') ' spectral filter: ',trim(spectral_filter)
|
||||||
if(fftw_timelimit<0.0_pReal) then
|
if(fftw_timelimit<0.0_pReal) then
|
||||||
write(6,'(a24,1x,L8)') ' fftw_timelimit: ',.false.
|
write(6,'(a24,1x,L8)') ' fftw_timelimit: ',.false.
|
||||||
else
|
else
|
||||||
|
@ -514,7 +514,7 @@ subroutine numerics_init
|
||||||
write(6,'(a24,1x,es8.1)') ' err_curl_tolRel: ',err_curl_tolRel
|
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)') ' polarAlpha: ',polarAlpha
|
||||||
write(6,'(a24,1x,es8.1)') ' polarBeta: ',polarBeta
|
write(6,'(a24,1x,es8.1)') ' polarBeta: ',polarBeta
|
||||||
write(6,'(a24,1x,a)') ' myspectralsolver: ',trim(myspectralsolver)
|
write(6,'(a24,1x,a)') ' spectral solver: ',trim(spectral_solver)
|
||||||
write(6,'(a24,1x,a)') ' PETSc_options: ',trim(petsc_options)
|
write(6,'(a24,1x,a)') ' PETSc_options: ',trim(petsc_options)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue