Skip to content
Snippets Groups Projects
Commit e50a0fc7 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Check for |u| = 0 instead of u = 0

If |u| is computed as 0, we should not divide by it (this appears to
happen even for u != 0)
parent 72d14f37
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ class MyNonlinearity {
// u and v are assumed to be non-zero
void directionalSubDiff(VectorType const u, VectorType const v,
Interval<double> &D) const {
if (u == SmallVector(0.0)) {
if (u.two_norm() == 0) {
D[0] = D[1] = func_.rightDifferential(0) * v.two_norm();
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment