From 9d05c869009c35c2299d413f8cd44d154cb685a0 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 1 May 2017 12:48:47 +0200 Subject: [PATCH] python: add debug options Signed-off-by: Thorsten Liebig --- python/openEMS/openEMS.pxd | 3 +++ python/openEMS/openEMS.pyx | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/openEMS/openEMS.pxd b/python/openEMS/openEMS.pxd index c531dc1..1b484ea 100644 --- a/python/openEMS/openEMS.pxd +++ b/python/openEMS/openEMS.pxd @@ -48,6 +48,9 @@ cdef extern from "openEMS/openems.h": void SetGaussExcite(double f0, double fc) void SetVerboseLevel(int level) + void DebugPEC() + void DebugMaterial() + void DebugCSX() int SetupFDTD() void RunFDTD() diff --git a/python/openEMS/openEMS.pyx b/python/openEMS/openEMS.pyx index 60abbbb..5161e3d 100644 --- a/python/openEMS/openEMS.pyx +++ b/python/openEMS/openEMS.pyx @@ -410,7 +410,7 @@ cdef class openEMS: continue grid.AddLine(n, hint[n]) - def Run(self, sim_path, cleanup=False, setup_only=False, verbose=None): + def Run(self, sim_path, cleanup=False, setup_only=False, debug_pec=False, verbose=None): """ Run(sim_path, cleanup=False, setup_only=False, verbose=None) Run the openEMS FDTD simulation. @@ -429,6 +429,8 @@ cdef class openEMS: os.chdir(sim_path) if verbose is not None: self.thisptr.SetVerboseLevel(verbose) + if debug_pec: + self.thisptr.DebugPEC() assert os.getcwd() == sim_path _openEMS.WelcomeScreen() cdef int EC