Skip to content

Commit

Permalink
fix: Bug fix for residual computation (#3399)
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltomin authored Oct 26, 2024
1 parent 9ee88f7 commit cd8175d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -911,15 +911,15 @@ class ResidualNormKernel : public solverBaseKernels::ResidualNormKernelBase< 3 >
// step 2: volume residual

real64 const valVol = LvArray::math::abs( m_localResidual[stack.localRow + m_numComponents] ) / volumeNormalizer;
if( valVol > stack.localValue[0] )
if( valVol > stack.localValue[1] )
{
stack.localValue[1] = valVol;
}

// step 3: energy residual

real64 const valEnergy = LvArray::math::abs( m_localResidual[stack.localRow + m_numComponents + 1] ) / energyNormalizer;
if( valEnergy > stack.localValue[1] )
if( valEnergy > stack.localValue[2] )
{
stack.localValue[2] = valEnergy;
}
Expand Down

0 comments on commit cd8175d

Please sign in to comment.