renaming "spectral" to "grid"

This commit is contained in:
Martin Diehl 2019-03-23 09:27:58 +01:00
parent 593fa24bad
commit d55a7da592
6 changed files with 34 additions and 22 deletions

View File

@ -105,9 +105,9 @@ set (CMAKE_C_COMPILER "${PETSC_MPICC}")
# Now start to care about DAMASK # Now start to care about DAMASK
# DAMASK solver defines project to build # DAMASK solver defines project to build
if (DAMASK_SOLVER STREQUAL "SPECTRAL") if (DAMASK_SOLVER STREQUAL "GRID")
project (DAMASK_spectral Fortran C) project (DAMASK_spectral Fortran C)
add_definitions (-DSpectral) add_definitions (-DGrid)
message ("Building Spectral Solver\n") message ("Building Spectral Solver\n")
elseif (DAMASK_SOLVER STREQUAL "FEM") elseif (DAMASK_SOLVER STREQUAL "FEM")
project (DAMASK_FEM Fortran C) project (DAMASK_FEM Fortran C)

View File

@ -6,17 +6,17 @@ SHELL = /bin/sh
all: spectral FEM processing all: spectral FEM processing
.PHONY: spectral .PHONY: spectral
spectral: build/spectral spectral: build/grid
@(cd build/spectral;make -j4 --no-print-directory -ws all install;) @(cd build/grid;make -j4 --no-print-directory -ws all install;)
.PHONY: FEM .PHONY: FEM
FEM: build/FEM FEM: build/FEM
@(cd build/FEM; make -j4 --no-print-directory -ws all install;) @(cd build/FEM; make -j4 --no-print-directory -ws all install;)
.PHONY: build/spectral .PHONY: build/grid
build/spectral: build/grid:
@mkdir -p build/spectral @mkdir -p build/grid
@(cd build/spectral; cmake -Wno-dev -DDAMASK_SOLVER=SPECTRAL -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;) @(cd build/grid; cmake -Wno-dev -DDAMASK_SOLVER=GRID -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;)
.PHONY: build/FEM .PHONY: build/FEM
build/FEM: build/FEM:

View File

@ -72,7 +72,7 @@ subroutine FE_init
modelName = getSolverJobName() modelName = getSolverJobName()
#if defined(Spectral) || defined(FEM) #if defined(Grid) || defined(FEM)
restartInc = interface_RestartInc restartInc = interface_RestartInc
if(restartInc < 0_pInt) then if(restartInc < 0_pInt) then

View File

@ -77,7 +77,7 @@ module numerics
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! spectral parameters: ! spectral parameters:
#ifdef Spectral #ifdef Grid
real(pReal), protected, public :: & real(pReal), protected, public :: &
err_div_tolAbs = 1.0e-4_pReal, & !< absolute tolerance for equilibrium err_div_tolAbs = 1.0e-4_pReal, & !< absolute tolerance for equilibrium
err_div_tolRel = 5.0e-4_pReal, & !< relative tolerance for equilibrium err_div_tolRel = 5.0e-4_pReal, & !< relative tolerance for equilibrium
@ -318,7 +318,7 @@ subroutine numerics_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! spectral parameters ! spectral parameters
#ifdef Spectral #ifdef Grid
case ('err_div_tolabs') case ('err_div_tolabs')
err_div_tolAbs = IO_floatValue(line,chunkPos,2_pInt) err_div_tolAbs = IO_floatValue(line,chunkPos,2_pInt)
case ('err_div_tolrel') case ('err_div_tolrel')
@ -376,8 +376,6 @@ subroutine numerics_init
'bbarstabilisation') 'bbarstabilisation')
call IO_warning(40_pInt,ext_msg=tag) call IO_warning(40_pInt,ext_msg=tag)
#endif #endif
case default ! found unknown keyword
call IO_error(300_pInt,ext_msg=tag)
end select end select
enddo enddo
@ -386,7 +384,7 @@ subroutine numerics_init
flush(6) flush(6)
endif fileExists endif fileExists
#ifdef Spectral #ifdef Grid
select case(IO_lc(fftw_plan_mode)) ! setting parameters for the plan creation of FFTW. Basically a translation from fftw3.f select case(IO_lc(fftw_plan_mode)) ! setting parameters for the plan creation of FFTW. Basically a translation from fftw3.f
case('estimate','fftw_estimate') ! ordered from slow execution (but fast plan creation) to fast execution case('estimate','fftw_estimate') ! ordered from slow execution (but fast plan creation) to fast execution
fftw_planner_flag = 64_pInt fftw_planner_flag = 64_pInt
@ -475,7 +473,7 @@ subroutine numerics_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! spectral parameters ! spectral parameters
#ifdef Spectral #ifdef Grid
write(6,'(a24,1x,L8)') ' continueCalculation: ',continueCalculation write(6,'(a24,1x,L8)') ' 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
@ -560,7 +558,7 @@ subroutine numerics_init
if (err_thermal_tolrel <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_thermal_tolrel') 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_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') if (err_damage_tolrel <= 0.0_pReal) call IO_error(301_pInt,ext_msg='err_damage_tolrel')
#ifdef Spectral #ifdef Grid
if (divergence_correction < 0_pInt .or. & if (divergence_correction < 0_pInt .or. &
divergence_correction > 2_pInt) call IO_error(301_pInt,ext_msg='divergence_correction') divergence_correction > 2_pInt) call IO_error(301_pInt,ext_msg='divergence_correction')
if (update_gamma .and. & if (update_gamma .and. &

View File

@ -102,6 +102,17 @@ module spectral_utilities
real(pReal) :: timeincOld real(pReal) :: timeincOld
end type tSolutionParams end type tSolutionParams
type, private :: tNumerics
real(pReal) :: &
spectral_derivative, &
fftw_planner_flag, &
fftw_timelimit, &
memory_efficient, &
petsc_defaultOptions, &
petsc_options, &
divergence_correction
end type tNumerics
enum, bind(c) enum, bind(c)
enumerator :: DERIVATIVE_CONTINUOUS_ID, & enumerator :: DERIVATIVE_CONTINUOUS_ID, &
DERIVATIVE_CENTRAL_DIFF_ID, & DERIVATIVE_CENTRAL_DIFF_ID, &
@ -195,6 +206,9 @@ subroutine utilities_init()
write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>' write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>'
write(6,'(/,a)') ' Diehl, Diploma Thesis TU München, 2010'
write(6,'(a)') ' https://doi.org/10.13140/2.1.3234.3840'
write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity 46:3753, 2013' write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity 46:3753, 2013'
write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2012.09.012' write(6,'(a)') ' https://doi.org/10.1016/j.ijplas.2012.09.012'