diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 258a1b511..d18155033 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -325,7 +325,7 @@ function grid_mechanical_FEM_solution(incInfoIn) result(solution) solution%converged = reason > 0 solution%iterationsNeeded = totalIter - solution%termIll = STATUS_OK /= status + solution%termIll = status /= STATUS_OK P_aim = merge(P_av,P_aim,params%stress_mask) end function grid_mechanical_FEM_solution @@ -492,7 +492,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,fnorm,reason,dummy,e BCTol = max(maxval(abs(P_av))*num%eps_stress_rtol, num%eps_stress_atol) if ((totalIter >= num%itmin .and. all([err_div/divTol, err_BC/BCTol] < 1.0_pREAL)) & - .or. STATUS_OK /= status) then + .or. status /= STATUS_OK) then reason = 1 elseif (totalIter >= num%itmax) then reason = -1 diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index 2653be0d6..591299ad1 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -288,7 +288,7 @@ function grid_mechanical_spectral_basic_solution(incInfoIn) result(solution) solution%converged = reason > 0 solution%iterationsNeeded = totalIter - solution%termIll = STATUS_OK /= status + solution%termIll = status /= STATUS_OK P_aim = merge(P_av,P_aim,params%stress_mask) end function grid_mechanical_spectral_basic_solution @@ -453,7 +453,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm BCTol = max(maxval(abs(P_av))*num%eps_stress_rtol, num%eps_stress_atol) if ((totalIter >= num%itmin .and. all([err_div/divTol, err_BC/BCTol] < 1.0_pREAL)) & - .or. STATUS_OK /= status) then + .or. status /= STATUS_OK) then reason = 1 elseif (totalIter >= num%itmax) then reason = -1 diff --git a/src/grid/grid_mech_spectral_polarization.f90 b/src/grid/grid_mech_spectral_polarization.f90 index 93e3cfc4a..4710c7e1e 100644 --- a/src/grid/grid_mech_spectral_polarization.f90 +++ b/src/grid/grid_mech_spectral_polarization.f90 @@ -323,7 +323,7 @@ function grid_mechanical_spectral_polarization_solution(incInfoIn) result(soluti solution%converged = reason > 0 solution%iterationsNeeded = totalIter - solution%termIll = STATUS_OK /= status + solution%termIll = status /= STATUS_OK P_aim = merge(P_av,P_aim,params%stress_mask) end function grid_mechanical_spectral_polarization_solution @@ -517,7 +517,7 @@ subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dumm BCTol = max(maxval(abs(P_av))*num%eps_stress_rtol, num%eps_stress_atol) if ((totalIter >= num%itmin .and. all([err_div/divTol, err_curl/curlTol, err_BC/BCTol] < 1.0_pREAL)) & - .or. STATUS_OK /= status) then + .or. status /= STATUS_OK) then reason = 1 elseif (totalIter >= num%itmax) then reason = -1 diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index f86280b2c..193d85c23 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -327,7 +327,7 @@ subroutine formResidual(residual_subdomain,x_scal,r,dummy,err_PETSc) call homogenization_thermal_response(status,Delta_t_,1,product(cells(1:2))*cells3) - broken = STATUS_OK /= status + broken = status /= STATUS_OK associate(T => x_scal) vectorField = utilities_ScalarGradient(T) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index d02162650..a80517b2b 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -239,7 +239,7 @@ subroutine homogenization_mechanical_response(status,Delta_t,cell_start,cell_end doneAndHappy = [.false.,.true.] - convergenceLooping: do while (.not. (status /= STATUS_OK .or. doneAndHappy(1))) + convergenceLooping: do while (status == STATUS_OK .and. .not. doneAndHappy(1)) call mechanical_partition(homogenization_F(1:3,1:3,ce),ce) converged = all([(phase_mechanical_constitutive(Delta_t,co,ce),co=1,homogenization_Nconstituents(ho))]) @@ -257,7 +257,7 @@ subroutine homogenization_mechanical_response(status,Delta_t,cell_start,cell_end converged = converged .and. all([(phase_damage_constitutive(Delta_t,co,ce),co=1,homogenization_Nconstituents(ho))]) if (.not. converged) then - if (STATUS_OK == status) print*, ' Cell ', ce, ' failed (damage)' + if (status == STATUS_OK) print*, ' Cell ', ce, ' failed (damage)' status = STATUS_FAILED_DAMAGE end if end do @@ -296,11 +296,11 @@ subroutine homogenization_thermal_response(status, & status = STATUS_OK !$OMP PARALLEL DO PRIVATE(ho) do ce = cell_start, cell_end - if (STATUS_OK /= status) continue + if (status /= STATUS_OK) continue ho = material_ID_homogenization(ce) do co = 1, homogenization_Nconstituents(ho) if (.not. phase_thermal_constitutive(Delta_t,material_ID_phase(co,ce),material_entry_phase(co,ce))) then - if (STATUS_OK == status) print*, ' Cell ', ce, ' failed (thermal)' + if (status == STATUS_OK) print*, ' Cell ', ce, ' failed (thermal)' status = STATUS_PHASE_THERMAL end if end do diff --git a/src/mesh/FEM_utilities.f90 b/src/mesh/FEM_utilities.f90 index 0ab8f76b2..64509ed87 100644 --- a/src/mesh/FEM_utilities.f90 +++ b/src/mesh/FEM_utilities.f90 @@ -135,7 +135,7 @@ subroutine utilities_constitutiveResponse(broken, Delta_t,P_av,forwardData) print'(/,1x,a)', '... evaluating constitutive response ......................................' call homogenization_mechanical_response(status,Delta_t,1,mesh_maxNips*mesh_NcpElems) ! calculate P field - broken = STATUS_OK /= status + broken = status /= STATUS_OK cutBack = .false. P_av = sum(homogenization_P,dim=3) * wgt diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index cb3cb6efc..2ca6506c1 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -135,7 +135,7 @@ module function phase_damage_constitutive(Delta_t,co,ce) result(converged_) ph = material_ID_phase(co,ce) en = material_entry_phase(co,ce) - converged_ = STATUS_OK == integrateDamageState(Delta_t,ph,en) + converged_ = integrateDamageState(Delta_t,ph,en) == STATUS_OK end function phase_damage_constitutive