ENH: viewFactorsGen: stabilise calculation. Fixes #2583

This commit is contained in:
mattijs
2022-09-14 13:26:05 +01:00
parent ff4c776b8b
commit a964c364b6

View File

@ -1062,7 +1062,12 @@ int main(int argc, char *argv[])
}
}
scalar err = (F2LIij-oldEToeInt)/F2LIij;
const scalar err
(
mag(F2LIij) > ROOTVSMALL
? (F2LIij-oldEToeInt)/F2LIij
: 0
);
if
(