avoid public variables
This commit is contained in:
parent
54aa5a67ff
commit
06f6e15123
|
@ -35,19 +35,9 @@ module CPFEM
|
||||||
CPFEM_dcsdE !< Cauchy stress tangent
|
CPFEM_dcsdE !< Cauchy stress tangent
|
||||||
real(pReal), dimension (:,:,:,:), allocatable, private :: &
|
real(pReal), dimension (:,:,:,:), allocatable, private :: &
|
||||||
CPFEM_dcsdE_knownGood !< known good tangent
|
CPFEM_dcsdE_knownGood !< known good tangent
|
||||||
integer(pInt), public :: &
|
|
||||||
cycleCounter = 0_pInt, & !< needs description
|
|
||||||
theInc = -1_pInt, & !< needs description
|
|
||||||
lastLovl = 0_pInt !< lovl in previous call to marc hypela2
|
|
||||||
real(pReal), public :: &
|
|
||||||
theTime = 0.0_pReal, & !< needs description
|
|
||||||
theDelta = 0.0_pReal
|
|
||||||
logical, public :: &
|
|
||||||
lastIncConverged = .false., & !< needs description
|
|
||||||
outdatedByNewInc = .false. !< needs description
|
|
||||||
|
|
||||||
logical, public, protected :: &
|
integer(pInt), public :: &
|
||||||
CPFEM_init_done = .false. !< remember whether init has been done already
|
cycleCounter = 0_pInt !< needs description
|
||||||
|
|
||||||
integer(pInt), parameter, public :: &
|
integer(pInt), parameter, public :: &
|
||||||
CPFEM_CALCRESULTS = 2_pInt**0_pInt, &
|
CPFEM_CALCRESULTS = 2_pInt**0_pInt, &
|
||||||
|
@ -68,7 +58,6 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine CPFEM_initAll
|
subroutine CPFEM_initAll
|
||||||
|
|
||||||
CPFEM_init_done = .true.
|
|
||||||
call DAMASK_interface_init
|
call DAMASK_interface_init
|
||||||
call prec_init
|
call prec_init
|
||||||
call IO_init
|
call IO_init
|
||||||
|
@ -149,9 +138,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS
|
||||||
write(6,'(/,a)') '#############################################'
|
write(6,'(/,a)') '#############################################'
|
||||||
write(6,'(a1,a22,1x,i8,a13)') '#','element', elCP, '#'
|
write(6,'(a1,a22,1x,i8,a13)') '#','element', elCP, '#'
|
||||||
write(6,'(a1,a22,1x,i8,a13)') '#','ip', ip, '#'
|
write(6,'(a1,a22,1x,i8,a13)') '#','ip', ip, '#'
|
||||||
write(6,'(a1,a22,1x,f15.7,a6)') '#','theTime', theTime, '#'
|
|
||||||
write(6,'(a1,a22,1x,f15.7,a6)') '#','theDelta', theDelta, '#'
|
|
||||||
write(6,'(a1,a22,1x,i8,a13)') '#','theInc', theInc, '#'
|
|
||||||
write(6,'(a1,a22,1x,i8,a13)') '#','cycleCounter', cycleCounter, '#'
|
write(6,'(a1,a22,1x,i8,a13)') '#','cycleCounter', cycleCounter, '#'
|
||||||
write(6,'(a1,a22,1x,i8,a13)') '#','computationMode',mode, '#'
|
write(6,'(a1,a22,1x,i8,a13)') '#','computationMode',mode, '#'
|
||||||
if (terminallyIll) &
|
if (terminallyIll) &
|
||||||
|
|
|
@ -42,6 +42,7 @@ module DAMASK_interface
|
||||||
|
|
||||||
logical, protected, public :: symmetricSolver
|
logical, protected, public :: symmetricSolver
|
||||||
character(len=*), parameter, public :: INPUTFILEEXTENSION = '.dat'
|
character(len=*), parameter, public :: INPUTFILEEXTENSION = '.dat'
|
||||||
|
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
DAMASK_interface_init, &
|
DAMASK_interface_init, &
|
||||||
|
@ -241,6 +242,17 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
|
||||||
real(pReal), dimension(6,6) :: ddsdde
|
real(pReal), dimension(6,6) :: ddsdde
|
||||||
integer :: computationMode, i, cp_en, node, CPnodeID
|
integer :: computationMode, i, cp_en, node, CPnodeID
|
||||||
integer(4) :: defaultNumThreadsInt !< default value set by Marc
|
integer(4) :: defaultNumThreadsInt !< default value set by Marc
|
||||||
|
|
||||||
|
integer(pInt), save :: &
|
||||||
|
theInc = -1_pInt, & !< needs description
|
||||||
|
lastLovl = 0_pInt !< lovl in previous call to marc hypela2
|
||||||
|
real(pReal), save :: &
|
||||||
|
theTime = 0.0_pReal, & !< needs description
|
||||||
|
theDelta = 0.0_pReal
|
||||||
|
logical, save :: &
|
||||||
|
lastIncConverged = .false., & !< needs description
|
||||||
|
outdatedByNewInc = .false., & !< needs description
|
||||||
|
CPFEM_init_done = .false. !< remember whether init has been done already
|
||||||
|
|
||||||
if (iand(debug_level(debug_MARC),debug_LEVELBASIC) /= 0) then
|
if (iand(debug_level(debug_MARC),debug_LEVELBASIC) /= 0) then
|
||||||
write(6,'(a,/,i8,i8,i2)') ' MSC.MARC information on shape of element(2), IP:', m, nn
|
write(6,'(a,/,i8,i8,i2)') ' MSC.MARC information on shape of element(2), IP:', m, nn
|
||||||
|
@ -260,14 +272,17 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
|
||||||
defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
|
defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
|
||||||
call omp_set_num_threads(1) ! no openMP
|
call omp_set_num_threads(1) ! no openMP
|
||||||
|
|
||||||
if (.not. CPFEM_init_done) call CPFEM_initAll
|
if (.not. CPFEM_init_done) then
|
||||||
|
CPFEM_init_done = .true.
|
||||||
|
call CPFEM_initAll
|
||||||
|
endif
|
||||||
|
|
||||||
computationMode = 0 ! save initialization value, since it does not result in any calculation
|
computationMode = 0 ! save initialization value, since it does not result in any calculation
|
||||||
if (lovl == 4 ) then ! jacobian requested by marc
|
if (lovl == 4 ) then ! jacobian requested by marc
|
||||||
if (timinc < theDelta .and. theInc == inc .and. lastLovl /= lovl) & ! first after cutback
|
if (timinc < theDelta .and. theInc == inc .and. lastLovl /= lovl) & ! first after cutback
|
||||||
computationMode = CPFEM_RESTOREJACOBIAN
|
computationMode = CPFEM_RESTOREJACOBIAN
|
||||||
elseif (lovl == 6) then ! stress requested by marc
|
elseif (lovl == 6) then ! stress requested by marc
|
||||||
computationMode = CPFEM_CALCRESULTS ! always calc
|
computationMode = CPFEM_CALCRESULTS
|
||||||
cp_en = mesh_FEM2DAMASK_elem(m(1))
|
cp_en = mesh_FEM2DAMASK_elem(m(1))
|
||||||
if (cptim > theTime .or. inc /= theInc) then ! reached "convergence"
|
if (cptim > theTime .or. inc /= theInc) then ! reached "convergence"
|
||||||
terminallyIll = .false.
|
terminallyIll = .false.
|
||||||
|
|
Loading…
Reference in New Issue