diff --git a/src/grid/grid_damage_spectral.f90 b/src/grid/grid_damage_spectral.f90 index c8029b5a9..f699ee7de 100644 --- a/src/grid/grid_damage_spectral.f90 +++ b/src/grid/grid_damage_spectral.f90 @@ -253,7 +253,7 @@ end subroutine grid_damage_spectral_forward !-------------------------------------------------------------------------------------------------- !> @brief forms the spectral damage residual vector !-------------------------------------------------------------------------------------------------- -subroutine formResidual(in,x_scal,r,dummy,dummy_err) +subroutine formResidual(in,x_scal,r,dummy,err_PETSc) DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: & in @@ -264,7 +264,7 @@ subroutine formResidual(in,x_scal,r,dummy,dummy_err) X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: & r PetscObject :: dummy - PetscErrorCode :: dummy_err + PetscErrorCode :: err_PETSc integer :: i, j, k, ce @@ -306,6 +306,7 @@ subroutine formResidual(in,x_scal,r,dummy,dummy_err) !-------------------------------------------------------------------------------------------------- ! constructing residual r = scalarField_real(1:grid(1),1:grid(2),1:grid3) - phi_current + err_PETSc = 0 end subroutine formResidual diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 565cde36d..de0935d2e 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -509,6 +509,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,fnorm,reason,dummy,e err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')' print'(/,1x,a)', '===========================================================================' flush(IO_STDOUT) + err_PETSc = 0 end subroutine converged diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index 6486e22f1..bf72d1d08 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -457,6 +457,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')' print'(/,1x,a)', '===========================================================================' flush(IO_STDOUT) + err_PETSc = 0 end subroutine converged diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index a541f2882..9a258e13e 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -523,6 +523,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm err_BC/BCTol, ' (',err_BC, ' Pa, tol = ',BCTol,')' print'(/,1x,a)', '===========================================================================' flush(IO_STDOUT) + err_PETSc = 0 end subroutine converged diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index 389ff10f4..d1d165b83 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -250,7 +250,7 @@ end subroutine grid_thermal_spectral_forward !-------------------------------------------------------------------------------------------------- !> @brief forms the spectral thermal residual vector !-------------------------------------------------------------------------------------------------- -subroutine formResidual(in,x_scal,r,dummy,dummy_err) +subroutine formResidual(in,x_scal,r,dummy,err_PETSc) DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: & in @@ -261,7 +261,7 @@ subroutine formResidual(in,x_scal,r,dummy,dummy_err) X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: & r PetscObject :: dummy - PetscErrorCode :: dummy_err + PetscErrorCode :: err_PETSc integer :: i, j, k, ce T_current = x_scal @@ -297,6 +297,7 @@ subroutine formResidual(in,x_scal,r,dummy,dummy_err) !-------------------------------------------------------------------------------------------------- ! constructing residual r = T_current - scalarField_real(1:grid(1),1:grid(2),1:grid3) + err_PETSc = 0 end subroutine formResidual