changed naming convention (keeping backward compatibility in numerics.config):

myspectralsolver --> spectral_solver (called "spectralsolver")
myfilter --> spectral_filter (called "spectralfilter")
This commit is contained in:
Philip Eisenlohr 2014-09-03 19:59:47 +00:00
parent 79f572f869
commit 6612603a23
4 changed files with 32 additions and 36 deletions

View File

@ -48,7 +48,7 @@ program DAMASK_spectral_Driver
restartInc
use numerics, only: &
maxCutBack, &
mySpectralSolver, &
spectral_solver, &
continueCalculation
use homogenization, only: &
materialpoint_sizeResults, &
@ -92,8 +92,8 @@ program DAMASK_spectral_Driver
integer(pInt), dimension(1_pInt + maxNchunks*2_pInt) :: positions ! this is longer than needed for geometry parsing
integer(pInt) :: &
N_t = 0_pInt, & !< # of time indicators found in load case file
N_n = 0_pInt, & !< # of increment specifiers found in load case file
N_t = 0_pInt, & !< # of time indicators found in load case file
N_n = 0_pInt, & !< # of increment specifiers found in load case file
N_def = 0_pInt !< # of rate of deformation specifiers found in load case file
character(len=65536) :: &
line
@ -121,12 +121,12 @@ program DAMASK_spectral_Driver
integer(pInt) :: &
currentLoadcase = 0_pInt, & !< current load case
inc, & !< current increment in current load case
totalIncsCounter = 0_pInt, & !< total No. of increments
convergedCounter = 0_pInt, & !< No. of converged increments
notConvergedCounter = 0_pInt, & !< No. of non-converged increments
totalIncsCounter = 0_pInt, & !< total # of increments
convergedCounter = 0_pInt, & !< # of converged increments
notConvergedCounter = 0_pInt, & !< # of non-converged increments
resUnit = 0_pInt, & !< file unit for results writing
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=1024) :: incInfo !< string parsed to solution with information about current load case
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
@ -313,7 +313,7 @@ program DAMASK_spectral_Driver
!--------------------------------------------------------------------------------------------------
! doing initialization depending on selected solver
select case (myspectralsolver)
select case (spectral_solver)
case (DAMASK_spectral_SolverBasic_label)
call basic_init(loadCases(1)%temperature)
#ifdef PETSc
@ -329,7 +329,7 @@ program DAMASK_spectral_Driver
call Polarisation_init(loadCases(1)%temperature)
#endif
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
!--------------------------------------------------------------------------------------------------
@ -350,8 +350,8 @@ program DAMASK_spectral_Driver
write(resUnit) 'materialpoint_sizeResults', materialpoint_sizeResults
write(resUnit) 'loadcases', size(loadCases)
write(resUnit) 'frequencies', loadCases%outputfrequency ! one entry per currentLoadCase
write(resUnit) 'times', loadCases%time ! one entry per currentLoadCase
write(resUnit) 'logscales', loadCases%logscale
write(resUnit) 'times', loadCases%time ! one entry per currentLoadCase
write(resUnit) 'logscales', loadCases%logscale
write(resUnit) 'increments', loadCases%incs ! one entry per currentLoadCase
write(resUnit) 'startingIncrement', restartInc - 1_pInt ! start with writing out the previous inc
write(resUnit) 'eoh' ! end of header
@ -368,16 +368,12 @@ program DAMASK_spectral_Driver
! loopping over loadcases
loadCaseLooping: do currentLoadCase = 1_pInt, size(loadCases)
time0 = time ! currentLoadCase start time
if (loadCases(currentLoadCase)%followFormerTrajectory) then
guess = .true.
else
guess = .false. ! change of load case, homogeneous guess for the first inc
endif
guess = loadCases(currentLoadCase)%followFormerTrajectory ! change of load case? homogeneous guess for the first inc
!--------------------------------------------------------------------------------------------------
! loop oper incs defined in input file for current currentLoadCase
incLooping: do inc = 1_pInt, loadCases(currentLoadCase)%incs
totalIncsCounter = totalIncsCounter + 1_pInt
totalIncsCounter = totalIncsCounter + 1_pInt
!--------------------------------------------------------------------------------------------------
! forwarding time
@ -412,7 +408,7 @@ program DAMASK_spectral_Driver
remainingLoadCaseTime = time0 - time + loadCases(currentLoadCase)%time + timeInc
!--------------------------------------------------------------------------------------------------
! forward solution
select case(myspectralsolver)
select case(spectral_solver)
case (DAMASK_spectral_SolverBasic_label)
#ifdef PETSc
case (DAMASK_spectral_SolverBasicPETSC_label)
@ -454,7 +450,7 @@ program DAMASK_spectral_Driver
',a,'//IO_intOut(stepFraction)//',a,'//IO_intOut(subStepFactor**cutBackLevel)//')') &
'Increment ',totalIncsCounter,'/',sum(loadCases%incs),&
'-',stepFraction, '/', subStepFactor**cutBackLevel
select case(myspectralsolver)
select case(spectral_solver)
!--------------------------------------------------------------------------------------------------
! calculate solution
@ -550,7 +546,7 @@ program DAMASK_spectral_Driver
enddo incLooping
enddo loadCaseLooping
select case (myspectralsolver)
select case (spectral_solver)
case (DAMASK_spectral_SolverBasic_label)
call basic_destroy()
#ifdef PETSc

