From c57c292926dde80acc7cf908ab24009ef062a065 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Tue, 3 Nov 2015 15:16:26 +0000 Subject: [PATCH] Added check for #geometry_view to ensure geometry view step size fits within domain size. --- gprMax/input_cmds_multiuse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gprMax/input_cmds_multiuse.py b/gprMax/input_cmds_multiuse.py index 487c75b1..a1b84c26 100644 --- a/gprMax/input_cmds_multiuse.py +++ b/gprMax/input_cmds_multiuse.py @@ -571,6 +571,8 @@ def process_multicmds(multicmds, G): raise CmdInputError("'" + cmdname + ': ' + ' '.join(tmp) + "'" + ' the lower coordinates should be less than the upper coordinates') if dx < 0 or dy < 0 or dz < 0: raise CmdInputError("'" + cmdname + ': ' + ' '.join(tmp) + "'" + ' the step size should not be less than zero') + if dx > G.nx or dy > G.ny or dz > G.nz: + raise CmdInputError("'" + cmdname + ': ' + ' '.join(tmp) + "'" + ' the step size should be less than the domain size') if dx < G.dx or dy < G.dy or dz < G.dz: raise CmdInputError("'" + cmdname + ': ' + ' '.join(tmp) + "'" + ' the step size should not be less than the spatial discretisation') if tmp[10].lower() != 'n' and tmp[10].lower() != 'f':