From e30e3d46ad780a0449baac4425c07a1ceb7b5c0a Mon Sep 17 00:00:00 2001 From: Matteo Cusini Date: Wed, 3 Jul 2024 15:09:14 -0700 Subject: [PATCH] fix unused var error. --- .../physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp b/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp index b35e9f73f0b..c3c465ad794 100644 --- a/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp +++ b/src/coreComponents/physicsSolvers/simplePDE/PhaseFieldDamageFEMKernels.hpp @@ -200,7 +200,6 @@ struct DamageKernel real64 const strainEnergyDensity = m_constitutiveUpdate.getStrainEnergyDensity( k, q ); real64 const ell = m_constitutiveUpdate.getRegularizationLength(); real64 const Gc = m_constitutiveUpdate.getCriticalFractureEnergy(); - real64 const threshold = m_constitutiveUpdate.getEnergyThreshold( k, q ); //Interpolate d and grad_d real64 N[ numNodesPerElem ]; @@ -212,11 +211,10 @@ struct DamageKernel real64 qp_grad_damage[3] = {0, 0, 0}; FE_TYPE::valueAndGradient( N, dNdX, stack.nodalDamageLocal, qp_damage, qp_grad_damage ); - real64 D = 0; //max between threshold and - // Elastic energy if constexpr ( DISSIPATION_FUNCTION_ORDER::value == 1 ) { - D = fmax( threshold, strainEnergyDensity ); + real64 const threshold = m_constitutiveUpdate.getEnergyThreshold( k, q ); + real64 const D = fmax( threshold, strainEnergyDensity ); //max between threshold and Elastic energy } for( localIndex a = 0; a < numNodesPerElem; ++a )