proteus  1.8.1
C/C++/Fortran libraries
ctimeIntegration.c
Go to the documentation of this file.
1 /* Generated by Cython 0.29.30 */
2 
3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
5 #endif /* PY_SSIZE_T_CLEAN */
6 #include "Python.h"
7 #ifndef Py_PYTHON_H
8  #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10  #error Cython requires Python 2.6+ or Python 3.3+.
11 #else
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
15 #include <stddef.h>
16 #ifndef offsetof
17  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
18 #endif
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
20  #ifndef __stdcall
21  #define __stdcall
22  #endif
23  #ifndef __cdecl
24  #define __cdecl
25  #endif
26  #ifndef __fastcall
27  #define __fastcall
28  #endif
29 #endif
30 #ifndef DL_IMPORT
31  #define DL_IMPORT(t) t
32 #endif
33 #ifndef DL_EXPORT
34  #define DL_EXPORT(t) t
35 #endif
36 #define __PYX_COMMA ,
37 #ifndef HAVE_LONG_LONG
38  #if PY_VERSION_HEX >= 0x02070000
39  #define HAVE_LONG_LONG
40  #endif
41 #endif
42 #ifndef PY_LONG_LONG
43  #define PY_LONG_LONG LONG_LONG
44 #endif
45 #ifndef Py_HUGE_VAL
46  #define Py_HUGE_VAL HUGE_VAL
47 #endif
48 #ifdef PYPY_VERSION
49  #define CYTHON_COMPILING_IN_PYPY 1
50  #define CYTHON_COMPILING_IN_PYSTON 0
51  #define CYTHON_COMPILING_IN_CPYTHON 0
52  #undef CYTHON_USE_TYPE_SLOTS
53  #define CYTHON_USE_TYPE_SLOTS 0
54  #undef CYTHON_USE_PYTYPE_LOOKUP
55  #define CYTHON_USE_PYTYPE_LOOKUP 0
56  #if PY_VERSION_HEX < 0x03050000
57  #undef CYTHON_USE_ASYNC_SLOTS
58  #define CYTHON_USE_ASYNC_SLOTS 0
59  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60  #define CYTHON_USE_ASYNC_SLOTS 1
61  #endif
62  #undef CYTHON_USE_PYLIST_INTERNALS
63  #define CYTHON_USE_PYLIST_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_INTERNALS
65  #define CYTHON_USE_UNICODE_INTERNALS 0
66  #undef CYTHON_USE_UNICODE_WRITER
67  #define CYTHON_USE_UNICODE_WRITER 0
68  #undef CYTHON_USE_PYLONG_INTERNALS
69  #define CYTHON_USE_PYLONG_INTERNALS 0
70  #undef CYTHON_AVOID_BORROWED_REFS
71  #define CYTHON_AVOID_BORROWED_REFS 1
72  #undef CYTHON_ASSUME_SAFE_MACROS
73  #define CYTHON_ASSUME_SAFE_MACROS 0
74  #undef CYTHON_UNPACK_METHODS
75  #define CYTHON_UNPACK_METHODS 0
76  #undef CYTHON_FAST_THREAD_STATE
77  #define CYTHON_FAST_THREAD_STATE 0
78  #undef CYTHON_FAST_PYCALL
79  #define CYTHON_FAST_PYCALL 0
80  #undef CYTHON_PEP489_MULTI_PHASE_INIT
81  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82  #undef CYTHON_USE_TP_FINALIZE
83  #define CYTHON_USE_TP_FINALIZE 0
84  #undef CYTHON_USE_DICT_VERSIONS
85  #define CYTHON_USE_DICT_VERSIONS 0
86  #undef CYTHON_USE_EXC_INFO_STACK
87  #define CYTHON_USE_EXC_INFO_STACK 0
88  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89  #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
90  #endif
91 #elif defined(PYSTON_VERSION)
92  #define CYTHON_COMPILING_IN_PYPY 0
93  #define CYTHON_COMPILING_IN_PYSTON 1
94  #define CYTHON_COMPILING_IN_CPYTHON 0
95  #ifndef CYTHON_USE_TYPE_SLOTS
96  #define CYTHON_USE_TYPE_SLOTS 1
97  #endif
98  #undef CYTHON_USE_PYTYPE_LOOKUP
99  #define CYTHON_USE_PYTYPE_LOOKUP 0
100  #undef CYTHON_USE_ASYNC_SLOTS
101  #define CYTHON_USE_ASYNC_SLOTS 0
102  #undef CYTHON_USE_PYLIST_INTERNALS
103  #define CYTHON_USE_PYLIST_INTERNALS 0
104  #ifndef CYTHON_USE_UNICODE_INTERNALS
105  #define CYTHON_USE_UNICODE_INTERNALS 1
106  #endif
107  #undef CYTHON_USE_UNICODE_WRITER
108  #define CYTHON_USE_UNICODE_WRITER 0
109  #undef CYTHON_USE_PYLONG_INTERNALS
110  #define CYTHON_USE_PYLONG_INTERNALS 0
111  #ifndef CYTHON_AVOID_BORROWED_REFS
112  #define CYTHON_AVOID_BORROWED_REFS 0
113  #endif
114  #ifndef CYTHON_ASSUME_SAFE_MACROS
115  #define CYTHON_ASSUME_SAFE_MACROS 1
116  #endif
117  #ifndef CYTHON_UNPACK_METHODS
118  #define CYTHON_UNPACK_METHODS 1
119  #endif
120  #undef CYTHON_FAST_THREAD_STATE
121  #define CYTHON_FAST_THREAD_STATE 0
122  #undef CYTHON_FAST_PYCALL
123  #define CYTHON_FAST_PYCALL 0
124  #undef CYTHON_PEP489_MULTI_PHASE_INIT
125  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126  #undef CYTHON_USE_TP_FINALIZE
127  #define CYTHON_USE_TP_FINALIZE 0
128  #undef CYTHON_USE_DICT_VERSIONS
129  #define CYTHON_USE_DICT_VERSIONS 0
130  #undef CYTHON_USE_EXC_INFO_STACK
131  #define CYTHON_USE_EXC_INFO_STACK 0
132  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
134  #endif
135 #else
136  #define CYTHON_COMPILING_IN_PYPY 0
137  #define CYTHON_COMPILING_IN_PYSTON 0
138  #define CYTHON_COMPILING_IN_CPYTHON 1
139  #ifndef CYTHON_USE_TYPE_SLOTS
140  #define CYTHON_USE_TYPE_SLOTS 1
141  #endif
142  #if PY_VERSION_HEX < 0x02070000
143  #undef CYTHON_USE_PYTYPE_LOOKUP
144  #define CYTHON_USE_PYTYPE_LOOKUP 0
145  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146  #define CYTHON_USE_PYTYPE_LOOKUP 1
147  #endif
148  #if PY_MAJOR_VERSION < 3
149  #undef CYTHON_USE_ASYNC_SLOTS
150  #define CYTHON_USE_ASYNC_SLOTS 0
151  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152  #define CYTHON_USE_ASYNC_SLOTS 1
153  #endif
154  #if PY_VERSION_HEX < 0x02070000
155  #undef CYTHON_USE_PYLONG_INTERNALS
156  #define CYTHON_USE_PYLONG_INTERNALS 0
157  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158  #define CYTHON_USE_PYLONG_INTERNALS 1
159  #endif
160  #ifndef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 1
162  #endif
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
166  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167  #undef CYTHON_USE_UNICODE_WRITER
168  #define CYTHON_USE_UNICODE_WRITER 0
169  #elif !defined(CYTHON_USE_UNICODE_WRITER)
170  #define CYTHON_USE_UNICODE_WRITER 1
171  #endif
172  #ifndef CYTHON_AVOID_BORROWED_REFS
173  #define CYTHON_AVOID_BORROWED_REFS 0
174  #endif
175  #ifndef CYTHON_ASSUME_SAFE_MACROS
176  #define CYTHON_ASSUME_SAFE_MACROS 1
177  #endif
178  #ifndef CYTHON_UNPACK_METHODS
179  #define CYTHON_UNPACK_METHODS 1
180  #endif
181  #if PY_VERSION_HEX >= 0x030B00A4
182  #undef CYTHON_FAST_THREAD_STATE
183  #define CYTHON_FAST_THREAD_STATE 0
184  #elif !defined(CYTHON_FAST_THREAD_STATE)
185  #define CYTHON_FAST_THREAD_STATE 1
186  #endif
187  #ifndef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
189  #endif
190  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
192  #endif
193  #ifndef CYTHON_USE_TP_FINALIZE
194  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
195  #endif
196  #ifndef CYTHON_USE_DICT_VERSIONS
197  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
198  #endif
199  #if PY_VERSION_HEX >= 0x030B00A4
200  #undef CYTHON_USE_EXC_INFO_STACK
201  #define CYTHON_USE_EXC_INFO_STACK 0
202  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
204  #endif
205  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
207  #endif
208 #endif
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
211 #endif
212 #if CYTHON_USE_PYLONG_INTERNALS
213  #if PY_MAJOR_VERSION < 3
214  #include "longintrepr.h"
215  #endif
216  #undef SHIFT
217  #undef BASE
218  #undef MASK
219  #ifdef SIZEOF_VOID_P
220  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
221  #endif
222 #endif
223 #ifndef __has_attribute
224  #define __has_attribute(x) 0
225 #endif
226 #ifndef __has_cpp_attribute
227  #define __has_cpp_attribute(x) 0
228 #endif
229 #ifndef CYTHON_RESTRICT
230  #if defined(__GNUC__)
231  #define CYTHON_RESTRICT __restrict__
232  #elif defined(_MSC_VER) && _MSC_VER >= 1400
233  #define CYTHON_RESTRICT __restrict
234  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235  #define CYTHON_RESTRICT restrict
236  #else
237  #define CYTHON_RESTRICT
238  #endif
239 #endif
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
244 # else
245 # define CYTHON_UNUSED
246 # endif
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
249 # else
250 # define CYTHON_UNUSED
251 # endif
252 #endif
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
256 # else
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
258 # endif
259 #endif
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
263 # else
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
265 # endif
266 #endif
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
268 #ifdef _MSC_VER
269  #ifndef _MSC_STDINT_H_
270  #if _MSC_VER < 1300
271  typedef unsigned char uint8_t;
272  typedef unsigned int uint32_t;
273  #else
274  typedef unsigned __int8 uint8_t;
275  typedef unsigned __int32 uint32_t;
276  #endif
277  #endif
278 #else
279  #include <stdint.h>
280 #endif
281 #ifndef CYTHON_FALLTHROUGH
282  #if defined(__cplusplus) && __cplusplus >= 201103L
283  #if __has_cpp_attribute(fallthrough)
284  #define CYTHON_FALLTHROUGH [[fallthrough]]
285  #elif __has_cpp_attribute(clang::fallthrough)
286  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287  #elif __has_cpp_attribute(gnu::fallthrough)
288  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
289  #endif
290  #endif
291  #ifndef CYTHON_FALLTHROUGH
292  #if __has_attribute(fallthrough)
293  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
294  #else
295  #define CYTHON_FALLTHROUGH
296  #endif
297  #endif
298  #if defined(__clang__ ) && defined(__apple_build_version__)
299  #if __apple_build_version__ < 7000000
300  #undef CYTHON_FALLTHROUGH
301  #define CYTHON_FALLTHROUGH
302  #endif
303  #endif
304 #endif
305 
306 #ifndef CYTHON_INLINE
307  #if defined(__clang__)
308  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
309  #elif defined(__GNUC__)
310  #define CYTHON_INLINE __inline__
311  #elif defined(_MSC_VER)
312  #define CYTHON_INLINE __inline
313  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
314  #define CYTHON_INLINE inline
315  #else
316  #define CYTHON_INLINE
317  #endif
318 #endif
319 
320 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
321  #define Py_OptimizeFlag 0
322 #endif
323 #define __PYX_BUILD_PY_SSIZE_T "n"
324 #define CYTHON_FORMAT_SSIZE_T "z"
325 #if PY_MAJOR_VERSION < 3
326  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
327  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
328  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
329  #define __Pyx_DefaultClassType PyClass_Type
330 #else
331  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
332  #define __Pyx_DefaultClassType PyType_Type
333 #if PY_VERSION_HEX >= 0x030B00A1
334  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
335  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
336  PyObject *fv, PyObject *cell, PyObject* fn,
337  PyObject *name, int fline, PyObject *lnos) {
338  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
339  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
340  const char *fn_cstr=NULL;
341  const char *name_cstr=NULL;
342  PyCodeObject* co=NULL;
343  PyObject *type, *value, *traceback;
344  PyErr_Fetch(&type, &value, &traceback);
345  if (!(kwds=PyDict_New())) goto end;
346  if (!(argcount=PyLong_FromLong(a))) goto end;
347  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
348  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
349  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
350  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
351  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
352  if (!(nlocals=PyLong_FromLong(l))) goto end;
353  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
354  if (!(stacksize=PyLong_FromLong(s))) goto end;
355  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
356  if (!(flags=PyLong_FromLong(f))) goto end;
357  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
358  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
359  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
360  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
361  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
362  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
363  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
364  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
365  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
366  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
367  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
368  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
369  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
370  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
371  Py_XDECREF((PyObject*)co);
372  co = (PyCodeObject*)call_result;
373  call_result = NULL;
374  if (0) {
375  cleanup_code_too:
376  Py_XDECREF((PyObject*)co);
377  co = NULL;
378  }
379  end:
380  Py_XDECREF(kwds);
381  Py_XDECREF(argcount);
382  Py_XDECREF(posonlyargcount);
383  Py_XDECREF(kwonlyargcount);
384  Py_XDECREF(nlocals);
385  Py_XDECREF(stacksize);
386  Py_XDECREF(replace);
387  Py_XDECREF(call_result);
388  Py_XDECREF(empty);
389  if (type) {
390  PyErr_Restore(type, value, traceback);
391  }
392  return co;
393  }
394 #else
395  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
396  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
397 #endif
398  #define __Pyx_DefaultClassType PyType_Type
399 #endif
400 #ifndef Py_TPFLAGS_CHECKTYPES
401  #define Py_TPFLAGS_CHECKTYPES 0
402 #endif
403 #ifndef Py_TPFLAGS_HAVE_INDEX
404  #define Py_TPFLAGS_HAVE_INDEX 0
405 #endif
406 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
407  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
408 #endif
409 #ifndef Py_TPFLAGS_HAVE_FINALIZE
410  #define Py_TPFLAGS_HAVE_FINALIZE 0
411 #endif
412 #ifndef METH_STACKLESS
413  #define METH_STACKLESS 0
414 #endif
415 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
416  #ifndef METH_FASTCALL
417  #define METH_FASTCALL 0x80
418  #endif
419  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
420  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
421  Py_ssize_t nargs, PyObject *kwnames);
422 #else
423  #define __Pyx_PyCFunctionFast _PyCFunctionFast
424  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
425 #endif
426 #if CYTHON_FAST_PYCCALL
427 #define __Pyx_PyFastCFunction_Check(func)\
428  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
429 #else
430 #define __Pyx_PyFastCFunction_Check(func) 0
431 #endif
432 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
433  #define PyObject_Malloc(s) PyMem_Malloc(s)
434  #define PyObject_Free(p) PyMem_Free(p)
435  #define PyObject_Realloc(p) PyMem_Realloc(p)
436 #endif
437 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
438  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
439  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
440  #define PyMem_RawFree(p) PyMem_Free(p)
441 #endif
442 #if CYTHON_COMPILING_IN_PYSTON
443  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
444  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
445 #else
446  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
447  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
448 #endif
449 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
450  #define __Pyx_PyThreadState_Current PyThreadState_GET()
451 #elif PY_VERSION_HEX >= 0x03060000
452  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
453 #elif PY_VERSION_HEX >= 0x03000000
454  #define __Pyx_PyThreadState_Current PyThreadState_GET()
455 #else
456  #define __Pyx_PyThreadState_Current _PyThreadState_Current
457 #endif
458 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
459 #include "pythread.h"
460 #define Py_tss_NEEDS_INIT 0
461 typedef int Py_tss_t;
462 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
463  *key = PyThread_create_key();
464  return 0;
465 }
466 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
467  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
468  *key = Py_tss_NEEDS_INIT;
469  return key;
470 }
471 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
472  PyObject_Free(key);
473 }
474 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
475  return *key != Py_tss_NEEDS_INIT;
476 }
477 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
478  PyThread_delete_key(*key);
479  *key = Py_tss_NEEDS_INIT;
480 }
481 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
482  return PyThread_set_key_value(*key, value);
483 }
484 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
485  return PyThread_get_key_value(*key);
486 }
487 #endif
488 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
489 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
490 #else
491 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
492 #endif
493 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
494  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
495  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
496 #else
497  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
498  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
499 #endif
500 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
501 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
502 #else
503 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
504 #endif
505 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
506  #define CYTHON_PEP393_ENABLED 1
507  #if defined(PyUnicode_IS_READY)
508  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
509  0 : _PyUnicode_Ready((PyObject *)(op)))
510  #else
511  #define __Pyx_PyUnicode_READY(op) (0)
512  #endif
513  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
514  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
515  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
516  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
517  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
518  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
519  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
520  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
521  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
522  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
523  #else
524  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
525  #endif
526  #else
527  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
528  #endif
529 #else
530  #define CYTHON_PEP393_ENABLED 0
531  #define PyUnicode_1BYTE_KIND 1
532  #define PyUnicode_2BYTE_KIND 2
533  #define PyUnicode_4BYTE_KIND 4
534  #define __Pyx_PyUnicode_READY(op) (0)
535  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
536  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
537  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
538  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
539  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
540  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
541  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
542  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
543 #endif
544 #if CYTHON_COMPILING_IN_PYPY
545  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
546  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
547 #else
548  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
549  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
550  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
551 #endif
552 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
553  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
554 #endif
555 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
556  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
557 #endif
558 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
559  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
560 #endif
561 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
562 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
563 #if PY_MAJOR_VERSION >= 3
564  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
565 #else
566  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
567 #endif
568 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
569  #define PyObject_ASCII(o) PyObject_Repr(o)
570 #endif
571 #if PY_MAJOR_VERSION >= 3
572  #define PyBaseString_Type PyUnicode_Type
573  #define PyStringObject PyUnicodeObject
574  #define PyString_Type PyUnicode_Type
575  #define PyString_Check PyUnicode_Check
576  #define PyString_CheckExact PyUnicode_CheckExact
577 #ifndef PyObject_Unicode
578  #define PyObject_Unicode PyObject_Str
579 #endif
580 #endif
581 #if PY_MAJOR_VERSION >= 3
582  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
583  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
584 #else
585  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
586  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
587 #endif
588 #ifndef PySet_CheckExact
589  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
590 #endif
591 #if PY_VERSION_HEX >= 0x030900A4
592  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
593  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
594 #else
595  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
596  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
597 #endif
598 #if CYTHON_ASSUME_SAFE_MACROS
599  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
600 #else
601  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
602 #endif
603 #if PY_MAJOR_VERSION >= 3
604  #define PyIntObject PyLongObject
605  #define PyInt_Type PyLong_Type
606  #define PyInt_Check(op) PyLong_Check(op)
607  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
608  #define PyInt_FromString PyLong_FromString
609  #define PyInt_FromUnicode PyLong_FromUnicode
610  #define PyInt_FromLong PyLong_FromLong
611  #define PyInt_FromSize_t PyLong_FromSize_t
612  #define PyInt_FromSsize_t PyLong_FromSsize_t
613  #define PyInt_AsLong PyLong_AsLong
614  #define PyInt_AS_LONG PyLong_AS_LONG
615  #define PyInt_AsSsize_t PyLong_AsSsize_t
616  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
617  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
618  #define PyNumber_Int PyNumber_Long
619 #endif
620 #if PY_MAJOR_VERSION >= 3
621  #define PyBoolObject PyLongObject
622 #endif
623 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
624  #ifndef PyUnicode_InternFromString
625  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
626  #endif
627 #endif
628 #if PY_VERSION_HEX < 0x030200A4
629  typedef long Py_hash_t;
630  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
631  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
632 #else
633  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
634  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
635 #endif
636 #if PY_MAJOR_VERSION >= 3
637  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
638 #else
639  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
640 #endif
641 #if CYTHON_USE_ASYNC_SLOTS
642  #if PY_VERSION_HEX >= 0x030500B1
643  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
644  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
645  #else
646  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
647  #endif
648 #else
649  #define __Pyx_PyType_AsAsync(obj) NULL
650 #endif
651 #ifndef __Pyx_PyAsyncMethodsStruct
652  typedef struct {
653  unaryfunc am_await;
654  unaryfunc am_aiter;
655  unaryfunc am_anext;
656  } __Pyx_PyAsyncMethodsStruct;
657 #endif
658 
659 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
660  #if !defined(_USE_MATH_DEFINES)
661  #define _USE_MATH_DEFINES
662  #endif
663 #endif
664 #include <math.h>
665 #ifdef NAN
666 #define __PYX_NAN() ((float) NAN)
667 #else
668 static CYTHON_INLINE float __PYX_NAN() {
669  float value;
670  memset(&value, 0xFF, sizeof(value));
671  return value;
672 }
673 #endif
674 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
675 #define __Pyx_truncl trunc
676 #else
677 #define __Pyx_truncl truncl
678 #endif
679 
680 #define __PYX_MARK_ERR_POS(f_index, lineno) \
681  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
682 #define __PYX_ERR(f_index, lineno, Ln_error) \
683  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
684 
685 #ifndef __PYX_EXTERN_C
686  #ifdef __cplusplus
687  #define __PYX_EXTERN_C extern "C"
688  #else
689  #define __PYX_EXTERN_C extern
690  #endif
691 #endif
692 
693 #define __PYX_HAVE__ctimeIntegration
694 #define __PYX_HAVE_API__ctimeIntegration
695 /* Early includes */
696 #include <string.h>
697 #include <stdio.h>
698 #include "numpy/arrayobject.h"
699 #include "numpy/ndarrayobject.h"
700 #include "numpy/ndarraytypes.h"
701 #include "numpy/arrayscalars.h"
702 #include "numpy/ufuncobject.h"
703 
704  /* NumPy API declarations from "numpy/__init__.pxd" */
705 
706 #include "timeIntegration.h"
707 #ifdef _OPENMP
708 #include <omp.h>
709 #endif /* _OPENMP */
710 
711 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
712 #define CYTHON_WITHOUT_ASSERTIONS
713 #endif
714 
715 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
716  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
717 
718 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
719 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
720 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
721 #define __PYX_DEFAULT_STRING_ENCODING ""
722 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
723 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
724 #define __Pyx_uchar_cast(c) ((unsigned char)c)
725 #define __Pyx_long_cast(x) ((long)x)
726 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
727  (sizeof(type) < sizeof(Py_ssize_t)) ||\
728  (sizeof(type) > sizeof(Py_ssize_t) &&\
729  likely(v < (type)PY_SSIZE_T_MAX ||\
730  v == (type)PY_SSIZE_T_MAX) &&\
731  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
732  v == (type)PY_SSIZE_T_MIN))) ||\
733  (sizeof(type) == sizeof(Py_ssize_t) &&\
734  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
735  v == (type)PY_SSIZE_T_MAX))) )
736 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
737  return (size_t) i < (size_t) limit;
738 }
739 #if defined (__cplusplus) && __cplusplus >= 201103L
740  #include <cstdlib>
741  #define __Pyx_sst_abs(value) std::abs(value)
742 #elif SIZEOF_INT >= SIZEOF_SIZE_T
743  #define __Pyx_sst_abs(value) abs(value)
744 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
745  #define __Pyx_sst_abs(value) labs(value)
746 #elif defined (_MSC_VER)
747  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
748 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
749  #define __Pyx_sst_abs(value) llabs(value)
750 #elif defined (__GNUC__)
751  #define __Pyx_sst_abs(value) __builtin_llabs(value)
752 #else
753  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
754 #endif
755 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
756 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
757 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
758 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
759 #define __Pyx_PyBytes_FromString PyBytes_FromString
760 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
761 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
762 #if PY_MAJOR_VERSION < 3
763  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
764  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
765 #else
766  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
767  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
768 #endif
769 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
770 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
771 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
772 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
773 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
774 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
775 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
776 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
777 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
778 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
779 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
780 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
781 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
782 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
783 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
784 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
785 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
786  const Py_UNICODE *u_end = u;
787  while (*u_end++) ;
788  return (size_t)(u_end - u - 1);
789 }
790 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
791 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
792 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
793 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
794 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
795 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
796 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
797 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
798 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
799 #define __Pyx_PySequence_Tuple(obj)\
800  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
801 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
802 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
803 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
804 #if CYTHON_ASSUME_SAFE_MACROS
805 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
806 #else
807 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
808 #endif
809 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
810 #if PY_MAJOR_VERSION >= 3
811 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
812 #else
813 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
814 #endif
815 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
816 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
817 static int __Pyx_sys_getdefaultencoding_not_ascii;
818 static int __Pyx_init_sys_getdefaultencoding_params(void) {
819  PyObject* sys;
820  PyObject* default_encoding = NULL;
821  PyObject* ascii_chars_u = NULL;
822  PyObject* ascii_chars_b = NULL;
823  const char* default_encoding_c;
824  sys = PyImport_ImportModule("sys");
825  if (!sys) goto bad;
826  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
827  Py_DECREF(sys);
828  if (!default_encoding) goto bad;
829  default_encoding_c = PyBytes_AsString(default_encoding);
830  if (!default_encoding_c) goto bad;
831  if (strcmp(default_encoding_c, "ascii") == 0) {
832  __Pyx_sys_getdefaultencoding_not_ascii = 0;
833  } else {
834  char ascii_chars[128];
835  int c;
836  for (c = 0; c < 128; c++) {
837  ascii_chars[c] = c;
838  }
839  __Pyx_sys_getdefaultencoding_not_ascii = 1;
840  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
841  if (!ascii_chars_u) goto bad;
842  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
843  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
844  PyErr_Format(
845  PyExc_ValueError,
846  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
847  default_encoding_c);
848  goto bad;
849  }
850  Py_DECREF(ascii_chars_u);
851  Py_DECREF(ascii_chars_b);
852  }
853  Py_DECREF(default_encoding);
854  return 0;
855 bad:
856  Py_XDECREF(default_encoding);
857  Py_XDECREF(ascii_chars_u);
858  Py_XDECREF(ascii_chars_b);
859  return -1;
860 }
861 #endif
862 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
863 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
864 #else
865 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
866 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
867 static char* __PYX_DEFAULT_STRING_ENCODING;
868 static int __Pyx_init_sys_getdefaultencoding_params(void) {
869  PyObject* sys;
870  PyObject* default_encoding = NULL;
871  char* default_encoding_c;
872  sys = PyImport_ImportModule("sys");
873  if (!sys) goto bad;
874  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
875  Py_DECREF(sys);
876  if (!default_encoding) goto bad;
877  default_encoding_c = PyBytes_AsString(default_encoding);
878  if (!default_encoding_c) goto bad;
879  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
880  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
881  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
882  Py_DECREF(default_encoding);
883  return 0;
884 bad:
885  Py_XDECREF(default_encoding);
886  return -1;
887 }
888 #endif
889 #endif
890 
891 
892 /* Test for GCC > 2.95 */
893 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
894  #define likely(x) __builtin_expect(!!(x), 1)
895  #define unlikely(x) __builtin_expect(!!(x), 0)
896 #else /* !__GNUC__ or GCC < 2.95 */
897  #define likely(x) (x)
898  #define unlikely(x) (x)
899 #endif /* __GNUC__ */
900 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
901 
902 static PyObject *__pyx_m = NULL;
903 static PyObject *__pyx_d;
904 static PyObject *__pyx_b;
905 static PyObject *__pyx_cython_runtime = NULL;
906 static PyObject *__pyx_empty_tuple;
907 static PyObject *__pyx_empty_bytes;
908 static PyObject *__pyx_empty_unicode;
909 static int __pyx_lineno;
910 static int __pyx_clineno = 0;
911 static const char * __pyx_cfilenm= __FILE__;
912 static const char *__pyx_filename;
913 
914 /* Header.proto */
915 #if !defined(CYTHON_CCOMPLEX)
916  #if defined(__cplusplus)
917  #define CYTHON_CCOMPLEX 1
918  #elif defined(_Complex_I)
919  #define CYTHON_CCOMPLEX 1
920  #else
921  #define CYTHON_CCOMPLEX 0
922  #endif
923 #endif
924 #if CYTHON_CCOMPLEX
925  #ifdef __cplusplus
926  #include <complex>
927  #else
928  #include <complex.h>
929  #endif
930 #endif
931 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
932  #undef _Complex_I
933  #define _Complex_I 1.0fj
934 #endif
935 
936 
937 static const char *__pyx_f[] = {
938  "proteus/ctimeIntegration.pyx",
939  "__init__.pxd",
940  "type.pxd",
941 };
942 
943 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
944  * # in Cython to enable them only on the right systems.
945  *
946  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
947  * ctypedef npy_int16 int16_t
948  * ctypedef npy_int32 int32_t
949  */
950 typedef npy_int8 __pyx_t_5numpy_int8_t;
951 
952 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
953  *
954  * ctypedef npy_int8 int8_t
955  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
956  * ctypedef npy_int32 int32_t
957  * ctypedef npy_int64 int64_t
958  */
959 typedef npy_int16 __pyx_t_5numpy_int16_t;
960 
961 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
962  * ctypedef npy_int8 int8_t
963  * ctypedef npy_int16 int16_t
964  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
965  * ctypedef npy_int64 int64_t
966  * #ctypedef npy_int96 int96_t
967  */
968 typedef npy_int32 __pyx_t_5numpy_int32_t;
969 
970 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
971  * ctypedef npy_int16 int16_t
972  * ctypedef npy_int32 int32_t
973  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
974  * #ctypedef npy_int96 int96_t
975  * #ctypedef npy_int128 int128_t
976  */
977 typedef npy_int64 __pyx_t_5numpy_int64_t;
978 
979 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
980  * #ctypedef npy_int128 int128_t
981  *
982  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
983  * ctypedef npy_uint16 uint16_t
984  * ctypedef npy_uint32 uint32_t
985  */
986 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
987 
988 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
989  *
990  * ctypedef npy_uint8 uint8_t
991  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
992  * ctypedef npy_uint32 uint32_t
993  * ctypedef npy_uint64 uint64_t
994  */
995 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
996 
997 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
998  * ctypedef npy_uint8 uint8_t
999  * ctypedef npy_uint16 uint16_t
1000  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1001  * ctypedef npy_uint64 uint64_t
1002  * #ctypedef npy_uint96 uint96_t
1003  */
1004 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1005 
1006 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1007  * ctypedef npy_uint16 uint16_t
1008  * ctypedef npy_uint32 uint32_t
1009  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1010  * #ctypedef npy_uint96 uint96_t
1011  * #ctypedef npy_uint128 uint128_t
1012  */
1013 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1014 
1015 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1016  * #ctypedef npy_uint128 uint128_t
1017  *
1018  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1019  * ctypedef npy_float64 float64_t
1020  * #ctypedef npy_float80 float80_t
1021  */
1022 typedef npy_float32 __pyx_t_5numpy_float32_t;
1023 
1024 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1025  *
1026  * ctypedef npy_float32 float32_t
1027  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1028  * #ctypedef npy_float80 float80_t
1029  * #ctypedef npy_float128 float128_t
1030  */
1031 typedef npy_float64 __pyx_t_5numpy_float64_t;
1032 
1033 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1034  * # The int types are mapped a bit surprising --
1035  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1036  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1037  * ctypedef npy_longlong long_t
1038  * ctypedef npy_longlong longlong_t
1039  */
1040 typedef npy_long __pyx_t_5numpy_int_t;
1041 
1042 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1043  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1044  * ctypedef npy_long int_t
1045  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1046  * ctypedef npy_longlong longlong_t
1047  *
1048  */
1049 typedef npy_longlong __pyx_t_5numpy_long_t;
1050 
1051 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1052  * ctypedef npy_long int_t
1053  * ctypedef npy_longlong long_t
1054  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1055  *
1056  * ctypedef npy_ulong uint_t
1057  */
1058 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1059 
1060 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1061  * ctypedef npy_longlong longlong_t
1062  *
1063  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1064  * ctypedef npy_ulonglong ulong_t
1065  * ctypedef npy_ulonglong ulonglong_t
1066  */
1067 typedef npy_ulong __pyx_t_5numpy_uint_t;
1068 
1069 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1070  *
1071  * ctypedef npy_ulong uint_t
1072  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1073  * ctypedef npy_ulonglong ulonglong_t
1074  *
1075  */
1076 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1077 
1078 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1079  * ctypedef npy_ulong uint_t
1080  * ctypedef npy_ulonglong ulong_t
1081  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1082  *
1083  * ctypedef npy_intp intp_t
1084  */
1085 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1086 
1087 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1088  * ctypedef npy_ulonglong ulonglong_t
1089  *
1090  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1091  * ctypedef npy_uintp uintp_t
1092  *
1093  */
1094 typedef npy_intp __pyx_t_5numpy_intp_t;
1095 
1096 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1097  *
1098  * ctypedef npy_intp intp_t
1099  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1100  *
1101  * ctypedef npy_double float_t
1102  */
1103 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1104 
1105 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1106  * ctypedef npy_uintp uintp_t
1107  *
1108  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1109  * ctypedef npy_double double_t
1110  * ctypedef npy_longdouble longdouble_t
1111  */
1112 typedef npy_double __pyx_t_5numpy_float_t;
1113 
1114 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1115  *
1116  * ctypedef npy_double float_t
1117  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1118  * ctypedef npy_longdouble longdouble_t
1119  *
1120  */
1121 typedef npy_double __pyx_t_5numpy_double_t;
1122 
1123 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1124  * ctypedef npy_double float_t
1125  * ctypedef npy_double double_t
1126  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1127  *
1128  * ctypedef npy_cfloat cfloat_t
1129  */
1130 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1131 /* Declarations.proto */
1132 #if CYTHON_CCOMPLEX
1133  #ifdef __cplusplus
1134  typedef ::std::complex< float > __pyx_t_float_complex;
1135  #else
1136  typedef float _Complex __pyx_t_float_complex;
1137  #endif
1138 #else
1139  typedef struct { float real, imag; } __pyx_t_float_complex;
1140 #endif
1141 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1142 
1143 /* Declarations.proto */
1144 #if CYTHON_CCOMPLEX
1145  #ifdef __cplusplus
1146  typedef ::std::complex< double > __pyx_t_double_complex;
1147  #else
1148  typedef double _Complex __pyx_t_double_complex;
1149  #endif
1150 #else
1151  typedef struct { double real, imag; } __pyx_t_double_complex;
1152 #endif
1153 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1154 
1155 
1156 /*--- Type declarations ---*/
1157 
1158 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1159  * ctypedef npy_longdouble longdouble_t
1160  *
1161  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1162  * ctypedef npy_cdouble cdouble_t
1163  * ctypedef npy_clongdouble clongdouble_t
1164  */
1165 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1166 
1167 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1168  *
1169  * ctypedef npy_cfloat cfloat_t
1170  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1171  * ctypedef npy_clongdouble clongdouble_t
1172  *
1173  */
1174 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1175 
1176 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1177  * ctypedef npy_cfloat cfloat_t
1178  * ctypedef npy_cdouble cdouble_t
1179  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1180  *
1181  * ctypedef npy_cdouble complex_t
1182  */
1183 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1184 
1185 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1186  * ctypedef npy_clongdouble clongdouble_t
1187  *
1188  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1189  *
1190  * cdef inline object PyArray_MultiIterNew1(a):
1191  */
1192 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1193 
1194 /* --- Runtime support code (head) --- */
1195 /* Refnanny.proto */
1196 #ifndef CYTHON_REFNANNY
1197  #define CYTHON_REFNANNY 0
1198 #endif
1199 #if CYTHON_REFNANNY
1200  typedef struct {
1201  void (*INCREF)(void*, PyObject*, int);
1202  void (*DECREF)(void*, PyObject*, int);
1203  void (*GOTREF)(void*, PyObject*, int);
1204  void (*GIVEREF)(void*, PyObject*, int);
1205  void* (*SetupContext)(const char*, int, const char*);
1206  void (*FinishContext)(void**);
1207  } __Pyx_RefNannyAPIStruct;
1208  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1209  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1210  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1211 #ifdef WITH_THREAD
1212  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1213  if (acquire_gil) {\
1214  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1215  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1216  PyGILState_Release(__pyx_gilstate_save);\
1217  } else {\
1218  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1219  }
1220 #else
1221  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1222  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1223 #endif
1224  #define __Pyx_RefNannyFinishContext()\
1225  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1226  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1227  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1228  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1229  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1230  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1231  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1232  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1233  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1234 #else
1235  #define __Pyx_RefNannyDeclarations
1236  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1237  #define __Pyx_RefNannyFinishContext()
1238  #define __Pyx_INCREF(r) Py_INCREF(r)
1239  #define __Pyx_DECREF(r) Py_DECREF(r)
1240  #define __Pyx_GOTREF(r)
1241  #define __Pyx_GIVEREF(r)
1242  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1243  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1244  #define __Pyx_XGOTREF(r)
1245  #define __Pyx_XGIVEREF(r)
1246 #endif
1247 #define __Pyx_XDECREF_SET(r, v) do {\
1248  PyObject *tmp = (PyObject *) r;\
1249  r = v; __Pyx_XDECREF(tmp);\
1250  } while (0)
1251 #define __Pyx_DECREF_SET(r, v) do {\
1252  PyObject *tmp = (PyObject *) r;\
1253  r = v; __Pyx_DECREF(tmp);\
1254  } while (0)
1255 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1256 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1257 
1258 /* RaiseArgTupleInvalid.proto */
1259 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1260  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1261 
1262 /* RaiseDoubleKeywords.proto */
1263 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1264 
1265 /* ParseKeywords.proto */
1266 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1267  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1268  const char* function_name);
1269 
1270 /* ArgTypeTest.proto */
1271 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1272  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1273  __Pyx__ArgTypeTest(obj, type, name, exact))
1274 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1275 
1276 /* PyObjectGetAttrStr.proto */
1277 #if CYTHON_USE_TYPE_SLOTS
1278 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1279 #else
1280 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1281 #endif
1282 
1283 /* GetBuiltinName.proto */
1284 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1285 
1286 /* GetTopmostException.proto */
1287 #if CYTHON_USE_EXC_INFO_STACK
1288 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1289 #endif
1290 
1291 /* PyThreadStateGet.proto */
1292 #if CYTHON_FAST_THREAD_STATE
1293 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1294 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1295 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1296 #else
1297 #define __Pyx_PyThreadState_declare
1298 #define __Pyx_PyThreadState_assign
1299 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1300 #endif
1301 
1302 /* SaveResetException.proto */
1303 #if CYTHON_FAST_THREAD_STATE
1304 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1305 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1306 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1307 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1308 #else
1309 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1310 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1311 #endif
1312 
1313 /* PyErrExceptionMatches.proto */
1314 #if CYTHON_FAST_THREAD_STATE
1315 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1316 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1317 #else
1318 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1319 #endif
1320 
1321 /* GetException.proto */
1322 #if CYTHON_FAST_THREAD_STATE
1323 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1324 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1325 #else
1326 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1327 #endif
1328 
1329 /* PyObjectCall.proto */
1330 #if CYTHON_COMPILING_IN_CPYTHON
1331 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1332 #else
1333 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1334 #endif
1335 
1336 /* PyErrFetchRestore.proto */
1337 #if CYTHON_FAST_THREAD_STATE
1338 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1339 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1340 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1341 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1342 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1343 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1344 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1345 #if CYTHON_COMPILING_IN_CPYTHON
1346 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1347 #else
1348 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1349 #endif
1350 #else
1351 #define __Pyx_PyErr_Clear() PyErr_Clear()
1352 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1353 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1354 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1355 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1356 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1357 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1358 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1359 #endif
1360 
1361 /* RaiseException.proto */
1362 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1363 
1364 /* TypeImport.proto */
1365 #ifndef __PYX_HAVE_RT_ImportType_proto
1366 #define __PYX_HAVE_RT_ImportType_proto
1367 enum __Pyx_ImportType_CheckSize {
1368  __Pyx_ImportType_CheckSize_Error = 0,
1369  __Pyx_ImportType_CheckSize_Warn = 1,
1370  __Pyx_ImportType_CheckSize_Ignore = 2
1371 };
1372 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1373 #endif
1374 
1375 /* Import.proto */
1376 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1377 
1378 /* PyDictVersioning.proto */
1379 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1380 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1381 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1382 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1383  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1384  (cache_var) = (value);
1385 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1386  static PY_UINT64_T __pyx_dict_version = 0;\
1387  static PyObject *__pyx_dict_cached_value = NULL;\
1388  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1389  (VAR) = __pyx_dict_cached_value;\
1390  } else {\
1391  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1392  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1393  }\
1394 }
1395 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1396 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1397 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1398 #else
1399 #define __PYX_GET_DICT_VERSION(dict) (0)
1400 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1401 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1402 #endif
1403 
1404 /* CLineInTraceback.proto */
1405 #ifdef CYTHON_CLINE_IN_TRACEBACK
1406 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1407 #else
1408 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1409 #endif
1410 
1411 /* CodeObjectCache.proto */
1412 typedef struct {
1413  PyCodeObject* code_object;
1414  int code_line;
1415 } __Pyx_CodeObjectCacheEntry;
1416 struct __Pyx_CodeObjectCache {
1417  int count;
1418  int max_count;
1419  __Pyx_CodeObjectCacheEntry* entries;
1420 };
1421 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1422 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1423 static PyCodeObject *__pyx_find_code_object(int code_line);
1424 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1425 
1426 /* AddTraceback.proto */
1427 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1428  int py_line, const char *filename);
1429 
1430 /* GCCDiagnostics.proto */
1431 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
1432 #define __Pyx_HAS_GCC_DIAGNOSTIC
1433 #endif
1434 
1435 /* RealImag.proto */
1436 #if CYTHON_CCOMPLEX
1437  #ifdef __cplusplus
1438  #define __Pyx_CREAL(z) ((z).real())
1439  #define __Pyx_CIMAG(z) ((z).imag())
1440  #else
1441  #define __Pyx_CREAL(z) (__real__(z))
1442  #define __Pyx_CIMAG(z) (__imag__(z))
1443  #endif
1444 #else
1445  #define __Pyx_CREAL(z) ((z).real)
1446  #define __Pyx_CIMAG(z) ((z).imag)
1447 #endif
1448 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1449  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1450  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1451  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1452 #else
1453  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1454  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1455 #endif
1456 
1457 /* Arithmetic.proto */
1458 #if CYTHON_CCOMPLEX
1459  #define __Pyx_c_eq_float(a, b) ((a)==(b))
1460  #define __Pyx_c_sum_float(a, b) ((a)+(b))
1461  #define __Pyx_c_diff_float(a, b) ((a)-(b))
1462  #define __Pyx_c_prod_float(a, b) ((a)*(b))
1463  #define __Pyx_c_quot_float(a, b) ((a)/(b))
1464  #define __Pyx_c_neg_float(a) (-(a))
1465  #ifdef __cplusplus
1466  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1467  #define __Pyx_c_conj_float(z) (::std::conj(z))
1468  #if 1
1469  #define __Pyx_c_abs_float(z) (::std::abs(z))
1470  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1471  #endif
1472  #else
1473  #define __Pyx_c_is_zero_float(z) ((z)==0)
1474  #define __Pyx_c_conj_float(z) (conjf(z))
1475  #if 1
1476  #define __Pyx_c_abs_float(z) (cabsf(z))
1477  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1478  #endif
1479  #endif
1480 #else
1481  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1482  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1483  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1484  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1485  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1486  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1487  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1488  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1489  #if 1
1490  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1491  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1492  #endif
1493 #endif
1494 
1495 /* Arithmetic.proto */
1496 #if CYTHON_CCOMPLEX
1497  #define __Pyx_c_eq_double(a, b) ((a)==(b))
1498  #define __Pyx_c_sum_double(a, b) ((a)+(b))
1499  #define __Pyx_c_diff_double(a, b) ((a)-(b))
1500  #define __Pyx_c_prod_double(a, b) ((a)*(b))
1501  #define __Pyx_c_quot_double(a, b) ((a)/(b))
1502  #define __Pyx_c_neg_double(a) (-(a))
1503  #ifdef __cplusplus
1504  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1505  #define __Pyx_c_conj_double(z) (::std::conj(z))
1506  #if 1
1507  #define __Pyx_c_abs_double(z) (::std::abs(z))
1508  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1509  #endif
1510  #else
1511  #define __Pyx_c_is_zero_double(z) ((z)==0)
1512  #define __Pyx_c_conj_double(z) (conj(z))
1513  #if 1
1514  #define __Pyx_c_abs_double(z) (cabs(z))
1515  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1516  #endif
1517  #endif
1518 #else
1519  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1520  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1521  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1522  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1523  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1524  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1525  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1526  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1527  #if 1
1528  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1529  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1530  #endif
1531 #endif
1532 
1533 /* CIntFromPy.proto */
1534 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1535 
1536 /* CIntToPy.proto */
1537 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1538 
1539 /* CIntFromPy.proto */
1540 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1541 
1542 /* FastTypeChecks.proto */
1543 #if CYTHON_COMPILING_IN_CPYTHON
1544 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1545 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1546 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1547 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1548 #else
1549 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1550 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1551 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1552 #endif
1553 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1554 
1555 /* CheckBinaryVersion.proto */
1556 static int __Pyx_check_binary_version(void);
1557 
1558 /* InitStrings.proto */
1559 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1560 
1561 
1562 /* Module declarations from 'cpython.buffer' */
1563 
1564 /* Module declarations from 'libc.string' */
1565 
1566 /* Module declarations from 'libc.stdio' */
1567 
1568 /* Module declarations from '__builtin__' */
1569 
1570 /* Module declarations from 'cpython.type' */
1571 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1572 
1573 /* Module declarations from 'cpython' */
1574 
1575 /* Module declarations from 'cpython.object' */
1576 
1577 /* Module declarations from 'cpython.ref' */
1578 
1579 /* Module declarations from 'cpython.mem' */
1580 
1581 /* Module declarations from 'numpy' */
1582 
1583 /* Module declarations from 'numpy' */
1584 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1585 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1586 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1587 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1588 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
1589 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
1590 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
1591 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
1592 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
1593 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
1594 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
1595 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
1596 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
1597 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
1598 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1599 
1600 /* Module declarations from 'ctimeIntegration' */
1601 #define __Pyx_MODULE_NAME "ctimeIntegration"
1602 extern int __pyx_module_is_main_ctimeIntegration;
1603 int __pyx_module_is_main_ctimeIntegration = 0;
1604 
1605 /* Implementation of 'ctimeIntegration' */
1606 static PyObject *__pyx_builtin_ImportError;
1607 static const char __pyx_k_np[] = "np";
1608 static const char __pyx_k_nu[] = "nu";
1609 static const char __pyx_k_yn[] = "yn";
1610 static const char __pyx_k_Mh2[] = "Mh2";
1611 static const char __pyx_k_Uin[] = "Uin";
1612 static const char __pyx_k_dtn[] = "dtn";
1613 static const char __pyx_k_l2g[] = "l2g";
1614 static const char __pyx_k_tag[] = "tag";
1615 static const char __pyx_k_tau[] = "tau";
1616 static const char __pyx_k_ypn[] = "ypn";
1617 static const char __pyx_k_Uout[] = "Uout";
1618 static const char __pyx_k_main[] = "__main__";
1619 static const char __pyx_k_name[] = "__name__";
1620 static const char __pyx_k_test[] = "__test__";
1621 static const char __pyx_k_dtnm1[] = "dtnm1";
1622 static const char __pyx_k_dtnp1[] = "dtnp1";
1623 static const char __pyx_k_numpy[] = "numpy";
1624 static const char __pyx_k_ypnm1[] = "ypnm1";
1625 static const char __pyx_k_alphas[] = "alphas";
1626 static const char __pyx_k_import[] = "__import__";
1627 static const char __pyx_k_nSpace[] = "nSpace";
1628 static const char __pyx_k_grad_v0[] = "grad_v0";
1629 static const char __pyx_k_nPoints[] = "nPoints";
1630 static const char __pyx_k_nodeArray[] = "nodeArray";
1631 static const char __pyx_k_vacuumTol[] = "vacuumTol";
1632 static const char __pyx_k_psiTCtteDT[] = "psiTCtteDT";
1633 static const char __pyx_k_ImportError[] = "ImportError";
1634 static const char __pyx_k_killExtrema[] = "killExtrema";
1635 static const char __pyx_k_limiterFlag[] = "limiterFlag";
1636 static const char __pyx_k_nDOF_element[] = "nDOF_element";
1637 static const char __pyx_k_alphaNeighbors[] = "alphaNeighbors";
1638 static const char __pyx_k_nNodes_element[] = "nNodes_element";
1639 static const char __pyx_k_elementAverages[] = "elementAverages";
1640 static const char __pyx_k_ctimeIntegration[] = "ctimeIntegration";
1641 static const char __pyx_k_nElements_global[] = "nElements_global";
1642 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
1643 static const char __pyx_k_enforcePositivity[] = "enforcePositivity";
1644 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1645 static const char __pyx_k_elementNeighborsArray[] = "elementNeighborsArray";
1646 static const char __pyx_k_allowMinWithUndershoot[] = "allowMinWithUndershoot";
1647 static const char __pyx_k_elementBoundariesArray[] = "elementBoundariesArray";
1648 static const char __pyx_k_elementBarycentersArray[] = "elementBarycentersArray";
1649 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
1650 static const char __pyx_k_applyDGlimitingP1Lagrange1d[] = "applyDGlimitingP1Lagrange1d";
1651 static const char __pyx_k_proteus_ctimeIntegration_pyx[] = "proteus/ctimeIntegration.pyx";
1652 static const char __pyx_k_elementNeighborShapeGradients[] = "elementNeighborShapeGradients";
1653 static const char __pyx_k_elementBoundaryBarycentersArray[] = "elementBoundaryBarycentersArray";
1654 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
1655 static const char __pyx_k_applyCockburnDGlimiterP1Lagrange[] = "applyCockburnDGlimiterP1Lagrange2d";
1656 static const char __pyx_k_applyDGlimitingP1Lagrange1d_with[] = "applyDGlimitingP1Lagrange1d_withVacuumTol";
1657 static const char __pyx_k_applyDurlofskyDGlimiterP1Lagrang[] = "applyDurlofskyDGlimiterP1Lagrange2d";
1658 static const char __pyx_k_computeCockburnDGlimiterArrays2d[] = "computeCockburnDGlimiterArrays2d";
1659 static const char __pyx_k_computeElementNeighborShapeGradi[] = "computeElementNeighborShapeGradients";
1660 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
1661 static const char __pyx_k_applyDurlofskyDGlimiterP1Lagrang_2[] = "applyDurlofskyDGlimiterP1Lagrange3d";
1662 static const char __pyx_k_applyDurlofskyDGlimiterP1Lagrang_3[] = "applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol";
1663 static PyObject *__pyx_n_s_ImportError;
1664 static PyObject *__pyx_n_s_Mh2;
1665 static PyObject *__pyx_n_s_Uin;
1666 static PyObject *__pyx_n_s_Uout;
1667 static PyObject *__pyx_n_s_allowMinWithUndershoot;
1668 static PyObject *__pyx_n_s_alphaNeighbors;
1669 static PyObject *__pyx_n_s_alphas;
1670 static PyObject *__pyx_n_s_applyCockburnDGlimiterP1Lagrange;
1671 static PyObject *__pyx_n_s_applyDGlimitingP1Lagrange1d;
1672 static PyObject *__pyx_n_s_applyDGlimitingP1Lagrange1d_with;
1673 static PyObject *__pyx_n_s_applyDurlofskyDGlimiterP1Lagrang;
1674 static PyObject *__pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_2;
1675 static PyObject *__pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_3;
1676 static PyObject *__pyx_n_s_cline_in_traceback;
1677 static PyObject *__pyx_n_s_computeCockburnDGlimiterArrays2d;
1678 static PyObject *__pyx_n_s_computeElementNeighborShapeGradi;
1679 static PyObject *__pyx_n_s_ctimeIntegration;
1680 static PyObject *__pyx_n_s_dtn;
1681 static PyObject *__pyx_n_s_dtnm1;
1682 static PyObject *__pyx_n_s_dtnp1;
1683 static PyObject *__pyx_n_s_elementAverages;
1684 static PyObject *__pyx_n_s_elementBarycentersArray;
1685 static PyObject *__pyx_n_s_elementBoundariesArray;
1686 static PyObject *__pyx_n_s_elementBoundaryBarycentersArray;
1687 static PyObject *__pyx_n_s_elementNeighborShapeGradients;
1688 static PyObject *__pyx_n_s_elementNeighborsArray;
1689 static PyObject *__pyx_n_s_elementNodesArray;
1690 static PyObject *__pyx_n_s_enforcePositivity;
1691 static PyObject *__pyx_n_s_grad_v0;
1692 static PyObject *__pyx_n_s_import;
1693 static PyObject *__pyx_n_s_killExtrema;
1694 static PyObject *__pyx_n_s_l2g;
1695 static PyObject *__pyx_n_s_limiterFlag;
1696 static PyObject *__pyx_n_s_main;
1697 static PyObject *__pyx_n_s_nDOF_element;
1698 static PyObject *__pyx_n_s_nElementBoundaries_element;
1699 static PyObject *__pyx_n_s_nElements_global;
1700 static PyObject *__pyx_n_s_nNodes_element;
1701 static PyObject *__pyx_n_s_nPoints;
1702 static PyObject *__pyx_n_s_nSpace;
1703 static PyObject *__pyx_n_s_name;
1704 static PyObject *__pyx_n_s_nodeArray;
1705 static PyObject *__pyx_n_s_np;
1706 static PyObject *__pyx_n_s_nu;
1707 static PyObject *__pyx_n_s_numpy;
1708 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
1709 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
1710 static PyObject *__pyx_kp_s_proteus_ctimeIntegration_pyx;
1711 static PyObject *__pyx_n_s_psiTCtteDT;
1712 static PyObject *__pyx_n_s_tag;
1713 static PyObject *__pyx_n_s_tau;
1714 static PyObject *__pyx_n_s_test;
1715 static PyObject *__pyx_n_s_vacuumTol;
1716 static PyObject *__pyx_n_s_yn;
1717 static PyObject *__pyx_n_s_ypn;
1718 static PyObject *__pyx_n_s_ypnm1;
1719 static PyObject *__pyx_pf_16ctimeIntegration_psiTCtteDT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nPoints, double __pyx_v_tau, double __pyx_v_dtn, double __pyx_v_dtnm1, PyArrayObject *__pyx_v_yn, PyArrayObject *__pyx_v_ypn, PyArrayObject *__pyx_v_ypnm1, PyArrayObject *__pyx_v_dtnp1); /* proto */
1720 static PyObject *__pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_limiterFlag, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
1721 static PyObject *__pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
1722 static PyObject *__pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients); /* proto */
1723 static PyObject *__pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors); /* proto */
1724 static PyObject *__pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_nu, double __pyx_v_Mh2, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
1725 static PyObject *__pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
1726 static PyObject *__pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
1727 static PyObject *__pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
1728 static PyObject *__pyx_tuple_;
1729 static PyObject *__pyx_tuple__2;
1730 static PyObject *__pyx_tuple__3;
1731 static PyObject *__pyx_tuple__5;
1732 static PyObject *__pyx_tuple__7;
1733 static PyObject *__pyx_tuple__9;
1734 static PyObject *__pyx_tuple__11;
1735 static PyObject *__pyx_tuple__13;
1736 static PyObject *__pyx_tuple__15;
1737 static PyObject *__pyx_tuple__17;
1738 static PyObject *__pyx_tuple__19;
1739 static PyObject *__pyx_codeobj__4;
1740 static PyObject *__pyx_codeobj__6;
1741 static PyObject *__pyx_codeobj__8;
1742 static PyObject *__pyx_codeobj__10;
1743 static PyObject *__pyx_codeobj__12;
1744 static PyObject *__pyx_codeobj__14;
1745 static PyObject *__pyx_codeobj__16;
1746 static PyObject *__pyx_codeobj__18;
1747 static PyObject *__pyx_codeobj__20;
1748 /* Late includes */
1749 
1750 /* "ctimeIntegration.pyx":143
1751  * double* Uout)
1752  * # ------------------------------------------- #
1753  * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
1754  * double tau,
1755  * double dtn,
1756  */
1757 
1758 /* Python wrapper */
1759 static PyObject *__pyx_pw_16ctimeIntegration_1psiTCtteDT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1760 static PyMethodDef __pyx_mdef_16ctimeIntegration_1psiTCtteDT = {"psiTCtteDT", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_1psiTCtteDT, METH_VARARGS|METH_KEYWORDS, 0};
1761 static PyObject *__pyx_pw_16ctimeIntegration_1psiTCtteDT(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1762  int __pyx_v_nPoints;
1763  double __pyx_v_tau;
1764  double __pyx_v_dtn;
1765  double __pyx_v_dtnm1;
1766  PyArrayObject *__pyx_v_yn = 0;
1767  PyArrayObject *__pyx_v_ypn = 0;
1768  PyArrayObject *__pyx_v_ypnm1 = 0;
1769  PyArrayObject *__pyx_v_dtnp1 = 0;
1770  int __pyx_lineno = 0;
1771  const char *__pyx_filename = NULL;
1772  int __pyx_clineno = 0;
1773  PyObject *__pyx_r = 0;
1774  __Pyx_RefNannyDeclarations
1775  __Pyx_RefNannySetupContext("psiTCtteDT (wrapper)", 0);
1776  {
1777  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nPoints,&__pyx_n_s_tau,&__pyx_n_s_dtn,&__pyx_n_s_dtnm1,&__pyx_n_s_yn,&__pyx_n_s_ypn,&__pyx_n_s_ypnm1,&__pyx_n_s_dtnp1,0};
1778  PyObject* values[8] = {0,0,0,0,0,0,0,0};
1779  if (unlikely(__pyx_kwds)) {
1780  Py_ssize_t kw_args;
1781  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1782  switch (pos_args) {
1783  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
1784  CYTHON_FALLTHROUGH;
1785  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
1786  CYTHON_FALLTHROUGH;
1787  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
1788  CYTHON_FALLTHROUGH;
1789  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1790  CYTHON_FALLTHROUGH;
1791  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1792  CYTHON_FALLTHROUGH;
1793  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1794  CYTHON_FALLTHROUGH;
1795  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1796  CYTHON_FALLTHROUGH;
1797  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1798  CYTHON_FALLTHROUGH;
1799  case 0: break;
1800  default: goto __pyx_L5_argtuple_error;
1801  }
1802  kw_args = PyDict_Size(__pyx_kwds);
1803  switch (pos_args) {
1804  case 0:
1805  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nPoints)) != 0)) kw_args--;
1806  else goto __pyx_L5_argtuple_error;
1807  CYTHON_FALLTHROUGH;
1808  case 1:
1809  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
1810  else {
1811  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 1); __PYX_ERR(0, 143, __pyx_L3_error)
1812  }
1813  CYTHON_FALLTHROUGH;
1814  case 2:
1815  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtn)) != 0)) kw_args--;
1816  else {
1817  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 2); __PYX_ERR(0, 143, __pyx_L3_error)
1818  }
1819  CYTHON_FALLTHROUGH;
1820  case 3:
1821  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtnm1)) != 0)) kw_args--;
1822  else {
1823  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 3); __PYX_ERR(0, 143, __pyx_L3_error)
1824  }
1825  CYTHON_FALLTHROUGH;
1826  case 4:
1827  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_yn)) != 0)) kw_args--;
1828  else {
1829  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 4); __PYX_ERR(0, 143, __pyx_L3_error)
1830  }
1831  CYTHON_FALLTHROUGH;
1832  case 5:
1833  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ypn)) != 0)) kw_args--;
1834  else {
1835  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 5); __PYX_ERR(0, 143, __pyx_L3_error)
1836  }
1837  CYTHON_FALLTHROUGH;
1838  case 6:
1839  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ypnm1)) != 0)) kw_args--;
1840  else {
1841  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 6); __PYX_ERR(0, 143, __pyx_L3_error)
1842  }
1843  CYTHON_FALLTHROUGH;
1844  case 7:
1845  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtnp1)) != 0)) kw_args--;
1846  else {
1847  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, 7); __PYX_ERR(0, 143, __pyx_L3_error)
1848  }
1849  }
1850  if (unlikely(kw_args > 0)) {
1851  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "psiTCtteDT") < 0)) __PYX_ERR(0, 143, __pyx_L3_error)
1852  }
1853  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
1854  goto __pyx_L5_argtuple_error;
1855  } else {
1856  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1857  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1858  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1859  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1860  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1861  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
1862  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
1863  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
1864  }
1865  __pyx_v_nPoints = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nPoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L3_error)
1866  __pyx_v_tau = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_tau == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L3_error)
1867  __pyx_v_dtn = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_dtn == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 145, __pyx_L3_error)
1868  __pyx_v_dtnm1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_dtnm1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
1869  __pyx_v_yn = ((PyArrayObject *)values[4]);
1870  __pyx_v_ypn = ((PyArrayObject *)values[5]);
1871  __pyx_v_ypnm1 = ((PyArrayObject *)values[6]);
1872  __pyx_v_dtnp1 = ((PyArrayObject *)values[7]);
1873  }
1874  goto __pyx_L4_argument_unpacking_done;
1875  __pyx_L5_argtuple_error:;
1876  __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 143, __pyx_L3_error)
1877  __pyx_L3_error:;
1878  __Pyx_AddTraceback("ctimeIntegration.psiTCtteDT", __pyx_clineno, __pyx_lineno, __pyx_filename);
1879  __Pyx_RefNannyFinishContext();
1880  return NULL;
1881  __pyx_L4_argument_unpacking_done:;
1882  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yn), __pyx_ptype_5numpy_ndarray, 1, "yn", 0))) __PYX_ERR(0, 147, __pyx_L1_error)
1883  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ypn), __pyx_ptype_5numpy_ndarray, 1, "ypn", 0))) __PYX_ERR(0, 148, __pyx_L1_error)
1884  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ypnm1), __pyx_ptype_5numpy_ndarray, 1, "ypnm1", 0))) __PYX_ERR(0, 149, __pyx_L1_error)
1885  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtnp1), __pyx_ptype_5numpy_ndarray, 1, "dtnp1", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
1886  __pyx_r = __pyx_pf_16ctimeIntegration_psiTCtteDT(__pyx_self, __pyx_v_nPoints, __pyx_v_tau, __pyx_v_dtn, __pyx_v_dtnm1, __pyx_v_yn, __pyx_v_ypn, __pyx_v_ypnm1, __pyx_v_dtnp1);
1887 
1888  /* function exit code */
1889  goto __pyx_L0;
1890  __pyx_L1_error:;
1891  __pyx_r = NULL;
1892  __pyx_L0:;
1893  __Pyx_RefNannyFinishContext();
1894  return __pyx_r;
1895 }
1896 
1897 static PyObject *__pyx_pf_16ctimeIntegration_psiTCtteDT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nPoints, double __pyx_v_tau, double __pyx_v_dtn, double __pyx_v_dtnm1, PyArrayObject *__pyx_v_yn, PyArrayObject *__pyx_v_ypn, PyArrayObject *__pyx_v_ypnm1, PyArrayObject *__pyx_v_dtnp1) {
1898  PyObject *__pyx_r = NULL;
1899  __Pyx_RefNannyDeclarations
1900  __Pyx_RefNannySetupContext("psiTCtteDT", 0);
1901 
1902  /* "ctimeIntegration.pyx":151
1903  * np.ndarray ypnm1,
1904  * np.ndarray dtnp1):
1905  * cpsiTCtteDT(nPoints, # <<<<<<<<<<<<<<
1906  * tau,
1907  * dtn,
1908  */
1909  psiTCtteDT(__pyx_v_nPoints, __pyx_v_tau, __pyx_v_dtn, __pyx_v_dtnm1, ((double *)__pyx_v_yn->data), ((double *)__pyx_v_ypn->data), ((double *)__pyx_v_ypnm1->data), ((double *)__pyx_v_dtnp1->data));
1910 
1911  /* "ctimeIntegration.pyx":143
1912  * double* Uout)
1913  * # ------------------------------------------- #
1914  * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
1915  * double tau,
1916  * double dtn,
1917  */
1918 
1919  /* function exit code */
1920  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1921  __Pyx_XGIVEREF(__pyx_r);
1922  __Pyx_RefNannyFinishContext();
1923  return __pyx_r;
1924 }
1925 
1926 /* "ctimeIntegration.pyx":160
1927  * <double*> dtnp1.data)
1928  *
1929  * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
1930  * int nElements_global,
1931  * int nNodes_element,
1932  */
1933 
1934 /* Python wrapper */
1935 static PyObject *__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1936 static PyMethodDef __pyx_mdef_16ctimeIntegration_3applyDGlimitingP1Lagrange1d = {"applyDGlimitingP1Lagrange1d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d, METH_VARARGS|METH_KEYWORDS, 0};
1937 static PyObject *__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1938  int __pyx_v_limiterFlag;
1939  int __pyx_v_nElements_global;
1940  int __pyx_v_nNodes_element;
1941  int __pyx_v_nElementBoundaries_element;
1942  int __pyx_v_nDOF_element;
1943  PyArrayObject *__pyx_v_elementNodesArray = 0;
1944  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
1945  PyArrayObject *__pyx_v_nodeArray = 0;
1946  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
1947  PyArrayObject *__pyx_v_l2g = 0;
1948  PyArrayObject *__pyx_v_tag = 0;
1949  PyArrayObject *__pyx_v_Uin = 0;
1950  PyArrayObject *__pyx_v_Uout = 0;
1951  int __pyx_lineno = 0;
1952  const char *__pyx_filename = NULL;
1953  int __pyx_clineno = 0;
1954  PyObject *__pyx_r = 0;
1955  __Pyx_RefNannyDeclarations
1956  __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d (wrapper)", 0);
1957  {
1958  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_limiterFlag,&__pyx_n_s_nElements_global,&__pyx_n_s_nNodes_element,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nDOF_element,&__pyx_n_s_elementNodesArray,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_nodeArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_l2g,&__pyx_n_s_tag,&__pyx_n_s_Uin,&__pyx_n_s_Uout,0};
1959  PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
1960  if (unlikely(__pyx_kwds)) {
1961  Py_ssize_t kw_args;
1962  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1963  switch (pos_args) {
1964  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
1965  CYTHON_FALLTHROUGH;
1966  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
1967  CYTHON_FALLTHROUGH;
1968  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
1969  CYTHON_FALLTHROUGH;
1970  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
1971  CYTHON_FALLTHROUGH;
1972  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
1973  CYTHON_FALLTHROUGH;
1974  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
1975  CYTHON_FALLTHROUGH;
1976  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
1977  CYTHON_FALLTHROUGH;
1978  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
1979  CYTHON_FALLTHROUGH;
1980  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1981  CYTHON_FALLTHROUGH;
1982  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1983  CYTHON_FALLTHROUGH;
1984  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1985  CYTHON_FALLTHROUGH;
1986  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1987  CYTHON_FALLTHROUGH;
1988  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1989  CYTHON_FALLTHROUGH;
1990  case 0: break;
1991  default: goto __pyx_L5_argtuple_error;
1992  }
1993  kw_args = PyDict_Size(__pyx_kwds);
1994  switch (pos_args) {
1995  case 0:
1996  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_limiterFlag)) != 0)) kw_args--;
1997  else goto __pyx_L5_argtuple_error;
1998  CYTHON_FALLTHROUGH;
1999  case 1:
2000  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
2001  else {
2002  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 1); __PYX_ERR(0, 160, __pyx_L3_error)
2003  }
2004  CYTHON_FALLTHROUGH;
2005  case 2:
2006  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
2007  else {
2008  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 2); __PYX_ERR(0, 160, __pyx_L3_error)
2009  }
2010  CYTHON_FALLTHROUGH;
2011  case 3:
2012  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
2013  else {
2014  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 3); __PYX_ERR(0, 160, __pyx_L3_error)
2015  }
2016  CYTHON_FALLTHROUGH;
2017  case 4:
2018  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_element)) != 0)) kw_args--;
2019  else {
2020  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 4); __PYX_ERR(0, 160, __pyx_L3_error)
2021  }
2022  CYTHON_FALLTHROUGH;
2023  case 5:
2024  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
2025  else {
2026  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 5); __PYX_ERR(0, 160, __pyx_L3_error)
2027  }
2028  CYTHON_FALLTHROUGH;
2029  case 6:
2030  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2031  else {
2032  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 6); __PYX_ERR(0, 160, __pyx_L3_error)
2033  }
2034  CYTHON_FALLTHROUGH;
2035  case 7:
2036  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
2037  else {
2038  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 7); __PYX_ERR(0, 160, __pyx_L3_error)
2039  }
2040  CYTHON_FALLTHROUGH;
2041  case 8:
2042  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
2043  else {
2044  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 8); __PYX_ERR(0, 160, __pyx_L3_error)
2045  }
2046  CYTHON_FALLTHROUGH;
2047  case 9:
2048  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
2049  else {
2050  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 9); __PYX_ERR(0, 160, __pyx_L3_error)
2051  }
2052  CYTHON_FALLTHROUGH;
2053  case 10:
2054  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
2055  else {
2056  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 10); __PYX_ERR(0, 160, __pyx_L3_error)
2057  }
2058  CYTHON_FALLTHROUGH;
2059  case 11:
2060  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uin)) != 0)) kw_args--;
2061  else {
2062  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 11); __PYX_ERR(0, 160, __pyx_L3_error)
2063  }
2064  CYTHON_FALLTHROUGH;
2065  case 12:
2066  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uout)) != 0)) kw_args--;
2067  else {
2068  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, 12); __PYX_ERR(0, 160, __pyx_L3_error)
2069  }
2070  }
2071  if (unlikely(kw_args > 0)) {
2072  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyDGlimitingP1Lagrange1d") < 0)) __PYX_ERR(0, 160, __pyx_L3_error)
2073  }
2074  } else if (PyTuple_GET_SIZE(__pyx_args) != 13) {
2075  goto __pyx_L5_argtuple_error;
2076  } else {
2077  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2078  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2079  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2080  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2081  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2082  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2083  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2084  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2085  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2086  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2087  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2088  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2089  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2090  }
2091  __pyx_v_limiterFlag = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_limiterFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L3_error)
2092  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error)
2093  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L3_error)
2094  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L3_error)
2095  __pyx_v_nDOF_element = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
2096  __pyx_v_elementNodesArray = ((PyArrayObject *)values[5]);
2097  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[6]);
2098  __pyx_v_nodeArray = ((PyArrayObject *)values[7]);
2099  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[8]);
2100  __pyx_v_l2g = ((PyArrayObject *)values[9]);
2101  __pyx_v_tag = ((PyArrayObject *)values[10]);
2102  __pyx_v_Uin = ((PyArrayObject *)values[11]);
2103  __pyx_v_Uout = ((PyArrayObject *)values[12]);
2104  }
2105  goto __pyx_L4_argument_unpacking_done;
2106  __pyx_L5_argtuple_error:;
2107  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 160, __pyx_L3_error)
2108  __pyx_L3_error:;
2109  __Pyx_AddTraceback("ctimeIntegration.applyDGlimitingP1Lagrange1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
2110  __Pyx_RefNannyFinishContext();
2111  return NULL;
2112  __pyx_L4_argument_unpacking_done:;
2113  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 165, __pyx_L1_error)
2114  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
2115  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 167, __pyx_L1_error)
2116  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 168, __pyx_L1_error)
2117  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 169, __pyx_L1_error)
2118  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
2119  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 171, __pyx_L1_error)
2120  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 172, __pyx_L1_error)
2121  __pyx_r = __pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(__pyx_self, __pyx_v_limiterFlag, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, __pyx_v_elementNodesArray, __pyx_v_elementNeighborsArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
2122 
2123  /* function exit code */
2124  goto __pyx_L0;
2125  __pyx_L1_error:;
2126  __pyx_r = NULL;
2127  __pyx_L0:;
2128  __Pyx_RefNannyFinishContext();
2129  return __pyx_r;
2130 }
2131 
2132 static PyObject *__pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_limiterFlag, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
2133  PyObject *__pyx_r = NULL;
2134  __Pyx_RefNannyDeclarations
2135  __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d", 0);
2136 
2137  /* "ctimeIntegration.pyx":173
2138  * np.ndarray Uin,
2139  * np.ndarray Uout):
2140  * capplyDGlimitingP1Lagrange1d(limiterFlag, # <<<<<<<<<<<<<<
2141  * nElements_global,
2142  * nNodes_element,
2143  */
2144  applyDGlimitingP1Lagrange1d(__pyx_v_limiterFlag, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, ((int *)__pyx_v_elementNodesArray->data), ((int *)__pyx_v_elementNeighborsArray->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((int *)__pyx_v_l2g->data), ((int *)__pyx_v_tag->data), ((double *)__pyx_v_Uin->data), ((double *)__pyx_v_Uout->data));
2145 
2146  /* "ctimeIntegration.pyx":160
2147  * <double*> dtnp1.data)
2148  *
2149  * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
2150  * int nElements_global,
2151  * int nNodes_element,
2152  */
2153 
2154  /* function exit code */
2155  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2156  __Pyx_XGIVEREF(__pyx_r);
2157  __Pyx_RefNannyFinishContext();
2158  return __pyx_r;
2159 }
2160 
2161 /* "ctimeIntegration.pyx":187
2162  * <double*> Uout.data)
2163  *
2164  * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
2165  * double vacuumTol,
2166  * int nElements_global,
2167  */
2168 
2169 /* Python wrapper */
2170 static PyObject *__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2171 static PyMethodDef __pyx_mdef_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol = {"applyDGlimitingP1Lagrange1d_withVacuumTol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol, METH_VARARGS|METH_KEYWORDS, 0};
2172 static PyObject *__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2173  int __pyx_v_enforcePositivity;
2174  double __pyx_v_vacuumTol;
2175  int __pyx_v_nElements_global;
2176  int __pyx_v_nNodes_element;
2177  int __pyx_v_nElementBoundaries_element;
2178  int __pyx_v_nDOF_element;
2179  PyArrayObject *__pyx_v_elementNodesArray = 0;
2180  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
2181  PyArrayObject *__pyx_v_nodeArray = 0;
2182  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
2183  PyArrayObject *__pyx_v_l2g = 0;
2184  PyArrayObject *__pyx_v_tag = 0;
2185  PyArrayObject *__pyx_v_Uin = 0;
2186  PyArrayObject *__pyx_v_Uout = 0;
2187  int __pyx_lineno = 0;
2188  const char *__pyx_filename = NULL;
2189  int __pyx_clineno = 0;
2190  PyObject *__pyx_r = 0;
2191  __Pyx_RefNannyDeclarations
2192  __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d_withVacuumTol (wrapper)", 0);
2193  {
2194  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_enforcePositivity,&__pyx_n_s_vacuumTol,&__pyx_n_s_nElements_global,&__pyx_n_s_nNodes_element,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nDOF_element,&__pyx_n_s_elementNodesArray,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_nodeArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_l2g,&__pyx_n_s_tag,&__pyx_n_s_Uin,&__pyx_n_s_Uout,0};
2195  PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
2196  if (unlikely(__pyx_kwds)) {
2197  Py_ssize_t kw_args;
2198  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2199  switch (pos_args) {
2200  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2201  CYTHON_FALLTHROUGH;
2202  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2203  CYTHON_FALLTHROUGH;
2204  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2205  CYTHON_FALLTHROUGH;
2206  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2207  CYTHON_FALLTHROUGH;
2208  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2209  CYTHON_FALLTHROUGH;
2210  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2211  CYTHON_FALLTHROUGH;
2212  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2213  CYTHON_FALLTHROUGH;
2214  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2215  CYTHON_FALLTHROUGH;
2216  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2217  CYTHON_FALLTHROUGH;
2218  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2219  CYTHON_FALLTHROUGH;
2220  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2221  CYTHON_FALLTHROUGH;
2222  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2223  CYTHON_FALLTHROUGH;
2224  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2225  CYTHON_FALLTHROUGH;
2226  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2227  CYTHON_FALLTHROUGH;
2228  case 0: break;
2229  default: goto __pyx_L5_argtuple_error;
2230  }
2231  kw_args = PyDict_Size(__pyx_kwds);
2232  switch (pos_args) {
2233  case 0:
2234  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforcePositivity)) != 0)) kw_args--;
2235  else goto __pyx_L5_argtuple_error;
2236  CYTHON_FALLTHROUGH;
2237  case 1:
2238  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vacuumTol)) != 0)) kw_args--;
2239  else {
2240  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 1); __PYX_ERR(0, 187, __pyx_L3_error)
2241  }
2242  CYTHON_FALLTHROUGH;
2243  case 2:
2244  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
2245  else {
2246  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 2); __PYX_ERR(0, 187, __pyx_L3_error)
2247  }
2248  CYTHON_FALLTHROUGH;
2249  case 3:
2250  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
2251  else {
2252  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 3); __PYX_ERR(0, 187, __pyx_L3_error)
2253  }
2254  CYTHON_FALLTHROUGH;
2255  case 4:
2256  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
2257  else {
2258  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 4); __PYX_ERR(0, 187, __pyx_L3_error)
2259  }
2260  CYTHON_FALLTHROUGH;
2261  case 5:
2262  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_element)) != 0)) kw_args--;
2263  else {
2264  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 5); __PYX_ERR(0, 187, __pyx_L3_error)
2265  }
2266  CYTHON_FALLTHROUGH;
2267  case 6:
2268  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
2269  else {
2270  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 6); __PYX_ERR(0, 187, __pyx_L3_error)
2271  }
2272  CYTHON_FALLTHROUGH;
2273  case 7:
2274  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2275  else {
2276  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 7); __PYX_ERR(0, 187, __pyx_L3_error)
2277  }
2278  CYTHON_FALLTHROUGH;
2279  case 8:
2280  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
2281  else {
2282  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 8); __PYX_ERR(0, 187, __pyx_L3_error)
2283  }
2284  CYTHON_FALLTHROUGH;
2285  case 9:
2286  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
2287  else {
2288  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 9); __PYX_ERR(0, 187, __pyx_L3_error)
2289  }
2290  CYTHON_FALLTHROUGH;
2291  case 10:
2292  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
2293  else {
2294  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 10); __PYX_ERR(0, 187, __pyx_L3_error)
2295  }
2296  CYTHON_FALLTHROUGH;
2297  case 11:
2298  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
2299  else {
2300  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 11); __PYX_ERR(0, 187, __pyx_L3_error)
2301  }
2302  CYTHON_FALLTHROUGH;
2303  case 12:
2304  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uin)) != 0)) kw_args--;
2305  else {
2306  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 12); __PYX_ERR(0, 187, __pyx_L3_error)
2307  }
2308  CYTHON_FALLTHROUGH;
2309  case 13:
2310  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uout)) != 0)) kw_args--;
2311  else {
2312  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, 13); __PYX_ERR(0, 187, __pyx_L3_error)
2313  }
2314  }
2315  if (unlikely(kw_args > 0)) {
2316  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyDGlimitingP1Lagrange1d_withVacuumTol") < 0)) __PYX_ERR(0, 187, __pyx_L3_error)
2317  }
2318  } else if (PyTuple_GET_SIZE(__pyx_args) != 14) {
2319  goto __pyx_L5_argtuple_error;
2320  } else {
2321  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2322  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2323  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2324  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2325  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2326  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2327  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2328  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2329  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2330  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2331  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2332  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2333  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2334  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2335  }
2336  __pyx_v_enforcePositivity = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_enforcePositivity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L3_error)
2337  __pyx_v_vacuumTol = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_vacuumTol == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error)
2338  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L3_error)
2339  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L3_error)
2340  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L3_error)
2341  __pyx_v_nDOF_element = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L3_error)
2342  __pyx_v_elementNodesArray = ((PyArrayObject *)values[6]);
2343  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
2344  __pyx_v_nodeArray = ((PyArrayObject *)values[8]);
2345  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[9]);
2346  __pyx_v_l2g = ((PyArrayObject *)values[10]);
2347  __pyx_v_tag = ((PyArrayObject *)values[11]);
2348  __pyx_v_Uin = ((PyArrayObject *)values[12]);
2349  __pyx_v_Uout = ((PyArrayObject *)values[13]);
2350  }
2351  goto __pyx_L4_argument_unpacking_done;
2352  __pyx_L5_argtuple_error:;
2353  __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 187, __pyx_L3_error)
2354  __pyx_L3_error:;
2355  __Pyx_AddTraceback("ctimeIntegration.applyDGlimitingP1Lagrange1d_withVacuumTol", __pyx_clineno, __pyx_lineno, __pyx_filename);
2356  __Pyx_RefNannyFinishContext();
2357  return NULL;
2358  __pyx_L4_argument_unpacking_done:;
2359  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 193, __pyx_L1_error)
2360  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
2361  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 195, __pyx_L1_error)
2362  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 196, __pyx_L1_error)
2363  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 197, __pyx_L1_error)
2364  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
2365  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 199, __pyx_L1_error)
2366  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 200, __pyx_L1_error)
2367  __pyx_r = __pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(__pyx_self, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, __pyx_v_elementNodesArray, __pyx_v_elementNeighborsArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
2368 
2369  /* function exit code */
2370  goto __pyx_L0;
2371  __pyx_L1_error:;
2372  __pyx_r = NULL;
2373  __pyx_L0:;
2374  __Pyx_RefNannyFinishContext();
2375  return __pyx_r;
2376 }
2377 
2378 static PyObject *__pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
2379  PyObject *__pyx_r = NULL;
2380  __Pyx_RefNannyDeclarations
2381  __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d_withVacuumTol", 0);
2382 
2383  /* "ctimeIntegration.pyx":201
2384  * np.ndarray Uin,
2385  * np.ndarray Uout):
2386  * capplyDGlimitingP1Lagrange1d_withVacuumTol(enforcePositivity, # <<<<<<<<<<<<<<
2387  * vacuumTol,
2388  * nElements_global,
2389  */
2390  applyDGlimitingP1Lagrange1d_withVacuumTol(__pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, ((int *)__pyx_v_elementNodesArray->data), ((int *)__pyx_v_elementNeighborsArray->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((int *)__pyx_v_l2g->data), ((int *)__pyx_v_tag->data), ((double *)__pyx_v_Uin->data), ((double *)__pyx_v_Uout->data));
2391 
2392  /* "ctimeIntegration.pyx":187
2393  * <double*> Uout.data)
2394  *
2395  * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
2396  * double vacuumTol,
2397  * int nElements_global,
2398  */
2399 
2400  /* function exit code */
2401  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2402  __Pyx_XGIVEREF(__pyx_r);
2403  __Pyx_RefNannyFinishContext();
2404  return __pyx_r;
2405 }
2406 
2407 /* "ctimeIntegration.pyx":217
2408  *
2409  *
2410  * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
2411  * np.ndarray elementNeighborsArray,
2412  * np.ndarray elementBarycentersArray,
2413  */
2414 
2415 /* Python wrapper */
2416 static PyObject *__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2417 static PyMethodDef __pyx_mdef_16ctimeIntegration_7computeElementNeighborShapeGradients = {"computeElementNeighborShapeGradients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients, METH_VARARGS|METH_KEYWORDS, 0};
2418 static PyObject *__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2419  PyArrayObject *__pyx_v_elementBoundariesArray = 0;
2420  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
2421  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
2422  PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
2423  PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
2424  int __pyx_lineno = 0;
2425  const char *__pyx_filename = NULL;
2426  int __pyx_clineno = 0;
2427  PyObject *__pyx_r = 0;
2428  __Pyx_RefNannyDeclarations
2429  __Pyx_RefNannySetupContext("computeElementNeighborShapeGradients (wrapper)", 0);
2430  {
2431  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementBoundariesArray,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_elementBoundaryBarycentersArray,&__pyx_n_s_elementNeighborShapeGradients,0};
2432  PyObject* values[5] = {0,0,0,0,0};
2433  if (unlikely(__pyx_kwds)) {
2434  Py_ssize_t kw_args;
2435  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2436  switch (pos_args) {
2437  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2438  CYTHON_FALLTHROUGH;
2439  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2440  CYTHON_FALLTHROUGH;
2441  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2442  CYTHON_FALLTHROUGH;
2443  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2444  CYTHON_FALLTHROUGH;
2445  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2446  CYTHON_FALLTHROUGH;
2447  case 0: break;
2448  default: goto __pyx_L5_argtuple_error;
2449  }
2450  kw_args = PyDict_Size(__pyx_kwds);
2451  switch (pos_args) {
2452  case 0:
2453  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundariesArray)) != 0)) kw_args--;
2454  else goto __pyx_L5_argtuple_error;
2455  CYTHON_FALLTHROUGH;
2456  case 1:
2457  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2458  else {
2459  __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, 1); __PYX_ERR(0, 217, __pyx_L3_error)
2460  }
2461  CYTHON_FALLTHROUGH;
2462  case 2:
2463  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
2464  else {
2465  __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, 2); __PYX_ERR(0, 217, __pyx_L3_error)
2466  }
2467  CYTHON_FALLTHROUGH;
2468  case 3:
2469  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryBarycentersArray)) != 0)) kw_args--;
2470  else {
2471  __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, 3); __PYX_ERR(0, 217, __pyx_L3_error)
2472  }
2473  CYTHON_FALLTHROUGH;
2474  case 4:
2475  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborShapeGradients)) != 0)) kw_args--;
2476  else {
2477  __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, 4); __PYX_ERR(0, 217, __pyx_L3_error)
2478  }
2479  }
2480  if (unlikely(kw_args > 0)) {
2481  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeElementNeighborShapeGradients") < 0)) __PYX_ERR(0, 217, __pyx_L3_error)
2482  }
2483  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
2484  goto __pyx_L5_argtuple_error;
2485  } else {
2486  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2487  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2488  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2489  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2490  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2491  }
2492  __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[0]);
2493  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[1]);
2494  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[2]);
2495  __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[3]);
2496  __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[4]);
2497  }
2498  goto __pyx_L4_argument_unpacking_done;
2499  __pyx_L5_argtuple_error:;
2500  __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 217, __pyx_L3_error)
2501  __pyx_L3_error:;
2502  __Pyx_AddTraceback("ctimeIntegration.computeElementNeighborShapeGradients", __pyx_clineno, __pyx_lineno, __pyx_filename);
2503  __Pyx_RefNannyFinishContext();
2504  return NULL;
2505  __pyx_L4_argument_unpacking_done:;
2506  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 217, __pyx_L1_error)
2507  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
2508  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 219, __pyx_L1_error)
2509  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 220, __pyx_L1_error)
2510  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 221, __pyx_L1_error)
2511  __pyx_r = __pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(__pyx_self, __pyx_v_elementBoundariesArray, __pyx_v_elementNeighborsArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients);
2512 
2513  /* function exit code */
2514  goto __pyx_L0;
2515  __pyx_L1_error:;
2516  __pyx_r = NULL;
2517  __pyx_L0:;
2518  __Pyx_RefNannyFinishContext();
2519  return __pyx_r;
2520 }
2521 
2522 static PyObject *__pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients) {
2523  PyObject *__pyx_r = NULL;
2524  __Pyx_RefNannyDeclarations
2525  __Pyx_RefNannySetupContext("computeElementNeighborShapeGradients", 0);
2526 
2527  /* "ctimeIntegration.pyx":222
2528  * np.ndarray elementBoundaryBarycentersArray,
2529  * np.ndarray elementNeighborShapeGradients):
2530  * ccomputeElementNeighborShapeGradients(elementNeighborsArray.shape[0], # <<<<<<<<<<<<<<
2531  * elementNeighborsArray.shape[1],
2532  * elementNeighborsArray.shape[1]-1,#nSpace from simplex size
2533  */
2534  computeElementNeighborShapeGradients((__pyx_v_elementNeighborsArray->dimensions[0]), (__pyx_v_elementNeighborsArray->dimensions[1]), ((__pyx_v_elementNeighborsArray->dimensions[1]) - 1), ((int *)__pyx_v_elementBoundariesArray->data), ((int *)__pyx_v_elementNeighborsArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((double *)__pyx_v_elementBoundaryBarycentersArray->data), ((double *)__pyx_v_elementNeighborShapeGradients->data));
2535 
2536  /* "ctimeIntegration.pyx":217
2537  *
2538  *
2539  * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
2540  * np.ndarray elementNeighborsArray,
2541  * np.ndarray elementBarycentersArray,
2542  */
2543 
2544  /* function exit code */
2545  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2546  __Pyx_XGIVEREF(__pyx_r);
2547  __Pyx_RefNannyFinishContext();
2548  return __pyx_r;
2549 }
2550 
2551 /* "ctimeIntegration.pyx":231
2552  * <double*> elementNeighborShapeGradients.data)
2553  *
2554  * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
2555  * np.ndarray elementNeighborsArray,
2556  * np.ndarray elementBarycentersArray,
2557  */
2558 
2559 /* Python wrapper */
2560 static PyObject *__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2561 static PyMethodDef __pyx_mdef_16ctimeIntegration_9computeCockburnDGlimiterArrays2d = {"computeCockburnDGlimiterArrays2d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d, METH_VARARGS|METH_KEYWORDS, 0};
2562 static PyObject *__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2563  PyArrayObject *__pyx_v_elementBoundariesArray = 0;
2564  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
2565  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
2566  PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
2567  PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
2568  PyArrayObject *__pyx_v_alphas = 0;
2569  PyArrayObject *__pyx_v_alphaNeighbors = 0;
2570  int __pyx_lineno = 0;
2571  const char *__pyx_filename = NULL;
2572  int __pyx_clineno = 0;
2573  PyObject *__pyx_r = 0;
2574  __Pyx_RefNannyDeclarations
2575  __Pyx_RefNannySetupContext("computeCockburnDGlimiterArrays2d (wrapper)", 0);
2576  {
2577  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elementBoundariesArray,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_elementBoundaryBarycentersArray,&__pyx_n_s_elementNeighborShapeGradients,&__pyx_n_s_alphas,&__pyx_n_s_alphaNeighbors,0};
2578  PyObject* values[7] = {0,0,0,0,0,0,0};
2579  if (unlikely(__pyx_kwds)) {
2580  Py_ssize_t kw_args;
2581  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2582  switch (pos_args) {
2583  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2584  CYTHON_FALLTHROUGH;
2585  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2586  CYTHON_FALLTHROUGH;
2587  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2588  CYTHON_FALLTHROUGH;
2589  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2590  CYTHON_FALLTHROUGH;
2591  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2592  CYTHON_FALLTHROUGH;
2593  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2594  CYTHON_FALLTHROUGH;
2595  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2596  CYTHON_FALLTHROUGH;
2597  case 0: break;
2598  default: goto __pyx_L5_argtuple_error;
2599  }
2600  kw_args = PyDict_Size(__pyx_kwds);
2601  switch (pos_args) {
2602  case 0:
2603  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundariesArray)) != 0)) kw_args--;
2604  else goto __pyx_L5_argtuple_error;
2605  CYTHON_FALLTHROUGH;
2606  case 1:
2607  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2608  else {
2609  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, 1); __PYX_ERR(0, 231, __pyx_L3_error)
2610  }
2611  CYTHON_FALLTHROUGH;
2612  case 2:
2613  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
2614  else {
2615  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, 2); __PYX_ERR(0, 231, __pyx_L3_error)
2616  }
2617  CYTHON_FALLTHROUGH;
2618  case 3:
2619  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryBarycentersArray)) != 0)) kw_args--;
2620  else {
2621  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, 3); __PYX_ERR(0, 231, __pyx_L3_error)
2622  }
2623  CYTHON_FALLTHROUGH;
2624  case 4:
2625  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborShapeGradients)) != 0)) kw_args--;
2626  else {
2627  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, 4); __PYX_ERR(0, 231, __pyx_L3_error)
2628  }
2629  CYTHON_FALLTHROUGH;
2630  case 5:
2631  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphas)) != 0)) kw_args--;
2632  else {
2633  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, 5); __PYX_ERR(0, 231, __pyx_L3_error)
2634  }
2635  CYTHON_FALLTHROUGH;
2636  case 6:
2637  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphaNeighbors)) != 0)) kw_args--;
2638  else {
2639  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, 6); __PYX_ERR(0, 231, __pyx_L3_error)
2640  }
2641  }
2642  if (unlikely(kw_args > 0)) {
2643  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeCockburnDGlimiterArrays2d") < 0)) __PYX_ERR(0, 231, __pyx_L3_error)
2644  }
2645  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
2646  goto __pyx_L5_argtuple_error;
2647  } else {
2648  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2649  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2650  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2651  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2652  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2653  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2654  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2655  }
2656  __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[0]);
2657  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[1]);
2658  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[2]);
2659  __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[3]);
2660  __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[4]);
2661  __pyx_v_alphas = ((PyArrayObject *)values[5]);
2662  __pyx_v_alphaNeighbors = ((PyArrayObject *)values[6]);
2663  }
2664  goto __pyx_L4_argument_unpacking_done;
2665  __pyx_L5_argtuple_error:;
2666  __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 231, __pyx_L3_error)
2667  __pyx_L3_error:;
2668  __Pyx_AddTraceback("ctimeIntegration.computeCockburnDGlimiterArrays2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
2669  __Pyx_RefNannyFinishContext();
2670  return NULL;
2671  __pyx_L4_argument_unpacking_done:;
2672  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 231, __pyx_L1_error)
2673  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 232, __pyx_L1_error)
2674  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 233, __pyx_L1_error)
2675  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 234, __pyx_L1_error)
2676  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 235, __pyx_L1_error)
2677  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphas), __pyx_ptype_5numpy_ndarray, 1, "alphas", 0))) __PYX_ERR(0, 236, __pyx_L1_error)
2678  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphaNeighbors), __pyx_ptype_5numpy_ndarray, 1, "alphaNeighbors", 0))) __PYX_ERR(0, 237, __pyx_L1_error)
2679  __pyx_r = __pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(__pyx_self, __pyx_v_elementBoundariesArray, __pyx_v_elementNeighborsArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_alphas, __pyx_v_alphaNeighbors);
2680 
2681  /* function exit code */
2682  goto __pyx_L0;
2683  __pyx_L1_error:;
2684  __pyx_r = NULL;
2685  __pyx_L0:;
2686  __Pyx_RefNannyFinishContext();
2687  return __pyx_r;
2688 }
2689 
2690 static PyObject *__pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors) {
2691  PyObject *__pyx_r = NULL;
2692  __Pyx_RefNannyDeclarations
2693  __Pyx_RefNannySetupContext("computeCockburnDGlimiterArrays2d", 0);
2694 
2695  /* "ctimeIntegration.pyx":238
2696  * np.ndarray alphas,
2697  * np.ndarray alphaNeighbors):
2698  * ccomputeCockburnDGlimiterArrays2d(elementNeighborsArray.shape[0], # <<<<<<<<<<<<<<
2699  * elementNeighborsArray.shape[1],
2700  * elementNeighborsArray.shape[1]-1,#nSpace from simplex size
2701  */
2702  computeCockburnDGlimiterArrays2d((__pyx_v_elementNeighborsArray->dimensions[0]), (__pyx_v_elementNeighborsArray->dimensions[1]), ((__pyx_v_elementNeighborsArray->dimensions[1]) - 1), ((int *)__pyx_v_elementBoundariesArray->data), ((int *)__pyx_v_elementNeighborsArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((double *)__pyx_v_elementBoundaryBarycentersArray->data), ((double *)__pyx_v_elementNeighborShapeGradients->data), ((double *)__pyx_v_alphas->data), ((int *)__pyx_v_alphaNeighbors->data));
2703 
2704  /* "ctimeIntegration.pyx":231
2705  * <double*> elementNeighborShapeGradients.data)
2706  *
2707  * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
2708  * np.ndarray elementNeighborsArray,
2709  * np.ndarray elementBarycentersArray,
2710  */
2711 
2712  /* function exit code */
2713  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2714  __Pyx_XGIVEREF(__pyx_r);
2715  __Pyx_RefNannyFinishContext();
2716  return __pyx_r;
2717 }
2718 
2719 /* "ctimeIntegration.pyx":249
2720  * <int*> alphaNeighbors.data)
2721  *
2722  * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
2723  * double Mh2,
2724  * np.ndarray elementNeighborsArray,
2725  */
2726 
2727 /* Python wrapper */
2728 static PyObject *__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2729 static PyMethodDef __pyx_mdef_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d = {"applyCockburnDGlimiterP1Lagrange2d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d, METH_VARARGS|METH_KEYWORDS, 0};
2730 static PyObject *__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2731  double __pyx_v_nu;
2732  double __pyx_v_Mh2;
2733  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
2734  PyArrayObject *__pyx_v_l2g = 0;
2735  PyArrayObject *__pyx_v_tag = 0;
2736  PyArrayObject *__pyx_v_alphas = 0;
2737  PyArrayObject *__pyx_v_alphaNeighbors = 0;
2738  PyArrayObject *__pyx_v_Uin = 0;
2739  PyArrayObject *__pyx_v_Uout = 0;
2740  int __pyx_lineno = 0;
2741  const char *__pyx_filename = NULL;
2742  int __pyx_clineno = 0;
2743  PyObject *__pyx_r = 0;
2744  __Pyx_RefNannyDeclarations
2745  __Pyx_RefNannySetupContext("applyCockburnDGlimiterP1Lagrange2d (wrapper)", 0);
2746  {
2747  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nu,&__pyx_n_s_Mh2,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_l2g,&__pyx_n_s_tag,&__pyx_n_s_alphas,&__pyx_n_s_alphaNeighbors,&__pyx_n_s_Uin,&__pyx_n_s_Uout,0};
2748  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
2749  if (unlikely(__pyx_kwds)) {
2750  Py_ssize_t kw_args;
2751  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2752  switch (pos_args) {
2753  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2754  CYTHON_FALLTHROUGH;
2755  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2756  CYTHON_FALLTHROUGH;
2757  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2758  CYTHON_FALLTHROUGH;
2759  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2760  CYTHON_FALLTHROUGH;
2761  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2762  CYTHON_FALLTHROUGH;
2763  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2764  CYTHON_FALLTHROUGH;
2765  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2766  CYTHON_FALLTHROUGH;
2767  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2768  CYTHON_FALLTHROUGH;
2769  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2770  CYTHON_FALLTHROUGH;
2771  case 0: break;
2772  default: goto __pyx_L5_argtuple_error;
2773  }
2774  kw_args = PyDict_Size(__pyx_kwds);
2775  switch (pos_args) {
2776  case 0:
2777  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nu)) != 0)) kw_args--;
2778  else goto __pyx_L5_argtuple_error;
2779  CYTHON_FALLTHROUGH;
2780  case 1:
2781  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Mh2)) != 0)) kw_args--;
2782  else {
2783  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 1); __PYX_ERR(0, 249, __pyx_L3_error)
2784  }
2785  CYTHON_FALLTHROUGH;
2786  case 2:
2787  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
2788  else {
2789  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 2); __PYX_ERR(0, 249, __pyx_L3_error)
2790  }
2791  CYTHON_FALLTHROUGH;
2792  case 3:
2793  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
2794  else {
2795  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 3); __PYX_ERR(0, 249, __pyx_L3_error)
2796  }
2797  CYTHON_FALLTHROUGH;
2798  case 4:
2799  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
2800  else {
2801  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 4); __PYX_ERR(0, 249, __pyx_L3_error)
2802  }
2803  CYTHON_FALLTHROUGH;
2804  case 5:
2805  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphas)) != 0)) kw_args--;
2806  else {
2807  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 5); __PYX_ERR(0, 249, __pyx_L3_error)
2808  }
2809  CYTHON_FALLTHROUGH;
2810  case 6:
2811  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alphaNeighbors)) != 0)) kw_args--;
2812  else {
2813  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 6); __PYX_ERR(0, 249, __pyx_L3_error)
2814  }
2815  CYTHON_FALLTHROUGH;
2816  case 7:
2817  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uin)) != 0)) kw_args--;
2818  else {
2819  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 7); __PYX_ERR(0, 249, __pyx_L3_error)
2820  }
2821  CYTHON_FALLTHROUGH;
2822  case 8:
2823  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uout)) != 0)) kw_args--;
2824  else {
2825  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, 8); __PYX_ERR(0, 249, __pyx_L3_error)
2826  }
2827  }
2828  if (unlikely(kw_args > 0)) {
2829  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyCockburnDGlimiterP1Lagrange2d") < 0)) __PYX_ERR(0, 249, __pyx_L3_error)
2830  }
2831  } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
2832  goto __pyx_L5_argtuple_error;
2833  } else {
2834  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2835  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2836  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2837  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2838  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2839  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2840  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2841  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2842  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2843  }
2844  __pyx_v_nu = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 249, __pyx_L3_error)
2845  __pyx_v_Mh2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_Mh2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error)
2846  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[2]);
2847  __pyx_v_l2g = ((PyArrayObject *)values[3]);
2848  __pyx_v_tag = ((PyArrayObject *)values[4]);
2849  __pyx_v_alphas = ((PyArrayObject *)values[5]);
2850  __pyx_v_alphaNeighbors = ((PyArrayObject *)values[6]);
2851  __pyx_v_Uin = ((PyArrayObject *)values[7]);
2852  __pyx_v_Uout = ((PyArrayObject *)values[8]);
2853  }
2854  goto __pyx_L4_argument_unpacking_done;
2855  __pyx_L5_argtuple_error:;
2856  __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 249, __pyx_L3_error)
2857  __pyx_L3_error:;
2858  __Pyx_AddTraceback("ctimeIntegration.applyCockburnDGlimiterP1Lagrange2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
2859  __Pyx_RefNannyFinishContext();
2860  return NULL;
2861  __pyx_L4_argument_unpacking_done:;
2862  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 251, __pyx_L1_error)
2863  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 252, __pyx_L1_error)
2864  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 253, __pyx_L1_error)
2865  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphas), __pyx_ptype_5numpy_ndarray, 1, "alphas", 0))) __PYX_ERR(0, 254, __pyx_L1_error)
2866  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphaNeighbors), __pyx_ptype_5numpy_ndarray, 1, "alphaNeighbors", 0))) __PYX_ERR(0, 255, __pyx_L1_error)
2867  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 256, __pyx_L1_error)
2868  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 257, __pyx_L1_error)
2869  __pyx_r = __pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(__pyx_self, __pyx_v_nu, __pyx_v_Mh2, __pyx_v_elementNeighborsArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_alphas, __pyx_v_alphaNeighbors, __pyx_v_Uin, __pyx_v_Uout);
2870 
2871  /* function exit code */
2872  goto __pyx_L0;
2873  __pyx_L1_error:;
2874  __pyx_r = NULL;
2875  __pyx_L0:;
2876  __Pyx_RefNannyFinishContext();
2877  return __pyx_r;
2878 }
2879 
2880 static PyObject *__pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_nu, double __pyx_v_Mh2, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
2881  PyObject *__pyx_r = NULL;
2882  __Pyx_RefNannyDeclarations
2883  __Pyx_RefNannySetupContext("applyCockburnDGlimiterP1Lagrange2d", 0);
2884 
2885  /* "ctimeIntegration.pyx":258
2886  * np.ndarray Uin,
2887  * np.ndarray Uout):
2888  * capplyCockburnDGlimiterP1Lagrange2d(nu, # <<<<<<<<<<<<<<
2889  * Mh2,
2890  * elementNeighborsArray.shape[0],
2891  */
2892  applyCockburnDGlimiterP1Lagrange2d(__pyx_v_nu, __pyx_v_Mh2, (__pyx_v_elementNeighborsArray->dimensions[0]), (__pyx_v_elementNeighborsArray->dimensions[1]), ((__pyx_v_elementNeighborsArray->dimensions[1]) - 1), (__pyx_v_l2g->dimensions[1]), ((int *)__pyx_v_elementNeighborsArray->data), ((int *)__pyx_v_l2g->data), ((int *)__pyx_v_tag->data), ((double *)__pyx_v_alphas->data), ((int *)__pyx_v_alphaNeighbors->data), ((double *)__pyx_v_Uin->data), ((double *)__pyx_v_Uout->data));
2893 
2894  /* "ctimeIntegration.pyx":249
2895  * <int*> alphaNeighbors.data)
2896  *
2897  * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
2898  * double Mh2,
2899  * np.ndarray elementNeighborsArray,
2900  */
2901 
2902  /* function exit code */
2903  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2904  __Pyx_XGIVEREF(__pyx_r);
2905  __Pyx_RefNannyFinishContext();
2906  return __pyx_r;
2907 }
2908 
2909 /* "ctimeIntegration.pyx":272
2910  * <double*> Uout.data)
2911  *
2912  * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
2913  * int allowMinWithUndershoot,
2914  * int nElements_global,
2915  */
2916 
2917 /* Python wrapper */
2918 static PyObject *__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2919 static PyMethodDef __pyx_mdef_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d = {"applyDurlofskyDGlimiterP1Lagrange2d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d, METH_VARARGS|METH_KEYWORDS, 0};
2920 static PyObject *__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2921  int __pyx_v_killExtrema;
2922  int __pyx_v_allowMinWithUndershoot;
2923  int __pyx_v_nElements_global;
2924  int __pyx_v_nElementBoundaries_element;
2925  int __pyx_v_nNodes_element;
2926  int __pyx_v_nSpace;
2927  int __pyx_v_nDOF_element;
2928  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
2929  PyArrayObject *__pyx_v_elementBoundariesArray = 0;
2930  PyArrayObject *__pyx_v_elementNodesArray = 0;
2931  PyArrayObject *__pyx_v_nodeArray = 0;
2932  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
2933  PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
2934  PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
2935  PyArrayObject *__pyx_v_l2g = 0;
2936  PyArrayObject *__pyx_v_grad_v0 = 0;
2937  PyArrayObject *__pyx_v_elementAverages = 0;
2938  PyArrayObject *__pyx_v_tag = 0;
2939  PyArrayObject *__pyx_v_Uin = 0;
2940  PyArrayObject *__pyx_v_Uout = 0;
2941  int __pyx_lineno = 0;
2942  const char *__pyx_filename = NULL;
2943  int __pyx_clineno = 0;
2944  PyObject *__pyx_r = 0;
2945  __Pyx_RefNannyDeclarations
2946  __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d (wrapper)", 0);
2947  {
2948  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_killExtrema,&__pyx_n_s_allowMinWithUndershoot,&__pyx_n_s_nElements_global,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nNodes_element,&__pyx_n_s_nSpace,&__pyx_n_s_nDOF_element,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_elementBoundariesArray,&__pyx_n_s_elementNodesArray,&__pyx_n_s_nodeArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_elementBoundaryBarycentersArray,&__pyx_n_s_elementNeighborShapeGradients,&__pyx_n_s_l2g,&__pyx_n_s_grad_v0,&__pyx_n_s_elementAverages,&__pyx_n_s_tag,&__pyx_n_s_Uin,&__pyx_n_s_Uout,0};
2949  PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
2950  if (unlikely(__pyx_kwds)) {
2951  Py_ssize_t kw_args;
2952  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2953  switch (pos_args) {
2954  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
2955  CYTHON_FALLTHROUGH;
2956  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
2957  CYTHON_FALLTHROUGH;
2958  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
2959  CYTHON_FALLTHROUGH;
2960  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
2961  CYTHON_FALLTHROUGH;
2962  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
2963  CYTHON_FALLTHROUGH;
2964  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
2965  CYTHON_FALLTHROUGH;
2966  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
2967  CYTHON_FALLTHROUGH;
2968  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
2969  CYTHON_FALLTHROUGH;
2970  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
2971  CYTHON_FALLTHROUGH;
2972  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
2973  CYTHON_FALLTHROUGH;
2974  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
2975  CYTHON_FALLTHROUGH;
2976  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
2977  CYTHON_FALLTHROUGH;
2978  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
2979  CYTHON_FALLTHROUGH;
2980  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2981  CYTHON_FALLTHROUGH;
2982  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2983  CYTHON_FALLTHROUGH;
2984  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2985  CYTHON_FALLTHROUGH;
2986  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2987  CYTHON_FALLTHROUGH;
2988  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2989  CYTHON_FALLTHROUGH;
2990  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2991  CYTHON_FALLTHROUGH;
2992  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2993  CYTHON_FALLTHROUGH;
2994  case 0: break;
2995  default: goto __pyx_L5_argtuple_error;
2996  }
2997  kw_args = PyDict_Size(__pyx_kwds);
2998  switch (pos_args) {
2999  case 0:
3000  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_killExtrema)) != 0)) kw_args--;
3001  else goto __pyx_L5_argtuple_error;
3002  CYTHON_FALLTHROUGH;
3003  case 1:
3004  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allowMinWithUndershoot)) != 0)) kw_args--;
3005  else {
3006  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 1); __PYX_ERR(0, 272, __pyx_L3_error)
3007  }
3008  CYTHON_FALLTHROUGH;
3009  case 2:
3010  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3011  else {
3012  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 2); __PYX_ERR(0, 272, __pyx_L3_error)
3013  }
3014  CYTHON_FALLTHROUGH;
3015  case 3:
3016  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
3017  else {
3018  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 3); __PYX_ERR(0, 272, __pyx_L3_error)
3019  }
3020  CYTHON_FALLTHROUGH;
3021  case 4:
3022  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
3023  else {
3024  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 4); __PYX_ERR(0, 272, __pyx_L3_error)
3025  }
3026  CYTHON_FALLTHROUGH;
3027  case 5:
3028  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
3029  else {
3030  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 5); __PYX_ERR(0, 272, __pyx_L3_error)
3031  }
3032  CYTHON_FALLTHROUGH;
3033  case 6:
3034  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_element)) != 0)) kw_args--;
3035  else {
3036  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 6); __PYX_ERR(0, 272, __pyx_L3_error)
3037  }
3038  CYTHON_FALLTHROUGH;
3039  case 7:
3040  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
3041  else {
3042  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 7); __PYX_ERR(0, 272, __pyx_L3_error)
3043  }
3044  CYTHON_FALLTHROUGH;
3045  case 8:
3046  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundariesArray)) != 0)) kw_args--;
3047  else {
3048  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 8); __PYX_ERR(0, 272, __pyx_L3_error)
3049  }
3050  CYTHON_FALLTHROUGH;
3051  case 9:
3052  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
3053  else {
3054  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 9); __PYX_ERR(0, 272, __pyx_L3_error)
3055  }
3056  CYTHON_FALLTHROUGH;
3057  case 10:
3058  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
3059  else {
3060  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 10); __PYX_ERR(0, 272, __pyx_L3_error)
3061  }
3062  CYTHON_FALLTHROUGH;
3063  case 11:
3064  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
3065  else {
3066  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 11); __PYX_ERR(0, 272, __pyx_L3_error)
3067  }
3068  CYTHON_FALLTHROUGH;
3069  case 12:
3070  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryBarycentersArray)) != 0)) kw_args--;
3071  else {
3072  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 12); __PYX_ERR(0, 272, __pyx_L3_error)
3073  }
3074  CYTHON_FALLTHROUGH;
3075  case 13:
3076  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborShapeGradients)) != 0)) kw_args--;
3077  else {
3078  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 13); __PYX_ERR(0, 272, __pyx_L3_error)
3079  }
3080  CYTHON_FALLTHROUGH;
3081  case 14:
3082  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
3083  else {
3084  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 14); __PYX_ERR(0, 272, __pyx_L3_error)
3085  }
3086  CYTHON_FALLTHROUGH;
3087  case 15:
3088  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v0)) != 0)) kw_args--;
3089  else {
3090  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 15); __PYX_ERR(0, 272, __pyx_L3_error)
3091  }
3092  CYTHON_FALLTHROUGH;
3093  case 16:
3094  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementAverages)) != 0)) kw_args--;
3095  else {
3096  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 16); __PYX_ERR(0, 272, __pyx_L3_error)
3097  }
3098  CYTHON_FALLTHROUGH;
3099  case 17:
3100  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
3101  else {
3102  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 17); __PYX_ERR(0, 272, __pyx_L3_error)
3103  }
3104  CYTHON_FALLTHROUGH;
3105  case 18:
3106  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uin)) != 0)) kw_args--;
3107  else {
3108  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 18); __PYX_ERR(0, 272, __pyx_L3_error)
3109  }
3110  CYTHON_FALLTHROUGH;
3111  case 19:
3112  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uout)) != 0)) kw_args--;
3113  else {
3114  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, 19); __PYX_ERR(0, 272, __pyx_L3_error)
3115  }
3116  }
3117  if (unlikely(kw_args > 0)) {
3118  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyDurlofskyDGlimiterP1Lagrange2d") < 0)) __PYX_ERR(0, 272, __pyx_L3_error)
3119  }
3120  } else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
3121  goto __pyx_L5_argtuple_error;
3122  } else {
3123  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3124  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3125  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3126  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3127  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3128  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3129  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3130  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3131  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3132  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3133  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3134  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3135  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3136  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3137  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3138  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3139  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3140  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3141  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3142  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3143  }
3144  __pyx_v_killExtrema = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_killExtrema == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L3_error)
3145  __pyx_v_allowMinWithUndershoot = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_allowMinWithUndershoot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L3_error)
3146  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
3147  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L3_error)
3148  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error)
3149  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error)
3150  __pyx_v_nDOF_element = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L3_error)
3151  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
3152  __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[8]);
3153  __pyx_v_elementNodesArray = ((PyArrayObject *)values[9]);
3154  __pyx_v_nodeArray = ((PyArrayObject *)values[10]);
3155  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[11]);
3156  __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[12]);
3157  __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[13]);
3158  __pyx_v_l2g = ((PyArrayObject *)values[14]);
3159  __pyx_v_grad_v0 = ((PyArrayObject *)values[15]);
3160  __pyx_v_elementAverages = ((PyArrayObject *)values[16]);
3161  __pyx_v_tag = ((PyArrayObject *)values[17]);
3162  __pyx_v_Uin = ((PyArrayObject *)values[18]);
3163  __pyx_v_Uout = ((PyArrayObject *)values[19]);
3164  }
3165  goto __pyx_L4_argument_unpacking_done;
3166  __pyx_L5_argtuple_error:;
3167  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 272, __pyx_L3_error)
3168  __pyx_L3_error:;
3169  __Pyx_AddTraceback("ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
3170  __Pyx_RefNannyFinishContext();
3171  return NULL;
3172  __pyx_L4_argument_unpacking_done:;
3173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 279, __pyx_L1_error)
3174  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 280, __pyx_L1_error)
3175  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 281, __pyx_L1_error)
3176  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 282, __pyx_L1_error)
3177  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 283, __pyx_L1_error)
3178  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 284, __pyx_L1_error)
3179  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 285, __pyx_L1_error)
3180  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 286, __pyx_L1_error)
3181  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_ptype_5numpy_ndarray, 1, "grad_v0", 0))) __PYX_ERR(0, 287, __pyx_L1_error)
3182  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_ptype_5numpy_ndarray, 1, "elementAverages", 0))) __PYX_ERR(0, 288, __pyx_L1_error)
3183  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 289, __pyx_L1_error)
3184  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 290, __pyx_L1_error)
3185  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 291, __pyx_L1_error)
3186  __pyx_r = __pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
3187 
3188  /* function exit code */
3189  goto __pyx_L0;
3190  __pyx_L1_error:;
3191  __pyx_r = NULL;
3192  __pyx_L0:;
3193  __Pyx_RefNannyFinishContext();
3194  return __pyx_r;
3195 }
3196 
3197 static PyObject *__pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
3198  PyObject *__pyx_r = NULL;
3199  __Pyx_RefNannyDeclarations
3200  __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d", 0);
3201 
3202  /* "ctimeIntegration.pyx":292
3203  * np.ndarray Uin,
3204  * np.ndarray Uout):
3205  * capplyDurlofskyDGlimiterP1Lagrange2d(killExtrema, # <<<<<<<<<<<<<<
3206  * allowMinWithUndershoot,
3207  * nElements_global,
3208  */
3209  applyDurlofskyDGlimiterP1Lagrange2d(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((int *)__pyx_v_elementNeighborsArray->data), ((int *)__pyx_v_elementBoundariesArray->data), ((int *)__pyx_v_elementNodesArray->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((double *)__pyx_v_elementBoundaryBarycentersArray->data), ((double *)__pyx_v_elementNeighborShapeGradients->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_grad_v0->data), ((double *)__pyx_v_elementAverages->data), ((int *)__pyx_v_tag->data), ((double *)__pyx_v_Uin->data), ((double *)__pyx_v_Uout->data));
3210 
3211  /* "ctimeIntegration.pyx":272
3212  * <double*> Uout.data)
3213  *
3214  * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
3215  * int allowMinWithUndershoot,
3216  * int nElements_global,
3217  */
3218 
3219  /* function exit code */
3220  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3221  __Pyx_XGIVEREF(__pyx_r);
3222  __Pyx_RefNannyFinishContext();
3223  return __pyx_r;
3224 }
3225 
3226 /* "ctimeIntegration.pyx":313
3227  * <double*> Uout.data)
3228  *
3229  * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
3230  * int allowMinWithUndershoot,
3231  * int nElements_global,
3232  */
3233 
3234 /* Python wrapper */
3235 static PyObject *__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3236 static PyMethodDef __pyx_mdef_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d = {"applyDurlofskyDGlimiterP1Lagrange3d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d, METH_VARARGS|METH_KEYWORDS, 0};
3237 static PyObject *__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3238  int __pyx_v_killExtrema;
3239  int __pyx_v_allowMinWithUndershoot;
3240  int __pyx_v_nElements_global;
3241  int __pyx_v_nElementBoundaries_element;
3242  int __pyx_v_nNodes_element;
3243  int __pyx_v_nSpace;
3244  int __pyx_v_nDOF_element;
3245  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
3246  PyArrayObject *__pyx_v_elementBoundariesArray = 0;
3247  PyArrayObject *__pyx_v_elementNodesArray = 0;
3248  PyArrayObject *__pyx_v_nodeArray = 0;
3249  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
3250  PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
3251  PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
3252  PyArrayObject *__pyx_v_l2g = 0;
3253  PyArrayObject *__pyx_v_grad_v0 = 0;
3254  PyArrayObject *__pyx_v_elementAverages = 0;
3255  PyArrayObject *__pyx_v_tag = 0;
3256  PyArrayObject *__pyx_v_Uin = 0;
3257  PyArrayObject *__pyx_v_Uout = 0;
3258  int __pyx_lineno = 0;
3259  const char *__pyx_filename = NULL;
3260  int __pyx_clineno = 0;
3261  PyObject *__pyx_r = 0;
3262  __Pyx_RefNannyDeclarations
3263  __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange3d (wrapper)", 0);
3264  {
3265  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_killExtrema,&__pyx_n_s_allowMinWithUndershoot,&__pyx_n_s_nElements_global,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nNodes_element,&__pyx_n_s_nSpace,&__pyx_n_s_nDOF_element,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_elementBoundariesArray,&__pyx_n_s_elementNodesArray,&__pyx_n_s_nodeArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_elementBoundaryBarycentersArray,&__pyx_n_s_elementNeighborShapeGradients,&__pyx_n_s_l2g,&__pyx_n_s_grad_v0,&__pyx_n_s_elementAverages,&__pyx_n_s_tag,&__pyx_n_s_Uin,&__pyx_n_s_Uout,0};
3266  PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3267  if (unlikely(__pyx_kwds)) {
3268  Py_ssize_t kw_args;
3269  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3270  switch (pos_args) {
3271  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3272  CYTHON_FALLTHROUGH;
3273  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3274  CYTHON_FALLTHROUGH;
3275  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3276  CYTHON_FALLTHROUGH;
3277  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3278  CYTHON_FALLTHROUGH;
3279  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3280  CYTHON_FALLTHROUGH;
3281  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3282  CYTHON_FALLTHROUGH;
3283  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3284  CYTHON_FALLTHROUGH;
3285  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3286  CYTHON_FALLTHROUGH;
3287  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3288  CYTHON_FALLTHROUGH;
3289  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3290  CYTHON_FALLTHROUGH;
3291  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3292  CYTHON_FALLTHROUGH;
3293  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3294  CYTHON_FALLTHROUGH;
3295  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3296  CYTHON_FALLTHROUGH;
3297  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3298  CYTHON_FALLTHROUGH;
3299  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3300  CYTHON_FALLTHROUGH;
3301  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3302  CYTHON_FALLTHROUGH;
3303  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3304  CYTHON_FALLTHROUGH;
3305  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3306  CYTHON_FALLTHROUGH;
3307  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3308  CYTHON_FALLTHROUGH;
3309  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3310  CYTHON_FALLTHROUGH;
3311  case 0: break;
3312  default: goto __pyx_L5_argtuple_error;
3313  }
3314  kw_args = PyDict_Size(__pyx_kwds);
3315  switch (pos_args) {
3316  case 0:
3317  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_killExtrema)) != 0)) kw_args--;
3318  else goto __pyx_L5_argtuple_error;
3319  CYTHON_FALLTHROUGH;
3320  case 1:
3321  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allowMinWithUndershoot)) != 0)) kw_args--;
3322  else {
3323  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 1); __PYX_ERR(0, 313, __pyx_L3_error)
3324  }
3325  CYTHON_FALLTHROUGH;
3326  case 2:
3327  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3328  else {
3329  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 2); __PYX_ERR(0, 313, __pyx_L3_error)
3330  }
3331  CYTHON_FALLTHROUGH;
3332  case 3:
3333  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
3334  else {
3335  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 3); __PYX_ERR(0, 313, __pyx_L3_error)
3336  }
3337  CYTHON_FALLTHROUGH;
3338  case 4:
3339  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
3340  else {
3341  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 4); __PYX_ERR(0, 313, __pyx_L3_error)
3342  }
3343  CYTHON_FALLTHROUGH;
3344  case 5:
3345  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
3346  else {
3347  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 5); __PYX_ERR(0, 313, __pyx_L3_error)
3348  }
3349  CYTHON_FALLTHROUGH;
3350  case 6:
3351  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_element)) != 0)) kw_args--;
3352  else {
3353  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 6); __PYX_ERR(0, 313, __pyx_L3_error)
3354  }
3355  CYTHON_FALLTHROUGH;
3356  case 7:
3357  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
3358  else {
3359  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 7); __PYX_ERR(0, 313, __pyx_L3_error)
3360  }
3361  CYTHON_FALLTHROUGH;
3362  case 8:
3363  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundariesArray)) != 0)) kw_args--;
3364  else {
3365  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 8); __PYX_ERR(0, 313, __pyx_L3_error)
3366  }
3367  CYTHON_FALLTHROUGH;
3368  case 9:
3369  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
3370  else {
3371  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 9); __PYX_ERR(0, 313, __pyx_L3_error)
3372  }
3373  CYTHON_FALLTHROUGH;
3374  case 10:
3375  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
3376  else {
3377  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 10); __PYX_ERR(0, 313, __pyx_L3_error)
3378  }
3379  CYTHON_FALLTHROUGH;
3380  case 11:
3381  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
3382  else {
3383  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 11); __PYX_ERR(0, 313, __pyx_L3_error)
3384  }
3385  CYTHON_FALLTHROUGH;
3386  case 12:
3387  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryBarycentersArray)) != 0)) kw_args--;
3388  else {
3389  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 12); __PYX_ERR(0, 313, __pyx_L3_error)
3390  }
3391  CYTHON_FALLTHROUGH;
3392  case 13:
3393  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborShapeGradients)) != 0)) kw_args--;
3394  else {
3395  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 13); __PYX_ERR(0, 313, __pyx_L3_error)
3396  }
3397  CYTHON_FALLTHROUGH;
3398  case 14:
3399  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
3400  else {
3401  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 14); __PYX_ERR(0, 313, __pyx_L3_error)
3402  }
3403  CYTHON_FALLTHROUGH;
3404  case 15:
3405  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v0)) != 0)) kw_args--;
3406  else {
3407  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 15); __PYX_ERR(0, 313, __pyx_L3_error)
3408  }
3409  CYTHON_FALLTHROUGH;
3410  case 16:
3411  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementAverages)) != 0)) kw_args--;
3412  else {
3413  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 16); __PYX_ERR(0, 313, __pyx_L3_error)
3414  }
3415  CYTHON_FALLTHROUGH;
3416  case 17:
3417  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
3418  else {
3419  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 17); __PYX_ERR(0, 313, __pyx_L3_error)
3420  }
3421  CYTHON_FALLTHROUGH;
3422  case 18:
3423  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uin)) != 0)) kw_args--;
3424  else {
3425  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 18); __PYX_ERR(0, 313, __pyx_L3_error)
3426  }
3427  CYTHON_FALLTHROUGH;
3428  case 19:
3429  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uout)) != 0)) kw_args--;
3430  else {
3431  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, 19); __PYX_ERR(0, 313, __pyx_L3_error)
3432  }
3433  }
3434  if (unlikely(kw_args > 0)) {
3435  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyDurlofskyDGlimiterP1Lagrange3d") < 0)) __PYX_ERR(0, 313, __pyx_L3_error)
3436  }
3437  } else if (PyTuple_GET_SIZE(__pyx_args) != 20) {
3438  goto __pyx_L5_argtuple_error;
3439  } else {
3440  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3441  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3442  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3443  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3444  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3445  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3446  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3447  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3448  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3449  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3450  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3451  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3452  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3453  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3454  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3455  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3456  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3457  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3458  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3459  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3460  }
3461  __pyx_v_killExtrema = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_killExtrema == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L3_error)
3462  __pyx_v_allowMinWithUndershoot = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_allowMinWithUndershoot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
3463  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L3_error)
3464  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error)
3465  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L3_error)
3466  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L3_error)
3467  __pyx_v_nDOF_element = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L3_error)
3468  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
3469  __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[8]);
3470  __pyx_v_elementNodesArray = ((PyArrayObject *)values[9]);
3471  __pyx_v_nodeArray = ((PyArrayObject *)values[10]);
3472  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[11]);
3473  __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[12]);
3474  __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[13]);
3475  __pyx_v_l2g = ((PyArrayObject *)values[14]);
3476  __pyx_v_grad_v0 = ((PyArrayObject *)values[15]);
3477  __pyx_v_elementAverages = ((PyArrayObject *)values[16]);
3478  __pyx_v_tag = ((PyArrayObject *)values[17]);
3479  __pyx_v_Uin = ((PyArrayObject *)values[18]);
3480  __pyx_v_Uout = ((PyArrayObject *)values[19]);
3481  }
3482  goto __pyx_L4_argument_unpacking_done;
3483  __pyx_L5_argtuple_error:;
3484  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 313, __pyx_L3_error)
3485  __pyx_L3_error:;
3486  __Pyx_AddTraceback("ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
3487  __Pyx_RefNannyFinishContext();
3488  return NULL;
3489  __pyx_L4_argument_unpacking_done:;
3490  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 320, __pyx_L1_error)
3491  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 321, __pyx_L1_error)
3492  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
3493  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 323, __pyx_L1_error)
3494  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 324, __pyx_L1_error)
3495  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 325, __pyx_L1_error)
3496  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 326, __pyx_L1_error)
3497  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 327, __pyx_L1_error)
3498  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_ptype_5numpy_ndarray, 1, "grad_v0", 0))) __PYX_ERR(0, 328, __pyx_L1_error)
3499  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_ptype_5numpy_ndarray, 1, "elementAverages", 0))) __PYX_ERR(0, 329, __pyx_L1_error)
3500  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 330, __pyx_L1_error)
3501  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 331, __pyx_L1_error)
3502  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 332, __pyx_L1_error)
3503  __pyx_r = __pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
3504 
3505  /* function exit code */
3506  goto __pyx_L0;
3507  __pyx_L1_error:;
3508  __pyx_r = NULL;
3509  __pyx_L0:;
3510  __Pyx_RefNannyFinishContext();
3511  return __pyx_r;
3512 }
3513 
3514 static PyObject *__pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
3515  PyObject *__pyx_r = NULL;
3516  __Pyx_RefNannyDeclarations
3517  __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange3d", 0);
3518 
3519  /* "ctimeIntegration.pyx":333
3520  * np.ndarray Uin,
3521  * np.ndarray Uout):
3522  * capplyDurlofskyDGlimiterP1Lagrange3d(killExtrema, # <<<<<<<<<<<<<<
3523  * allowMinWithUndershoot,
3524  * nElements_global,
3525  */
3526  applyDurlofskyDGlimiterP1Lagrange3d(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((int *)__pyx_v_elementNeighborsArray->data), ((int *)__pyx_v_elementBoundariesArray->data), ((int *)__pyx_v_elementNodesArray->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((double *)__pyx_v_elementBoundaryBarycentersArray->data), ((double *)__pyx_v_elementNeighborShapeGradients->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_grad_v0->data), ((double *)__pyx_v_elementAverages->data), ((int *)__pyx_v_tag->data), ((double *)__pyx_v_Uin->data), ((double *)__pyx_v_Uout->data));
3527 
3528  /* "ctimeIntegration.pyx":313
3529  * <double*> Uout.data)
3530  *
3531  * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
3532  * int allowMinWithUndershoot,
3533  * int nElements_global,
3534  */
3535 
3536  /* function exit code */
3537  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3538  __Pyx_XGIVEREF(__pyx_r);
3539  __Pyx_RefNannyFinishContext();
3540  return __pyx_r;
3541 }
3542 
3543 /* "ctimeIntegration.pyx":354
3544  * <double*> Uout.data)
3545  *
3546  * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
3547  * int allowMinWithUndershoot,
3548  * int enforcePositivity,
3549  */
3550 
3551 /* Python wrapper */
3552 static PyObject *__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3553 static PyMethodDef __pyx_mdef_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol = {"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol, METH_VARARGS|METH_KEYWORDS, 0};
3554 static PyObject *__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3555  int __pyx_v_killExtrema;
3556  int __pyx_v_allowMinWithUndershoot;
3557  int __pyx_v_enforcePositivity;
3558  double __pyx_v_vacuumTol;
3559  int __pyx_v_nElements_global;
3560  int __pyx_v_nElementBoundaries_element;
3561  int __pyx_v_nNodes_element;
3562  int __pyx_v_nSpace;
3563  int __pyx_v_nDOF_element;
3564  PyArrayObject *__pyx_v_elementNeighborsArray = 0;
3565  PyArrayObject *__pyx_v_elementBoundariesArray = 0;
3566  PyArrayObject *__pyx_v_elementNodesArray = 0;
3567  PyArrayObject *__pyx_v_nodeArray = 0;
3568  PyArrayObject *__pyx_v_elementBarycentersArray = 0;
3569  PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
3570  PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
3571  PyArrayObject *__pyx_v_l2g = 0;
3572  PyArrayObject *__pyx_v_grad_v0 = 0;
3573  PyArrayObject *__pyx_v_elementAverages = 0;
3574  PyArrayObject *__pyx_v_tag = 0;
3575  PyArrayObject *__pyx_v_Uin = 0;
3576  PyArrayObject *__pyx_v_Uout = 0;
3577  int __pyx_lineno = 0;
3578  const char *__pyx_filename = NULL;
3579  int __pyx_clineno = 0;
3580  PyObject *__pyx_r = 0;
3581  __Pyx_RefNannyDeclarations
3582  __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol (wrapper)", 0);
3583  {
3584  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_killExtrema,&__pyx_n_s_allowMinWithUndershoot,&__pyx_n_s_enforcePositivity,&__pyx_n_s_vacuumTol,&__pyx_n_s_nElements_global,&__pyx_n_s_nElementBoundaries_element,&__pyx_n_s_nNodes_element,&__pyx_n_s_nSpace,&__pyx_n_s_nDOF_element,&__pyx_n_s_elementNeighborsArray,&__pyx_n_s_elementBoundariesArray,&__pyx_n_s_elementNodesArray,&__pyx_n_s_nodeArray,&__pyx_n_s_elementBarycentersArray,&__pyx_n_s_elementBoundaryBarycentersArray,&__pyx_n_s_elementNeighborShapeGradients,&__pyx_n_s_l2g,&__pyx_n_s_grad_v0,&__pyx_n_s_elementAverages,&__pyx_n_s_tag,&__pyx_n_s_Uin,&__pyx_n_s_Uout,0};
3585  PyObject* values[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3586  if (unlikely(__pyx_kwds)) {
3587  Py_ssize_t kw_args;
3588  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3589  switch (pos_args) {
3590  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3591  CYTHON_FALLTHROUGH;
3592  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3593  CYTHON_FALLTHROUGH;
3594  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3595  CYTHON_FALLTHROUGH;
3596  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3597  CYTHON_FALLTHROUGH;
3598  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3599  CYTHON_FALLTHROUGH;
3600  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3601  CYTHON_FALLTHROUGH;
3602  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3603  CYTHON_FALLTHROUGH;
3604  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3605  CYTHON_FALLTHROUGH;
3606  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3607  CYTHON_FALLTHROUGH;
3608  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3609  CYTHON_FALLTHROUGH;
3610  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3611  CYTHON_FALLTHROUGH;
3612  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3613  CYTHON_FALLTHROUGH;
3614  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3615  CYTHON_FALLTHROUGH;
3616  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3617  CYTHON_FALLTHROUGH;
3618  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3619  CYTHON_FALLTHROUGH;
3620  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3621  CYTHON_FALLTHROUGH;
3622  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3623  CYTHON_FALLTHROUGH;
3624  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3625  CYTHON_FALLTHROUGH;
3626  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3627  CYTHON_FALLTHROUGH;
3628  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3629  CYTHON_FALLTHROUGH;
3630  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3631  CYTHON_FALLTHROUGH;
3632  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3633  CYTHON_FALLTHROUGH;
3634  case 0: break;
3635  default: goto __pyx_L5_argtuple_error;
3636  }
3637  kw_args = PyDict_Size(__pyx_kwds);
3638  switch (pos_args) {
3639  case 0:
3640  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_killExtrema)) != 0)) kw_args--;
3641  else goto __pyx_L5_argtuple_error;
3642  CYTHON_FALLTHROUGH;
3643  case 1:
3644  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allowMinWithUndershoot)) != 0)) kw_args--;
3645  else {
3646  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 1); __PYX_ERR(0, 354, __pyx_L3_error)
3647  }
3648  CYTHON_FALLTHROUGH;
3649  case 2:
3650  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforcePositivity)) != 0)) kw_args--;
3651  else {
3652  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 2); __PYX_ERR(0, 354, __pyx_L3_error)
3653  }
3654  CYTHON_FALLTHROUGH;
3655  case 3:
3656  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vacuumTol)) != 0)) kw_args--;
3657  else {
3658  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 3); __PYX_ERR(0, 354, __pyx_L3_error)
3659  }
3660  CYTHON_FALLTHROUGH;
3661  case 4:
3662  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3663  else {
3664  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 4); __PYX_ERR(0, 354, __pyx_L3_error)
3665  }
3666  CYTHON_FALLTHROUGH;
3667  case 5:
3668  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElementBoundaries_element)) != 0)) kw_args--;
3669  else {
3670  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 5); __PYX_ERR(0, 354, __pyx_L3_error)
3671  }
3672  CYTHON_FALLTHROUGH;
3673  case 6:
3674  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
3675  else {
3676  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 6); __PYX_ERR(0, 354, __pyx_L3_error)
3677  }
3678  CYTHON_FALLTHROUGH;
3679  case 7:
3680  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
3681  else {
3682  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 7); __PYX_ERR(0, 354, __pyx_L3_error)
3683  }
3684  CYTHON_FALLTHROUGH;
3685  case 8:
3686  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_element)) != 0)) kw_args--;
3687  else {
3688  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 8); __PYX_ERR(0, 354, __pyx_L3_error)
3689  }
3690  CYTHON_FALLTHROUGH;
3691  case 9:
3692  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborsArray)) != 0)) kw_args--;
3693  else {
3694  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 9); __PYX_ERR(0, 354, __pyx_L3_error)
3695  }
3696  CYTHON_FALLTHROUGH;
3697  case 10:
3698  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundariesArray)) != 0)) kw_args--;
3699  else {
3700  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 10); __PYX_ERR(0, 354, __pyx_L3_error)
3701  }
3702  CYTHON_FALLTHROUGH;
3703  case 11:
3704  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNodesArray)) != 0)) kw_args--;
3705  else {
3706  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 11); __PYX_ERR(0, 354, __pyx_L3_error)
3707  }
3708  CYTHON_FALLTHROUGH;
3709  case 12:
3710  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeArray)) != 0)) kw_args--;
3711  else {
3712  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 12); __PYX_ERR(0, 354, __pyx_L3_error)
3713  }
3714  CYTHON_FALLTHROUGH;
3715  case 13:
3716  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBarycentersArray)) != 0)) kw_args--;
3717  else {
3718  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 13); __PYX_ERR(0, 354, __pyx_L3_error)
3719  }
3720  CYTHON_FALLTHROUGH;
3721  case 14:
3722  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryBarycentersArray)) != 0)) kw_args--;
3723  else {
3724  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 14); __PYX_ERR(0, 354, __pyx_L3_error)
3725  }
3726  CYTHON_FALLTHROUGH;
3727  case 15:
3728  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementNeighborShapeGradients)) != 0)) kw_args--;
3729  else {
3730  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 15); __PYX_ERR(0, 354, __pyx_L3_error)
3731  }
3732  CYTHON_FALLTHROUGH;
3733  case 16:
3734  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2g)) != 0)) kw_args--;
3735  else {
3736  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 16); __PYX_ERR(0, 354, __pyx_L3_error)
3737  }
3738  CYTHON_FALLTHROUGH;
3739  case 17:
3740  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grad_v0)) != 0)) kw_args--;
3741  else {
3742  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 17); __PYX_ERR(0, 354, __pyx_L3_error)
3743  }
3744  CYTHON_FALLTHROUGH;
3745  case 18:
3746  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementAverages)) != 0)) kw_args--;
3747  else {
3748  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 18); __PYX_ERR(0, 354, __pyx_L3_error)
3749  }
3750  CYTHON_FALLTHROUGH;
3751  case 19:
3752  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
3753  else {
3754  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 19); __PYX_ERR(0, 354, __pyx_L3_error)
3755  }
3756  CYTHON_FALLTHROUGH;
3757  case 20:
3758  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uin)) != 0)) kw_args--;
3759  else {
3760  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 20); __PYX_ERR(0, 354, __pyx_L3_error)
3761  }
3762  CYTHON_FALLTHROUGH;
3763  case 21:
3764  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Uout)) != 0)) kw_args--;
3765  else {
3766  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, 21); __PYX_ERR(0, 354, __pyx_L3_error)
3767  }
3768  }
3769  if (unlikely(kw_args > 0)) {
3770  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol") < 0)) __PYX_ERR(0, 354, __pyx_L3_error)
3771  }
3772  } else if (PyTuple_GET_SIZE(__pyx_args) != 22) {
3773  goto __pyx_L5_argtuple_error;
3774  } else {
3775  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3776  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3777  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3778  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3779  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3780  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3781  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3782  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3783  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3784  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3785  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3786  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3787  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3788  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3789  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3790  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3791  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3792  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3793  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3794  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3795  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3796  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3797  }
3798  __pyx_v_killExtrema = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_killExtrema == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 354, __pyx_L3_error)
3799  __pyx_v_allowMinWithUndershoot = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_allowMinWithUndershoot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error)
3800  __pyx_v_enforcePositivity = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_enforcePositivity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L3_error)
3801  __pyx_v_vacuumTol = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vacuumTol == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L3_error)
3802  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L3_error)
3803  __pyx_v_nElementBoundaries_element = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L3_error)
3804  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error)
3805  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L3_error)
3806  __pyx_v_nDOF_element = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
3807  __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[9]);
3808  __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[10]);
3809  __pyx_v_elementNodesArray = ((PyArrayObject *)values[11]);
3810  __pyx_v_nodeArray = ((PyArrayObject *)values[12]);
3811  __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[13]);
3812  __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[14]);
3813  __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[15]);
3814  __pyx_v_l2g = ((PyArrayObject *)values[16]);
3815  __pyx_v_grad_v0 = ((PyArrayObject *)values[17]);
3816  __pyx_v_elementAverages = ((PyArrayObject *)values[18]);
3817  __pyx_v_tag = ((PyArrayObject *)values[19]);
3818  __pyx_v_Uin = ((PyArrayObject *)values[20]);
3819  __pyx_v_Uout = ((PyArrayObject *)values[21]);
3820  }
3821  goto __pyx_L4_argument_unpacking_done;
3822  __pyx_L5_argtuple_error:;
3823  __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 354, __pyx_L3_error)
3824  __pyx_L3_error:;
3825  __Pyx_AddTraceback("ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", __pyx_clineno, __pyx_lineno, __pyx_filename);
3826  __Pyx_RefNannyFinishContext();
3827  return NULL;
3828  __pyx_L4_argument_unpacking_done:;
3829  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 363, __pyx_L1_error)
3830  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 364, __pyx_L1_error)
3831  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 365, __pyx_L1_error)
3832  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 366, __pyx_L1_error)
3833  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 367, __pyx_L1_error)
3834  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 368, __pyx_L1_error)
3835  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 369, __pyx_L1_error)
3836  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 370, __pyx_L1_error)
3837  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_ptype_5numpy_ndarray, 1, "grad_v0", 0))) __PYX_ERR(0, 371, __pyx_L1_error)
3838  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_ptype_5numpy_ndarray, 1, "elementAverages", 0))) __PYX_ERR(0, 372, __pyx_L1_error)
3839  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 373, __pyx_L1_error)
3840  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 374, __pyx_L1_error)
3841  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 375, __pyx_L1_error)
3842  __pyx_r = __pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
3843 
3844  /* function exit code */
3845  goto __pyx_L0;
3846  __pyx_L1_error:;
3847  __pyx_r = NULL;
3848  __pyx_L0:;
3849  __Pyx_RefNannyFinishContext();
3850  return __pyx_r;
3851 }
3852 
3853 static PyObject *__pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
3854  PyObject *__pyx_r = NULL;
3855  __Pyx_RefNannyDeclarations
3856  __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 0);
3857 
3858  /* "ctimeIntegration.pyx":376
3859  * np.ndarray Uin,
3860  * np.ndarray Uout):
3861  * capplyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(killExtrema, # <<<<<<<<<<<<<<
3862  * allowMinWithUndershoot,
3863  * enforcePositivity,
3864  */
3865  applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((int *)__pyx_v_elementNeighborsArray->data), ((int *)__pyx_v_elementBoundariesArray->data), ((int *)__pyx_v_elementNodesArray->data), ((double *)__pyx_v_nodeArray->data), ((double *)__pyx_v_elementBarycentersArray->data), ((double *)__pyx_v_elementBoundaryBarycentersArray->data), ((double *)__pyx_v_elementNeighborShapeGradients->data), ((int *)__pyx_v_l2g->data), ((double *)__pyx_v_grad_v0->data), ((double *)__pyx_v_elementAverages->data), ((int *)__pyx_v_tag->data), ((double *)__pyx_v_Uin->data), ((double *)__pyx_v_Uout->data));
3866 
3867  /* "ctimeIntegration.pyx":354
3868  * <double*> Uout.data)
3869  *
3870  * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
3871  * int allowMinWithUndershoot,
3872  * int enforcePositivity,
3873  */
3874 
3875  /* function exit code */
3876  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3877  __Pyx_XGIVEREF(__pyx_r);
3878  __Pyx_RefNannyFinishContext();
3879  return __pyx_r;
3880 }
3881 
3882 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
3883  * ctypedef npy_cdouble complex_t
3884  *
3885  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
3886  * return PyArray_MultiIterNew(1, <void*>a)
3887  *
3888  */
3889 
3890 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
3891  PyObject *__pyx_r = NULL;
3892  __Pyx_RefNannyDeclarations
3893  PyObject *__pyx_t_1 = NULL;
3894  int __pyx_lineno = 0;
3895  const char *__pyx_filename = NULL;
3896  int __pyx_clineno = 0;
3897  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
3898 
3899  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
3900  *
3901  * cdef inline object PyArray_MultiIterNew1(a):
3902  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
3903  *
3904  * cdef inline object PyArray_MultiIterNew2(a, b):
3905  */
3906  __Pyx_XDECREF(__pyx_r);
3907  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
3908  __Pyx_GOTREF(__pyx_t_1);
3909  __pyx_r = __pyx_t_1;
3910  __pyx_t_1 = 0;
3911  goto __pyx_L0;
3912 
3913  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
3914  * ctypedef npy_cdouble complex_t
3915  *
3916  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
3917  * return PyArray_MultiIterNew(1, <void*>a)
3918  *
3919  */
3920 
3921  /* function exit code */
3922  __pyx_L1_error:;
3923  __Pyx_XDECREF(__pyx_t_1);
3924  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
3925  __pyx_r = 0;
3926  __pyx_L0:;
3927  __Pyx_XGIVEREF(__pyx_r);
3928  __Pyx_RefNannyFinishContext();
3929  return __pyx_r;
3930 }
3931 
3932 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
3933  * return PyArray_MultiIterNew(1, <void*>a)
3934  *
3935  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
3936  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
3937  *
3938  */
3939 
3940 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
3941  PyObject *__pyx_r = NULL;
3942  __Pyx_RefNannyDeclarations
3943  PyObject *__pyx_t_1 = NULL;
3944  int __pyx_lineno = 0;
3945  const char *__pyx_filename = NULL;
3946  int __pyx_clineno = 0;
3947  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
3948 
3949  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
3950  *
3951  * cdef inline object PyArray_MultiIterNew2(a, b):
3952  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
3953  *
3954  * cdef inline object PyArray_MultiIterNew3(a, b, c):
3955  */
3956  __Pyx_XDECREF(__pyx_r);
3957  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error)
3958  __Pyx_GOTREF(__pyx_t_1);
3959  __pyx_r = __pyx_t_1;
3960  __pyx_t_1 = 0;
3961  goto __pyx_L0;
3962 
3963  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
3964  * return PyArray_MultiIterNew(1, <void*>a)
3965  *
3966  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
3967  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
3968  *
3969  */
3970 
3971  /* function exit code */
3972  __pyx_L1_error:;
3973  __Pyx_XDECREF(__pyx_t_1);
3974  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
3975  __pyx_r = 0;
3976  __pyx_L0:;
3977  __Pyx_XGIVEREF(__pyx_r);
3978  __Pyx_RefNannyFinishContext();
3979  return __pyx_r;
3980 }
3981 
3982 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
3983  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
3984  *
3985  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
3986  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
3987  *
3988  */
3989 
3990 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
3991  PyObject *__pyx_r = NULL;
3992  __Pyx_RefNannyDeclarations
3993  PyObject *__pyx_t_1 = NULL;
3994  int __pyx_lineno = 0;
3995  const char *__pyx_filename = NULL;
3996  int __pyx_clineno = 0;
3997  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
3998 
3999  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
4000  *
4001  * cdef inline object PyArray_MultiIterNew3(a, b, c):
4002  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
4003  *
4004  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4005  */
4006  __Pyx_XDECREF(__pyx_r);
4007  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error)
4008  __Pyx_GOTREF(__pyx_t_1);
4009  __pyx_r = __pyx_t_1;
4010  __pyx_t_1 = 0;
4011  goto __pyx_L0;
4012 
4013  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
4014  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4015  *
4016  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4017  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4018  *
4019  */
4020 
4021  /* function exit code */
4022  __pyx_L1_error:;
4023  __Pyx_XDECREF(__pyx_t_1);
4024  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4025  __pyx_r = 0;
4026  __pyx_L0:;
4027  __Pyx_XGIVEREF(__pyx_r);
4028  __Pyx_RefNannyFinishContext();
4029  return __pyx_r;
4030 }
4031 
4032 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
4033  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4034  *
4035  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4036  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4037  *
4038  */
4039 
4040 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
4041  PyObject *__pyx_r = NULL;
4042  __Pyx_RefNannyDeclarations
4043  PyObject *__pyx_t_1 = NULL;
4044  int __pyx_lineno = 0;
4045  const char *__pyx_filename = NULL;
4046  int __pyx_clineno = 0;
4047  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
4048 
4049  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
4050  *
4051  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4052  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
4053  *
4054  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4055  */
4056  __Pyx_XDECREF(__pyx_r);
4057  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error)
4058  __Pyx_GOTREF(__pyx_t_1);
4059  __pyx_r = __pyx_t_1;
4060  __pyx_t_1 = 0;
4061  goto __pyx_L0;
4062 
4063  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
4064  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4065  *
4066  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4067  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4068  *
4069  */
4070 
4071  /* function exit code */
4072  __pyx_L1_error:;
4073  __Pyx_XDECREF(__pyx_t_1);
4074  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4075  __pyx_r = 0;
4076  __pyx_L0:;
4077  __Pyx_XGIVEREF(__pyx_r);
4078  __Pyx_RefNannyFinishContext();
4079  return __pyx_r;
4080 }
4081 
4082 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
4083  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4084  *
4085  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4086  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4087  *
4088  */
4089 
4090 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
4091  PyObject *__pyx_r = NULL;
4092  __Pyx_RefNannyDeclarations
4093  PyObject *__pyx_t_1 = NULL;
4094  int __pyx_lineno = 0;
4095  const char *__pyx_filename = NULL;
4096  int __pyx_clineno = 0;
4097  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
4098 
4099  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
4100  *
4101  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4102  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
4103  *
4104  * cdef inline tuple PyDataType_SHAPE(dtype d):
4105  */
4106  __Pyx_XDECREF(__pyx_r);
4107  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error)
4108  __Pyx_GOTREF(__pyx_t_1);
4109  __pyx_r = __pyx_t_1;
4110  __pyx_t_1 = 0;
4111  goto __pyx_L0;
4112 
4113  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
4114  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4115  *
4116  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4117  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4118  *
4119  */
4120 
4121  /* function exit code */
4122  __pyx_L1_error:;
4123  __Pyx_XDECREF(__pyx_t_1);
4124  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4125  __pyx_r = 0;
4126  __pyx_L0:;
4127  __Pyx_XGIVEREF(__pyx_r);
4128  __Pyx_RefNannyFinishContext();
4129  return __pyx_r;
4130 }
4131 
4132 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
4133  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4134  *
4135  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4136  * if PyDataType_HASSUBARRAY(d):
4137  * return <tuple>d.subarray.shape
4138  */
4139 
4140 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4141  PyObject *__pyx_r = NULL;
4142  __Pyx_RefNannyDeclarations
4143  int __pyx_t_1;
4144  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
4145 
4146  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
4147  *
4148  * cdef inline tuple PyDataType_SHAPE(dtype d):
4149  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4150  * return <tuple>d.subarray.shape
4151  * else:
4152  */
4153  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
4154  if (__pyx_t_1) {
4155 
4156  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
4157  * cdef inline tuple PyDataType_SHAPE(dtype d):
4158  * if PyDataType_HASSUBARRAY(d):
4159  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
4160  * else:
4161  * return ()
4162  */
4163  __Pyx_XDECREF(__pyx_r);
4164  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
4165  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
4166  goto __pyx_L0;
4167 
4168  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
4169  *
4170  * cdef inline tuple PyDataType_SHAPE(dtype d):
4171  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4172  * return <tuple>d.subarray.shape
4173  * else:
4174  */
4175  }
4176 
4177  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
4178  * return <tuple>d.subarray.shape
4179  * else:
4180  * return () # <<<<<<<<<<<<<<
4181  *
4182  *
4183  */
4184  /*else*/ {
4185  __Pyx_XDECREF(__pyx_r);
4186  __Pyx_INCREF(__pyx_empty_tuple);
4187  __pyx_r = __pyx_empty_tuple;
4188  goto __pyx_L0;
4189  }
4190 
4191  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
4192  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4193  *
4194  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4195  * if PyDataType_HASSUBARRAY(d):
4196  * return <tuple>d.subarray.shape
4197  */
4198 
4199  /* function exit code */
4200  __pyx_L0:;
4201  __Pyx_XGIVEREF(__pyx_r);
4202  __Pyx_RefNannyFinishContext();
4203  return __pyx_r;
4204 }
4205 
4206 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
4207  * int _import_umath() except -1
4208  *
4209  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
4210  * Py_INCREF(base) # important to do this before stealing the reference below!
4211  * PyArray_SetBaseObject(arr, base)
4212  */
4213 
4214 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
4215  __Pyx_RefNannyDeclarations
4216  __Pyx_RefNannySetupContext("set_array_base", 0);
4217 
4218  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
4219  *
4220  * cdef inline void set_array_base(ndarray arr, object base):
4221  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
4222  * PyArray_SetBaseObject(arr, base)
4223  *
4224  */
4225  Py_INCREF(__pyx_v_base);
4226 
4227  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
4228  * cdef inline void set_array_base(ndarray arr, object base):
4229  * Py_INCREF(base) # important to do this before stealing the reference below!
4230  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
4231  *
4232  * cdef inline object get_array_base(ndarray arr):
4233  */
4234  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
4235 
4236  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
4237  * int _import_umath() except -1
4238  *
4239  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
4240  * Py_INCREF(base) # important to do this before stealing the reference below!
4241  * PyArray_SetBaseObject(arr, base)
4242  */
4243 
4244  /* function exit code */
4245  __Pyx_RefNannyFinishContext();
4246 }
4247 
4248 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
4249  * PyArray_SetBaseObject(arr, base)
4250  *
4251  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
4252  * base = PyArray_BASE(arr)
4253  * if base is NULL:
4254  */
4255 
4256 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
4257  PyObject *__pyx_v_base;
4258  PyObject *__pyx_r = NULL;
4259  __Pyx_RefNannyDeclarations
4260  int __pyx_t_1;
4261  __Pyx_RefNannySetupContext("get_array_base", 0);
4262 
4263  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
4264  *
4265  * cdef inline object get_array_base(ndarray arr):
4266  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
4267  * if base is NULL:
4268  * return None
4269  */
4270  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
4271 
4272  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
4273  * cdef inline object get_array_base(ndarray arr):
4274  * base = PyArray_BASE(arr)
4275  * if base is NULL: # <<<<<<<<<<<<<<
4276  * return None
4277  * return <object>base
4278  */
4279  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
4280  if (__pyx_t_1) {
4281 
4282  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
4283  * base = PyArray_BASE(arr)
4284  * if base is NULL:
4285  * return None # <<<<<<<<<<<<<<
4286  * return <object>base
4287  *
4288  */
4289  __Pyx_XDECREF(__pyx_r);
4290  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4291  goto __pyx_L0;
4292 
4293  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
4294  * cdef inline object get_array_base(ndarray arr):
4295  * base = PyArray_BASE(arr)
4296  * if base is NULL: # <<<<<<<<<<<<<<
4297  * return None
4298  * return <object>base
4299  */
4300  }
4301 
4302  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
4303  * if base is NULL:
4304  * return None
4305  * return <object>base # <<<<<<<<<<<<<<
4306  *
4307  * # Versions of the import_* functions which are more suitable for
4308  */
4309  __Pyx_XDECREF(__pyx_r);
4310  __Pyx_INCREF(((PyObject *)__pyx_v_base));
4311  __pyx_r = ((PyObject *)__pyx_v_base);
4312  goto __pyx_L0;
4313 
4314  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
4315  * PyArray_SetBaseObject(arr, base)
4316  *
4317  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
4318  * base = PyArray_BASE(arr)
4319  * if base is NULL:
4320  */
4321 
4322  /* function exit code */
4323  __pyx_L0:;
4324  __Pyx_XGIVEREF(__pyx_r);
4325  __Pyx_RefNannyFinishContext();
4326  return __pyx_r;
4327 }
4328 
4329 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
4330  * # Versions of the import_* functions which are more suitable for
4331  * # Cython code.
4332  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
4333  * try:
4334  * __pyx_import_array()
4335  */
4336 
4337 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
4338  int __pyx_r;
4339  __Pyx_RefNannyDeclarations
4340  PyObject *__pyx_t_1 = NULL;
4341  PyObject *__pyx_t_2 = NULL;
4342  PyObject *__pyx_t_3 = NULL;
4343  int __pyx_t_4;
4344  PyObject *__pyx_t_5 = NULL;
4345  PyObject *__pyx_t_6 = NULL;
4346  PyObject *__pyx_t_7 = NULL;
4347  PyObject *__pyx_t_8 = NULL;
4348  int __pyx_lineno = 0;
4349  const char *__pyx_filename = NULL;
4350  int __pyx_clineno = 0;
4351  __Pyx_RefNannySetupContext("import_array", 0);
4352 
4353  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
4354  * # Cython code.
4355  * cdef inline int import_array() except -1:
4356  * try: # <<<<<<<<<<<<<<
4357  * __pyx_import_array()
4358  * except Exception:
4359  */
4360  {
4361  __Pyx_PyThreadState_declare
4362  __Pyx_PyThreadState_assign
4363  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
4364  __Pyx_XGOTREF(__pyx_t_1);
4365  __Pyx_XGOTREF(__pyx_t_2);
4366  __Pyx_XGOTREF(__pyx_t_3);
4367  /*try:*/ {
4368 
4369  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
4370  * cdef inline int import_array() except -1:
4371  * try:
4372  * __pyx_import_array() # <<<<<<<<<<<<<<
4373  * except Exception:
4374  * raise ImportError("numpy.core.multiarray failed to import")
4375  */
4376  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L3_error)
4377 
4378  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
4379  * # Cython code.
4380  * cdef inline int import_array() except -1:
4381  * try: # <<<<<<<<<<<<<<
4382  * __pyx_import_array()
4383  * except Exception:
4384  */
4385  }
4386  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4387  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4388  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4389  goto __pyx_L8_try_end;
4390  __pyx_L3_error:;
4391 
4392  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
4393  * try:
4394  * __pyx_import_array()
4395  * except Exception: # <<<<<<<<<<<<<<
4396  * raise ImportError("numpy.core.multiarray failed to import")
4397  *
4398  */
4399  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4400  if (__pyx_t_4) {
4401  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
4402  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 944, __pyx_L5_except_error)
4403  __Pyx_GOTREF(__pyx_t_5);
4404  __Pyx_GOTREF(__pyx_t_6);
4405  __Pyx_GOTREF(__pyx_t_7);
4406 
4407  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
4408  * __pyx_import_array()
4409  * except Exception:
4410  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
4411  *
4412  * cdef inline int import_umath() except -1:
4413  */
4414  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 945, __pyx_L5_except_error)
4415  __Pyx_GOTREF(__pyx_t_8);
4416  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
4417  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4418  __PYX_ERR(1, 945, __pyx_L5_except_error)
4419  }
4420  goto __pyx_L5_except_error;
4421  __pyx_L5_except_error:;
4422 
4423  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
4424  * # Cython code.
4425  * cdef inline int import_array() except -1:
4426  * try: # <<<<<<<<<<<<<<
4427  * __pyx_import_array()
4428  * except Exception:
4429  */
4430  __Pyx_XGIVEREF(__pyx_t_1);
4431  __Pyx_XGIVEREF(__pyx_t_2);
4432  __Pyx_XGIVEREF(__pyx_t_3);
4433  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
4434  goto __pyx_L1_error;
4435  __pyx_L8_try_end:;
4436  }
4437 
4438  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
4439  * # Versions of the import_* functions which are more suitable for
4440  * # Cython code.
4441  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
4442  * try:
4443  * __pyx_import_array()
4444  */
4445 
4446  /* function exit code */
4447  __pyx_r = 0;
4448  goto __pyx_L0;
4449  __pyx_L1_error:;
4450  __Pyx_XDECREF(__pyx_t_5);
4451  __Pyx_XDECREF(__pyx_t_6);
4452  __Pyx_XDECREF(__pyx_t_7);
4453  __Pyx_XDECREF(__pyx_t_8);
4454  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
4455  __pyx_r = -1;
4456  __pyx_L0:;
4457  __Pyx_RefNannyFinishContext();
4458  return __pyx_r;
4459 }
4460 
4461 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
4462  * raise ImportError("numpy.core.multiarray failed to import")
4463  *
4464  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
4465  * try:
4466  * _import_umath()
4467  */
4468 
4469 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
4470  int __pyx_r;
4471  __Pyx_RefNannyDeclarations
4472  PyObject *__pyx_t_1 = NULL;
4473  PyObject *__pyx_t_2 = NULL;
4474  PyObject *__pyx_t_3 = NULL;
4475  int __pyx_t_4;
4476  PyObject *__pyx_t_5 = NULL;
4477  PyObject *__pyx_t_6 = NULL;
4478  PyObject *__pyx_t_7 = NULL;
4479  PyObject *__pyx_t_8 = NULL;
4480  int __pyx_lineno = 0;
4481  const char *__pyx_filename = NULL;
4482  int __pyx_clineno = 0;
4483  __Pyx_RefNannySetupContext("import_umath", 0);
4484 
4485  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
4486  *
4487  * cdef inline int import_umath() except -1:
4488  * try: # <<<<<<<<<<<<<<
4489  * _import_umath()
4490  * except Exception:
4491  */
4492  {
4493  __Pyx_PyThreadState_declare
4494  __Pyx_PyThreadState_assign
4495  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
4496  __Pyx_XGOTREF(__pyx_t_1);
4497  __Pyx_XGOTREF(__pyx_t_2);
4498  __Pyx_XGOTREF(__pyx_t_3);
4499  /*try:*/ {
4500 
4501  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
4502  * cdef inline int import_umath() except -1:
4503  * try:
4504  * _import_umath() # <<<<<<<<<<<<<<
4505  * except Exception:
4506  * raise ImportError("numpy.core.umath failed to import")
4507  */
4508  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 949, __pyx_L3_error)
4509 
4510  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
4511  *
4512  * cdef inline int import_umath() except -1:
4513  * try: # <<<<<<<<<<<<<<
4514  * _import_umath()
4515  * except Exception:
4516  */
4517  }
4518  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4519  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4520  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4521  goto __pyx_L8_try_end;
4522  __pyx_L3_error:;
4523 
4524  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
4525  * try:
4526  * _import_umath()
4527  * except Exception: # <<<<<<<<<<<<<<
4528  * raise ImportError("numpy.core.umath failed to import")
4529  *
4530  */
4531  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4532  if (__pyx_t_4) {
4533  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
4534  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 950, __pyx_L5_except_error)
4535  __Pyx_GOTREF(__pyx_t_5);
4536  __Pyx_GOTREF(__pyx_t_6);
4537  __Pyx_GOTREF(__pyx_t_7);
4538 
4539  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
4540  * _import_umath()
4541  * except Exception:
4542  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
4543  *
4544  * cdef inline int import_ufunc() except -1:
4545  */
4546  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 951, __pyx_L5_except_error)
4547  __Pyx_GOTREF(__pyx_t_8);
4548  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
4549  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4550  __PYX_ERR(1, 951, __pyx_L5_except_error)
4551  }
4552  goto __pyx_L5_except_error;
4553  __pyx_L5_except_error:;
4554 
4555  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
4556  *
4557  * cdef inline int import_umath() except -1:
4558  * try: # <<<<<<<<<<<<<<
4559  * _import_umath()
4560  * except Exception:
4561  */
4562  __Pyx_XGIVEREF(__pyx_t_1);
4563  __Pyx_XGIVEREF(__pyx_t_2);
4564  __Pyx_XGIVEREF(__pyx_t_3);
4565  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
4566  goto __pyx_L1_error;
4567  __pyx_L8_try_end:;
4568  }
4569 
4570  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
4571  * raise ImportError("numpy.core.multiarray failed to import")
4572  *
4573  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
4574  * try:
4575  * _import_umath()
4576  */
4577 
4578  /* function exit code */
4579  __pyx_r = 0;
4580  goto __pyx_L0;
4581  __pyx_L1_error:;
4582  __Pyx_XDECREF(__pyx_t_5);
4583  __Pyx_XDECREF(__pyx_t_6);
4584  __Pyx_XDECREF(__pyx_t_7);
4585  __Pyx_XDECREF(__pyx_t_8);
4586  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
4587  __pyx_r = -1;
4588  __pyx_L0:;
4589  __Pyx_RefNannyFinishContext();
4590  return __pyx_r;
4591 }
4592 
4593 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
4594  * raise ImportError("numpy.core.umath failed to import")
4595  *
4596  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
4597  * try:
4598  * _import_umath()
4599  */
4600 
4601 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
4602  int __pyx_r;
4603  __Pyx_RefNannyDeclarations
4604  PyObject *__pyx_t_1 = NULL;
4605  PyObject *__pyx_t_2 = NULL;
4606  PyObject *__pyx_t_3 = NULL;
4607  int __pyx_t_4;
4608  PyObject *__pyx_t_5 = NULL;
4609  PyObject *__pyx_t_6 = NULL;
4610  PyObject *__pyx_t_7 = NULL;
4611  PyObject *__pyx_t_8 = NULL;
4612  int __pyx_lineno = 0;
4613  const char *__pyx_filename = NULL;
4614  int __pyx_clineno = 0;
4615  __Pyx_RefNannySetupContext("import_ufunc", 0);
4616 
4617  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
4618  *
4619  * cdef inline int import_ufunc() except -1:
4620  * try: # <<<<<<<<<<<<<<
4621  * _import_umath()
4622  * except Exception:
4623  */
4624  {
4625  __Pyx_PyThreadState_declare
4626  __Pyx_PyThreadState_assign
4627  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
4628  __Pyx_XGOTREF(__pyx_t_1);
4629  __Pyx_XGOTREF(__pyx_t_2);
4630  __Pyx_XGOTREF(__pyx_t_3);
4631  /*try:*/ {
4632 
4633  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
4634  * cdef inline int import_ufunc() except -1:
4635  * try:
4636  * _import_umath() # <<<<<<<<<<<<<<
4637  * except Exception:
4638  * raise ImportError("numpy.core.umath failed to import")
4639  */
4640  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 955, __pyx_L3_error)
4641 
4642  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
4643  *
4644  * cdef inline int import_ufunc() except -1:
4645  * try: # <<<<<<<<<<<<<<
4646  * _import_umath()
4647  * except Exception:
4648  */
4649  }
4650  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4651  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4652  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4653  goto __pyx_L8_try_end;
4654  __pyx_L3_error:;
4655 
4656  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
4657  * try:
4658  * _import_umath()
4659  * except Exception: # <<<<<<<<<<<<<<
4660  * raise ImportError("numpy.core.umath failed to import")
4661  *
4662  */
4663  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
4664  if (__pyx_t_4) {
4665  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
4666  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 956, __pyx_L5_except_error)
4667  __Pyx_GOTREF(__pyx_t_5);
4668  __Pyx_GOTREF(__pyx_t_6);
4669  __Pyx_GOTREF(__pyx_t_7);
4670 
4671  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
4672  * _import_umath()
4673  * except Exception:
4674  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
4675  *
4676  * cdef extern from *:
4677  */
4678  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 957, __pyx_L5_except_error)
4679  __Pyx_GOTREF(__pyx_t_8);
4680  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
4681  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4682  __PYX_ERR(1, 957, __pyx_L5_except_error)
4683  }
4684  goto __pyx_L5_except_error;
4685  __pyx_L5_except_error:;
4686 
4687  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
4688  *
4689  * cdef inline int import_ufunc() except -1:
4690  * try: # <<<<<<<<<<<<<<
4691  * _import_umath()
4692  * except Exception:
4693  */
4694  __Pyx_XGIVEREF(__pyx_t_1);
4695  __Pyx_XGIVEREF(__pyx_t_2);
4696  __Pyx_XGIVEREF(__pyx_t_3);
4697  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
4698  goto __pyx_L1_error;
4699  __pyx_L8_try_end:;
4700  }
4701 
4702  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
4703  * raise ImportError("numpy.core.umath failed to import")
4704  *
4705  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
4706  * try:
4707  * _import_umath()
4708  */
4709 
4710  /* function exit code */
4711  __pyx_r = 0;
4712  goto __pyx_L0;
4713  __pyx_L1_error:;
4714  __Pyx_XDECREF(__pyx_t_5);
4715  __Pyx_XDECREF(__pyx_t_6);
4716  __Pyx_XDECREF(__pyx_t_7);
4717  __Pyx_XDECREF(__pyx_t_8);
4718  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
4719  __pyx_r = -1;
4720  __pyx_L0:;
4721  __Pyx_RefNannyFinishContext();
4722  return __pyx_r;
4723 }
4724 
4725 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
4726  *
4727  *
4728  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
4729  * """
4730  * Cython equivalent of `isinstance(obj, np.timedelta64)`
4731  */
4732 
4733 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
4734  int __pyx_r;
4735  __Pyx_RefNannyDeclarations
4736  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
4737 
4738  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
4739  * bool
4740  * """
4741  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
4742  *
4743  *
4744  */
4745  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
4746  goto __pyx_L0;
4747 
4748  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
4749  *
4750  *
4751  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
4752  * """
4753  * Cython equivalent of `isinstance(obj, np.timedelta64)`
4754  */
4755 
4756  /* function exit code */
4757  __pyx_L0:;
4758  __Pyx_RefNannyFinishContext();
4759  return __pyx_r;
4760 }
4761 
4762 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
4763  *
4764  *
4765  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
4766  * """
4767  * Cython equivalent of `isinstance(obj, np.datetime64)`
4768  */
4769 
4770 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
4771  int __pyx_r;
4772  __Pyx_RefNannyDeclarations
4773  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
4774 
4775  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
4776  * bool
4777  * """
4778  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
4779  *
4780  *
4781  */
4782  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
4783  goto __pyx_L0;
4784 
4785  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
4786  *
4787  *
4788  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
4789  * """
4790  * Cython equivalent of `isinstance(obj, np.datetime64)`
4791  */
4792 
4793  /* function exit code */
4794  __pyx_L0:;
4795  __Pyx_RefNannyFinishContext();
4796  return __pyx_r;
4797 }
4798 
4799 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
4800  *
4801  *
4802  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
4803  * """
4804  * returns the int64 value underlying scalar numpy datetime64 object
4805  */
4806 
4807 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
4808  npy_datetime __pyx_r;
4809 
4810  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
4811  * also needed. That can be found using `get_datetime64_unit`.
4812  * """
4813  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
4814  *
4815  *
4816  */
4817  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
4818  goto __pyx_L0;
4819 
4820  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
4821  *
4822  *
4823  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
4824  * """
4825  * returns the int64 value underlying scalar numpy datetime64 object
4826  */
4827 
4828  /* function exit code */
4829  __pyx_L0:;
4830  return __pyx_r;
4831 }
4832 
4833 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
4834  *
4835  *
4836  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
4837  * """
4838  * returns the int64 value underlying scalar numpy timedelta64 object
4839  */
4840 
4841 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
4842  npy_timedelta __pyx_r;
4843 
4844  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
4845  * returns the int64 value underlying scalar numpy timedelta64 object
4846  * """
4847  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
4848  *
4849  *
4850  */
4851  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
4852  goto __pyx_L0;
4853 
4854  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
4855  *
4856  *
4857  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
4858  * """
4859  * returns the int64 value underlying scalar numpy timedelta64 object
4860  */
4861 
4862  /* function exit code */
4863  __pyx_L0:;
4864  return __pyx_r;
4865 }
4866 
4867 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
4868  *
4869  *
4870  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
4871  * """
4872  * returns the unit part of the dtype for a numpy datetime64 object.
4873  */
4874 
4875 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
4876  NPY_DATETIMEUNIT __pyx_r;
4877 
4878  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
4879  * returns the unit part of the dtype for a numpy datetime64 object.
4880  * """
4881  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
4882  */
4883  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
4884  goto __pyx_L0;
4885 
4886  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
4887  *
4888  *
4889  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
4890  * """
4891  * returns the unit part of the dtype for a numpy datetime64 object.
4892  */
4893 
4894  /* function exit code */
4895  __pyx_L0:;
4896  return __pyx_r;
4897 }
4898 
4899 static PyMethodDef __pyx_methods[] = {
4900  {0, 0, 0, 0}
4901 };
4902 
4903 #if PY_MAJOR_VERSION >= 3
4904 #if CYTHON_PEP489_MULTI_PHASE_INIT
4905 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
4906 static int __pyx_pymod_exec_ctimeIntegration(PyObject* module); /*proto*/
4907 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
4908  {Py_mod_create, (void*)__pyx_pymod_create},
4909  {Py_mod_exec, (void*)__pyx_pymod_exec_ctimeIntegration},
4910  {0, NULL}
4911 };
4912 #endif
4913 
4914 static struct PyModuleDef __pyx_moduledef = {
4915  PyModuleDef_HEAD_INIT,
4916  "ctimeIntegration",
4917  0, /* m_doc */
4918  #if CYTHON_PEP489_MULTI_PHASE_INIT
4919  0, /* m_size */
4920  #else
4921  -1, /* m_size */
4922  #endif
4923  __pyx_methods /* m_methods */,
4924  #if CYTHON_PEP489_MULTI_PHASE_INIT
4925  __pyx_moduledef_slots, /* m_slots */
4926  #else
4927  NULL, /* m_reload */
4928  #endif
4929  NULL, /* m_traverse */
4930  NULL, /* m_clear */
4931  NULL /* m_free */
4932 };
4933 #endif
4934 #ifndef CYTHON_SMALL_CODE
4935 #if defined(__clang__)
4936  #define CYTHON_SMALL_CODE
4937 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
4938  #define CYTHON_SMALL_CODE __attribute__((cold))
4939 #else
4940  #define CYTHON_SMALL_CODE
4941 #endif
4942 #endif
4943 
4944 static __Pyx_StringTabEntry __pyx_string_tab[] = {
4945  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
4946  {&__pyx_n_s_Mh2, __pyx_k_Mh2, sizeof(__pyx_k_Mh2), 0, 0, 1, 1},
4947  {&__pyx_n_s_Uin, __pyx_k_Uin, sizeof(__pyx_k_Uin), 0, 0, 1, 1},
4948  {&__pyx_n_s_Uout, __pyx_k_Uout, sizeof(__pyx_k_Uout), 0, 0, 1, 1},
4949  {&__pyx_n_s_allowMinWithUndershoot, __pyx_k_allowMinWithUndershoot, sizeof(__pyx_k_allowMinWithUndershoot), 0, 0, 1, 1},
4950  {&__pyx_n_s_alphaNeighbors, __pyx_k_alphaNeighbors, sizeof(__pyx_k_alphaNeighbors), 0, 0, 1, 1},
4951  {&__pyx_n_s_alphas, __pyx_k_alphas, sizeof(__pyx_k_alphas), 0, 0, 1, 1},
4952  {&__pyx_n_s_applyCockburnDGlimiterP1Lagrange, __pyx_k_applyCockburnDGlimiterP1Lagrange, sizeof(__pyx_k_applyCockburnDGlimiterP1Lagrange), 0, 0, 1, 1},
4953  {&__pyx_n_s_applyDGlimitingP1Lagrange1d, __pyx_k_applyDGlimitingP1Lagrange1d, sizeof(__pyx_k_applyDGlimitingP1Lagrange1d), 0, 0, 1, 1},
4954  {&__pyx_n_s_applyDGlimitingP1Lagrange1d_with, __pyx_k_applyDGlimitingP1Lagrange1d_with, sizeof(__pyx_k_applyDGlimitingP1Lagrange1d_with), 0, 0, 1, 1},
4955  {&__pyx_n_s_applyDurlofskyDGlimiterP1Lagrang, __pyx_k_applyDurlofskyDGlimiterP1Lagrang, sizeof(__pyx_k_applyDurlofskyDGlimiterP1Lagrang), 0, 0, 1, 1},
4956  {&__pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_2, __pyx_k_applyDurlofskyDGlimiterP1Lagrang_2, sizeof(__pyx_k_applyDurlofskyDGlimiterP1Lagrang_2), 0, 0, 1, 1},
4957  {&__pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_3, __pyx_k_applyDurlofskyDGlimiterP1Lagrang_3, sizeof(__pyx_k_applyDurlofskyDGlimiterP1Lagrang_3), 0, 0, 1, 1},
4958  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
4959  {&__pyx_n_s_computeCockburnDGlimiterArrays2d, __pyx_k_computeCockburnDGlimiterArrays2d, sizeof(__pyx_k_computeCockburnDGlimiterArrays2d), 0, 0, 1, 1},
4960  {&__pyx_n_s_computeElementNeighborShapeGradi, __pyx_k_computeElementNeighborShapeGradi, sizeof(__pyx_k_computeElementNeighborShapeGradi), 0, 0, 1, 1},
4961  {&__pyx_n_s_ctimeIntegration, __pyx_k_ctimeIntegration, sizeof(__pyx_k_ctimeIntegration), 0, 0, 1, 1},
4962  {&__pyx_n_s_dtn, __pyx_k_dtn, sizeof(__pyx_k_dtn), 0, 0, 1, 1},
4963  {&__pyx_n_s_dtnm1, __pyx_k_dtnm1, sizeof(__pyx_k_dtnm1), 0, 0, 1, 1},
4964  {&__pyx_n_s_dtnp1, __pyx_k_dtnp1, sizeof(__pyx_k_dtnp1), 0, 0, 1, 1},
4965  {&__pyx_n_s_elementAverages, __pyx_k_elementAverages, sizeof(__pyx_k_elementAverages), 0, 0, 1, 1},
4966  {&__pyx_n_s_elementBarycentersArray, __pyx_k_elementBarycentersArray, sizeof(__pyx_k_elementBarycentersArray), 0, 0, 1, 1},
4967  {&__pyx_n_s_elementBoundariesArray, __pyx_k_elementBoundariesArray, sizeof(__pyx_k_elementBoundariesArray), 0, 0, 1, 1},
4968  {&__pyx_n_s_elementBoundaryBarycentersArray, __pyx_k_elementBoundaryBarycentersArray, sizeof(__pyx_k_elementBoundaryBarycentersArray), 0, 0, 1, 1},
4969  {&__pyx_n_s_elementNeighborShapeGradients, __pyx_k_elementNeighborShapeGradients, sizeof(__pyx_k_elementNeighborShapeGradients), 0, 0, 1, 1},
4970  {&__pyx_n_s_elementNeighborsArray, __pyx_k_elementNeighborsArray, sizeof(__pyx_k_elementNeighborsArray), 0, 0, 1, 1},
4971  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
4972  {&__pyx_n_s_enforcePositivity, __pyx_k_enforcePositivity, sizeof(__pyx_k_enforcePositivity), 0, 0, 1, 1},
4973  {&__pyx_n_s_grad_v0, __pyx_k_grad_v0, sizeof(__pyx_k_grad_v0), 0, 0, 1, 1},
4974  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
4975  {&__pyx_n_s_killExtrema, __pyx_k_killExtrema, sizeof(__pyx_k_killExtrema), 0, 0, 1, 1},
4976  {&__pyx_n_s_l2g, __pyx_k_l2g, sizeof(__pyx_k_l2g), 0, 0, 1, 1},
4977  {&__pyx_n_s_limiterFlag, __pyx_k_limiterFlag, sizeof(__pyx_k_limiterFlag), 0, 0, 1, 1},
4978  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
4979  {&__pyx_n_s_nDOF_element, __pyx_k_nDOF_element, sizeof(__pyx_k_nDOF_element), 0, 0, 1, 1},
4980  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
4981  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
4982  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
4983  {&__pyx_n_s_nPoints, __pyx_k_nPoints, sizeof(__pyx_k_nPoints), 0, 0, 1, 1},
4984  {&__pyx_n_s_nSpace, __pyx_k_nSpace, sizeof(__pyx_k_nSpace), 0, 0, 1, 1},
4985  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
4986  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
4987  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
4988  {&__pyx_n_s_nu, __pyx_k_nu, sizeof(__pyx_k_nu), 0, 0, 1, 1},
4989  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
4990  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
4991  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
4992  {&__pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_k_proteus_ctimeIntegration_pyx, sizeof(__pyx_k_proteus_ctimeIntegration_pyx), 0, 0, 1, 0},
4993  {&__pyx_n_s_psiTCtteDT, __pyx_k_psiTCtteDT, sizeof(__pyx_k_psiTCtteDT), 0, 0, 1, 1},
4994  {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
4995  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
4996  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
4997  {&__pyx_n_s_vacuumTol, __pyx_k_vacuumTol, sizeof(__pyx_k_vacuumTol), 0, 0, 1, 1},
4998  {&__pyx_n_s_yn, __pyx_k_yn, sizeof(__pyx_k_yn), 0, 0, 1, 1},
4999  {&__pyx_n_s_ypn, __pyx_k_ypn, sizeof(__pyx_k_ypn), 0, 0, 1, 1},
5000  {&__pyx_n_s_ypnm1, __pyx_k_ypnm1, sizeof(__pyx_k_ypnm1), 0, 0, 1, 1},
5001  {0, 0, 0, 0, 0, 0, 0}
5002 };
5003 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
5004  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 945, __pyx_L1_error)
5005  return 0;
5006  __pyx_L1_error:;
5007  return -1;
5008 }
5009 
5010 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
5011  __Pyx_RefNannyDeclarations
5012  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
5013 
5014  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
5015  * __pyx_import_array()
5016  * except Exception:
5017  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
5018  *
5019  * cdef inline int import_umath() except -1:
5020  */
5021  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 945, __pyx_L1_error)
5022  __Pyx_GOTREF(__pyx_tuple_);
5023  __Pyx_GIVEREF(__pyx_tuple_);
5024 
5025  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
5026  * _import_umath()
5027  * except Exception:
5028  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
5029  *
5030  * cdef inline int import_ufunc() except -1:
5031  */
5032  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 951, __pyx_L1_error)
5033  __Pyx_GOTREF(__pyx_tuple__2);
5034  __Pyx_GIVEREF(__pyx_tuple__2);
5035 
5036  /* "ctimeIntegration.pyx":143
5037  * double* Uout)
5038  * # ------------------------------------------- #
5039  * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
5040  * double tau,
5041  * double dtn,
5042  */
5043  __pyx_tuple__3 = PyTuple_Pack(8, __pyx_n_s_nPoints, __pyx_n_s_tau, __pyx_n_s_dtn, __pyx_n_s_dtnm1, __pyx_n_s_yn, __pyx_n_s_ypn, __pyx_n_s_ypnm1, __pyx_n_s_dtnp1); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 143, __pyx_L1_error)
5044  __Pyx_GOTREF(__pyx_tuple__3);
5045  __Pyx_GIVEREF(__pyx_tuple__3);
5046  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_psiTCtteDT, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 143, __pyx_L1_error)
5047 
5048  /* "ctimeIntegration.pyx":160
5049  * <double*> dtnp1.data)
5050  *
5051  * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
5052  * int nElements_global,
5053  * int nNodes_element,
5054  */
5055  __pyx_tuple__5 = PyTuple_Pack(13, __pyx_n_s_limiterFlag, __pyx_n_s_nElements_global, __pyx_n_s_nNodes_element, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nDOF_element, __pyx_n_s_elementNodesArray, __pyx_n_s_elementNeighborsArray, __pyx_n_s_nodeArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_l2g, __pyx_n_s_tag, __pyx_n_s_Uin, __pyx_n_s_Uout); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 160, __pyx_L1_error)
5056  __Pyx_GOTREF(__pyx_tuple__5);
5057  __Pyx_GIVEREF(__pyx_tuple__5);
5058  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(13, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_applyDGlimitingP1Lagrange1d, 160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 160, __pyx_L1_error)
5059 
5060  /* "ctimeIntegration.pyx":187
5061  * <double*> Uout.data)
5062  *
5063  * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
5064  * double vacuumTol,
5065  * int nElements_global,
5066  */
5067  __pyx_tuple__7 = PyTuple_Pack(14, __pyx_n_s_enforcePositivity, __pyx_n_s_vacuumTol, __pyx_n_s_nElements_global, __pyx_n_s_nNodes_element, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nDOF_element, __pyx_n_s_elementNodesArray, __pyx_n_s_elementNeighborsArray, __pyx_n_s_nodeArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_l2g, __pyx_n_s_tag, __pyx_n_s_Uin, __pyx_n_s_Uout); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 187, __pyx_L1_error)
5068  __Pyx_GOTREF(__pyx_tuple__7);
5069  __Pyx_GIVEREF(__pyx_tuple__7);
5070  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(14, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_applyDGlimitingP1Lagrange1d_with, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 187, __pyx_L1_error)
5071 
5072  /* "ctimeIntegration.pyx":217
5073  *
5074  *
5075  * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
5076  * np.ndarray elementNeighborsArray,
5077  * np.ndarray elementBarycentersArray,
5078  */
5079  __pyx_tuple__9 = PyTuple_Pack(5, __pyx_n_s_elementBoundariesArray, __pyx_n_s_elementNeighborsArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_elementBoundaryBarycentersArray, __pyx_n_s_elementNeighborShapeGradients); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 217, __pyx_L1_error)
5080  __Pyx_GOTREF(__pyx_tuple__9);
5081  __Pyx_GIVEREF(__pyx_tuple__9);
5082  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_computeElementNeighborShapeGradi, 217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 217, __pyx_L1_error)
5083 
5084  /* "ctimeIntegration.pyx":231
5085  * <double*> elementNeighborShapeGradients.data)
5086  *
5087  * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
5088  * np.ndarray elementNeighborsArray,
5089  * np.ndarray elementBarycentersArray,
5090  */
5091  __pyx_tuple__11 = PyTuple_Pack(7, __pyx_n_s_elementBoundariesArray, __pyx_n_s_elementNeighborsArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_elementBoundaryBarycentersArray, __pyx_n_s_elementNeighborShapeGradients, __pyx_n_s_alphas, __pyx_n_s_alphaNeighbors); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 231, __pyx_L1_error)
5092  __Pyx_GOTREF(__pyx_tuple__11);
5093  __Pyx_GIVEREF(__pyx_tuple__11);
5094  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_computeCockburnDGlimiterArrays2d, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 231, __pyx_L1_error)
5095 
5096  /* "ctimeIntegration.pyx":249
5097  * <int*> alphaNeighbors.data)
5098  *
5099  * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
5100  * double Mh2,
5101  * np.ndarray elementNeighborsArray,
5102  */
5103  __pyx_tuple__13 = PyTuple_Pack(9, __pyx_n_s_nu, __pyx_n_s_Mh2, __pyx_n_s_elementNeighborsArray, __pyx_n_s_l2g, __pyx_n_s_tag, __pyx_n_s_alphas, __pyx_n_s_alphaNeighbors, __pyx_n_s_Uin, __pyx_n_s_Uout); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 249, __pyx_L1_error)
5104  __Pyx_GOTREF(__pyx_tuple__13);
5105  __Pyx_GIVEREF(__pyx_tuple__13);
5106  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_applyCockburnDGlimiterP1Lagrange, 249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 249, __pyx_L1_error)
5107 
5108  /* "ctimeIntegration.pyx":272
5109  * <double*> Uout.data)
5110  *
5111  * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
5112  * int allowMinWithUndershoot,
5113  * int nElements_global,
5114  */
5115  __pyx_tuple__15 = PyTuple_Pack(20, __pyx_n_s_killExtrema, __pyx_n_s_allowMinWithUndershoot, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nNodes_element, __pyx_n_s_nSpace, __pyx_n_s_nDOF_element, __pyx_n_s_elementNeighborsArray, __pyx_n_s_elementBoundariesArray, __pyx_n_s_elementNodesArray, __pyx_n_s_nodeArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_elementBoundaryBarycentersArray, __pyx_n_s_elementNeighborShapeGradients, __pyx_n_s_l2g, __pyx_n_s_grad_v0, __pyx_n_s_elementAverages, __pyx_n_s_tag, __pyx_n_s_Uin, __pyx_n_s_Uout); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 272, __pyx_L1_error)
5116  __Pyx_GOTREF(__pyx_tuple__15);
5117  __Pyx_GIVEREF(__pyx_tuple__15);
5118  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(20, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_applyDurlofskyDGlimiterP1Lagrang, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 272, __pyx_L1_error)
5119 
5120  /* "ctimeIntegration.pyx":313
5121  * <double*> Uout.data)
5122  *
5123  * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
5124  * int allowMinWithUndershoot,
5125  * int nElements_global,
5126  */
5127  __pyx_tuple__17 = PyTuple_Pack(20, __pyx_n_s_killExtrema, __pyx_n_s_allowMinWithUndershoot, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nNodes_element, __pyx_n_s_nSpace, __pyx_n_s_nDOF_element, __pyx_n_s_elementNeighborsArray, __pyx_n_s_elementBoundariesArray, __pyx_n_s_elementNodesArray, __pyx_n_s_nodeArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_elementBoundaryBarycentersArray, __pyx_n_s_elementNeighborShapeGradients, __pyx_n_s_l2g, __pyx_n_s_grad_v0, __pyx_n_s_elementAverages, __pyx_n_s_tag, __pyx_n_s_Uin, __pyx_n_s_Uout); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 313, __pyx_L1_error)
5128  __Pyx_GOTREF(__pyx_tuple__17);
5129  __Pyx_GIVEREF(__pyx_tuple__17);
5130  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(20, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_2, 313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 313, __pyx_L1_error)
5131 
5132  /* "ctimeIntegration.pyx":354
5133  * <double*> Uout.data)
5134  *
5135  * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
5136  * int allowMinWithUndershoot,
5137  * int enforcePositivity,
5138  */
5139  __pyx_tuple__19 = PyTuple_Pack(22, __pyx_n_s_killExtrema, __pyx_n_s_allowMinWithUndershoot, __pyx_n_s_enforcePositivity, __pyx_n_s_vacuumTol, __pyx_n_s_nElements_global, __pyx_n_s_nElementBoundaries_element, __pyx_n_s_nNodes_element, __pyx_n_s_nSpace, __pyx_n_s_nDOF_element, __pyx_n_s_elementNeighborsArray, __pyx_n_s_elementBoundariesArray, __pyx_n_s_elementNodesArray, __pyx_n_s_nodeArray, __pyx_n_s_elementBarycentersArray, __pyx_n_s_elementBoundaryBarycentersArray, __pyx_n_s_elementNeighborShapeGradients, __pyx_n_s_l2g, __pyx_n_s_grad_v0, __pyx_n_s_elementAverages, __pyx_n_s_tag, __pyx_n_s_Uin, __pyx_n_s_Uout); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 354, __pyx_L1_error)
5140  __Pyx_GOTREF(__pyx_tuple__19);
5141  __Pyx_GIVEREF(__pyx_tuple__19);
5142  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(22, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ctimeIntegration_pyx, __pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_3, 354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 354, __pyx_L1_error)
5143  __Pyx_RefNannyFinishContext();
5144  return 0;
5145  __pyx_L1_error:;
5146  __Pyx_RefNannyFinishContext();
5147  return -1;
5148 }
5149 
5150 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
5151  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
5152  return 0;
5153  __pyx_L1_error:;
5154  return -1;
5155 }
5156 
5157 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
5158 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
5159 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
5160 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
5161 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
5162 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
5163 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
5164 
5165 static int __Pyx_modinit_global_init_code(void) {
5166  __Pyx_RefNannyDeclarations
5167  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
5168  /*--- Global init code ---*/
5169  __Pyx_RefNannyFinishContext();
5170  return 0;
5171 }
5172 
5173 static int __Pyx_modinit_variable_export_code(void) {
5174  __Pyx_RefNannyDeclarations
5175  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
5176  /*--- Variable export code ---*/
5177  __Pyx_RefNannyFinishContext();
5178  return 0;
5179 }
5180 
5181 static int __Pyx_modinit_function_export_code(void) {
5182  __Pyx_RefNannyDeclarations
5183  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
5184  /*--- Function export code ---*/
5185  __Pyx_RefNannyFinishContext();
5186  return 0;
5187 }
5188 
5189 static int __Pyx_modinit_type_init_code(void) {
5190  __Pyx_RefNannyDeclarations
5191  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
5192  /*--- Type init code ---*/
5193  __Pyx_RefNannyFinishContext();
5194  return 0;
5195 }
5196 
5197 static int __Pyx_modinit_type_import_code(void) {
5198  __Pyx_RefNannyDeclarations
5199  PyObject *__pyx_t_1 = NULL;
5200  int __pyx_lineno = 0;
5201  const char *__pyx_filename = NULL;
5202  int __pyx_clineno = 0;
5203  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
5204  /*--- Type import code ---*/
5205  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
5206  __Pyx_GOTREF(__pyx_t_1);
5207  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
5208  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
5209  sizeof(PyTypeObject),
5210  #else
5211  sizeof(PyHeapTypeObject),
5212  #endif
5213  __Pyx_ImportType_CheckSize_Warn);
5214  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
5215  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5216  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
5217  __Pyx_GOTREF(__pyx_t_1);
5218  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
5219  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error)
5220  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
5221  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error)
5222  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
5223  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error)
5224  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
5225  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error)
5226  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5227  if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error)
5228  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5229  if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error)
5230  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5231  if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error)
5232  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5233  if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error)
5234  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5235  if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error)
5236  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5237  if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error)
5238  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5239  if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error)
5240  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5241  if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error)
5242  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5243  if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error)
5244  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
5245  if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error)
5246  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
5247  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error)
5248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5249  __Pyx_RefNannyFinishContext();
5250  return 0;
5251  __pyx_L1_error:;
5252  __Pyx_XDECREF(__pyx_t_1);
5253  __Pyx_RefNannyFinishContext();
5254  return -1;
5255 }
5256 
5257 static int __Pyx_modinit_variable_import_code(void) {
5258  __Pyx_RefNannyDeclarations
5259  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
5260  /*--- Variable import code ---*/
5261  __Pyx_RefNannyFinishContext();
5262  return 0;
5263 }
5264 
5265 static int __Pyx_modinit_function_import_code(void) {
5266  __Pyx_RefNannyDeclarations
5267  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
5268  /*--- Function import code ---*/
5269  __Pyx_RefNannyFinishContext();
5270  return 0;
5271 }
5272 
5273 
5274 #ifndef CYTHON_NO_PYINIT_EXPORT
5275 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
5276 #elif PY_MAJOR_VERSION < 3
5277 #ifdef __cplusplus
5278 #define __Pyx_PyMODINIT_FUNC extern "C" void
5279 #else
5280 #define __Pyx_PyMODINIT_FUNC void
5281 #endif
5282 #else
5283 #ifdef __cplusplus
5284 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
5285 #else
5286 #define __Pyx_PyMODINIT_FUNC PyObject *
5287 #endif
5288 #endif
5289 
5290 
5291 #if PY_MAJOR_VERSION < 3
5292 __Pyx_PyMODINIT_FUNC initctimeIntegration(void) CYTHON_SMALL_CODE; /*proto*/
5293 __Pyx_PyMODINIT_FUNC initctimeIntegration(void)
5294 #else
5295 __Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(void) CYTHON_SMALL_CODE; /*proto*/
5296 __Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(void)
5297 #if CYTHON_PEP489_MULTI_PHASE_INIT
5298 {
5299  return PyModuleDef_Init(&__pyx_moduledef);
5300 }
5301 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
5302  #if PY_VERSION_HEX >= 0x030700A1
5303  static PY_INT64_T main_interpreter_id = -1;
5304  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
5305  if (main_interpreter_id == -1) {
5306  main_interpreter_id = current_id;
5307  return (unlikely(current_id == -1)) ? -1 : 0;
5308  } else if (unlikely(main_interpreter_id != current_id))
5309  #else
5310  static PyInterpreterState *main_interpreter = NULL;
5311  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
5312  if (!main_interpreter) {
5313  main_interpreter = current_interpreter;
5314  } else if (unlikely(main_interpreter != current_interpreter))
5315  #endif
5316  {
5317  PyErr_SetString(
5318  PyExc_ImportError,
5319  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
5320  return -1;
5321  }
5322  return 0;
5323 }
5324 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
5325  PyObject *value = PyObject_GetAttrString(spec, from_name);
5326  int result = 0;
5327  if (likely(value)) {
5328  if (allow_none || value != Py_None) {
5329  result = PyDict_SetItemString(moddict, to_name, value);
5330  }
5331  Py_DECREF(value);
5332  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
5333  PyErr_Clear();
5334  } else {
5335  result = -1;
5336  }
5337  return result;
5338 }
5339 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
5340  PyObject *module = NULL, *moddict, *modname;
5341  if (__Pyx_check_single_interpreter())
5342  return NULL;
5343  if (__pyx_m)
5344  return __Pyx_NewRef(__pyx_m);
5345  modname = PyObject_GetAttrString(spec, "name");
5346  if (unlikely(!modname)) goto bad;
5347  module = PyModule_NewObject(modname);
5348  Py_DECREF(modname);
5349  if (unlikely(!module)) goto bad;
5350  moddict = PyModule_GetDict(module);
5351  if (unlikely(!moddict)) goto bad;
5352  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
5353  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
5354  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
5355  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
5356  return module;
5357 bad:
5358  Py_XDECREF(module);
5359  return NULL;
5360 }
5361 
5362 
5363 static CYTHON_SMALL_CODE int __pyx_pymod_exec_ctimeIntegration(PyObject *__pyx_pyinit_module)
5364 #endif
5365 #endif
5366 {
5367  PyObject *__pyx_t_1 = NULL;
5368  int __pyx_lineno = 0;
5369  const char *__pyx_filename = NULL;
5370  int __pyx_clineno = 0;
5371  __Pyx_RefNannyDeclarations
5372  #if CYTHON_PEP489_MULTI_PHASE_INIT
5373  if (__pyx_m) {
5374  if (__pyx_m == __pyx_pyinit_module) return 0;
5375  PyErr_SetString(PyExc_RuntimeError, "Module 'ctimeIntegration' has already been imported. Re-initialisation is not supported.");
5376  return -1;
5377  }
5378  #elif PY_MAJOR_VERSION >= 3
5379  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
5380  #endif
5381  #if CYTHON_REFNANNY
5382 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
5383 if (!__Pyx_RefNanny) {
5384  PyErr_Clear();
5385  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
5386  if (!__Pyx_RefNanny)
5387  Py_FatalError("failed to import 'refnanny' module");
5388 }
5389 #endif
5390  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(void)", 0);
5391  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5392  #ifdef __Pxy_PyFrame_Initialize_Offsets
5393  __Pxy_PyFrame_Initialize_Offsets();
5394  #endif
5395  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
5396  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
5397  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
5398  #ifdef __Pyx_CyFunction_USED
5399  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5400  #endif
5401  #ifdef __Pyx_FusedFunction_USED
5402  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5403  #endif
5404  #ifdef __Pyx_Coroutine_USED
5405  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5406  #endif
5407  #ifdef __Pyx_Generator_USED
5408  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5409  #endif
5410  #ifdef __Pyx_AsyncGen_USED
5411  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5412  #endif
5413  #ifdef __Pyx_StopAsyncIteration_USED
5414  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5415  #endif
5416  /*--- Library function declarations ---*/
5417  /*--- Threads initialization code ---*/
5418  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
5419  PyEval_InitThreads();
5420  #endif
5421  /*--- Module creation code ---*/
5422  #if CYTHON_PEP489_MULTI_PHASE_INIT
5423  __pyx_m = __pyx_pyinit_module;
5424  Py_INCREF(__pyx_m);
5425  #else
5426  #if PY_MAJOR_VERSION < 3
5427  __pyx_m = Py_InitModule4("ctimeIntegration", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
5428  #else
5429  __pyx_m = PyModule_Create(&__pyx_moduledef);
5430  #endif
5431  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
5432  #endif
5433  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
5434  Py_INCREF(__pyx_d);
5435  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
5436  Py_INCREF(__pyx_b);
5437  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
5438  Py_INCREF(__pyx_cython_runtime);
5439  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
5440  /*--- Initialize various global constants etc. ---*/
5441  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5442  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
5443  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5444  #endif
5445  if (__pyx_module_is_main_ctimeIntegration) {
5446  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5447  }
5448  #if PY_MAJOR_VERSION >= 3
5449  {
5450  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
5451  if (!PyDict_GetItemString(modules, "ctimeIntegration")) {
5452  if (unlikely(PyDict_SetItemString(modules, "ctimeIntegration", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
5453  }
5454  }
5455  #endif
5456  /*--- Builtin init code ---*/
5457  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5458  /*--- Constants init code ---*/
5459  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5460  /*--- Global type/function init code ---*/
5461  (void)__Pyx_modinit_global_init_code();
5462  (void)__Pyx_modinit_variable_export_code();
5463  (void)__Pyx_modinit_function_export_code();
5464  (void)__Pyx_modinit_type_init_code();
5465  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
5466  (void)__Pyx_modinit_variable_import_code();
5467  (void)__Pyx_modinit_function_import_code();
5468  /*--- Execution code ---*/
5469  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
5470  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5471  #endif
5472 
5473  /* "ctimeIntegration.pyx":2
5474  * # A type of -*- python -*- file
5475  * import numpy as np # <<<<<<<<<<<<<<
5476  * cimport numpy as np
5477  * cdef extern from "timeIntegration.h":
5478  */
5479  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
5480  __Pyx_GOTREF(__pyx_t_1);
5481  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
5482  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5483 
5484  /* "ctimeIntegration.pyx":143
5485  * double* Uout)
5486  * # ------------------------------------------- #
5487  * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
5488  * double tau,
5489  * double dtn,
5490  */
5491  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_1psiTCtteDT, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
5492  __Pyx_GOTREF(__pyx_t_1);
5493  if (PyDict_SetItem(__pyx_d, __pyx_n_s_psiTCtteDT, __pyx_t_1) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
5494  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5495 
5496  /* "ctimeIntegration.pyx":160
5497  * <double*> dtnp1.data)
5498  *
5499  * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
5500  * int nElements_global,
5501  * int nNodes_element,
5502  */
5503  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_3applyDGlimitingP1Lagrange1d, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
5504  __Pyx_GOTREF(__pyx_t_1);
5505  if (PyDict_SetItem(__pyx_d, __pyx_n_s_applyDGlimitingP1Lagrange1d, __pyx_t_1) < 0) __PYX_ERR(0, 160, __pyx_L1_error)
5506  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5507 
5508  /* "ctimeIntegration.pyx":187
5509  * <double*> Uout.data)
5510  *
5511  * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
5512  * double vacuumTol,
5513  * int nElements_global,
5514  */
5515  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
5516  __Pyx_GOTREF(__pyx_t_1);
5517  if (PyDict_SetItem(__pyx_d, __pyx_n_s_applyDGlimitingP1Lagrange1d_with, __pyx_t_1) < 0) __PYX_ERR(0, 187, __pyx_L1_error)
5518  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5519 
5520  /* "ctimeIntegration.pyx":217
5521  *
5522  *
5523  * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
5524  * np.ndarray elementNeighborsArray,
5525  * np.ndarray elementBarycentersArray,
5526  */
5527  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_7computeElementNeighborShapeGradients, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
5528  __Pyx_GOTREF(__pyx_t_1);
5529  if (PyDict_SetItem(__pyx_d, __pyx_n_s_computeElementNeighborShapeGradi, __pyx_t_1) < 0) __PYX_ERR(0, 217, __pyx_L1_error)
5530  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5531 
5532  /* "ctimeIntegration.pyx":231
5533  * <double*> elementNeighborShapeGradients.data)
5534  *
5535  * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
5536  * np.ndarray elementNeighborsArray,
5537  * np.ndarray elementBarycentersArray,
5538  */
5539  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_9computeCockburnDGlimiterArrays2d, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
5540  __Pyx_GOTREF(__pyx_t_1);
5541  if (PyDict_SetItem(__pyx_d, __pyx_n_s_computeCockburnDGlimiterArrays2d, __pyx_t_1) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
5542  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5543 
5544  /* "ctimeIntegration.pyx":249
5545  * <int*> alphaNeighbors.data)
5546  *
5547  * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
5548  * double Mh2,
5549  * np.ndarray elementNeighborsArray,
5550  */
5551  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
5552  __Pyx_GOTREF(__pyx_t_1);
5553  if (PyDict_SetItem(__pyx_d, __pyx_n_s_applyCockburnDGlimiterP1Lagrange, __pyx_t_1) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
5554  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5555 
5556  /* "ctimeIntegration.pyx":272
5557  * <double*> Uout.data)
5558  *
5559  * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
5560  * int allowMinWithUndershoot,
5561  * int nElements_global,
5562  */
5563  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
5564  __Pyx_GOTREF(__pyx_t_1);
5565  if (PyDict_SetItem(__pyx_d, __pyx_n_s_applyDurlofskyDGlimiterP1Lagrang, __pyx_t_1) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
5566  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5567 
5568  /* "ctimeIntegration.pyx":313
5569  * <double*> Uout.data)
5570  *
5571  * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
5572  * int allowMinWithUndershoot,
5573  * int nElements_global,
5574  */
5575  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
5576  __Pyx_GOTREF(__pyx_t_1);
5577  if (PyDict_SetItem(__pyx_d, __pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_2, __pyx_t_1) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
5578  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5579 
5580  /* "ctimeIntegration.pyx":354
5581  * <double*> Uout.data)
5582  *
5583  * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
5584  * int allowMinWithUndershoot,
5585  * int enforcePositivity,
5586  */
5587  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol, NULL, __pyx_n_s_ctimeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
5588  __Pyx_GOTREF(__pyx_t_1);
5589  if (PyDict_SetItem(__pyx_d, __pyx_n_s_applyDurlofskyDGlimiterP1Lagrang_3, __pyx_t_1) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
5590  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5591 
5592  /* "ctimeIntegration.pyx":1
5593  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
5594  * import numpy as np
5595  * cimport numpy as np
5596  */
5597  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
5598  __Pyx_GOTREF(__pyx_t_1);
5599  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
5600  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5601 
5602  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
5603  *
5604  *
5605  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
5606  * """
5607  * returns the unit part of the dtype for a numpy datetime64 object.
5608  */
5609 
5610  /*--- Wrapped vars code ---*/
5611 
5612  goto __pyx_L0;
5613  __pyx_L1_error:;
5614  __Pyx_XDECREF(__pyx_t_1);
5615  if (__pyx_m) {
5616  if (__pyx_d) {
5617  __Pyx_AddTraceback("init ctimeIntegration", __pyx_clineno, __pyx_lineno, __pyx_filename);
5618  }
5619  Py_CLEAR(__pyx_m);
5620  } else if (!PyErr_Occurred()) {
5621  PyErr_SetString(PyExc_ImportError, "init ctimeIntegration");
5622  }
5623  __pyx_L0:;
5624  __Pyx_RefNannyFinishContext();
5625  #if CYTHON_PEP489_MULTI_PHASE_INIT
5626  return (__pyx_m != NULL) ? 0 : -1;
5627  #elif PY_MAJOR_VERSION >= 3
5628  return __pyx_m;
5629  #else
5630  return;
5631  #endif
5632 }
5633 
5634 /* --- Runtime support code --- */
5635 /* Refnanny */
5636 #if CYTHON_REFNANNY
5637 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
5638  PyObject *m = NULL, *p = NULL;
5639  void *r = NULL;
5640  m = PyImport_ImportModule(modname);
5641  if (!m) goto end;
5642  p = PyObject_GetAttrString(m, "RefNannyAPI");
5643  if (!p) goto end;
5644  r = PyLong_AsVoidPtr(p);
5645 end:
5646  Py_XDECREF(p);
5647  Py_XDECREF(m);
5648  return (__Pyx_RefNannyAPIStruct *)r;
5649 }
5650 #endif
5651 
5652 /* RaiseArgTupleInvalid */
5653 static void __Pyx_RaiseArgtupleInvalid(
5654  const char* func_name,
5655  int exact,
5656  Py_ssize_t num_min,
5657  Py_ssize_t num_max,
5658  Py_ssize_t num_found)
5659 {
5660  Py_ssize_t num_expected;
5661  const char *more_or_less;
5662  if (num_found < num_min) {
5663  num_expected = num_min;
5664  more_or_less = "at least";
5665  } else {
5666  num_expected = num_max;
5667  more_or_less = "at most";
5668  }
5669  if (exact) {
5670  more_or_less = "exactly";
5671  }
5672  PyErr_Format(PyExc_TypeError,
5673  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
5674  func_name, more_or_less, num_expected,
5675  (num_expected == 1) ? "" : "s", num_found);
5676 }
5677 
5678 /* RaiseDoubleKeywords */
5679 static void __Pyx_RaiseDoubleKeywordsError(
5680  const char* func_name,
5681  PyObject* kw_name)
5682 {
5683  PyErr_Format(PyExc_TypeError,
5684  #if PY_MAJOR_VERSION >= 3
5685  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
5686  #else
5687  "%s() got multiple values for keyword argument '%s'", func_name,
5688  PyString_AsString(kw_name));
5689  #endif
5690 }
5691 
5692 /* ParseKeywords */
5693 static int __Pyx_ParseOptionalKeywords(
5694  PyObject *kwds,
5695  PyObject **argnames[],
5696  PyObject *kwds2,
5697  PyObject *values[],
5698  Py_ssize_t num_pos_args,
5699  const char* function_name)
5700 {
5701  PyObject *key = 0, *value = 0;
5702  Py_ssize_t pos = 0;
5703  PyObject*** name;
5704  PyObject*** first_kw_arg = argnames + num_pos_args;
5705  while (PyDict_Next(kwds, &pos, &key, &value)) {
5706  name = first_kw_arg;
5707  while (*name && (**name != key)) name++;
5708  if (*name) {
5709  values[name-argnames] = value;
5710  continue;
5711  }
5712  name = first_kw_arg;
5713  #if PY_MAJOR_VERSION < 3
5714  if (likely(PyString_Check(key))) {
5715  while (*name) {
5716  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
5717  && _PyString_Eq(**name, key)) {
5718  values[name-argnames] = value;
5719  break;
5720  }
5721  name++;
5722  }
5723  if (*name) continue;
5724  else {
5725  PyObject*** argname = argnames;
5726  while (argname != first_kw_arg) {
5727  if ((**argname == key) || (
5728  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
5729  && _PyString_Eq(**argname, key))) {
5730  goto arg_passed_twice;
5731  }
5732  argname++;
5733  }
5734  }
5735  } else
5736  #endif
5737  if (likely(PyUnicode_Check(key))) {
5738  while (*name) {
5739  int cmp = (**name == key) ? 0 :
5740  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
5741  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
5742  #endif
5743  PyUnicode_Compare(**name, key);
5744  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
5745  if (cmp == 0) {
5746  values[name-argnames] = value;
5747  break;
5748  }
5749  name++;
5750  }
5751  if (*name) continue;
5752  else {
5753  PyObject*** argname = argnames;
5754  while (argname != first_kw_arg) {
5755  int cmp = (**argname == key) ? 0 :
5756  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
5757  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
5758  #endif
5759  PyUnicode_Compare(**argname, key);
5760  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
5761  if (cmp == 0) goto arg_passed_twice;
5762  argname++;
5763  }
5764  }
5765  } else
5766  goto invalid_keyword_type;
5767  if (kwds2) {
5768  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
5769  } else {
5770  goto invalid_keyword;
5771  }
5772  }
5773  return 0;
5774 arg_passed_twice:
5775  __Pyx_RaiseDoubleKeywordsError(function_name, key);
5776  goto bad;
5777 invalid_keyword_type:
5778  PyErr_Format(PyExc_TypeError,
5779  "%.200s() keywords must be strings", function_name);
5780  goto bad;
5781 invalid_keyword:
5782  PyErr_Format(PyExc_TypeError,
5783  #if PY_MAJOR_VERSION < 3
5784  "%.200s() got an unexpected keyword argument '%.200s'",
5785  function_name, PyString_AsString(key));
5786  #else
5787  "%s() got an unexpected keyword argument '%U'",
5788  function_name, key);
5789  #endif
5790 bad:
5791  return -1;
5792 }
5793 
5794 /* ArgTypeTest */
5795 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
5796 {
5797  if (unlikely(!type)) {
5798  PyErr_SetString(PyExc_SystemError, "Missing type object");
5799  return 0;
5800  }
5801  else if (exact) {
5802  #if PY_MAJOR_VERSION == 2
5803  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
5804  #endif
5805  }
5806  else {
5807  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
5808  }
5809  PyErr_Format(PyExc_TypeError,
5810  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
5811  name, type->tp_name, Py_TYPE(obj)->tp_name);
5812  return 0;
5813 }
5814 
5815 /* PyObjectGetAttrStr */
5816 #if CYTHON_USE_TYPE_SLOTS
5817 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
5818  PyTypeObject* tp = Py_TYPE(obj);
5819  if (likely(tp->tp_getattro))
5820  return tp->tp_getattro(obj, attr_name);
5821 #if PY_MAJOR_VERSION < 3
5822  if (likely(tp->tp_getattr))
5823  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
5824 #endif
5825  return PyObject_GetAttr(obj, attr_name);
5826 }
5827 #endif
5828 
5829 /* GetBuiltinName */
5830 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
5831  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
5832  if (unlikely(!result)) {
5833  PyErr_Format(PyExc_NameError,
5834 #if PY_MAJOR_VERSION >= 3
5835  "name '%U' is not defined", name);
5836 #else
5837  "name '%.200s' is not defined", PyString_AS_STRING(name));
5838 #endif
5839  }
5840  return result;
5841 }
5842 
5843 /* GetTopmostException */
5844 #if CYTHON_USE_EXC_INFO_STACK
5845 static _PyErr_StackItem *
5846 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
5847 {
5848  _PyErr_StackItem *exc_info = tstate->exc_info;
5849  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
5850  exc_info->previous_item != NULL)
5851  {
5852  exc_info = exc_info->previous_item;
5853  }
5854  return exc_info;
5855 }
5856 #endif
5857 
5858 /* SaveResetException */
5859 #if CYTHON_FAST_THREAD_STATE
5860 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
5861  #if CYTHON_USE_EXC_INFO_STACK
5862  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
5863  *type = exc_info->exc_type;
5864  *value = exc_info->exc_value;
5865  *tb = exc_info->exc_traceback;
5866  #else
5867  *type = tstate->exc_type;
5868  *value = tstate->exc_value;
5869  *tb = tstate->exc_traceback;
5870  #endif
5871  Py_XINCREF(*type);
5872  Py_XINCREF(*value);
5873  Py_XINCREF(*tb);
5874 }
5875 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
5876  PyObject *tmp_type, *tmp_value, *tmp_tb;
5877  #if CYTHON_USE_EXC_INFO_STACK
5878  _PyErr_StackItem *exc_info = tstate->exc_info;
5879  tmp_type = exc_info->exc_type;
5880  tmp_value = exc_info->exc_value;
5881  tmp_tb = exc_info->exc_traceback;
5882  exc_info->exc_type = type;
5883  exc_info->exc_value = value;
5884  exc_info->exc_traceback = tb;
5885  #else
5886  tmp_type = tstate->exc_type;
5887  tmp_value = tstate->exc_value;
5888  tmp_tb = tstate->exc_traceback;
5889  tstate->exc_type = type;
5890  tstate->exc_value = value;
5891  tstate->exc_traceback = tb;
5892  #endif
5893  Py_XDECREF(tmp_type);
5894  Py_XDECREF(tmp_value);
5895  Py_XDECREF(tmp_tb);
5896 }
5897 #endif
5898 
5899 /* PyErrExceptionMatches */
5900 #if CYTHON_FAST_THREAD_STATE
5901 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
5902  Py_ssize_t i, n;
5903  n = PyTuple_GET_SIZE(tuple);
5904 #if PY_MAJOR_VERSION >= 3
5905  for (i=0; i<n; i++) {
5906  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
5907  }
5908 #endif
5909  for (i=0; i<n; i++) {
5910  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
5911  }
5912  return 0;
5913 }
5914 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
5915  PyObject *exc_type = tstate->curexc_type;
5916  if (exc_type == err) return 1;
5917  if (unlikely(!exc_type)) return 0;
5918  if (unlikely(PyTuple_Check(err)))
5919  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
5920  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
5921 }
5922 #endif
5923 
5924 /* GetException */
5925 #if CYTHON_FAST_THREAD_STATE
5926 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
5927 #else
5928 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
5929 #endif
5930 {
5931  PyObject *local_type, *local_value, *local_tb;
5932 #if CYTHON_FAST_THREAD_STATE
5933  PyObject *tmp_type, *tmp_value, *tmp_tb;
5934  local_type = tstate->curexc_type;
5935  local_value = tstate->curexc_value;
5936  local_tb = tstate->curexc_traceback;
5937  tstate->curexc_type = 0;
5938  tstate->curexc_value = 0;
5939  tstate->curexc_traceback = 0;
5940 #else
5941  PyErr_Fetch(&local_type, &local_value, &local_tb);
5942 #endif
5943  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
5944 #if CYTHON_FAST_THREAD_STATE
5945  if (unlikely(tstate->curexc_type))
5946 #else
5947  if (unlikely(PyErr_Occurred()))
5948 #endif
5949  goto bad;
5950  #if PY_MAJOR_VERSION >= 3
5951  if (local_tb) {
5952  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
5953  goto bad;
5954  }
5955  #endif
5956  Py_XINCREF(local_tb);
5957  Py_XINCREF(local_type);
5958  Py_XINCREF(local_value);
5959  *type = local_type;
5960  *value = local_value;
5961  *tb = local_tb;
5962 #if CYTHON_FAST_THREAD_STATE
5963  #if CYTHON_USE_EXC_INFO_STACK
5964  {
5965  _PyErr_StackItem *exc_info = tstate->exc_info;
5966  tmp_type = exc_info->exc_type;
5967  tmp_value = exc_info->exc_value;
5968  tmp_tb = exc_info->exc_traceback;
5969  exc_info->exc_type = local_type;
5970  exc_info->exc_value = local_value;
5971  exc_info->exc_traceback = local_tb;
5972  }
5973  #else
5974  tmp_type = tstate->exc_type;
5975  tmp_value = tstate->exc_value;
5976  tmp_tb = tstate->exc_traceback;
5977  tstate->exc_type = local_type;
5978  tstate->exc_value = local_value;
5979  tstate->exc_traceback = local_tb;
5980  #endif
5981  Py_XDECREF(tmp_type);
5982  Py_XDECREF(tmp_value);
5983  Py_XDECREF(tmp_tb);
5984 #else
5985  PyErr_SetExcInfo(local_type, local_value, local_tb);
5986 #endif
5987  return 0;
5988 bad:
5989  *type = 0;
5990  *value = 0;
5991  *tb = 0;
5992  Py_XDECREF(local_type);
5993  Py_XDECREF(local_value);
5994  Py_XDECREF(local_tb);
5995  return -1;
5996 }
5997 
5998 /* PyObjectCall */
5999 #if CYTHON_COMPILING_IN_CPYTHON
6000 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
6001  PyObject *result;
6002  ternaryfunc call = Py_TYPE(func)->tp_call;
6003  if (unlikely(!call))
6004  return PyObject_Call(func, arg, kw);
6005  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
6006  return NULL;
6007  result = (*call)(func, arg, kw);
6008  Py_LeaveRecursiveCall();
6009  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
6010  PyErr_SetString(
6011  PyExc_SystemError,
6012  "NULL result without error in PyObject_Call");
6013  }
6014  return result;
6015 }
6016 #endif
6017 
6018 /* PyErrFetchRestore */
6019 #if CYTHON_FAST_THREAD_STATE
6020 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
6021  PyObject *tmp_type, *tmp_value, *tmp_tb;
6022  tmp_type = tstate->curexc_type;
6023  tmp_value = tstate->curexc_value;
6024  tmp_tb = tstate->curexc_traceback;
6025  tstate->curexc_type = type;
6026  tstate->curexc_value = value;
6027  tstate->curexc_traceback = tb;
6028  Py_XDECREF(tmp_type);
6029  Py_XDECREF(tmp_value);
6030  Py_XDECREF(tmp_tb);
6031 }
6032 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
6033  *type = tstate->curexc_type;
6034  *value = tstate->curexc_value;
6035  *tb = tstate->curexc_traceback;
6036  tstate->curexc_type = 0;
6037  tstate->curexc_value = 0;
6038  tstate->curexc_traceback = 0;
6039 }
6040 #endif
6041 
6042 /* RaiseException */
6043 #if PY_MAJOR_VERSION < 3
6044 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
6045  CYTHON_UNUSED PyObject *cause) {
6046  __Pyx_PyThreadState_declare
6047  Py_XINCREF(type);
6048  if (!value || value == Py_None)
6049  value = NULL;
6050  else
6051  Py_INCREF(value);
6052  if (!tb || tb == Py_None)
6053  tb = NULL;
6054  else {
6055  Py_INCREF(tb);
6056  if (!PyTraceBack_Check(tb)) {
6057  PyErr_SetString(PyExc_TypeError,
6058  "raise: arg 3 must be a traceback or None");
6059  goto raise_error;
6060  }
6061  }
6062  if (PyType_Check(type)) {
6063 #if CYTHON_COMPILING_IN_PYPY
6064  if (!value) {
6065  Py_INCREF(Py_None);
6066  value = Py_None;
6067  }
6068 #endif
6069  PyErr_NormalizeException(&type, &value, &tb);
6070  } else {
6071  if (value) {
6072  PyErr_SetString(PyExc_TypeError,
6073  "instance exception may not have a separate value");
6074  goto raise_error;
6075  }
6076  value = type;
6077  type = (PyObject*) Py_TYPE(type);
6078  Py_INCREF(type);
6079  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
6080  PyErr_SetString(PyExc_TypeError,
6081  "raise: exception class must be a subclass of BaseException");
6082  goto raise_error;
6083  }
6084  }
6085  __Pyx_PyThreadState_assign
6086  __Pyx_ErrRestore(type, value, tb);
6087  return;
6088 raise_error:
6089  Py_XDECREF(value);
6090  Py_XDECREF(type);
6091  Py_XDECREF(tb);
6092  return;
6093 }
6094 #else
6095 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
6096  PyObject* owned_instance = NULL;
6097  if (tb == Py_None) {
6098  tb = 0;
6099  } else if (tb && !PyTraceBack_Check(tb)) {
6100  PyErr_SetString(PyExc_TypeError,
6101  "raise: arg 3 must be a traceback or None");
6102  goto bad;
6103  }
6104  if (value == Py_None)
6105  value = 0;
6106  if (PyExceptionInstance_Check(type)) {
6107  if (value) {
6108  PyErr_SetString(PyExc_TypeError,
6109  "instance exception may not have a separate value");
6110  goto bad;
6111  }
6112  value = type;
6113  type = (PyObject*) Py_TYPE(value);
6114  } else if (PyExceptionClass_Check(type)) {
6115  PyObject *instance_class = NULL;
6116  if (value && PyExceptionInstance_Check(value)) {
6117  instance_class = (PyObject*) Py_TYPE(value);
6118  if (instance_class != type) {
6119  int is_subclass = PyObject_IsSubclass(instance_class, type);
6120  if (!is_subclass) {
6121  instance_class = NULL;
6122  } else if (unlikely(is_subclass == -1)) {
6123  goto bad;
6124  } else {
6125  type = instance_class;
6126  }
6127  }
6128  }
6129  if (!instance_class) {
6130  PyObject *args;
6131  if (!value)
6132  args = PyTuple_New(0);
6133  else if (PyTuple_Check(value)) {
6134  Py_INCREF(value);
6135  args = value;
6136  } else
6137  args = PyTuple_Pack(1, value);
6138  if (!args)
6139  goto bad;
6140  owned_instance = PyObject_Call(type, args, NULL);
6141  Py_DECREF(args);
6142  if (!owned_instance)
6143  goto bad;
6144  value = owned_instance;
6145  if (!PyExceptionInstance_Check(value)) {
6146  PyErr_Format(PyExc_TypeError,
6147  "calling %R should have returned an instance of "
6148  "BaseException, not %R",
6149  type, Py_TYPE(value));
6150  goto bad;
6151  }
6152  }
6153  } else {
6154  PyErr_SetString(PyExc_TypeError,
6155  "raise: exception class must be a subclass of BaseException");
6156  goto bad;
6157  }
6158  if (cause) {
6159  PyObject *fixed_cause;
6160  if (cause == Py_None) {
6161  fixed_cause = NULL;
6162  } else if (PyExceptionClass_Check(cause)) {
6163  fixed_cause = PyObject_CallObject(cause, NULL);
6164  if (fixed_cause == NULL)
6165  goto bad;
6166  } else if (PyExceptionInstance_Check(cause)) {
6167  fixed_cause = cause;
6168  Py_INCREF(fixed_cause);
6169  } else {
6170  PyErr_SetString(PyExc_TypeError,
6171  "exception causes must derive from "
6172  "BaseException");
6173  goto bad;
6174  }
6175  PyException_SetCause(value, fixed_cause);
6176  }
6177  PyErr_SetObject(type, value);
6178  if (tb) {
6179 #if CYTHON_COMPILING_IN_PYPY
6180  PyObject *tmp_type, *tmp_value, *tmp_tb;
6181  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
6182  Py_INCREF(tb);
6183  PyErr_Restore(tmp_type, tmp_value, tb);
6184  Py_XDECREF(tmp_tb);
6185 #else
6186  PyThreadState *tstate = __Pyx_PyThreadState_Current;
6187  PyObject* tmp_tb = tstate->curexc_traceback;
6188  if (tb != tmp_tb) {
6189  Py_INCREF(tb);
6190  tstate->curexc_traceback = tb;
6191  Py_XDECREF(tmp_tb);
6192  }
6193 #endif
6194  }
6195 bad:
6196  Py_XDECREF(owned_instance);
6197  return;
6198 }
6199 #endif
6200 
6201 /* TypeImport */
6202 #ifndef __PYX_HAVE_RT_ImportType
6203 #define __PYX_HAVE_RT_ImportType
6204 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
6205  size_t size, enum __Pyx_ImportType_CheckSize check_size)
6206 {
6207  PyObject *result = 0;
6208  char warning[200];
6209  Py_ssize_t basicsize;
6210 #ifdef Py_LIMITED_API
6211  PyObject *py_basicsize;
6212 #endif
6213  result = PyObject_GetAttrString(module, class_name);
6214  if (!result)
6215  goto bad;
6216  if (!PyType_Check(result)) {
6217  PyErr_Format(PyExc_TypeError,
6218  "%.200s.%.200s is not a type object",
6219  module_name, class_name);
6220  goto bad;
6221  }
6222 #ifndef Py_LIMITED_API
6223  basicsize = ((PyTypeObject *)result)->tp_basicsize;
6224 #else
6225  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
6226  if (!py_basicsize)
6227  goto bad;
6228  basicsize = PyLong_AsSsize_t(py_basicsize);
6229  Py_DECREF(py_basicsize);
6230  py_basicsize = 0;
6231  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
6232  goto bad;
6233 #endif
6234  if ((size_t)basicsize < size) {
6235  PyErr_Format(PyExc_ValueError,
6236  "%.200s.%.200s size changed, may indicate binary incompatibility. "
6237  "Expected %zd from C header, got %zd from PyObject",
6238  module_name, class_name, size, basicsize);
6239  goto bad;
6240  }
6241  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
6242  PyErr_Format(PyExc_ValueError,
6243  "%.200s.%.200s size changed, may indicate binary incompatibility. "
6244  "Expected %zd from C header, got %zd from PyObject",
6245  module_name, class_name, size, basicsize);
6246  goto bad;
6247  }
6248  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
6249  PyOS_snprintf(warning, sizeof(warning),
6250  "%s.%s size changed, may indicate binary incompatibility. "
6251  "Expected %zd from C header, got %zd from PyObject",
6252  module_name, class_name, size, basicsize);
6253  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
6254  }
6255  return (PyTypeObject *)result;
6256 bad:
6257  Py_XDECREF(result);
6258  return NULL;
6259 }
6260 #endif
6261 
6262 /* Import */
6263 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
6264  PyObject *empty_list = 0;
6265  PyObject *module = 0;
6266  PyObject *global_dict = 0;
6267  PyObject *empty_dict = 0;
6268  PyObject *list;
6269  #if PY_MAJOR_VERSION < 3
6270  PyObject *py_import;
6271  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
6272  if (!py_import)
6273  goto bad;
6274  #endif
6275  if (from_list)
6276  list = from_list;
6277  else {
6278  empty_list = PyList_New(0);
6279  if (!empty_list)
6280  goto bad;
6281  list = empty_list;
6282  }
6283  global_dict = PyModule_GetDict(__pyx_m);
6284  if (!global_dict)
6285  goto bad;
6286  empty_dict = PyDict_New();
6287  if (!empty_dict)
6288  goto bad;
6289  {
6290  #if PY_MAJOR_VERSION >= 3
6291  if (level == -1) {
6292  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
6293  module = PyImport_ImportModuleLevelObject(
6294  name, global_dict, empty_dict, list, 1);
6295  if (!module) {
6296  if (!PyErr_ExceptionMatches(PyExc_ImportError))
6297  goto bad;
6298  PyErr_Clear();
6299  }
6300  }
6301  level = 0;
6302  }
6303  #endif
6304  if (!module) {
6305  #if PY_MAJOR_VERSION < 3
6306  PyObject *py_level = PyInt_FromLong(level);
6307  if (!py_level)
6308  goto bad;
6309  module = PyObject_CallFunctionObjArgs(py_import,
6310  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
6311  Py_DECREF(py_level);
6312  #else
6313  module = PyImport_ImportModuleLevelObject(
6314  name, global_dict, empty_dict, list, level);
6315  #endif
6316  }
6317  }
6318 bad:
6319  #if PY_MAJOR_VERSION < 3
6320  Py_XDECREF(py_import);
6321  #endif
6322  Py_XDECREF(empty_list);
6323  Py_XDECREF(empty_dict);
6324  return module;
6325 }
6326 
6327 /* PyDictVersioning */
6328 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
6329 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
6330  PyObject *dict = Py_TYPE(obj)->tp_dict;
6331  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
6332 }
6333 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
6334  PyObject **dictptr = NULL;
6335  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
6336  if (offset) {
6337 #if CYTHON_COMPILING_IN_CPYTHON
6338  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
6339 #else
6340  dictptr = _PyObject_GetDictPtr(obj);
6341 #endif
6342  }
6343  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
6344 }
6345 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
6346  PyObject *dict = Py_TYPE(obj)->tp_dict;
6347  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
6348  return 0;
6349  return obj_dict_version == __Pyx_get_object_dict_version(obj);
6350 }
6351 #endif
6352 
6353 /* CLineInTraceback */
6354 #ifndef CYTHON_CLINE_IN_TRACEBACK
6355 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
6356  PyObject *use_cline;
6357  PyObject *ptype, *pvalue, *ptraceback;
6358 #if CYTHON_COMPILING_IN_CPYTHON
6359  PyObject **cython_runtime_dict;
6360 #endif
6361  if (unlikely(!__pyx_cython_runtime)) {
6362  return c_line;
6363  }
6364  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
6365 #if CYTHON_COMPILING_IN_CPYTHON
6366  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
6367  if (likely(cython_runtime_dict)) {
6368  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
6369  use_cline, *cython_runtime_dict,
6370  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
6371  } else
6372 #endif
6373  {
6374  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
6375  if (use_cline_obj) {
6376  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
6377  Py_DECREF(use_cline_obj);
6378  } else {
6379  PyErr_Clear();
6380  use_cline = NULL;
6381  }
6382  }
6383  if (!use_cline) {
6384  c_line = 0;
6385  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
6386  }
6387  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
6388  c_line = 0;
6389  }
6390  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
6391  return c_line;
6392 }
6393 #endif
6394 
6395 /* CodeObjectCache */
6396 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
6397  int start = 0, mid = 0, end = count - 1;
6398  if (end >= 0 && code_line > entries[end].code_line) {
6399  return count;
6400  }
6401  while (start < end) {
6402  mid = start + (end - start) / 2;
6403  if (code_line < entries[mid].code_line) {
6404  end = mid;
6405  } else if (code_line > entries[mid].code_line) {
6406  start = mid + 1;
6407  } else {
6408  return mid;
6409  }
6410  }
6411  if (code_line <= entries[mid].code_line) {
6412  return mid;
6413  } else {
6414  return mid + 1;
6415  }
6416 }
6417 static PyCodeObject *__pyx_find_code_object(int code_line) {
6418  PyCodeObject* code_object;
6419  int pos;
6420  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
6421  return NULL;
6422  }
6423  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
6424  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
6425  return NULL;
6426  }
6427  code_object = __pyx_code_cache.entries[pos].code_object;
6428  Py_INCREF(code_object);
6429  return code_object;
6430 }
6431 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
6432  int pos, i;
6433  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
6434  if (unlikely(!code_line)) {
6435  return;
6436  }
6437  if (unlikely(!entries)) {
6438  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
6439  if (likely(entries)) {
6440  __pyx_code_cache.entries = entries;
6441  __pyx_code_cache.max_count = 64;
6442  __pyx_code_cache.count = 1;
6443  entries[0].code_line = code_line;
6444  entries[0].code_object = code_object;
6445  Py_INCREF(code_object);
6446  }
6447  return;
6448  }
6449  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
6450  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
6451  PyCodeObject* tmp = entries[pos].code_object;
6452  entries[pos].code_object = code_object;
6453  Py_DECREF(tmp);
6454  return;
6455  }
6456  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
6457  int new_max = __pyx_code_cache.max_count + 64;
6458  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
6459  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
6460  if (unlikely(!entries)) {
6461  return;
6462  }
6463  __pyx_code_cache.entries = entries;
6464  __pyx_code_cache.max_count = new_max;
6465  }
6466  for (i=__pyx_code_cache.count; i>pos; i--) {
6467  entries[i] = entries[i-1];
6468  }
6469  entries[pos].code_line = code_line;
6470  entries[pos].code_object = code_object;
6471  __pyx_code_cache.count++;
6472  Py_INCREF(code_object);
6473 }
6474 
6475 /* AddTraceback */
6476 #include "compile.h"
6477 #include "frameobject.h"
6478 #include "traceback.h"
6479 #if PY_VERSION_HEX >= 0x030b00a6
6480  #ifndef Py_BUILD_CORE
6481  #define Py_BUILD_CORE 1
6482  #endif
6483  #include "internal/pycore_frame.h"
6484 #endif
6485 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
6486  const char *funcname, int c_line,
6487  int py_line, const char *filename) {
6488  PyCodeObject *py_code = NULL;
6489  PyObject *py_funcname = NULL;
6490  #if PY_MAJOR_VERSION < 3
6491  PyObject *py_srcfile = NULL;
6492  py_srcfile = PyString_FromString(filename);
6493  if (!py_srcfile) goto bad;
6494  #endif
6495  if (c_line) {
6496  #if PY_MAJOR_VERSION < 3
6497  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
6498  if (!py_funcname) goto bad;
6499  #else
6500  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
6501  if (!py_funcname) goto bad;
6502  funcname = PyUnicode_AsUTF8(py_funcname);
6503  if (!funcname) goto bad;
6504  #endif
6505  }
6506  else {
6507  #if PY_MAJOR_VERSION < 3
6508  py_funcname = PyString_FromString(funcname);
6509  if (!py_funcname) goto bad;
6510  #endif
6511  }
6512  #if PY_MAJOR_VERSION < 3
6513  py_code = __Pyx_PyCode_New(
6514  0,
6515  0,
6516  0,
6517  0,
6518  0,
6519  __pyx_empty_bytes, /*PyObject *code,*/
6520  __pyx_empty_tuple, /*PyObject *consts,*/
6521  __pyx_empty_tuple, /*PyObject *names,*/
6522  __pyx_empty_tuple, /*PyObject *varnames,*/
6523  __pyx_empty_tuple, /*PyObject *freevars,*/
6524  __pyx_empty_tuple, /*PyObject *cellvars,*/
6525  py_srcfile, /*PyObject *filename,*/
6526  py_funcname, /*PyObject *name,*/
6527  py_line,
6528  __pyx_empty_bytes /*PyObject *lnotab*/
6529  );
6530  Py_DECREF(py_srcfile);
6531  #else
6532  py_code = PyCode_NewEmpty(filename, funcname, py_line);
6533  #endif
6534  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
6535  return py_code;
6536 bad:
6537  Py_XDECREF(py_funcname);
6538  #if PY_MAJOR_VERSION < 3
6539  Py_XDECREF(py_srcfile);
6540  #endif
6541  return NULL;
6542 }
6543 static void __Pyx_AddTraceback(const char *funcname, int c_line,
6544  int py_line, const char *filename) {
6545  PyCodeObject *py_code = 0;
6546  PyFrameObject *py_frame = 0;
6547  PyThreadState *tstate = __Pyx_PyThreadState_Current;
6548  PyObject *ptype, *pvalue, *ptraceback;
6549  if (c_line) {
6550  c_line = __Pyx_CLineForTraceback(tstate, c_line);
6551  }
6552  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
6553  if (!py_code) {
6554  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
6555  py_code = __Pyx_CreateCodeObjectForTraceback(
6556  funcname, c_line, py_line, filename);
6557  if (!py_code) {
6558  /* If the code object creation fails, then we should clear the
6559  fetched exception references and propagate the new exception */
6560  Py_XDECREF(ptype);
6561  Py_XDECREF(pvalue);
6562  Py_XDECREF(ptraceback);
6563  goto bad;
6564  }
6565  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
6566  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
6567  }
6568  py_frame = PyFrame_New(
6569  tstate, /*PyThreadState *tstate,*/
6570  py_code, /*PyCodeObject *code,*/
6571  __pyx_d, /*PyObject *globals,*/
6572  0 /*PyObject *locals*/
6573  );
6574  if (!py_frame) goto bad;
6575  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
6576  PyTraceBack_Here(py_frame);
6577 bad:
6578  Py_XDECREF(py_code);
6579  Py_XDECREF(py_frame);
6580 }
6581 
6582 /* CIntFromPyVerify */
6583 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
6584  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
6585 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
6586  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
6587 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
6588  {\
6589  func_type value = func_value;\
6590  if (sizeof(target_type) < sizeof(func_type)) {\
6591  if (unlikely(value != (func_type) (target_type) value)) {\
6592  func_type zero = 0;\
6593  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
6594  return (target_type) -1;\
6595  if (is_unsigned && unlikely(value < zero))\
6596  goto raise_neg_overflow;\
6597  else\
6598  goto raise_overflow;\
6599  }\
6600  }\
6601  return (target_type) value;\
6602  }
6603 
6604 /* Declarations */
6605 #if CYTHON_CCOMPLEX
6606  #ifdef __cplusplus
6607  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
6608  return ::std::complex< float >(x, y);
6609  }
6610  #else
6611  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
6612  return x + y*(__pyx_t_float_complex)_Complex_I;
6613  }
6614  #endif
6615 #else
6616  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
6617  __pyx_t_float_complex z;
6618  z.real = x;
6619  z.imag = y;
6620  return z;
6621  }
6622 #endif
6623 
6624 /* Arithmetic */
6625 #if CYTHON_CCOMPLEX
6626 #else
6627  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6628  return (a.real == b.real) && (a.imag == b.imag);
6629  }
6630  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6631  __pyx_t_float_complex z;
6632  z.real = a.real + b.real;
6633  z.imag = a.imag + b.imag;
6634  return z;
6635  }
6636  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6637  __pyx_t_float_complex z;
6638  z.real = a.real - b.real;
6639  z.imag = a.imag - b.imag;
6640  return z;
6641  }
6642  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6643  __pyx_t_float_complex z;
6644  z.real = a.real * b.real - a.imag * b.imag;
6645  z.imag = a.real * b.imag + a.imag * b.real;
6646  return z;
6647  }
6648  #if 1
6649  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6650  if (b.imag == 0) {
6651  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
6652  } else if (fabsf(b.real) >= fabsf(b.imag)) {
6653  if (b.real == 0 && b.imag == 0) {
6654  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
6655  } else {
6656  float r = b.imag / b.real;
6657  float s = (float)(1.0) / (b.real + b.imag * r);
6658  return __pyx_t_float_complex_from_parts(
6659  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
6660  }
6661  } else {
6662  float r = b.real / b.imag;
6663  float s = (float)(1.0) / (b.imag + b.real * r);
6664  return __pyx_t_float_complex_from_parts(
6665  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
6666  }
6667  }
6668  #else
6669  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6670  if (b.imag == 0) {
6671  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
6672  } else {
6673  float denom = b.real * b.real + b.imag * b.imag;
6674  return __pyx_t_float_complex_from_parts(
6675  (a.real * b.real + a.imag * b.imag) / denom,
6676  (a.imag * b.real - a.real * b.imag) / denom);
6677  }
6678  }
6679  #endif
6680  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
6681  __pyx_t_float_complex z;
6682  z.real = -a.real;
6683  z.imag = -a.imag;
6684  return z;
6685  }
6686  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
6687  return (a.real == 0) && (a.imag == 0);
6688  }
6689  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
6690  __pyx_t_float_complex z;
6691  z.real = a.real;
6692  z.imag = -a.imag;
6693  return z;
6694  }
6695  #if 1
6696  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
6697  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
6698  return sqrtf(z.real*z.real + z.imag*z.imag);
6699  #else
6700  return hypotf(z.real, z.imag);
6701  #endif
6702  }
6703  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
6704  __pyx_t_float_complex z;
6705  float r, lnr, theta, z_r, z_theta;
6706  if (b.imag == 0 && b.real == (int)b.real) {
6707  if (b.real < 0) {
6708  float denom = a.real * a.real + a.imag * a.imag;
6709  a.real = a.real / denom;
6710  a.imag = -a.imag / denom;
6711  b.real = -b.real;
6712  }
6713  switch ((int)b.real) {
6714  case 0:
6715  z.real = 1;
6716  z.imag = 0;
6717  return z;
6718  case 1:
6719  return a;
6720  case 2:
6721  return __Pyx_c_prod_float(a, a);
6722  case 3:
6723  z = __Pyx_c_prod_float(a, a);
6724  return __Pyx_c_prod_float(z, a);
6725  case 4:
6726  z = __Pyx_c_prod_float(a, a);
6727  return __Pyx_c_prod_float(z, z);
6728  }
6729  }
6730  if (a.imag == 0) {
6731  if (a.real == 0) {
6732  return a;
6733  } else if (b.imag == 0) {
6734  z.real = powf(a.real, b.real);
6735  z.imag = 0;
6736  return z;
6737  } else if (a.real > 0) {
6738  r = a.real;
6739  theta = 0;
6740  } else {
6741  r = -a.real;
6742  theta = atan2f(0.0, -1.0);
6743  }
6744  } else {
6745  r = __Pyx_c_abs_float(a);
6746  theta = atan2f(a.imag, a.real);
6747  }
6748  lnr = logf(r);
6749  z_r = expf(lnr * b.real - theta * b.imag);
6750  z_theta = theta * b.real + lnr * b.imag;
6751  z.real = z_r * cosf(z_theta);
6752  z.imag = z_r * sinf(z_theta);
6753  return z;
6754  }
6755  #endif
6756 #endif
6757 
6758 /* Declarations */
6759 #if CYTHON_CCOMPLEX
6760  #ifdef __cplusplus
6761  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
6762  return ::std::complex< double >(x, y);
6763  }
6764  #else
6765  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
6766  return x + y*(__pyx_t_double_complex)_Complex_I;
6767  }
6768  #endif
6769 #else
6770  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
6771  __pyx_t_double_complex z;
6772  z.real = x;
6773  z.imag = y;
6774  return z;
6775  }
6776 #endif
6777 
6778 /* Arithmetic */
6779 #if CYTHON_CCOMPLEX
6780 #else
6781  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6782  return (a.real == b.real) && (a.imag == b.imag);
6783  }
6784  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6785  __pyx_t_double_complex z;
6786  z.real = a.real + b.real;
6787  z.imag = a.imag + b.imag;
6788  return z;
6789  }
6790  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6791  __pyx_t_double_complex z;
6792  z.real = a.real - b.real;
6793  z.imag = a.imag - b.imag;
6794  return z;
6795  }
6796  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6797  __pyx_t_double_complex z;
6798  z.real = a.real * b.real - a.imag * b.imag;
6799  z.imag = a.real * b.imag + a.imag * b.real;
6800  return z;
6801  }
6802  #if 1
6803  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6804  if (b.imag == 0) {
6805  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
6806  } else if (fabs(b.real) >= fabs(b.imag)) {
6807  if (b.real == 0 && b.imag == 0) {
6808  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
6809  } else {
6810  double r = b.imag / b.real;
6811  double s = (double)(1.0) / (b.real + b.imag * r);
6812  return __pyx_t_double_complex_from_parts(
6813  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
6814  }
6815  } else {
6816  double r = b.real / b.imag;
6817  double s = (double)(1.0) / (b.imag + b.real * r);
6818  return __pyx_t_double_complex_from_parts(
6819  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
6820  }
6821  }
6822  #else
6823  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6824  if (b.imag == 0) {
6825  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
6826  } else {
6827  double denom = b.real * b.real + b.imag * b.imag;
6828  return __pyx_t_double_complex_from_parts(
6829  (a.real * b.real + a.imag * b.imag) / denom,
6830  (a.imag * b.real - a.real * b.imag) / denom);
6831  }
6832  }
6833  #endif
6834  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
6835  __pyx_t_double_complex z;
6836  z.real = -a.real;
6837  z.imag = -a.imag;
6838  return z;
6839  }
6840  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
6841  return (a.real == 0) && (a.imag == 0);
6842  }
6843  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
6844  __pyx_t_double_complex z;
6845  z.real = a.real;
6846  z.imag = -a.imag;
6847  return z;
6848  }
6849  #if 1
6850  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
6851  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
6852  return sqrt(z.real*z.real + z.imag*z.imag);
6853  #else
6854  return hypot(z.real, z.imag);
6855  #endif
6856  }
6857  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
6858  __pyx_t_double_complex z;
6859  double r, lnr, theta, z_r, z_theta;
6860  if (b.imag == 0 && b.real == (int)b.real) {
6861  if (b.real < 0) {
6862  double denom = a.real * a.real + a.imag * a.imag;
6863  a.real = a.real / denom;
6864  a.imag = -a.imag / denom;
6865  b.real = -b.real;
6866  }
6867  switch ((int)b.real) {
6868  case 0:
6869  z.real = 1;
6870  z.imag = 0;
6871  return z;
6872  case 1:
6873  return a;
6874  case 2:
6875  return __Pyx_c_prod_double(a, a);
6876  case 3:
6877  z = __Pyx_c_prod_double(a, a);
6878  return __Pyx_c_prod_double(z, a);
6879  case 4:
6880  z = __Pyx_c_prod_double(a, a);
6881  return __Pyx_c_prod_double(z, z);
6882  }
6883  }
6884  if (a.imag == 0) {
6885  if (a.real == 0) {
6886  return a;
6887  } else if (b.imag == 0) {
6888  z.real = pow(a.real, b.real);
6889  z.imag = 0;
6890  return z;
6891  } else if (a.real > 0) {
6892  r = a.real;
6893  theta = 0;
6894  } else {
6895  r = -a.real;
6896  theta = atan2(0.0, -1.0);
6897  }
6898  } else {
6899  r = __Pyx_c_abs_double(a);
6900  theta = atan2(a.imag, a.real);
6901  }
6902  lnr = log(r);
6903  z_r = exp(lnr * b.real - theta * b.imag);
6904  z_theta = theta * b.real + lnr * b.imag;
6905  z.real = z_r * cos(z_theta);
6906  z.imag = z_r * sin(z_theta);
6907  return z;
6908  }
6909  #endif
6910 #endif
6911 
6912 /* CIntFromPy */
6913 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
6914 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
6915 #pragma GCC diagnostic push
6916 #pragma GCC diagnostic ignored "-Wconversion"
6917 #endif
6918  const int neg_one = (int) -1, const_zero = (int) 0;
6919 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
6920 #pragma GCC diagnostic pop
6921 #endif
6922  const int is_unsigned = neg_one > const_zero;
6923 #if PY_MAJOR_VERSION < 3
6924  if (likely(PyInt_Check(x))) {
6925  if (sizeof(int) < sizeof(long)) {
6926  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
6927  } else {
6928  long val = PyInt_AS_LONG(x);
6929  if (is_unsigned && unlikely(val < 0)) {
6930  goto raise_neg_overflow;
6931  }
6932  return (int) val;
6933  }
6934  } else
6935 #endif
6936  if (likely(PyLong_Check(x))) {
6937  if (is_unsigned) {
6938 #if CYTHON_USE_PYLONG_INTERNALS
6939  const digit* digits = ((PyLongObject*)x)->ob_digit;
6940  switch (Py_SIZE(x)) {
6941  case 0: return (int) 0;
6942  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
6943  case 2:
6944  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
6945  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
6946  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
6947  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
6948  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
6949  }
6950  }
6951  break;
6952  case 3:
6953  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
6954  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
6955  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
6956  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
6957  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
6958  }
6959  }
6960  break;
6961  case 4:
6962  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
6963  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
6964  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
6965  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
6966  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
6967  }
6968  }
6969  break;
6970  }
6971 #endif
6972 #if CYTHON_COMPILING_IN_CPYTHON
6973  if (unlikely(Py_SIZE(x) < 0)) {
6974  goto raise_neg_overflow;
6975  }
6976 #else
6977  {
6978  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
6979  if (unlikely(result < 0))
6980  return (int) -1;
6981  if (unlikely(result == 1))
6982  goto raise_neg_overflow;
6983  }
6984 #endif
6985  if (sizeof(int) <= sizeof(unsigned long)) {
6986  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
6987 #ifdef HAVE_LONG_LONG
6988  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
6989  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
6990 #endif
6991  }
6992  } else {
6993 #if CYTHON_USE_PYLONG_INTERNALS
6994  const digit* digits = ((PyLongObject*)x)->ob_digit;
6995  switch (Py_SIZE(x)) {
6996  case 0: return (int) 0;
6997  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
6998  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
6999  case -2:
7000  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
7001  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
7002  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7003  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
7004  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
7005  }
7006  }
7007  break;
7008  case 2:
7009  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
7010  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
7011  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7012  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
7013  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
7014  }
7015  }
7016  break;
7017  case -3:
7018  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
7019  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
7020  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7021  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
7022  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
7023  }
7024  }
7025  break;
7026  case 3:
7027  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
7028  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
7029  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7030  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
7031  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
7032  }
7033  }
7034  break;
7035  case -4:
7036  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
7037  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
7038  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7039  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
7040  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
7041  }
7042  }
7043  break;
7044  case 4:
7045  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
7046  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
7047  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7048  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
7049  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
7050  }
7051  }
7052  break;
7053  }
7054 #endif
7055  if (sizeof(int) <= sizeof(long)) {
7056  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
7057 #ifdef HAVE_LONG_LONG
7058  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
7059  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
7060 #endif
7061  }
7062  }
7063  {
7064 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
7065  PyErr_SetString(PyExc_RuntimeError,
7066  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
7067 #else
7068  int val;
7069  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
7070  #if PY_MAJOR_VERSION < 3
7071  if (likely(v) && !PyLong_Check(v)) {
7072  PyObject *tmp = v;
7073  v = PyNumber_Long(tmp);
7074  Py_DECREF(tmp);
7075  }
7076  #endif
7077  if (likely(v)) {
7078  int one = 1; int is_little = (int)*(unsigned char *)&one;
7079  unsigned char *bytes = (unsigned char *)&val;
7080  int ret = _PyLong_AsByteArray((PyLongObject *)v,
7081  bytes, sizeof(val),
7082  is_little, !is_unsigned);
7083  Py_DECREF(v);
7084  if (likely(!ret))
7085  return val;
7086  }
7087 #endif
7088  return (int) -1;
7089  }
7090  } else {
7091  int val;
7092  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
7093  if (!tmp) return (int) -1;
7094  val = __Pyx_PyInt_As_int(tmp);
7095  Py_DECREF(tmp);
7096  return val;
7097  }
7098 raise_overflow:
7099  PyErr_SetString(PyExc_OverflowError,
7100  "value too large to convert to int");
7101  return (int) -1;
7102 raise_neg_overflow:
7103  PyErr_SetString(PyExc_OverflowError,
7104  "can't convert negative value to int");
7105  return (int) -1;
7106 }
7107 
7108 /* CIntToPy */
7109 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
7110 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
7111 #pragma GCC diagnostic push
7112 #pragma GCC diagnostic ignored "-Wconversion"
7113 #endif
7114  const long neg_one = (long) -1, const_zero = (long) 0;
7115 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
7116 #pragma GCC diagnostic pop
7117 #endif
7118  const int is_unsigned = neg_one > const_zero;
7119  if (is_unsigned) {
7120  if (sizeof(long) < sizeof(long)) {
7121  return PyInt_FromLong((long) value);
7122  } else if (sizeof(long) <= sizeof(unsigned long)) {
7123  return PyLong_FromUnsignedLong((unsigned long) value);
7124 #ifdef HAVE_LONG_LONG
7125  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
7126  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
7127 #endif
7128  }
7129  } else {
7130  if (sizeof(long) <= sizeof(long)) {
7131  return PyInt_FromLong((long) value);
7132 #ifdef HAVE_LONG_LONG
7133  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
7134  return PyLong_FromLongLong((PY_LONG_LONG) value);
7135 #endif
7136  }
7137  }
7138  {
7139  int one = 1; int little = (int)*(unsigned char *)&one;
7140  unsigned char *bytes = (unsigned char *)&value;
7141  return _PyLong_FromByteArray(bytes, sizeof(long),
7142  little, !is_unsigned);
7143  }
7144 }
7145 
7146 /* CIntFromPy */
7147 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
7148 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
7149 #pragma GCC diagnostic push
7150 #pragma GCC diagnostic ignored "-Wconversion"
7151 #endif
7152  const long neg_one = (long) -1, const_zero = (long) 0;
7153 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
7154 #pragma GCC diagnostic pop
7155 #endif
7156  const int is_unsigned = neg_one > const_zero;
7157 #if PY_MAJOR_VERSION < 3
7158  if (likely(PyInt_Check(x))) {
7159  if (sizeof(long) < sizeof(long)) {
7160  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
7161  } else {
7162  long val = PyInt_AS_LONG(x);
7163  if (is_unsigned && unlikely(val < 0)) {
7164  goto raise_neg_overflow;
7165  }
7166  return (long) val;
7167  }
7168  } else
7169 #endif
7170  if (likely(PyLong_Check(x))) {
7171  if (is_unsigned) {
7172 #if CYTHON_USE_PYLONG_INTERNALS
7173  const digit* digits = ((PyLongObject*)x)->ob_digit;
7174  switch (Py_SIZE(x)) {
7175  case 0: return (long) 0;
7176  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
7177  case 2:
7178  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
7179  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
7180  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7181  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
7182  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
7183  }
7184  }
7185  break;
7186  case 3:
7187  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
7188  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
7189  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7190  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
7191  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
7192  }
7193  }
7194  break;
7195  case 4:
7196  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
7197  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
7198  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7199  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
7200  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
7201  }
7202  }
7203  break;
7204  }
7205 #endif
7206 #if CYTHON_COMPILING_IN_CPYTHON
7207  if (unlikely(Py_SIZE(x) < 0)) {
7208  goto raise_neg_overflow;
7209  }
7210 #else
7211  {
7212  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
7213  if (unlikely(result < 0))
7214  return (long) -1;
7215  if (unlikely(result == 1))
7216  goto raise_neg_overflow;
7217  }
7218 #endif
7219  if (sizeof(long) <= sizeof(unsigned long)) {
7220  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
7221 #ifdef HAVE_LONG_LONG
7222  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
7223  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
7224 #endif
7225  }
7226  } else {
7227 #if CYTHON_USE_PYLONG_INTERNALS
7228  const digit* digits = ((PyLongObject*)x)->ob_digit;
7229  switch (Py_SIZE(x)) {
7230  case 0: return (long) 0;
7231  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
7232  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
7233  case -2:
7234  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
7235  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
7236  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7237  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
7238  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
7239  }
7240  }
7241  break;
7242  case 2:
7243  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
7244  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
7245  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7246  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
7247  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
7248  }
7249  }
7250  break;
7251  case -3:
7252  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
7253  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
7254  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7255  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
7256  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
7257  }
7258  }
7259  break;
7260  case 3:
7261  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
7262  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
7263  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7264  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
7265  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
7266  }
7267  }
7268  break;
7269  case -4:
7270  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
7271  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
7272  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7273  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
7274  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
7275  }
7276  }
7277  break;
7278  case 4:
7279  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
7280  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
7281  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
7282  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
7283  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
7284  }
7285  }
7286  break;
7287  }
7288 #endif
7289  if (sizeof(long) <= sizeof(long)) {
7290  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
7291 #ifdef HAVE_LONG_LONG
7292  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
7293  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
7294 #endif
7295  }
7296  }
7297  {
7298 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
7299  PyErr_SetString(PyExc_RuntimeError,
7300  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
7301 #else
7302  long val;
7303  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
7304  #if PY_MAJOR_VERSION < 3
7305  if (likely(v) && !PyLong_Check(v)) {
7306  PyObject *tmp = v;
7307  v = PyNumber_Long(tmp);
7308  Py_DECREF(tmp);
7309  }
7310  #endif
7311  if (likely(v)) {
7312  int one = 1; int is_little = (int)*(unsigned char *)&one;
7313  unsigned char *bytes = (unsigned char *)&val;
7314  int ret = _PyLong_AsByteArray((PyLongObject *)v,
7315  bytes, sizeof(val),
7316  is_little, !is_unsigned);
7317  Py_DECREF(v);
7318  if (likely(!ret))
7319  return val;
7320  }
7321 #endif
7322  return (long) -1;
7323  }
7324  } else {
7325  long val;
7326  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
7327  if (!tmp) return (long) -1;
7328  val = __Pyx_PyInt_As_long(tmp);
7329  Py_DECREF(tmp);
7330  return val;
7331  }
7332 raise_overflow:
7333  PyErr_SetString(PyExc_OverflowError,
7334  "value too large to convert to long");
7335  return (long) -1;
7336 raise_neg_overflow:
7337  PyErr_SetString(PyExc_OverflowError,
7338  "can't convert negative value to long");
7339  return (long) -1;
7340 }
7341 
7342 /* FastTypeChecks */
7343 #if CYTHON_COMPILING_IN_CPYTHON
7344 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
7345  while (a) {
7346  a = a->tp_base;
7347  if (a == b)
7348  return 1;
7349  }
7350  return b == &PyBaseObject_Type;
7351 }
7352 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
7353  PyObject *mro;
7354  if (a == b) return 1;
7355  mro = a->tp_mro;
7356  if (likely(mro)) {
7357  Py_ssize_t i, n;
7358  n = PyTuple_GET_SIZE(mro);
7359  for (i = 0; i < n; i++) {
7360  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
7361  return 1;
7362  }
7363  return 0;
7364  }
7365  return __Pyx_InBases(a, b);
7366 }
7367 #if PY_MAJOR_VERSION == 2
7368 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
7369  PyObject *exception, *value, *tb;
7370  int res;
7371  __Pyx_PyThreadState_declare
7372  __Pyx_PyThreadState_assign
7373  __Pyx_ErrFetch(&exception, &value, &tb);
7374  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
7375  if (unlikely(res == -1)) {
7376  PyErr_WriteUnraisable(err);
7377  res = 0;
7378  }
7379  if (!res) {
7380  res = PyObject_IsSubclass(err, exc_type2);
7381  if (unlikely(res == -1)) {
7382  PyErr_WriteUnraisable(err);
7383  res = 0;
7384  }
7385  }
7386  __Pyx_ErrRestore(exception, value, tb);
7387  return res;
7388 }
7389 #else
7390 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
7391  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
7392  if (!res) {
7393  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
7394  }
7395  return res;
7396 }
7397 #endif
7398 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
7399  Py_ssize_t i, n;
7400  assert(PyExceptionClass_Check(exc_type));
7401  n = PyTuple_GET_SIZE(tuple);
7402 #if PY_MAJOR_VERSION >= 3
7403  for (i=0; i<n; i++) {
7404  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
7405  }
7406 #endif
7407  for (i=0; i<n; i++) {
7408  PyObject *t = PyTuple_GET_ITEM(tuple, i);
7409  #if PY_MAJOR_VERSION < 3
7410  if (likely(exc_type == t)) return 1;
7411  #endif
7412  if (likely(PyExceptionClass_Check(t))) {
7413  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
7414  } else {
7415  }
7416  }
7417  return 0;
7418 }
7419 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
7420  if (likely(err == exc_type)) return 1;
7421  if (likely(PyExceptionClass_Check(err))) {
7422  if (likely(PyExceptionClass_Check(exc_type))) {
7423  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
7424  } else if (likely(PyTuple_Check(exc_type))) {
7425  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
7426  } else {
7427  }
7428  }
7429  return PyErr_GivenExceptionMatches(err, exc_type);
7430 }
7431 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
7432  assert(PyExceptionClass_Check(exc_type1));
7433  assert(PyExceptionClass_Check(exc_type2));
7434  if (likely(err == exc_type1 || err == exc_type2)) return 1;
7435  if (likely(PyExceptionClass_Check(err))) {
7436  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
7437  }
7438  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
7439 }
7440 #endif
7441 
7442 /* CheckBinaryVersion */
7443 static int __Pyx_check_binary_version(void) {
7444  char ctversion[5];
7445  int same=1, i, found_dot;
7446  const char* rt_from_call = Py_GetVersion();
7447  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
7448  found_dot = 0;
7449  for (i = 0; i < 4; i++) {
7450  if (!ctversion[i]) {
7451  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
7452  break;
7453  }
7454  if (rt_from_call[i] != ctversion[i]) {
7455  same = 0;
7456  break;
7457  }
7458  }
7459  if (!same) {
7460  char rtversion[5] = {'\0'};
7461  char message[200];
7462  for (i=0; i<4; ++i) {
7463  if (rt_from_call[i] == '.') {
7464  if (found_dot) break;
7465  found_dot = 1;
7466  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
7467  break;
7468  }
7469  rtversion[i] = rt_from_call[i];
7470  }
7471  PyOS_snprintf(message, sizeof(message),
7472  "compiletime version %s of module '%.100s' "
7473  "does not match runtime version %s",
7474  ctversion, __Pyx_MODULE_NAME, rtversion);
7475  return PyErr_WarnEx(NULL, message, 1);
7476  }
7477  return 0;
7478 }
7479 
7480 /* InitStrings */
7481 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
7482  while (t->p) {
7483  #if PY_MAJOR_VERSION < 3
7484  if (t->is_unicode) {
7485  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
7486  } else if (t->intern) {
7487  *t->p = PyString_InternFromString(t->s);
7488  } else {
7489  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
7490  }
7491  #else
7492  if (t->is_unicode | t->is_str) {
7493  if (t->intern) {
7494  *t->p = PyUnicode_InternFromString(t->s);
7495  } else if (t->encoding) {
7496  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
7497  } else {
7498  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
7499  }
7500  } else {
7501  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
7502  }
7503  #endif
7504  if (!*t->p)
7505  return -1;
7506  if (PyObject_Hash(*t->p) == -1)
7507  return -1;
7508  ++t;
7509  }
7510  return 0;
7511 }
7512 
7513 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
7514  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
7515 }
7516 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
7517  Py_ssize_t ignore;
7518  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
7519 }
7520 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
7521 #if !CYTHON_PEP393_ENABLED
7522 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
7523  char* defenc_c;
7524  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
7525  if (!defenc) return NULL;
7526  defenc_c = PyBytes_AS_STRING(defenc);
7527 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
7528  {
7529  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
7530  char* c;
7531  for (c = defenc_c; c < end; c++) {
7532  if ((unsigned char) (*c) >= 128) {
7533  PyUnicode_AsASCIIString(o);
7534  return NULL;
7535  }
7536  }
7537  }
7538 #endif
7539  *length = PyBytes_GET_SIZE(defenc);
7540  return defenc_c;
7541 }
7542 #else
7543 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
7544  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
7545 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
7546  if (likely(PyUnicode_IS_ASCII(o))) {
7547  *length = PyUnicode_GET_LENGTH(o);
7548  return PyUnicode_AsUTF8(o);
7549  } else {
7550  PyUnicode_AsASCIIString(o);
7551  return NULL;
7552  }
7553 #else
7554  return PyUnicode_AsUTF8AndSize(o, length);
7555 #endif
7556 }
7557 #endif
7558 #endif
7559 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
7560 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
7561  if (
7562 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
7563  __Pyx_sys_getdefaultencoding_not_ascii &&
7564 #endif
7565  PyUnicode_Check(o)) {
7566  return __Pyx_PyUnicode_AsStringAndSize(o, length);
7567  } else
7568 #endif
7569 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
7570  if (PyByteArray_Check(o)) {
7571  *length = PyByteArray_GET_SIZE(o);
7572  return PyByteArray_AS_STRING(o);
7573  } else
7574 #endif
7575  {
7576  char* result;
7577  int r = PyBytes_AsStringAndSize(o, &result, length);
7578  if (unlikely(r < 0)) {
7579  return NULL;
7580  } else {
7581  return result;
7582  }
7583  }
7584 }
7585 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
7586  int is_true = x == Py_True;
7587  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
7588  else return PyObject_IsTrue(x);
7589 }
7590 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
7591  int retval;
7592  if (unlikely(!x)) return -1;
7593  retval = __Pyx_PyObject_IsTrue(x);
7594  Py_DECREF(x);
7595  return retval;
7596 }
7597 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
7598 #if PY_MAJOR_VERSION >= 3
7599  if (PyLong_Check(result)) {
7600  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
7601  "__int__ returned non-int (type %.200s). "
7602  "The ability to return an instance of a strict subclass of int "
7603  "is deprecated, and may be removed in a future version of Python.",
7604  Py_TYPE(result)->tp_name)) {
7605  Py_DECREF(result);
7606  return NULL;
7607  }
7608  return result;
7609  }
7610 #endif
7611  PyErr_Format(PyExc_TypeError,
7612  "__%.4s__ returned non-%.4s (type %.200s)",
7613  type_name, type_name, Py_TYPE(result)->tp_name);
7614  Py_DECREF(result);
7615  return NULL;
7616 }
7617 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
7618 #if CYTHON_USE_TYPE_SLOTS
7619  PyNumberMethods *m;
7620 #endif
7621  const char *name = NULL;
7622  PyObject *res = NULL;
7623 #if PY_MAJOR_VERSION < 3
7624  if (likely(PyInt_Check(x) || PyLong_Check(x)))
7625 #else
7626  if (likely(PyLong_Check(x)))
7627 #endif
7628  return __Pyx_NewRef(x);
7629 #if CYTHON_USE_TYPE_SLOTS
7630  m = Py_TYPE(x)->tp_as_number;
7631  #if PY_MAJOR_VERSION < 3
7632  if (m && m->nb_int) {
7633  name = "int";
7634  res = m->nb_int(x);
7635  }
7636  else if (m && m->nb_long) {
7637  name = "long";
7638  res = m->nb_long(x);
7639  }
7640  #else
7641  if (likely(m && m->nb_int)) {
7642  name = "int";
7643  res = m->nb_int(x);
7644  }
7645  #endif
7646 #else
7647  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
7648  res = PyNumber_Int(x);
7649  }
7650 #endif
7651  if (likely(res)) {
7652 #if PY_MAJOR_VERSION < 3
7653  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
7654 #else
7655  if (unlikely(!PyLong_CheckExact(res))) {
7656 #endif
7657  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
7658  }
7659  }
7660  else if (!PyErr_Occurred()) {
7661  PyErr_SetString(PyExc_TypeError,
7662  "an integer is required");
7663  }
7664  return res;
7665 }
7666 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
7667  Py_ssize_t ival;
7668  PyObject *x;
7669 #if PY_MAJOR_VERSION < 3
7670  if (likely(PyInt_CheckExact(b))) {
7671  if (sizeof(Py_ssize_t) >= sizeof(long))
7672  return PyInt_AS_LONG(b);
7673  else
7674  return PyInt_AsSsize_t(b);
7675  }
7676 #endif
7677  if (likely(PyLong_CheckExact(b))) {
7678  #if CYTHON_USE_PYLONG_INTERNALS
7679  const digit* digits = ((PyLongObject*)b)->ob_digit;
7680  const Py_ssize_t size = Py_SIZE(b);
7681  if (likely(__Pyx_sst_abs(size) <= 1)) {
7682  ival = likely(size) ? digits[0] : 0;
7683  if (size == -1) ival = -ival;
7684  return ival;
7685  } else {
7686  switch (size) {
7687  case 2:
7688  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
7689  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
7690  }
7691  break;
7692  case -2:
7693  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
7694  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
7695  }
7696  break;
7697  case 3:
7698  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
7699  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
7700  }
7701  break;
7702  case -3:
7703  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
7704  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
7705  }
7706  break;
7707  case 4:
7708  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
7709  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
7710  }
7711  break;
7712  case -4:
7713  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
7714  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
7715  }
7716  break;
7717  }
7718  }
7719  #endif
7720  return PyLong_AsSsize_t(b);
7721  }
7722  x = PyNumber_Index(b);
7723  if (!x) return -1;
7724  ival = PyInt_AsSsize_t(x);
7725  Py_DECREF(x);
7726  return ival;
7727 }
7728 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
7729  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
7730  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
7731 #if PY_MAJOR_VERSION < 3
7732  } else if (likely(PyInt_CheckExact(o))) {
7733  return PyInt_AS_LONG(o);
7734 #endif
7735  } else {
7736  Py_ssize_t ival;
7737  PyObject *x;
7738  x = PyNumber_Index(o);
7739  if (!x) return -1;
7740  ival = PyInt_AsLong(x);
7741  Py_DECREF(x);
7742  return ival;
7743  }
7744 }
7745 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
7746  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
7747 }
7748 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
7749  return PyInt_FromSize_t(ival);
7750 }
7751 
7752 
7753 #endif /* Py_PYTHON_H */
applyDurlofskyDGlimiterP1Lagrange3d
void applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, int allowMinWithUndershoot, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
Definition: timeIntegration.c:1107
f
Double f
Definition: Headers.h:64
computeCockburnDGlimiterArrays2d
void computeCockburnDGlimiterArrays2d(int nElements_global, int nElementBoundaries_element, int nSpace, const int *elementBoundariesArray, const int *elementNeighborsArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, double *alphas, int *alphaNeighbors)
Definition: timeIntegration.c:649
applyDGlimitingP1Lagrange1d_withVacuumTol
void applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, double vacuumTol, int nElements_global, int nNodes_element, int nElementBoundaries_element, int nDOF_element, int *elementNodesArray, int *elementNeighborsArray, double *nodeArray, double *elementBarycentersArray, int *l2g, int *tag, double *Uin, double *Uout)
Definition: timeIntegration.c:310
psiTCtteDT
void psiTCtteDT(int nPoints, double tau, double dtn, double dtnm1, double *yn, double *ypn, double *ypnm1, double *dtnp1)
Definition: timeIntegration.c:12
s
Double s
Definition: Headers.h:84
n
Int n
Definition: Headers.h:28
applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol
void applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, int allowMinWithUndershoot, int enforcePositivity, double vacuumTol, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
Definition: timeIntegration.c:1397
applyDGlimitingP1Lagrange1d
void applyDGlimitingP1Lagrange1d(int limiterFlag, int nElements_global, int nNodes_element, int nElementBoundaries_element, int nDOF_element, int *elementNodesArray, int *elementNeighborsArray, double *nodeArray, double *elementBarycentersArray, int *l2g, int *tag, double *Uin, double *Uout)
Definition: timeIntegration.c:214
v
Double v
Definition: Headers.h:95
T
Double T
Definition: Headers.h:87
z
Double * z
Definition: Headers.h:49
u
Double u
Definition: Headers.h:89
c
Double c
Definition: Headers.h:54
applyCockburnDGlimiterP1Lagrange2d
void applyCockburnDGlimiterP1Lagrange2d(double nu, double Mh2, int nElements_global, int nElementBoundaries_element, int nSpace, int nDOF_element, int *elementNeighborsArray, int *l2g, int *tag, double *alphas, int *alphaNeighbors, double *Uin, double *Uout)
Definition: timeIntegration.c:736
r
Double r
Definition: Headers.h:83
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8
computeElementNeighborShapeGradients
void computeElementNeighborShapeGradients(int nElements_global, int nElementBoundaries_element, int nSpace, const int *elementBoundariesArray, const int *elementNeighborsArray, double *elementBarycentersArray, double *elementBoundaryBarycentersArray, double *elementNeighborShapeGradients)
Definition: timeIntegration.c:409
timeIntegration.h
c interface for implementation of time discretization algorithms
applyDurlofskyDGlimiterP1Lagrange2d
void applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, int allowMinWithUndershoot, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
Definition: timeIntegration.c:879