From 8243e43f9f11b8eaae04f371fcb4981cd5450e7f Mon Sep 17 00:00:00 2001 From: Scott Aiton Date: Thu, 11 Jan 2024 09:25:07 -0700 Subject: [PATCH] add check --- src/patches/clawpatch/fclaw2d_clawpatch_options.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/patches/clawpatch/fclaw2d_clawpatch_options.c b/src/patches/clawpatch/fclaw2d_clawpatch_options.c index d6dc8d56d..1998f924a 100644 --- a/src/patches/clawpatch/fclaw2d_clawpatch_options.c +++ b/src/patches/clawpatch/fclaw2d_clawpatch_options.c @@ -164,6 +164,13 @@ clawpatch_check(fclaw2d_clawpatch_options_t *clawpatch_opt) return FCLAW_EXIT_ERROR; } + if (clawpatch_opt->vtk_patch_threshold < 0) + { + fclaw_global_essentialf("Clawpatch error : vtk-patch-threshold must be " \ + "non-negative.\n"); + return FCLAW_EXIT_ERROR; + } + return FCLAW_NOEXIT; }