diff --git a/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp b/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp index c3c465ad794..d65407c7bc8 100644 --- a/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp +++ b/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp @@ -210,11 +210,12 @@ struct DamageKernel real64 qp_damage = 0.0; real64 qp_grad_damage[3] = {0, 0, 0}; FE_TYPE::valueAndGradient( N, dNdX, stack.nodalDamageLocal, qp_damage, qp_grad_damage ); - + + real64 D = 0; if constexpr ( DISSIPATION_FUNCTION_ORDER::value == 1 ) { real64 const threshold = m_constitutiveUpdate.getEnergyThreshold( k, q ); - real64 const D = fmax( threshold, strainEnergyDensity ); //max between threshold and Elastic energy + D = fmax( threshold, strainEnergyDensity ); //max between threshold and Elastic energy } for( localIndex a = 0; a < numNodesPerElem; ++a )