polishing

This commit is contained in:
Sharan Roongta 2020-06-17 18:02:22 +02:00
parent d4d29ff376
commit d3f9e9f115
5 changed files with 65 additions and 73 deletions

View File

@ -320,7 +320,7 @@ program DAMASK_grid
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! doing initialization depending on active solvers ! doing initialization depending on active solvers
call Utilities_init call spectral_Utilities_init
do field = 1, nActiveFields do field = 1, nActiveFields
select case (loadCases(1)%ID(field)) select case (loadCases(1)%ID(field))
case(FIELD_MECH_ID) case(FIELD_MECH_ID)

View File

@ -136,7 +136,7 @@ module spectral_utilities
spectral_derivative_ID spectral_derivative_ID
public :: & public :: &
utilities_init, & spectral_utilities_init, &
utilities_updateGamma, & utilities_updateGamma, &
utilities_FFTtensorForward, & utilities_FFTtensorForward, &
utilities_FFTtensorBackward, & utilities_FFTtensorBackward, &
@ -173,7 +173,7 @@ contains
!> level chosen. !> level chosen.
!> Initializes FFTW. !> Initializes FFTW.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine utilities_init subroutine spectral_utilities_init
PetscErrorCode :: ierr PetscErrorCode :: ierr
integer :: i, j, k, & integer :: i, j, k, &
@ -382,7 +382,7 @@ subroutine utilities_init
allocate (gamma_hat(3,3,3,3,grid1Red,grid(2),grid3), source = cmplx(0.0_pReal,0.0_pReal,pReal)) allocate (gamma_hat(3,3,3,3,grid1Red,grid(2),grid3), source = cmplx(0.0_pReal,0.0_pReal,pReal))
endif endif
end subroutine utilities_init end subroutine spectral_utilities_init
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------

View File

@ -236,7 +236,7 @@ program DAMASK_mesh
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! doing initialization depending on active solvers ! doing initialization depending on active solvers
call Utilities_init call FEM_Utilities_init
do field = 1, nActiveFields do field = 1, nActiveFields
select case (loadCases(1)%fieldBC(field)%ID) select case (loadCases(1)%fieldBC(field)%ID)
case(FIELD_MECH_ID) case(FIELD_MECH_ID)

View File

@ -85,7 +85,7 @@ module FEM_utilities
end type tLoadCase end type tLoadCase
public :: & public :: &
utilities_init, & FEM_utilities_init, &
utilities_constitutiveResponse, & utilities_constitutiveResponse, &
utilities_projectBCValues, & utilities_projectBCValues, &
FIELD_MECH_ID, & FIELD_MECH_ID, &
@ -99,7 +99,7 @@ contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief allocates all neccessary fields, sets debug flags !> @brief allocates all neccessary fields, sets debug flags
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine utilities_init subroutine FEM_utilities_init
character(len=pStringLen) :: petsc_optionsOrder character(len=pStringLen) :: petsc_optionsOrder
class(tNode), pointer :: & class(tNode), pointer :: &
@ -141,7 +141,7 @@ subroutine utilities_init
wgt = 1.0/real(mesh_maxNips*mesh_NcpElemsGlobal,pReal) wgt = 1.0/real(mesh_maxNips*mesh_NcpElemsGlobal,pReal)
end subroutine utilities_init end subroutine FEM_utilities_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -56,12 +56,12 @@ contains
! a sanity check ! a sanity check
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine numerics_init subroutine numerics_init
!$ integer :: gotDAMASK_NUM_THREADS = 1 !$ integer :: gotDAMASK_NUM_THREADS = 1
integer :: i, ierr integer :: i, ierr
character(len=:), allocatable :: & character(len=:), allocatable :: &
numerics_input, & numerics_input, &
numerics_inFlow, & numerics_inFlow
key
class (tNode), pointer :: & class (tNode), pointer :: &
num_grid num_grid
logical :: fexist logical :: fexist
@ -93,21 +93,13 @@ subroutine numerics_init
numerics_inFlow = to_flow(numerics_input) numerics_inFlow = to_flow(numerics_input)
numerics_root => parse_flow(numerics_inFlow,defaultVal=emptyDict) numerics_root => parse_flow(numerics_inFlow,defaultVal=emptyDict)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! spectral parameters ! grid parameters
num_grid => numerics_root%get('grid',defaultVal=emptyDict) num_grid => numerics_root%get('grid',defaultVal=emptyDict)
do i=1,num_grid%length itmax = num_grid%get_asInt('itmax',defaultVal=250)
key = num_grid%getKey(i) itmin = num_grid%get_asInt('itmin',defaultVal=1)
select case(key)
case ('itmax')
itmax = num_grid%get_asInt(key)
case ('itmin')
itmin = num_grid%get_asInt(key)
#ifdef PETSC #ifdef PETSC
case ('petsc_options') petsc_options = num_grid%get_asString('petsc_options',defaultVal = '')
petsc_options = num_grid%get_asString(key)
#endif #endif
endselect
enddo
else fileExists else fileExists
write(6,'(a,/)') ' using standard values' write(6,'(a,/)') ' using standard values'
flush(6) flush(6)