View File

@ -962,7 +962,7 @@ real(pReal) function utilities_getFilter(k)
use IO, only: &
IO_error
use numerics, only: &
myfilter
spectral_filter
use math, only: &
PI
@ -971,7 +971,7 @@ real(pReal) function utilities_getFilter(k)
utilities_getFilter = 1.0_pReal
select case (myfilter)
select case (spectral_filter)
case ('none') ! default, no weighting
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
@ -979,7 +979,7 @@ real(pReal) function utilities_getFilter(k)
utilities_getFilter = 1.0_pReal/(1.0_pReal + &
(k(1)*k(1) + k(2)*k(2) + k(3)*k(3)))
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 function utilities_getFilter

View File

@ -1410,7 +1410,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
IO_write_jobFile, &
IO_error
use numerics, only: &
mySpectralSolver
spectral_solver
use math, only: &
math_periodicNearestNeighbor, &
math_mul33x3
@ -1482,7 +1482,7 @@ function mesh_regrid(adaptive,resNewInput,minRes)
!--------------------------------------------------------------------------------------------------
! read in deformation gradient to calculate coordinates, shape depend of selected solver
select case(myspectralsolver)
select case(spectral_solver)
case('basic')
allocate(spectralF33(3,3,grid(1),grid(2),grid(3)))
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
select case(myspectralsolver)
select case(spectral_solver)
case('basic')
allocate(spectralF33New(3,3,resNew(1),resNew(2),resNew(3)))
spectralF33New = spread(spread(spread(Favg,3,resNew(1)),4,resNew(2)),5,resNew(3))

View File

@ -84,8 +84,8 @@ module numerics
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
character(len=64), protected, public :: &
myspectralsolver = 'basic' , & !< spectral solution method
myfilter = 'none' !< spectral filtering method
spectral_solver = 'basic' , & !< spectral solution method
spectral_filter = 'none' !< spectral filtering method
character(len=1024), protected, public :: &
petsc_options = '-snes_type ngmres &
&-snes_ngmres_anderson '
@ -328,8 +328,8 @@ subroutine numerics_init
fftw_timelimit = IO_floatValue(line,positions,2_pInt)
case ('fftw_plan_mode')
fftw_plan_mode = IO_lc(IO_stringValue(line,positions,2_pInt))
case ('myfilter')
myfilter = IO_lc(IO_stringValue(line,positions,2_pInt))
case ('spectralfilter','myfilter')
spectral_filter = IO_lc(IO_stringValue(line,positions,2_pInt))
case ('divergence_correction')
divergence_correction = IO_intValue(line,positions,2_pInt)
case ('update_gamma')
@ -337,8 +337,8 @@ subroutine numerics_init
#ifdef PETSc
case ('petsc_options')
petsc_options = trim(line(positions(4):))
case ('myspectralsolver')
myspectralsolver = IO_lc(IO_stringValue(line,positions,2_pInt))
case ('spectralsolver','myspectralsolver')
spectral_solver = IO_lc(IO_stringValue(line,positions,2_pInt))
case ('err_curl_tolabs')
err_curl_tolAbs = IO_floatValue(line,positions,2_pInt)
case ('err_curl_tolrel')
@ -349,7 +349,7 @@ subroutine numerics_init
polarBeta = IO_floatValue(line,positions,2_pInt)
#endif
#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
call IO_warning(41_pInt,ext_msg=tag)
#endif
@ -357,7 +357,7 @@ subroutine numerics_init
#ifndef Spectral
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', &
'divergence_correction','update_gamma','myfilter', &
'divergence_correction','update_gamma','spectralfilter','myfilter', &
'err_curl_tolabs','err_curl_tolrel', &
'maxcutback','polaralpha','polarbeta')
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,L8)') ' memory_efficient: ',memory_efficient
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
write(6,'(a24,1x,L8)') ' fftw_timelimit: ',.false.
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)') ' polarAlpha: ',polarAlpha
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)
#endif
#endif