better as local variables
This commit is contained in:
parent
e455dd4b9a
commit
f6355d199a
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit a22650393972eeaf4fa20bb5a5fe69f853c211fa
|
Subproject commit 017b38d79deb4720368927b8a884527e2b331c23
|
|
@ -61,6 +61,7 @@ program DAMASK_grid
|
||||||
i, j, k, l, field, &
|
i, j, k, l, field, &
|
||||||
errorID = 0, &
|
errorID = 0, &
|
||||||
cutBackLevel = 0, & !< cut back level \f$ t = \frac{t_{inc}}{2^l} \f$
|
cutBackLevel = 0, & !< cut back level \f$ t = \frac{t_{inc}}{2^l} \f$
|
||||||
|
maxCutBack, & !< max number of cut backs
|
||||||
stepFraction = 0 !< fraction of current time interval
|
stepFraction = 0 !< fraction of current time interval
|
||||||
integer :: &
|
integer :: &
|
||||||
currentLoadcase = 0, & !< current load case
|
currentLoadcase = 0, & !< current load case
|
||||||
|
@ -68,6 +69,7 @@ program DAMASK_grid
|
||||||
totalIncsCounter = 0, & !< total # of increments
|
totalIncsCounter = 0, & !< total # of increments
|
||||||
statUnit = 0, & !< file unit for statistics output
|
statUnit = 0, & !< file unit for statistics output
|
||||||
stagIter, &
|
stagIter, &
|
||||||
|
stagItMax, & !< max number of field level staggered iterations
|
||||||
nActiveFields = 0
|
nActiveFields = 0
|
||||||
character(len=pStringLen), dimension(:), allocatable :: fileContent
|
character(len=pStringLen), dimension(:), allocatable :: fileContent
|
||||||
character(len=pStringLen) :: &
|
character(len=pStringLen) :: &
|
||||||
|
@ -90,7 +92,8 @@ program DAMASK_grid
|
||||||
external :: &
|
external :: &
|
||||||
quit
|
quit
|
||||||
class (tNode), pointer :: &
|
class (tNode), pointer :: &
|
||||||
num_grid
|
num_grid, &
|
||||||
|
num_generic
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init DAMASK (all modules)
|
! init DAMASK (all modules)
|
||||||
|
@ -145,6 +148,15 @@ program DAMASK_grid
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
|
!-------------------------------------------------------------------------------------------------
|
||||||
|
! reading field paramters from numerics file and do sanity checks
|
||||||
|
num_generic => numerics_root%get('generic', defaultVal=emptyDict)
|
||||||
|
stagItMax = num_generic%get_asInt('maxStaggeredIter',defaultVal=10)
|
||||||
|
maxCutBack = num_generic%get_asInt('maxCutBack',defaultVal=3)
|
||||||
|
|
||||||
|
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
||||||
|
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! reading information from load case file and to sanity checks
|
! reading information from load case file and to sanity checks
|
||||||
fileContent = IO_readlines(trim(loadCaseFile))
|
fileContent = IO_readlines(trim(loadCaseFile))
|
||||||
|
|
|
@ -13,6 +13,7 @@ module discretization_marc
|
||||||
use IO
|
use IO
|
||||||
use debug
|
use debug
|
||||||
use numerics
|
use numerics
|
||||||
|
use YAML_types
|
||||||
use FEsolving
|
use FEsolving
|
||||||
use element
|
use element
|
||||||
use discretization
|
use discretization
|
||||||
|
@ -68,9 +69,14 @@ subroutine discretization_marc_init
|
||||||
real(pReal), dimension(:,:,:,:),allocatable :: &
|
real(pReal), dimension(:,:,:,:),allocatable :: &
|
||||||
unscaledNormals
|
unscaledNormals
|
||||||
|
|
||||||
|
class(tNode), pointer :: &
|
||||||
|
num_commercialFEM
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- discretization_marc init -+>>>'; flush(6)
|
write(6,'(/,a)') ' <<<+- discretization_marc init -+>>>'; flush(6)
|
||||||
|
|
||||||
mesh_unitlength = numerics_unitlength ! set physical extent of a length unit in mesh
|
num_commercialFEM => numerics_root%get('commercialFEM',defaultVal = emptyDict)
|
||||||
|
mesh_unitlength = num_commercialFEM%get_asFloat('unitlength',defaultVal=1.0_pReal) ! set physical extent of a length unit in mesh
|
||||||
|
if (mesh_unitlength <= 0.0_pReal) call IO_error(301,ext_msg='unitlength')
|
||||||
|
|
||||||
call inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogenizationAt)
|
call inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogenizationAt)
|
||||||
nElems = size(connectivity_elem,2)
|
nElems = size(connectivity_elem,2)
|
||||||
|
|
|
@ -16,6 +16,7 @@ program DAMASK_mesh
|
||||||
use CPFEM2
|
use CPFEM2
|
||||||
use FEsolving
|
use FEsolving
|
||||||
use numerics
|
use numerics
|
||||||
|
use YAML_types
|
||||||
use discretization_mesh
|
use discretization_mesh
|
||||||
use FEM_Utilities
|
use FEM_Utilities
|
||||||
use mesh_mech_FEM
|
use mesh_mech_FEM
|
||||||
|
@ -48,6 +49,7 @@ program DAMASK_mesh
|
||||||
i, &
|
i, &
|
||||||
errorID, &
|
errorID, &
|
||||||
cutBackLevel = 0, & !< cut back level \f$ t = \frac{t_{inc}}{2^l} \f$
|
cutBackLevel = 0, & !< cut back level \f$ t = \frac{t_{inc}}{2^l} \f$
|
||||||
|
maxCutBack, & !< max number of cutbacks
|
||||||
stepFraction = 0, & !< fraction of current time interval
|
stepFraction = 0, & !< fraction of current time interval
|
||||||
currentLoadcase = 0, & !< current load case
|
currentLoadcase = 0, & !< current load case
|
||||||
currentFace = 0, &
|
currentFace = 0, &
|
||||||
|
@ -55,7 +57,10 @@ program DAMASK_mesh
|
||||||
totalIncsCounter = 0, & !< total # of increments
|
totalIncsCounter = 0, & !< total # of increments
|
||||||
statUnit = 0, & !< file unit for statistics output
|
statUnit = 0, & !< file unit for statistics output
|
||||||
stagIter, &
|
stagIter, &
|
||||||
|
stagItMax, & !< max number of field level staggered iterations
|
||||||
component
|
component
|
||||||
|
class(tNode), pointer :: &
|
||||||
|
num_generic
|
||||||
character(len=pStringLen), dimension(:), allocatable :: fileContent
|
character(len=pStringLen), dimension(:), allocatable :: fileContent
|
||||||
character(len=pStringLen) :: &
|
character(len=pStringLen) :: &
|
||||||
incInfo, &
|
incInfo, &
|
||||||
|
@ -73,6 +78,15 @@ program DAMASK_mesh
|
||||||
call CPFEM_initAll
|
call CPFEM_initAll
|
||||||
write(6,'(/,a)') ' <<<+- DAMASK_FEM init -+>>>'; flush(6)
|
write(6,'(/,a)') ' <<<+- DAMASK_FEM init -+>>>'; flush(6)
|
||||||
|
|
||||||
|
!---------------------------------------------------------------------
|
||||||
|
! reading field information from numerics file and do sanity checks
|
||||||
|
num_generic => numerics_root%get('generic', defaultVal=emptyDict)
|
||||||
|
stagItMax = num_generic%get_asInt('maxStaggeredIter',defaultVal=10)
|
||||||
|
maxCutBack = num_generic%get_asInt('maxCutBack',defaultVal=3)
|
||||||
|
|
||||||
|
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
||||||
|
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
||||||
|
|
||||||
! reading basic information from load case file and allocate data structure containing load cases
|
! reading basic information from load case file and allocate data structure containing load cases
|
||||||
call DMGetDimension(geomMesh,dimPlex,ierr); CHKERRA(ierr) !< dimension of mesh (2D or 3D)
|
call DMGetDimension(geomMesh,dimPlex,ierr); CHKERRA(ierr) !< dimension of mesh (2D or 3D)
|
||||||
nActiveFields = 1
|
nActiveFields = 1
|
||||||
|
|
|
@ -26,16 +26,13 @@ module numerics
|
||||||
integer(4), protected, public :: &
|
integer(4), protected, public :: &
|
||||||
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
|
||||||
real(pReal), protected, public :: &
|
real(pReal), protected, public :: &
|
||||||
numerics_unitlength = 1.0_pReal, & !< determines the physical length of one computational length unit
|
|
||||||
residualStiffness = 1.0e-6_pReal !< non-zero residual damage
|
residualStiffness = 1.0e-6_pReal !< non-zero residual damage
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! field parameters:
|
! field parameters:
|
||||||
integer, protected, public :: &
|
integer, protected, public :: &
|
||||||
itmax = 250, & !< maximum number of iterations
|
itmax = 250, & !< maximum number of iterations
|
||||||
itmin = 1, & !< minimum number of iterations
|
itmin = 1 !< minimum number of iterations
|
||||||
stagItMax = 10, & !< max number of field level staggered iterations
|
|
||||||
maxCutBack = 3 !< max number of cut backs
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! spectral parameters:
|
! spectral parameters:
|
||||||
|
@ -108,10 +105,6 @@ subroutine numerics_init
|
||||||
itmax = num_grid%get_asInt(key)
|
itmax = num_grid%get_asInt(key)
|
||||||
case ('itmin')
|
case ('itmin')
|
||||||
itmin = num_grid%get_asInt(key)
|
itmin = num_grid%get_asInt(key)
|
||||||
case ('maxCutBack')
|
|
||||||
maxCutBack = num_grid%get_asInt(key)
|
|
||||||
case ('maxStaggeredIter')
|
|
||||||
stagItMax = num_grid%get_asInt(key)
|
|
||||||
#ifdef PETSC
|
#ifdef PETSC
|
||||||
case ('petsc_options')
|
case ('petsc_options')
|
||||||
petsc_options = num_grid%get_asString(key)
|
petsc_options = num_grid%get_asString(key)
|
||||||
|
@ -123,11 +116,6 @@ subroutine numerics_init
|
||||||
do i=1,num_generic%length
|
do i=1,num_generic%length
|
||||||
key = num_generic%getKey(i)
|
key = num_generic%getKey(i)
|
||||||
select case(key)
|
select case(key)
|
||||||
case ('unitlength')
|
|
||||||
numerics_unitlength = num_generic%get_asFloat(key)
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! gradient parameter
|
|
||||||
case ('residualStiffness')
|
case ('residualStiffness')
|
||||||
residualStiffness = num_generic%get_asFloat(key)
|
residualStiffness = num_generic%get_asFloat(key)
|
||||||
endselect
|
endselect
|
||||||
|
@ -138,10 +126,6 @@ subroutine numerics_init
|
||||||
flush(6)
|
flush(6)
|
||||||
endif fileExists
|
endif fileExists
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! writing parameters to output
|
|
||||||
write(6,'(a24,1x,es8.1,/)')' unitlength: ',numerics_unitlength
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! gradient parameter
|
! gradient parameter
|
||||||
write(6,'(a24,1x,es8.1)') ' residualStiffness: ',residualStiffness
|
write(6,'(a24,1x,es8.1)') ' residualStiffness: ',residualStiffness
|
||||||
|
@ -154,8 +138,6 @@ subroutine numerics_init
|
||||||
! field parameters
|
! field parameters
|
||||||
write(6,'(a24,1x,i8)') ' itmax: ',itmax
|
write(6,'(a24,1x,i8)') ' itmax: ',itmax
|
||||||
write(6,'(a24,1x,i8)') ' itmin: ',itmin
|
write(6,'(a24,1x,i8)') ' itmin: ',itmin
|
||||||
write(6,'(a24,1x,i8)') ' maxCutBack: ',maxCutBack
|
|
||||||
write(6,'(a24,1x,i8)') ' maxStaggeredIter: ',stagItMax
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
#ifdef PETSC
|
#ifdef PETSC
|
||||||
|
@ -164,12 +146,9 @@ subroutine numerics_init
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! sanity checks
|
! sanity checks
|
||||||
if (numerics_unitlength <= 0.0_pReal) call IO_error(301,ext_msg='unitlength')
|
|
||||||
if (residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness')
|
if (residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness')
|
||||||
if (itmax <= 1) call IO_error(301,ext_msg='itmax')
|
if (itmax <= 1) call IO_error(301,ext_msg='itmax')
|
||||||
if (itmin > itmax .or. itmin < 1) call IO_error(301,ext_msg='itmin')
|
if (itmin > itmax .or. itmin < 1) call IO_error(301,ext_msg='itmin')
|
||||||
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
|
||||||
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
|
||||||
|
|
||||||
end subroutine numerics_init
|
end subroutine numerics_init
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue