From 534073358e500e189add08f4158f9eea4f100d93 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 23 Oct 2019 23:06:47 +0200 Subject: [PATCH] arguments are better than public variables --- src/CPFEM2.f90 | 6 ++++-- src/grid/grid_mech_FEM.f90 | 2 +- src/grid/grid_mech_spectral_basic.f90 | 8 ++++---- src/grid/grid_mech_spectral_polarisation.f90 | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/CPFEM2.f90 b/src/CPFEM2.f90 index 04a829163..757abc9d4 100644 --- a/src/CPFEM2.f90 +++ b/src/CPFEM2.f90 @@ -122,8 +122,10 @@ end subroutine CPFEM_init !-------------------------------------------------------------------------------------------------- !> @brief forwards data after successful increment !-------------------------------------------------------------------------------------------------- -subroutine CPFEM_age - +subroutine CPFEM_age(restartWrite) + + logical :: restartWrite + integer :: i, ph, homog, mySource character(len=32) :: rankStr, PlasticItem, HomogItem integer(HID_T) :: fileHandle, groupPlastic, groupHomog diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index a479319c3..6b5b635bf 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -325,7 +325,7 @@ subroutine grid_mech_FEM_forward(guess,timeinc,timeinc_old,loadCaseTime,deformat call HDF5_closeFile(fileHandle) endif - call CPFEM_age ! age state and kinematics + call CPFEM_age(restartWrite) ! age state and kinematics call utilities_updateCoords(F) C_volAvgLastInc = C_volAvg diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index f27079137..9eab82775 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -303,7 +303,7 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi call HDF5_closeFile(fileHandle) endif - call CPFEM_age ! age state and kinematics + call CPFEM_age(restartWrite) ! age state and kinematics call utilities_updateCoords(F) C_volAvgLastInc = C_volAvg @@ -314,13 +314,13 @@ subroutine grid_mech_spectral_basic_forward(guess,timeinc,timeinc_old,loadCaseTi !-------------------------------------------------------------------------------------------------- ! calculate rate for aim - if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F + if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F F_aimDot = & F_aimDot + deformation_BC%maskFloat * matmul(deformation_BC%values, F_aim_lastInc) - elseif(deformation_BC%myType=='fdot') then ! F_aimDot is prescribed + elseif(deformation_BC%myType=='fdot') then ! F_aimDot is prescribed F_aimDot = & F_aimDot + deformation_BC%maskFloat * deformation_BC%values - elseif (deformation_BC%myType=='f') then ! aim at end of load case is prescribed + elseif (deformation_BC%myType=='f') then ! aim at end of load case is prescribed F_aimDot = & F_aimDot + deformation_BC%maskFloat * (deformation_BC%values - F_aim_lastInc)/loadCaseTime endif diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index a5cfcb012..ce7306510 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -325,7 +325,7 @@ subroutine grid_mech_spectral_polarisation_forward(guess,timeinc,timeinc_old,loa call HDF5_closeFile(fileHandle) endif - call CPFEM_age ! age state and kinematics + call CPFEM_age(restartWrite) ! age state and kinematics call utilities_updateCoords(F) C_volAvgLastInc = C_volAvg