Skip to content

Commit

Permalink
Use more adequate/performant error measure to avoid expensive error c…
Browse files Browse the repository at this point in the history
…omputation.
  • Loading branch information
allanleal committed Jan 16, 2024
1 parent 45d4489 commit d440460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Optima/ResidualErrors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct ResidualErrors::Impl
errorx = norminf(ex);
errorp = norminf(ep);
errorw = norminf(ewbar); // prefer error check at the canonical level
error = std::sqrt((ex.squaredNorm() + ep.squaredNorm() + ew.squaredNorm())/(dims.nx + dims.np + dims.nw)); // Divide by Nx + Np + Nw since error can become large if number of variables increase due to the sum
error = std::max({errorx, errorp, errorw});
}

auto sanitycheck() const -> void
Expand Down

0 comments on commit d440460

Please sign in to comment.