diff --git a/sketches/usns.cpp b/sketches/usns.cpp index 477f41b3..c58f9146 100644 --- a/sketches/usns.cpp +++ b/sketches/usns.cpp @@ -279,6 +279,12 @@ class NavierSolver time += dt; } + + void SanityCheck() + { + assert(!isnan(u->Min()) && !isnan(u->Max())); + assert(!isnan(p->Min()) && !isnan(p->Max())); + } }; int main(int argc, char *argv[]) @@ -404,6 +410,7 @@ int main(int argc, char *argv[]) } navier.Step(time, step); + navier.SanityCheck(); } // 17. Free the used memory.