From 197ae535538363d8d53bc94b2cfa37c9f20fe561 Mon Sep 17 00:00:00 2001
From: Pratheek Shanthraj
Date: Fri, 28 Aug 2015 10:55:38 +0000
Subject: [PATCH] lots of memory savings (~ stateside + 250 pReals per
integration point) when using analytic jacobian
---
code/crystallite.f90 | 38 +++++++++++++++++++++----
code/plastic_disloKMC.f90 | 7 +++--
code/plastic_disloUCLA.f90 | 7 +++--
code/plastic_dislotwin.f90 | 7 +++--
code/plastic_j2.f90 | 9 ++++--
code/plastic_nonlocal.f90 | 9 ++++--
code/plastic_phenopowerlaw.f90 | 7 +++--
code/plastic_titanmod.f90 | 7 +++--
code/source_damage_anisoBrittle.f90 | 7 +++--
code/source_damage_anisoDuctile.f90 | 7 +++--
code/source_damage_isoBrittle.f90 | 7 +++--
code/source_damage_isoDuctile.f90 | 7 +++--
code/source_thermal_dissipation.f90 | 7 +++--
code/source_thermal_externalheat.f90 | 7 +++--
code/source_vacancy_irradiation.f90 | 7 +++--
code/source_vacancy_phenoplasticity.f90 | 7 +++--
code/source_vacancy_thermalfluc.f90 | 7 +++--
17 files changed, 115 insertions(+), 39 deletions(-)
diff --git a/code/crystallite.f90 b/code/crystallite.f90
index ac34f7569..55e031087 100644
--- a/code/crystallite.f90
+++ b/code/crystallite.f90
@@ -593,10 +593,10 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
invFp, & ! inverse of the plastic deformation gradient
Fe_guess, & ! guess for elastic deformation gradient
Tstar ! 2nd Piola-Kirchhoff stress tensor
- real(pReal), dimension(3,3,3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
+ real(pReal), allocatable, dimension(:,:,:,:,:,:,:) :: &
dPdF_perturbation1, &
dPdF_perturbation2
- real(pReal), dimension(3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
+ real(pReal), allocatable, dimension(:,:,:,:,:) :: &
F_backup, &
Fp_backup, &
InvFp_backup, &
@@ -606,8 +606,10 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
Lp_backup, &
Li_backup, &
P_backup
- real(pReal), dimension(6,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
+ real(pReal), allocatable, dimension(:,:,:,:) :: &
Tstar_v_backup
+ logical, allocatable, dimension(:,:,:) :: &
+ convergenceFlag_backup
integer(pInt) :: &
NiterationCrystallite, & ! number of iterations in crystallite loop
e, & ! element index
@@ -623,8 +625,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
perturbation , & ! loop counter for forward,backward perturbation mode
myNgrains, &
mySource
- logical, dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
- convergenceFlag_backup
! local variables used for calculating analytic Jacobian
real(pReal), dimension(3,3) :: temp_33
real(pReal), dimension(3,3,3,3) :: dSdFe, &
@@ -1279,6 +1279,20 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
numerics_integrationMode = 2_pInt
! --- BACKUP ---
+ allocate(dPdF_perturbation1(3,3,3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(dPdF_perturbation2(3,3,3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(F_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(Fp_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(InvFp_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(Fi_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(InvFi_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(Fe_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(Lp_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(Li_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(P_backup (3,3, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(Tstar_v_backup (6, homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = 0.0_pReal)
+ allocate(convergenceFlag_backup (homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source = .false.)
+
!$OMP PARALLEL DO PRIVATE(myNgrains)
elementLooping7: do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e))
@@ -1493,6 +1507,20 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
crystallite_converged(g,i,e) = convergenceFlag_backup(g,i,e)
enddo; enddo
enddo elementLooping10
+
+ deallocate(dPdF_perturbation1)
+ deallocate(dPdF_perturbation2)
+ deallocate(F_backup )
+ deallocate(Fp_backup )
+ deallocate(InvFp_backup )
+ deallocate(Fi_backup )
+ deallocate(InvFi_backup )
+ deallocate(Fe_backup )
+ deallocate(Lp_backup )
+ deallocate(Li_backup )
+ deallocate(P_backup )
+ deallocate(Tstar_v_backup )
+ deallocate(convergenceFlag_backup)
endif jacobianMethod
endif computeJacobian
diff --git a/code/plastic_disloKMC.f90 b/code/plastic_disloKMC.f90
index d30a9be2c..4aaac3070 100644
--- a/code/plastic_disloKMC.f90
+++ b/code/plastic_disloKMC.f90
@@ -187,6 +187,7 @@ subroutine plastic_disloKMC_init(fileUnit)
MATERIAL_partPhase
use lattice
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -674,11 +675,13 @@ subroutine plastic_disloKMC_init(fileUnit)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/plastic_disloUCLA.f90 b/code/plastic_disloUCLA.f90
index c8032fcce..71a186832 100644
--- a/code/plastic_disloUCLA.f90
+++ b/code/plastic_disloUCLA.f90
@@ -192,6 +192,7 @@ subroutine plastic_disloUCLA_init(fileUnit)
MATERIAL_partPhase
use lattice
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -693,11 +694,13 @@ subroutine plastic_disloUCLA_init(fileUnit)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/plastic_dislotwin.f90 b/code/plastic_dislotwin.f90
index f9fbaf9e8..69465126a 100644
--- a/code/plastic_dislotwin.f90
+++ b/code/plastic_dislotwin.f90
@@ -225,6 +225,7 @@ subroutine plastic_dislotwin_init(fileUnit)
MATERIAL_partPhase
use lattice
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -868,11 +869,13 @@ subroutine plastic_dislotwin_init(fileUnit)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/plastic_j2.f90 b/code/plastic_j2.f90
index 1718f71cb..870213b33 100644
--- a/code/plastic_j2.f90
+++ b/code/plastic_j2.f90
@@ -95,6 +95,7 @@ subroutine plastic_j2_init(fileUnit)
debug_constitutive, &
debug_levelBasic
use numerics, only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
use math, only: &
@@ -341,10 +342,12 @@ subroutine plastic_j2_init(fileUnit)
allocate(plasticState(phase)%partionedState0 ( sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%subState0 ( sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%state ( sizeState,NofMyPhase),source=0.0_pReal)
- allocate(plasticState(phase)%state_backup ( sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase),source=0.0_pReal)
- allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase),source=0.0_pReal)
+ allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase),source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup ( sizeState,NofMyPhase),source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase),source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2(sizeDotState,NofMyPhase),source=0.0_pReal)
diff --git a/code/plastic_nonlocal.f90 b/code/plastic_nonlocal.f90
index 07b30e297..d48e26a88 100644
--- a/code/plastic_nonlocal.f90
+++ b/code/plastic_nonlocal.f90
@@ -297,8 +297,9 @@ use material, only: phase_plasticity, &
material_phase
use lattice
use numerics,only: &
+ analyticJaco, &
worldrank, &
- numerics_integrator
+ numerics_integrator
implicit none
@@ -1309,11 +1310,13 @@ allocate(nonSchmidProjection(3,3,4,maxTotalNslip,maxNinstances),
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/plastic_phenopowerlaw.f90 b/code/plastic_phenopowerlaw.f90
index 40ae49136..75a4c4baa 100644
--- a/code/plastic_phenopowerlaw.f90
+++ b/code/plastic_phenopowerlaw.f90
@@ -141,6 +141,7 @@ subroutine plastic_phenopowerlaw_init(fileUnit)
MATERIAL_partPhase
use lattice
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -564,10 +565,12 @@ subroutine plastic_phenopowerlaw_init(fileUnit)
allocate(plasticState(phase)%partionedState0 ( sizeState,NipcMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 ( sizeState,NipcMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state ( sizeState,NipcMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%state_backup ( sizeState,NipcMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NipcMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDeltaState,NipcMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NipcMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup ( sizeState,NipcMyPhase),source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NipcMyPhase),source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NipcMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2(sizeDotState,NipcMyPhase),source=0.0_pReal)
diff --git a/code/plastic_titanmod.f90 b/code/plastic_titanmod.f90
index 2a4e6759b..f9a8f5a90 100644
--- a/code/plastic_titanmod.f90
+++ b/code/plastic_titanmod.f90
@@ -218,6 +218,7 @@ subroutine plastic_titanmod_init(fileUnit)
MATERIAL_partPhase
use lattice
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -858,11 +859,13 @@ subroutine plastic_titanmod_init(fileUnit)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_damage_anisoBrittle.f90 b/code/source_damage_anisoBrittle.f90
index a033369aa..0c731324f 100644
--- a/code/source_damage_anisoBrittle.f90
+++ b/code/source_damage_anisoBrittle.f90
@@ -94,6 +94,7 @@ subroutine source_damage_anisoBrittle_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
use lattice, only: &
@@ -267,11 +268,13 @@ subroutine source_damage_anisoBrittle_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_damage_anisoDuctile.f90 b/code/source_damage_anisoDuctile.f90
index 74a7205b2..496bb6051 100644
--- a/code/source_damage_anisoDuctile.f90
+++ b/code/source_damage_anisoDuctile.f90
@@ -98,6 +98,7 @@ subroutine source_damage_anisoDuctile_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
use lattice, only: &
@@ -269,11 +270,13 @@ subroutine source_damage_anisoDuctile_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_damage_isoBrittle.f90 b/code/source_damage_isoBrittle.f90
index e3424c63b..3178ca814 100644
--- a/code/source_damage_isoBrittle.f90
+++ b/code/source_damage_isoBrittle.f90
@@ -84,6 +84,7 @@ subroutine source_damage_isoBrittle_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -221,11 +222,13 @@ subroutine source_damage_isoBrittle_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_damage_isoDuctile.f90 b/code/source_damage_isoDuctile.f90
index cdc2a3242..5b132ed62 100644
--- a/code/source_damage_isoDuctile.f90
+++ b/code/source_damage_isoDuctile.f90
@@ -84,6 +84,7 @@ subroutine source_damage_isoDuctile_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -221,11 +222,13 @@ subroutine source_damage_isoDuctile_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_thermal_dissipation.f90 b/code/source_thermal_dissipation.f90
index 43a6136f7..2998533ca 100644
--- a/code/source_thermal_dissipation.f90
+++ b/code/source_thermal_dissipation.f90
@@ -70,6 +70,7 @@ subroutine source_thermal_dissipation_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -162,11 +163,13 @@ subroutine source_thermal_dissipation_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_thermal_externalheat.f90 b/code/source_thermal_externalheat.f90
index 3b1013581..018a662c4 100644
--- a/code/source_thermal_externalheat.f90
+++ b/code/source_thermal_externalheat.f90
@@ -75,6 +75,7 @@ subroutine source_thermal_externalheat_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -188,11 +189,13 @@ subroutine source_thermal_externalheat_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_vacancy_irradiation.f90 b/code/source_vacancy_irradiation.f90
index 5c9785163..08fb3d71e 100644
--- a/code/source_vacancy_irradiation.f90
+++ b/code/source_vacancy_irradiation.f90
@@ -72,6 +72,7 @@ subroutine source_vacancy_irradiation_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -168,11 +169,13 @@ subroutine source_vacancy_irradiation_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_vacancy_phenoplasticity.f90 b/code/source_vacancy_phenoplasticity.f90
index f2fbdc45d..bbd14a83d 100644
--- a/code/source_vacancy_phenoplasticity.f90
+++ b/code/source_vacancy_phenoplasticity.f90
@@ -70,6 +70,7 @@ subroutine source_vacancy_phenoplasticity_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -162,11 +163,13 @@ subroutine source_vacancy_phenoplasticity_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
diff --git a/code/source_vacancy_thermalfluc.f90 b/code/source_vacancy_thermalfluc.f90
index 330c7adde..65f16270b 100644
--- a/code/source_vacancy_thermalfluc.f90
+++ b/code/source_vacancy_thermalfluc.f90
@@ -74,6 +74,7 @@ subroutine source_vacancy_thermalfluc_init(fileUnit)
sourceState, &
MATERIAL_partPhase
use numerics,only: &
+ analyticJaco, &
worldrank, &
numerics_integrator
@@ -169,11 +170,13 @@ subroutine source_vacancy_thermalfluc_init(fileUnit)
allocate(sourceState(phase)%p(sourceOffset)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%state (sizeState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
- allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ if (.not. analyticJaco) then
+ allocate(sourceState(phase)%p(sourceOffset)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
+ allocate(sourceState(phase)%p(sourceOffset)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
+ endif
if (any(numerics_integrator == 1_pInt)) then
allocate(sourceState(phase)%p(sourceOffset)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(sourceState(phase)%p(sourceOffset)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)