3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
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+.
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
17 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
31 #define DL_IMPORT(t) t
34 #define DL_EXPORT(t) t
37 #ifndef HAVE_LONG_LONG
38 #if PY_VERSION_HEX >= 0x02070000
39 #define HAVE_LONG_LONG
43 #define PY_LONG_LONG LONG_LONG
46 #define Py_HUGE_VAL HUGE_VAL
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
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)
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
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
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
114 #ifndef CYTHON_ASSUME_SAFE_MACROS
115 #define CYTHON_ASSUME_SAFE_MACROS 1
117 #ifndef CYTHON_UNPACK_METHODS
118 #define CYTHON_UNPACK_METHODS 1
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
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
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
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
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
160 #ifndef CYTHON_USE_PYLIST_INTERNALS
161 #define CYTHON_USE_PYLIST_INTERNALS 1
163 #ifndef CYTHON_USE_UNICODE_INTERNALS
164 #define CYTHON_USE_UNICODE_INTERNALS 1
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
172 #ifndef CYTHON_AVOID_BORROWED_REFS
173 #define CYTHON_AVOID_BORROWED_REFS 0
175 #ifndef CYTHON_ASSUME_SAFE_MACROS
176 #define CYTHON_ASSUME_SAFE_MACROS 1
178 #ifndef CYTHON_UNPACK_METHODS
179 #define CYTHON_UNPACK_METHODS 1
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
187 #ifndef CYTHON_FAST_PYCALL
188 #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
190 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
193 #ifndef CYTHON_USE_TP_FINALIZE
194 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
196 #ifndef CYTHON_USE_DICT_VERSIONS
197 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
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)
205 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
212 #if CYTHON_USE_PYLONG_INTERNALS
213 #if PY_MAJOR_VERSION < 3
214 #include "longintrepr.h"
220 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
223 #ifndef __has_attribute
224 #define __has_attribute(x) 0
226 #ifndef __has_cpp_attribute
227 #define __has_cpp_attribute(x) 0
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
237 #define CYTHON_RESTRICT
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__))
245 # define CYTHON_UNUSED
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
250 # define CYTHON_UNUSED
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255 template<
class T>
void CYTHON_MAYBE_UNUSED_VAR(
const T& ) { }
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
269 #ifndef _MSC_STDINT_H_
271 typedef unsigned char uint8_t;
272 typedef unsigned int uint32_t;
274 typedef unsigned __int8 uint8_t;
275 typedef unsigned __int32 uint32_t;
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]]
291 #ifndef CYTHON_FALLTHROUGH
292 #if __has_attribute(fallthrough)
293 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
295 #define CYTHON_FALLTHROUGH
298 #if defined(__clang__ ) && defined(__apple_build_version__)
299 #if __apple_build_version__ < 7000000
300 #undef CYTHON_FALLTHROUGH
301 #define CYTHON_FALLTHROUGH
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
316 #define CYTHON_INLINE
320 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
321 #define Py_OptimizeFlag 0
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
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;
370 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
371 Py_XDECREF((PyObject*)co);
372 co = (PyCodeObject*)call_result;
376 Py_XDECREF((PyObject*)co);
381 Py_XDECREF(argcount);
382 Py_XDECREF(posonlyargcount);
383 Py_XDECREF(kwonlyargcount);
385 Py_XDECREF(stacksize);
387 Py_XDECREF(call_result);
390 PyErr_Restore(type, value, traceback);
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)
398 #define __Pyx_DefaultClassType PyType_Type
400 #ifndef Py_TPFLAGS_CHECKTYPES
401 #define Py_TPFLAGS_CHECKTYPES 0
403 #ifndef Py_TPFLAGS_HAVE_INDEX
404 #define Py_TPFLAGS_HAVE_INDEX 0
406 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
407 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
409 #ifndef Py_TPFLAGS_HAVE_FINALIZE
410 #define Py_TPFLAGS_HAVE_FINALIZE 0
412 #ifndef METH_STACKLESS
413 #define METH_STACKLESS 0
415 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
416 #ifndef METH_FASTCALL
417 #define METH_FASTCALL 0x80
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);
423 #define __Pyx_PyCFunctionFast _PyCFunctionFast
424 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
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)))))
430 #define __Pyx_PyFastCFunction_Check(func) 0
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)
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)
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)
446 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
447 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
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()
456 #define __Pyx_PyThreadState_Current _PyThreadState_Current
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();
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;
471 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
474 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
475 return *key != Py_tss_NEEDS_INIT;
477 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
478 PyThread_delete_key(*key);
479 *key = Py_tss_NEEDS_INIT;
481 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
482 return PyThread_set_key_value(*key, value);
484 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
485 return PyThread_get_key_value(*key);
488 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
489 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
491 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
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)
497 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
498 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
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)
503 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
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)))
511 #define __Pyx_PyUnicode_READY(op) (0)
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))
524 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
527 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
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))
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)
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))
552 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
553 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
555 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
556 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
558 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
559 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
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)
566 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
568 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
569 #define PyObject_ASCII(o) PyObject_Repr(o)
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
581 #if PY_MAJOR_VERSION >= 3
582 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
583 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
585 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
586 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
588 #ifndef PySet_CheckExact
589 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
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)
595 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
596 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
598 #if CYTHON_ASSUME_SAFE_MACROS
599 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
601 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
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
620 #if PY_MAJOR_VERSION >= 3
621 #define PyBoolObject PyLongObject
623 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
624 #ifndef PyUnicode_InternFromString
625 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
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
633 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
634 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
636 #if PY_MAJOR_VERSION >= 3
637 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
639 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
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)
646 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
649 #define __Pyx_PyType_AsAsync(obj) NULL
651 #ifndef __Pyx_PyAsyncMethodsStruct
656 } __Pyx_PyAsyncMethodsStruct;
659 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
660 #if !defined(_USE_MATH_DEFINES)
661 #define _USE_MATH_DEFINES
666 #define __PYX_NAN() ((float) NAN)
668 static CYTHON_INLINE
float __PYX_NAN() {
670 memset(&value, 0xFF,
sizeof(value));
674 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
675 #define __Pyx_truncl trunc
677 #define __Pyx_truncl truncl
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; }
685 #ifndef __PYX_EXTERN_C
687 #define __PYX_EXTERN_C extern "C"
689 #define __PYX_EXTERN_C extern
693 #define __PYX_HAVE__canalyticalSolutions
694 #define __PYX_HAVE_API__canalyticalSolutions
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"
711 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
712 #define CYTHON_WITHOUT_ASSERTIONS
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;
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;
739 #if defined (__cplusplus) && __cplusplus >= 201103L
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)
753 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
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
766 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
767 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
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;
788 return (
size_t)(u_end -
u - 1);
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))
807 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
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))
813 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
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) {
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");
826 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
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;
834 char ascii_chars[128];
836 for (
c = 0;
c < 128;
c++) {
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) {
846 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
850 Py_DECREF(ascii_chars_u);
851 Py_DECREF(ascii_chars_b);
853 Py_DECREF(default_encoding);
856 Py_XDECREF(default_encoding);
857 Py_XDECREF(ascii_chars_u);
858 Py_XDECREF(ascii_chars_b);
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)
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) {
870 PyObject* default_encoding = NULL;
871 char* default_encoding_c;
872 sys = PyImport_ImportModule(
"sys");
874 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
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);
885 Py_XDECREF(default_encoding);
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)
897 #define likely(x) (x)
898 #define unlikely(x) (x)
900 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
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;
915 #if !defined(CYTHON_CCOMPLEX)
916 #if defined(__cplusplus)
917 #define CYTHON_CCOMPLEX 1
918 #elif defined(_Complex_I)
919 #define CYTHON_CCOMPLEX 1
921 #define CYTHON_CCOMPLEX 0
931 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
933 #define _Complex_I 1.0fj
937 static const char *__pyx_f[] = {
938 "proteus/canalyticalSolutions.pyx",
950 typedef npy_int8 __pyx_t_5numpy_int8_t;
959 typedef npy_int16 __pyx_t_5numpy_int16_t;
968 typedef npy_int32 __pyx_t_5numpy_int32_t;
977 typedef npy_int64 __pyx_t_5numpy_int64_t;
986 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
995 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1004 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1013 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1022 typedef npy_float32 __pyx_t_5numpy_float32_t;
1031 typedef npy_float64 __pyx_t_5numpy_float64_t;
1040 typedef npy_long __pyx_t_5numpy_int_t;
1049 typedef npy_longlong __pyx_t_5numpy_long_t;
1058 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1067 typedef npy_ulong __pyx_t_5numpy_uint_t;
1076 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1085 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1094 typedef npy_intp __pyx_t_5numpy_intp_t;
1103 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1112 typedef npy_double __pyx_t_5numpy_float_t;
1121 typedef npy_double __pyx_t_5numpy_double_t;
1130 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1134 typedef ::std::complex< float > __pyx_t_float_complex;
1136 typedef float _Complex __pyx_t_float_complex;
1139 typedef struct {
float real, imag; } __pyx_t_float_complex;
1141 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1146 typedef ::std::complex< double > __pyx_t_double_complex;
1148 typedef double _Complex __pyx_t_double_complex;
1151 typedef struct {
double real, imag; } __pyx_t_double_complex;
1153 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1165 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1174 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1183 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1192 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1196 #ifndef CYTHON_REFNANNY
1197 #define CYTHON_REFNANNY 0
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;
1212 #define __Pyx_RefNannySetupContext(name, 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);\
1218 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1221 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1222 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
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)
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)
1247 #define __Pyx_XDECREF_SET(r, v) do {\
1248 PyObject *tmp = (PyObject *) r;\
1249 r = v; __Pyx_XDECREF(tmp);\
1251 #define __Pyx_DECREF_SET(r, v) do {\
1252 PyObject *tmp = (PyObject *) r;\
1253 r = v; __Pyx_DECREF(tmp);\
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)
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);
1263 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
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);
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);
1277 #if CYTHON_USE_TYPE_SLOTS
1278 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1280 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1284 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1287 #if CYTHON_USE_EXC_INFO_STACK
1288 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
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
1297 #define __Pyx_PyThreadState_declare
1298 #define __Pyx_PyThreadState_assign
1299 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
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);
1309 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1310 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
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);
1318 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
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);
1326 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1330 #if CYTHON_COMPILING_IN_CPYTHON
1331 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1333 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
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))
1348 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
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)
1362 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
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
1372 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
1376 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
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;\
1391 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1392 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
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);
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);
1405 #ifdef CYTHON_CLINE_IN_TRACEBACK
1406 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1408 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
1413 PyCodeObject* code_object;
1415 } __Pyx_CodeObjectCacheEntry;
1416 struct __Pyx_CodeObjectCache {
1419 __Pyx_CodeObjectCacheEntry* entries;
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);
1427 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
1428 int py_line,
const char *filename);
1431 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
1432 #define __Pyx_HAS_GCC_DIAGNOSTIC
1438 #define __Pyx_CREAL(z) ((z).real())
1439 #define __Pyx_CIMAG(z) ((z).imag())
1441 #define __Pyx_CREAL(z) (__real__(z))
1442 #define __Pyx_CIMAG(z) (__imag__(z))
1445 #define __Pyx_CREAL(z) ((z).real)
1446 #define __Pyx_CIMAG(z) ((z).imag)
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))
1453 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1454 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
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))
1466 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1467 #define __Pyx_c_conj_float(z) (::std::conj(z))
1469 #define __Pyx_c_abs_float(z) (::std::abs(z))
1470 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1473 #define __Pyx_c_is_zero_float(z) ((z)==0)
1474 #define __Pyx_c_conj_float(z) (conjf(z))
1476 #define __Pyx_c_abs_float(z) (cabsf(z))
1477 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
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);
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);
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))
1504 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1505 #define __Pyx_c_conj_double(z) (::std::conj(z))
1507 #define __Pyx_c_abs_double(z) (::std::abs(z))
1508 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1511 #define __Pyx_c_is_zero_double(z) ((z)==0)
1512 #define __Pyx_c_conj_double(z) (conj(z))
1514 #define __Pyx_c_abs_double(z) (cabs(z))
1515 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
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);
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);
1534 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value);
1537 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
1540 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
1543 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
1546 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
1549 #if CYTHON_COMPILING_IN_CPYTHON
1550 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1551 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1552 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1553 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1555 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1556 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1557 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1559 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1562 static int __Pyx_check_binary_version(
void);
1565 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1577 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1590 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1591 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1592 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1593 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1594 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
1595 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
1596 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
1597 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
1598 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
1599 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
1600 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
1601 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
1602 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
1603 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
1604 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1607 #define __Pyx_MODULE_NAME "canalyticalSolutions"
1608 extern int __pyx_module_is_main_canalyticalSolutions;
1609 int __pyx_module_is_main_canalyticalSolutions = 0;
1612 static PyObject *__pyx_builtin_ImportError;
1613 static const char __pyx_k_f[] =
"f";
1614 static const char __pyx_k_r[] =
"r";
1615 static const char __pyx_k_t[] =
"t";
1616 static const char __pyx_k_u[] =
"u";
1617 static const char __pyx_k_x[] =
"x";
1618 static const char __pyx_k_dr[] =
"dr";
1619 static const char __pyx_k_du[] =
"du";
1620 static const char __pyx_k_np[] =
"np";
1621 static const char __pyx_k_main[] =
"__main__";
1622 static const char __pyx_k_name[] =
"__name__";
1623 static const char __pyx_k_size[] =
"size";
1624 static const char __pyx_k_test[] =
"__test__";
1625 static const char __pyx_k_iwork[] =
"iwork";
1626 static const char __pyx_k_numpy[] =
"numpy";
1627 static const char __pyx_k_rwork[] =
"rwork";
1628 static const char __pyx_k_import[] =
"__import__";
1629 static const char __pyx_k_ImportError[] =
"ImportError";
1630 static const char __pyx_k_NonlinearDAE[] =
"NonlinearDAE";
1631 static const char __pyx_k_LinearADR_Sine[] =
"LinearADR_Sine";
1632 static const char __pyx_k_NonlinearDAE_f[] =
"NonlinearDAE_f";
1633 static const char __pyx_k_STflowSphere_P[] =
"STflowSphere_P";
1634 static const char __pyx_k_diffusionSin1D[] =
"diffusionSin1D";
1635 static const char __pyx_k_diffusionSin2D[] =
"diffusionSin2D";
1636 static const char __pyx_k_diffusionSin3D[] =
"diffusionSin3D";
1637 static const char __pyx_k_STflowSphere_Vx[] =
"STflowSphere_Vx";
1638 static const char __pyx_k_STflowSphere_Vy[] =
"STflowSphere_Vy";
1639 static const char __pyx_k_STflowSphere_Vz[] =
"STflowSphere_Vz";
1640 static const char __pyx_k_LinearADR_Sine_r[] =
"LinearADR_Sine_r";
1641 static const char __pyx_k_LinearAD_DiracIC[] =
"LinearAD_DiracIC";
1642 static const char __pyx_k_diffusionSin1D_r[] =
"diffusionSin1D_r";
1643 static const char __pyx_k_diffusionSin2D_r[] =
"diffusionSin2D_r";
1644 static const char __pyx_k_diffusionSin3D_r[] =
"diffusionSin3D_r";
1645 static const char __pyx_k_LinearADR_Sine_dr[] =
"LinearADR_Sine_dr";
1646 static const char __pyx_k_LinearADR_Sine_du[] =
"LinearADR_Sine_du";
1647 static const char __pyx_k_PlaneCouetteFlow_u[] =
"PlaneCouetteFlow_u";
1648 static const char __pyx_k_PoiseuillePipeFlow[] =
"PoiseuillePipeFlow";
1649 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
1650 static const char __pyx_k_LinearAD_DiracIC_du[] =
"LinearAD_DiracIC_du";
1651 static const char __pyx_k_LinearAD_SteadyState[] =
"LinearAD_SteadyState";
1652 static const char __pyx_k_PoiseuillePipeFlow_P[] =
"PoiseuillePipeFlow_P";
1653 static const char __pyx_k_canalyticalSolutions[] =
"canalyticalSolutions";
1654 static const char __pyx_k_PlanePoiseuilleFlow_u[] =
"PlanePoiseuilleFlow_u";
1655 static const char __pyx_k_poissonsEquationExp1D[] =
"poissonsEquationExp1D";
1656 static const char __pyx_k_poissonsEquationExp2D[] =
"poissonsEquationExp2D";
1657 static const char __pyx_k_poissonsEquationExp3D[] =
"poissonsEquationExp3D";
1658 static const char __pyx_k_LinearADR_Decay_DiracIC[] =
"LinearADR_Decay_DiracIC";
1659 static const char __pyx_k_NonlinearAD_SteadyState[] =
"NonlinearAD_SteadyState";
1660 static const char __pyx_k_poissonsEquationExp1D_r[] =
"poissonsEquationExp1D_r";
1661 static const char __pyx_k_poissonsEquationExp2D_r[] =
"poissonsEquationExp2D_r";
1662 static const char __pyx_k_poissonsEquationExp3D_r[] =
"poissonsEquationExp3D_r";
1663 static const char __pyx_k_poissonsEquationExp3D_dr[] =
"poissonsEquationExp3D_dr";
1664 static const char __pyx_k_LinearADR_Decay_DiracIC_r[] =
"LinearADR_Decay_DiracIC_r";
1665 static const char __pyx_k_LinearADR_Decay_DiracIC_dr[] =
"LinearADR_Decay_DiracIC_dr";
1666 static const char __pyx_k_NonlinearADR_Decay_DiracIC[] =
"NonlinearADR_Decay_DiracIC";
1667 static const char __pyx_k_LinearADR_Sine_totalVelocity[] =
"LinearADR_Sine_totalVelocity";
1668 static const char __pyx_k_NonlinearADR_Decay_DiracIC_r[] =
"NonlinearADR_Decay_DiracIC_r";
1669 static const char __pyx_k_NonlinearADR_Decay_DiracIC_dr[] =
"NonlinearADR_Decay_DiracIC_dr";
1670 static const char __pyx_k_LinearAD_DiracIC_totalVelocity[] =
"LinearAD_DiracIC_totalVelocity";
1671 static const char __pyx_k_numpy_core_multiarray_failed_to[] =
"numpy.core.multiarray failed to import";
1672 static const char __pyx_k_LinearADR_Sine_advectiveVelocity[] =
"LinearADR_Sine_advectiveVelocity";
1673 static const char __pyx_k_LinearADR_Sine_diffusiveVelocity[] =
"LinearADR_Sine_diffusiveVelocity";
1674 static const char __pyx_k_LinearAD_DiracIC_advectiveVeloci[] =
"LinearAD_DiracIC_advectiveVelocity";
1675 static const char __pyx_k_LinearAD_DiracIC_diffusiveVeloci[] =
"LinearAD_DiracIC_diffusiveVelocity";
1676 static const char __pyx_k_numpy_core_umath_failed_to_impor[] =
"numpy.core.umath failed to import";
1677 static const char __pyx_k_proteus_canalyticalSolutions_pyx[] =
"proteus/canalyticalSolutions.pyx";
1678 static PyObject *__pyx_n_s_ImportError;
1679 static PyObject *__pyx_n_s_LinearADR_Decay_DiracIC;
1680 static PyObject *__pyx_n_s_LinearADR_Decay_DiracIC_dr;
1681 static PyObject *__pyx_n_s_LinearADR_Decay_DiracIC_r;
1682 static PyObject *__pyx_n_s_LinearADR_Sine;
1683 static PyObject *__pyx_n_s_LinearADR_Sine_advectiveVelocity;
1684 static PyObject *__pyx_n_s_LinearADR_Sine_diffusiveVelocity;
1685 static PyObject *__pyx_n_s_LinearADR_Sine_dr;
1686 static PyObject *__pyx_n_s_LinearADR_Sine_du;
1687 static PyObject *__pyx_n_s_LinearADR_Sine_r;
1688 static PyObject *__pyx_n_s_LinearADR_Sine_totalVelocity;
1689 static PyObject *__pyx_n_s_LinearAD_DiracIC;
1690 static PyObject *__pyx_n_s_LinearAD_DiracIC_advectiveVeloci;
1691 static PyObject *__pyx_n_s_LinearAD_DiracIC_diffusiveVeloci;
1692 static PyObject *__pyx_n_s_LinearAD_DiracIC_du;
1693 static PyObject *__pyx_n_s_LinearAD_DiracIC_totalVelocity;
1694 static PyObject *__pyx_n_s_LinearAD_SteadyState;
1695 static PyObject *__pyx_n_s_NonlinearADR_Decay_DiracIC;
1696 static PyObject *__pyx_n_s_NonlinearADR_Decay_DiracIC_dr;
1697 static PyObject *__pyx_n_s_NonlinearADR_Decay_DiracIC_r;
1698 static PyObject *__pyx_n_s_NonlinearAD_SteadyState;
1699 static PyObject *__pyx_n_s_NonlinearDAE;
1700 static PyObject *__pyx_n_s_NonlinearDAE_f;
1701 static PyObject *__pyx_n_s_PlaneCouetteFlow_u;
1702 static PyObject *__pyx_n_s_PlanePoiseuilleFlow_u;
1703 static PyObject *__pyx_n_s_PoiseuillePipeFlow;
1704 static PyObject *__pyx_n_s_PoiseuillePipeFlow_P;
1705 static PyObject *__pyx_n_s_STflowSphere_P;
1706 static PyObject *__pyx_n_s_STflowSphere_Vx;
1707 static PyObject *__pyx_n_s_STflowSphere_Vy;
1708 static PyObject *__pyx_n_s_STflowSphere_Vz;
1709 static PyObject *__pyx_n_s_canalyticalSolutions;
1710 static PyObject *__pyx_n_s_cline_in_traceback;
1711 static PyObject *__pyx_n_s_diffusionSin1D;
1712 static PyObject *__pyx_n_s_diffusionSin1D_r;
1713 static PyObject *__pyx_n_s_diffusionSin2D;
1714 static PyObject *__pyx_n_s_diffusionSin2D_r;
1715 static PyObject *__pyx_n_s_diffusionSin3D;
1716 static PyObject *__pyx_n_s_diffusionSin3D_r;
1717 static PyObject *__pyx_n_s_dr;
1718 static PyObject *__pyx_n_s_du;
1719 static PyObject *__pyx_n_s_f;
1720 static PyObject *__pyx_n_s_import;
1721 static PyObject *__pyx_n_s_iwork;
1722 static PyObject *__pyx_n_s_main;
1723 static PyObject *__pyx_n_s_name;
1724 static PyObject *__pyx_n_s_np;
1725 static PyObject *__pyx_n_s_numpy;
1726 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
1727 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
1728 static PyObject *__pyx_n_s_poissonsEquationExp1D;
1729 static PyObject *__pyx_n_s_poissonsEquationExp1D_r;
1730 static PyObject *__pyx_n_s_poissonsEquationExp2D;
1731 static PyObject *__pyx_n_s_poissonsEquationExp2D_r;
1732 static PyObject *__pyx_n_s_poissonsEquationExp3D;
1733 static PyObject *__pyx_n_s_poissonsEquationExp3D_dr;
1734 static PyObject *__pyx_n_s_poissonsEquationExp3D_r;
1735 static PyObject *__pyx_kp_s_proteus_canalyticalSolutions_pyx;
1736 static PyObject *__pyx_n_s_r;
1737 static PyObject *__pyx_n_s_rwork;
1738 static PyObject *__pyx_n_s_size;
1739 static PyObject *__pyx_n_s_t;
1740 static PyObject *__pyx_n_s_test;
1741 static PyObject *__pyx_n_s_u;
1742 static PyObject *__pyx_n_s_x;
1743 static PyObject *__pyx_pf_20canalyticalSolutions_PlaneCouetteFlow_u(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1744 static PyObject *__pyx_pf_20canalyticalSolutions_2diffusionSin1D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1745 static PyObject *__pyx_pf_20canalyticalSolutions_4diffusionSin2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1746 static PyObject *__pyx_pf_20canalyticalSolutions_6diffusionSin3D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1747 static PyObject *__pyx_pf_20canalyticalSolutions_8diffusionSin1D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1748 static PyObject *__pyx_pf_20canalyticalSolutions_10diffusionSin2D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1749 static PyObject *__pyx_pf_20canalyticalSolutions_12diffusionSin3D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1750 static PyObject *__pyx_pf_20canalyticalSolutions_14LinearAD_DiracIC(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1751 static PyObject *__pyx_pf_20canalyticalSolutions_16LinearAD_DiracIC_advectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f);
1752 static PyObject *__pyx_pf_20canalyticalSolutions_18LinearAD_DiracIC_diffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f);
1753 static PyObject *__pyx_pf_20canalyticalSolutions_20LinearAD_DiracIC_du(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_du);
1754 static PyObject *__pyx_pf_20canalyticalSolutions_22LinearAD_DiracIC_totalVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1755 static PyObject *__pyx_pf_20canalyticalSolutions_24LinearAD_SteadyState(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1756 static PyObject *__pyx_pf_20canalyticalSolutions_26LinearADR_Decay_DiracIC(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1757 static PyObject *__pyx_pf_20canalyticalSolutions_28LinearADR_Decay_DiracIC_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr);
1758 static PyObject *__pyx_pf_20canalyticalSolutions_30LinearADR_Decay_DiracIC_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1759 static PyObject *__pyx_pf_20canalyticalSolutions_32LinearADR_Sine(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1760 static PyObject *__pyx_pf_20canalyticalSolutions_34LinearADR_Sine_advectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f);
1761 static PyObject *__pyx_pf_20canalyticalSolutions_36LinearADR_Sine_diffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f);
1762 static PyObject *__pyx_pf_20canalyticalSolutions_38LinearADR_Sine_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr);
1763 static PyObject *__pyx_pf_20canalyticalSolutions_40LinearADR_Sine_du(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_du);
1764 static PyObject *__pyx_pf_20canalyticalSolutions_42LinearADR_Sine_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1765 static PyObject *__pyx_pf_20canalyticalSolutions_44LinearADR_Sine_totalVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1766 static PyObject *__pyx_pf_20canalyticalSolutions_46NonlinearAD_SteadyState(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1767 static PyObject *__pyx_pf_20canalyticalSolutions_48NonlinearADR_Decay_DiracIC(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1768 static PyObject *__pyx_pf_20canalyticalSolutions_50NonlinearADR_Decay_DiracIC_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr);
1769 static PyObject *__pyx_pf_20canalyticalSolutions_52NonlinearADR_Decay_DiracIC_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1770 static PyObject *__pyx_pf_20canalyticalSolutions_54NonlinearDAE(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1771 static PyObject *__pyx_pf_20canalyticalSolutions_56NonlinearDAE_f(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1772 static PyObject *__pyx_pf_20canalyticalSolutions_58PlanePoiseuilleFlow_u(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1773 static PyObject *__pyx_pf_20canalyticalSolutions_60PoiseuillePipeFlow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1774 static PyObject *__pyx_pf_20canalyticalSolutions_62PoiseuillePipeFlow_P(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1775 static PyObject *__pyx_pf_20canalyticalSolutions_64poissonsEquationExp1D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1776 static PyObject *__pyx_pf_20canalyticalSolutions_66poissonsEquationExp2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1777 static PyObject *__pyx_pf_20canalyticalSolutions_68poissonsEquationExp3D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1778 static PyObject *__pyx_pf_20canalyticalSolutions_70poissonsEquationExp3D_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr);
1779 static PyObject *__pyx_pf_20canalyticalSolutions_72poissonsEquationExp1D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1780 static PyObject *__pyx_pf_20canalyticalSolutions_74poissonsEquationExp2D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1781 static PyObject *__pyx_pf_20canalyticalSolutions_76poissonsEquationExp3D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r);
1782 static PyObject *__pyx_pf_20canalyticalSolutions_78STflowSphere_P(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1783 static PyObject *__pyx_pf_20canalyticalSolutions_80STflowSphere_Vx(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1784 static PyObject *__pyx_pf_20canalyticalSolutions_82STflowSphere_Vy(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1785 static PyObject *__pyx_pf_20canalyticalSolutions_84STflowSphere_Vz(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u);
1786 static PyObject *__pyx_tuple_;
1787 static PyObject *__pyx_tuple__2;
1788 static PyObject *__pyx_tuple__3;
1789 static PyObject *__pyx_tuple__5;
1790 static PyObject *__pyx_tuple__7;
1791 static PyObject *__pyx_tuple__9;
1792 static PyObject *__pyx_tuple__11;
1793 static PyObject *__pyx_tuple__13;
1794 static PyObject *__pyx_tuple__15;
1795 static PyObject *__pyx_tuple__17;
1796 static PyObject *__pyx_tuple__19;
1797 static PyObject *__pyx_tuple__21;
1798 static PyObject *__pyx_tuple__23;
1799 static PyObject *__pyx_tuple__25;
1800 static PyObject *__pyx_tuple__27;
1801 static PyObject *__pyx_tuple__29;
1802 static PyObject *__pyx_tuple__31;
1803 static PyObject *__pyx_tuple__33;
1804 static PyObject *__pyx_tuple__35;
1805 static PyObject *__pyx_tuple__37;
1806 static PyObject *__pyx_tuple__39;
1807 static PyObject *__pyx_tuple__41;
1808 static PyObject *__pyx_tuple__43;
1809 static PyObject *__pyx_tuple__45;
1810 static PyObject *__pyx_tuple__47;
1811 static PyObject *__pyx_tuple__49;
1812 static PyObject *__pyx_tuple__51;
1813 static PyObject *__pyx_tuple__53;
1814 static PyObject *__pyx_tuple__55;
1815 static PyObject *__pyx_tuple__57;
1816 static PyObject *__pyx_tuple__59;
1817 static PyObject *__pyx_tuple__61;
1818 static PyObject *__pyx_tuple__63;
1819 static PyObject *__pyx_tuple__65;
1820 static PyObject *__pyx_tuple__67;
1821 static PyObject *__pyx_tuple__69;
1822 static PyObject *__pyx_tuple__71;
1823 static PyObject *__pyx_tuple__73;
1824 static PyObject *__pyx_tuple__75;
1825 static PyObject *__pyx_tuple__77;
1826 static PyObject *__pyx_tuple__79;
1827 static PyObject *__pyx_tuple__81;
1828 static PyObject *__pyx_tuple__83;
1829 static PyObject *__pyx_tuple__85;
1830 static PyObject *__pyx_tuple__87;
1831 static PyObject *__pyx_codeobj__4;
1832 static PyObject *__pyx_codeobj__6;
1833 static PyObject *__pyx_codeobj__8;
1834 static PyObject *__pyx_codeobj__10;
1835 static PyObject *__pyx_codeobj__12;
1836 static PyObject *__pyx_codeobj__14;
1837 static PyObject *__pyx_codeobj__16;
1838 static PyObject *__pyx_codeobj__18;
1839 static PyObject *__pyx_codeobj__20;
1840 static PyObject *__pyx_codeobj__22;
1841 static PyObject *__pyx_codeobj__24;
1842 static PyObject *__pyx_codeobj__26;
1843 static PyObject *__pyx_codeobj__28;
1844 static PyObject *__pyx_codeobj__30;
1845 static PyObject *__pyx_codeobj__32;
1846 static PyObject *__pyx_codeobj__34;
1847 static PyObject *__pyx_codeobj__36;
1848 static PyObject *__pyx_codeobj__38;
1849 static PyObject *__pyx_codeobj__40;
1850 static PyObject *__pyx_codeobj__42;
1851 static PyObject *__pyx_codeobj__44;
1852 static PyObject *__pyx_codeobj__46;
1853 static PyObject *__pyx_codeobj__48;
1854 static PyObject *__pyx_codeobj__50;
1855 static PyObject *__pyx_codeobj__52;
1856 static PyObject *__pyx_codeobj__54;
1857 static PyObject *__pyx_codeobj__56;
1858 static PyObject *__pyx_codeobj__58;
1859 static PyObject *__pyx_codeobj__60;
1860 static PyObject *__pyx_codeobj__62;
1861 static PyObject *__pyx_codeobj__64;
1862 static PyObject *__pyx_codeobj__66;
1863 static PyObject *__pyx_codeobj__68;
1864 static PyObject *__pyx_codeobj__70;
1865 static PyObject *__pyx_codeobj__72;
1866 static PyObject *__pyx_codeobj__74;
1867 static PyObject *__pyx_codeobj__76;
1868 static PyObject *__pyx_codeobj__78;
1869 static PyObject *__pyx_codeobj__80;
1870 static PyObject *__pyx_codeobj__82;
1871 static PyObject *__pyx_codeobj__84;
1872 static PyObject *__pyx_codeobj__86;
1873 static PyObject *__pyx_codeobj__88;
1885 static PyObject *__pyx_pw_20canalyticalSolutions_1PlaneCouetteFlow_u(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
1886 static PyMethodDef __pyx_mdef_20canalyticalSolutions_1PlaneCouetteFlow_u = {
"PlaneCouetteFlow_u", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_1PlaneCouetteFlow_u, METH_VARARGS|METH_KEYWORDS, 0};
1887 static PyObject *__pyx_pw_20canalyticalSolutions_1PlaneCouetteFlow_u(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1888 PyArrayObject *__pyx_v_iwork = 0;
1889 PyArrayObject *__pyx_v_rwork = 0;
1891 PyArrayObject *__pyx_v_x = 0;
1892 PyArrayObject *__pyx_v_u = 0;
1893 int __pyx_lineno = 0;
1894 const char *__pyx_filename = NULL;
1895 int __pyx_clineno = 0;
1896 PyObject *__pyx_r = 0;
1897 __Pyx_RefNannyDeclarations
1898 __Pyx_RefNannySetupContext(
"PlaneCouetteFlow_u (wrapper)", 0);
1900 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
1901 PyObject* values[5] = {0,0,0,0,0};
1902 if (unlikely(__pyx_kwds)) {
1904 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1906 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1908 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1910 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1912 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1914 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1917 default:
goto __pyx_L5_argtuple_error;
1919 kw_args = PyDict_Size(__pyx_kwds);
1922 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
1923 else goto __pyx_L5_argtuple_error;
1926 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
1928 __Pyx_RaiseArgtupleInvalid(
"PlaneCouetteFlow_u", 1, 5, 5, 1); __PYX_ERR(0, 50, __pyx_L3_error)
1932 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
1934 __Pyx_RaiseArgtupleInvalid(
"PlaneCouetteFlow_u", 1, 5, 5, 2); __PYX_ERR(0, 50, __pyx_L3_error)
1938 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
1940 __Pyx_RaiseArgtupleInvalid(
"PlaneCouetteFlow_u", 1, 5, 5, 3); __PYX_ERR(0, 50, __pyx_L3_error)
1944 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
1946 __Pyx_RaiseArgtupleInvalid(
"PlaneCouetteFlow_u", 1, 5, 5, 4); __PYX_ERR(0, 50, __pyx_L3_error)
1949 if (unlikely(kw_args > 0)) {
1950 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"PlaneCouetteFlow_u") < 0)) __PYX_ERR(0, 50, __pyx_L3_error)
1952 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
1953 goto __pyx_L5_argtuple_error;
1955 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1956 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1957 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1958 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
1959 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
1961 __pyx_v_iwork = ((PyArrayObject *)values[0]);
1962 __pyx_v_rwork = ((PyArrayObject *)values[1]);
1963 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 50, __pyx_L3_error)
1964 __pyx_v_x = ((PyArrayObject *)values[3]);
1965 __pyx_v_u = ((PyArrayObject *)values[4]);
1967 goto __pyx_L4_argument_unpacking_done;
1968 __pyx_L5_argtuple_error:;
1969 __Pyx_RaiseArgtupleInvalid(
"PlaneCouetteFlow_u", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 50, __pyx_L3_error)
1971 __Pyx_AddTraceback(
"canalyticalSolutions.PlaneCouetteFlow_u", __pyx_clineno, __pyx_lineno, __pyx_filename);
1972 __Pyx_RefNannyFinishContext();
1974 __pyx_L4_argument_unpacking_done:;
1975 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 50, __pyx_L1_error)
1976 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 50, __pyx_L1_error)
1977 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 50, __pyx_L1_error)
1978 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 50, __pyx_L1_error)
1979 __pyx_r = __pyx_pf_20canalyticalSolutions_PlaneCouetteFlow_u(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
1986 __Pyx_RefNannyFinishContext();
1990 static PyObject *__pyx_pf_20canalyticalSolutions_PlaneCouetteFlow_u(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
1991 PyObject *__pyx_r = NULL;
1992 __Pyx_RefNannyDeclarations
1993 PyObject *__pyx_t_1 = NULL;
1994 PyObject *__pyx_t_2 = NULL;
1995 PyObject *__pyx_t_3 = NULL;
1997 int __pyx_lineno = 0;
1998 const char *__pyx_filename = NULL;
1999 int __pyx_clineno = 0;
2000 __Pyx_RefNannySetupContext(
"PlaneCouetteFlow_u", 0);
2009 __Pyx_XDECREF(__pyx_r);
2010 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
2011 __Pyx_GOTREF(__pyx_t_1);
2012 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
2013 __Pyx_GOTREF(__pyx_t_2);
2014 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)
2015 __Pyx_GOTREF(__pyx_t_3);
2016 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2017 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2018 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L1_error)
2019 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2020 __pyx_t_3 = __Pyx_PyInt_From_int(
PlaneCouetteFlow_u(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)
2021 __Pyx_GOTREF(__pyx_t_3);
2022 __pyx_r = __pyx_t_3;
2036 __Pyx_XDECREF(__pyx_t_1);
2037 __Pyx_XDECREF(__pyx_t_2);
2038 __Pyx_XDECREF(__pyx_t_3);
2039 __Pyx_AddTraceback(
"canalyticalSolutions.PlaneCouetteFlow_u", __pyx_clineno, __pyx_lineno, __pyx_filename);
2042 __Pyx_XGIVEREF(__pyx_r);
2043 __Pyx_RefNannyFinishContext();
2056 static PyObject *__pyx_pw_20canalyticalSolutions_3diffusionSin1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2057 static PyMethodDef __pyx_mdef_20canalyticalSolutions_3diffusionSin1D = {
"diffusionSin1D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_3diffusionSin1D, METH_VARARGS|METH_KEYWORDS, 0};
2058 static PyObject *__pyx_pw_20canalyticalSolutions_3diffusionSin1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2059 PyArrayObject *__pyx_v_iwork = 0;
2060 PyArrayObject *__pyx_v_rwork = 0;
2062 PyArrayObject *__pyx_v_x = 0;
2063 PyArrayObject *__pyx_v_u = 0;
2064 int __pyx_lineno = 0;
2065 const char *__pyx_filename = NULL;
2066 int __pyx_clineno = 0;
2067 PyObject *__pyx_r = 0;
2068 __Pyx_RefNannyDeclarations
2069 __Pyx_RefNannySetupContext(
"diffusionSin1D (wrapper)", 0);
2071 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
2072 PyObject* values[5] = {0,0,0,0,0};
2073 if (unlikely(__pyx_kwds)) {
2075 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2077 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2079 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2081 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2083 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2085 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2088 default:
goto __pyx_L5_argtuple_error;
2090 kw_args = PyDict_Size(__pyx_kwds);
2093 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
2094 else goto __pyx_L5_argtuple_error;
2097 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
2099 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D", 1, 5, 5, 1); __PYX_ERR(0, 54, __pyx_L3_error)
2103 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2105 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D", 1, 5, 5, 2); __PYX_ERR(0, 54, __pyx_L3_error)
2109 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2111 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D", 1, 5, 5, 3); __PYX_ERR(0, 54, __pyx_L3_error)
2115 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
2117 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D", 1, 5, 5, 4); __PYX_ERR(0, 54, __pyx_L3_error)
2120 if (unlikely(kw_args > 0)) {
2121 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"diffusionSin1D") < 0)) __PYX_ERR(0, 54, __pyx_L3_error)
2123 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
2124 goto __pyx_L5_argtuple_error;
2126 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2127 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2128 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2129 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2130 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2132 __pyx_v_iwork = ((PyArrayObject *)values[0]);
2133 __pyx_v_rwork = ((PyArrayObject *)values[1]);
2134 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 54, __pyx_L3_error)
2135 __pyx_v_x = ((PyArrayObject *)values[3]);
2136 __pyx_v_u = ((PyArrayObject *)values[4]);
2138 goto __pyx_L4_argument_unpacking_done;
2139 __pyx_L5_argtuple_error:;
2140 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 54, __pyx_L3_error)
2142 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin1D", __pyx_clineno, __pyx_lineno, __pyx_filename);
2143 __Pyx_RefNannyFinishContext();
2145 __pyx_L4_argument_unpacking_done:;
2146 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
2147 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
2148 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
2149 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 54, __pyx_L1_error)
2150 __pyx_r = __pyx_pf_20canalyticalSolutions_2diffusionSin1D(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
2157 __Pyx_RefNannyFinishContext();
2161 static PyObject *__pyx_pf_20canalyticalSolutions_2diffusionSin1D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
2162 PyObject *__pyx_r = NULL;
2163 __Pyx_RefNannyDeclarations
2164 PyObject *__pyx_t_1 = NULL;
2165 PyObject *__pyx_t_2 = NULL;
2166 PyObject *__pyx_t_3 = NULL;
2168 int __pyx_lineno = 0;
2169 const char *__pyx_filename = NULL;
2170 int __pyx_clineno = 0;
2171 __Pyx_RefNannySetupContext(
"diffusionSin1D", 0);
2180 __Pyx_XDECREF(__pyx_r);
2181 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
2182 __Pyx_GOTREF(__pyx_t_1);
2183 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
2184 __Pyx_GOTREF(__pyx_t_2);
2185 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
2186 __Pyx_GOTREF(__pyx_t_3);
2187 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2188 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2189 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error)
2190 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2191 __pyx_t_3 = __Pyx_PyInt_From_int(
diffusionSin1D(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
2192 __Pyx_GOTREF(__pyx_t_3);
2193 __pyx_r = __pyx_t_3;
2207 __Pyx_XDECREF(__pyx_t_1);
2208 __Pyx_XDECREF(__pyx_t_2);
2209 __Pyx_XDECREF(__pyx_t_3);
2210 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin1D", __pyx_clineno, __pyx_lineno, __pyx_filename);
2213 __Pyx_XGIVEREF(__pyx_r);
2214 __Pyx_RefNannyFinishContext();
2227 static PyObject *__pyx_pw_20canalyticalSolutions_5diffusionSin2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2228 static PyMethodDef __pyx_mdef_20canalyticalSolutions_5diffusionSin2D = {
"diffusionSin2D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_5diffusionSin2D, METH_VARARGS|METH_KEYWORDS, 0};
2229 static PyObject *__pyx_pw_20canalyticalSolutions_5diffusionSin2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2230 PyArrayObject *__pyx_v_iwork = 0;
2231 PyArrayObject *__pyx_v_rwork = 0;
2233 PyArrayObject *__pyx_v_x = 0;
2234 PyArrayObject *__pyx_v_u = 0;
2235 int __pyx_lineno = 0;
2236 const char *__pyx_filename = NULL;
2237 int __pyx_clineno = 0;
2238 PyObject *__pyx_r = 0;
2239 __Pyx_RefNannyDeclarations
2240 __Pyx_RefNannySetupContext(
"diffusionSin2D (wrapper)", 0);
2242 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
2243 PyObject* values[5] = {0,0,0,0,0};
2244 if (unlikely(__pyx_kwds)) {
2246 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2248 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2250 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2252 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2254 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2256 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2259 default:
goto __pyx_L5_argtuple_error;
2261 kw_args = PyDict_Size(__pyx_kwds);
2264 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
2265 else goto __pyx_L5_argtuple_error;
2268 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
2270 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D", 1, 5, 5, 1); __PYX_ERR(0, 58, __pyx_L3_error)
2274 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2276 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D", 1, 5, 5, 2); __PYX_ERR(0, 58, __pyx_L3_error)
2280 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2282 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D", 1, 5, 5, 3); __PYX_ERR(0, 58, __pyx_L3_error)
2286 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
2288 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D", 1, 5, 5, 4); __PYX_ERR(0, 58, __pyx_L3_error)
2291 if (unlikely(kw_args > 0)) {
2292 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"diffusionSin2D") < 0)) __PYX_ERR(0, 58, __pyx_L3_error)
2294 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
2295 goto __pyx_L5_argtuple_error;
2297 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2298 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2299 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2300 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2301 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2303 __pyx_v_iwork = ((PyArrayObject *)values[0]);
2304 __pyx_v_rwork = ((PyArrayObject *)values[1]);
2305 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
2306 __pyx_v_x = ((PyArrayObject *)values[3]);
2307 __pyx_v_u = ((PyArrayObject *)values[4]);
2309 goto __pyx_L4_argument_unpacking_done;
2310 __pyx_L5_argtuple_error:;
2311 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 58, __pyx_L3_error)
2313 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
2314 __Pyx_RefNannyFinishContext();
2316 __pyx_L4_argument_unpacking_done:;
2317 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
2318 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
2319 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
2320 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 58, __pyx_L1_error)
2321 __pyx_r = __pyx_pf_20canalyticalSolutions_4diffusionSin2D(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
2328 __Pyx_RefNannyFinishContext();
2332 static PyObject *__pyx_pf_20canalyticalSolutions_4diffusionSin2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
2333 PyObject *__pyx_r = NULL;
2334 __Pyx_RefNannyDeclarations
2335 PyObject *__pyx_t_1 = NULL;
2336 PyObject *__pyx_t_2 = NULL;
2337 PyObject *__pyx_t_3 = NULL;
2339 int __pyx_lineno = 0;
2340 const char *__pyx_filename = NULL;
2341 int __pyx_clineno = 0;
2342 __Pyx_RefNannySetupContext(
"diffusionSin2D", 0);
2351 __Pyx_XDECREF(__pyx_r);
2352 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
2353 __Pyx_GOTREF(__pyx_t_1);
2354 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
2355 __Pyx_GOTREF(__pyx_t_2);
2356 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
2357 __Pyx_GOTREF(__pyx_t_3);
2358 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2359 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2360 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L1_error)
2361 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2362 __pyx_t_3 = __Pyx_PyInt_From_int(
diffusionSin2D(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
2363 __Pyx_GOTREF(__pyx_t_3);
2364 __pyx_r = __pyx_t_3;
2378 __Pyx_XDECREF(__pyx_t_1);
2379 __Pyx_XDECREF(__pyx_t_2);
2380 __Pyx_XDECREF(__pyx_t_3);
2381 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
2384 __Pyx_XGIVEREF(__pyx_r);
2385 __Pyx_RefNannyFinishContext();
2398 static PyObject *__pyx_pw_20canalyticalSolutions_7diffusionSin3D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2399 static PyMethodDef __pyx_mdef_20canalyticalSolutions_7diffusionSin3D = {
"diffusionSin3D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_7diffusionSin3D, METH_VARARGS|METH_KEYWORDS, 0};
2400 static PyObject *__pyx_pw_20canalyticalSolutions_7diffusionSin3D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2401 PyArrayObject *__pyx_v_iwork = 0;
2402 PyArrayObject *__pyx_v_rwork = 0;
2404 PyArrayObject *__pyx_v_x = 0;
2405 PyArrayObject *__pyx_v_u = 0;
2406 int __pyx_lineno = 0;
2407 const char *__pyx_filename = NULL;
2408 int __pyx_clineno = 0;
2409 PyObject *__pyx_r = 0;
2410 __Pyx_RefNannyDeclarations
2411 __Pyx_RefNannySetupContext(
"diffusionSin3D (wrapper)", 0);
2413 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
2414 PyObject* values[5] = {0,0,0,0,0};
2415 if (unlikely(__pyx_kwds)) {
2417 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2419 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2421 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2423 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2425 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2427 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2430 default:
goto __pyx_L5_argtuple_error;
2432 kw_args = PyDict_Size(__pyx_kwds);
2435 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
2436 else goto __pyx_L5_argtuple_error;
2439 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
2441 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D", 1, 5, 5, 1); __PYX_ERR(0, 62, __pyx_L3_error)
2445 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2447 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D", 1, 5, 5, 2); __PYX_ERR(0, 62, __pyx_L3_error)
2451 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2453 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D", 1, 5, 5, 3); __PYX_ERR(0, 62, __pyx_L3_error)
2457 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
2459 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D", 1, 5, 5, 4); __PYX_ERR(0, 62, __pyx_L3_error)
2462 if (unlikely(kw_args > 0)) {
2463 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"diffusionSin3D") < 0)) __PYX_ERR(0, 62, __pyx_L3_error)
2465 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
2466 goto __pyx_L5_argtuple_error;
2468 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2469 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2470 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2471 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2472 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2474 __pyx_v_iwork = ((PyArrayObject *)values[0]);
2475 __pyx_v_rwork = ((PyArrayObject *)values[1]);
2476 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L3_error)
2477 __pyx_v_x = ((PyArrayObject *)values[3]);
2478 __pyx_v_u = ((PyArrayObject *)values[4]);
2480 goto __pyx_L4_argument_unpacking_done;
2481 __pyx_L5_argtuple_error:;
2482 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 62, __pyx_L3_error)
2484 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
2485 __Pyx_RefNannyFinishContext();
2487 __pyx_L4_argument_unpacking_done:;
2488 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 62, __pyx_L1_error)
2489 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 62, __pyx_L1_error)
2490 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 62, __pyx_L1_error)
2491 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 62, __pyx_L1_error)
2492 __pyx_r = __pyx_pf_20canalyticalSolutions_6diffusionSin3D(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
2499 __Pyx_RefNannyFinishContext();
2503 static PyObject *__pyx_pf_20canalyticalSolutions_6diffusionSin3D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
2504 PyObject *__pyx_r = NULL;
2505 __Pyx_RefNannyDeclarations
2506 PyObject *__pyx_t_1 = NULL;
2507 PyObject *__pyx_t_2 = NULL;
2508 PyObject *__pyx_t_3 = NULL;
2510 int __pyx_lineno = 0;
2511 const char *__pyx_filename = NULL;
2512 int __pyx_clineno = 0;
2513 __Pyx_RefNannySetupContext(
"diffusionSin3D", 0);
2522 __Pyx_XDECREF(__pyx_r);
2523 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
2524 __Pyx_GOTREF(__pyx_t_1);
2525 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
2526 __Pyx_GOTREF(__pyx_t_2);
2527 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
2528 __Pyx_GOTREF(__pyx_t_3);
2529 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2530 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2531 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 63, __pyx_L1_error)
2532 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2533 __pyx_t_3 = __Pyx_PyInt_From_int(
diffusionSin3D(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
2534 __Pyx_GOTREF(__pyx_t_3);
2535 __pyx_r = __pyx_t_3;
2549 __Pyx_XDECREF(__pyx_t_1);
2550 __Pyx_XDECREF(__pyx_t_2);
2551 __Pyx_XDECREF(__pyx_t_3);
2552 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
2555 __Pyx_XGIVEREF(__pyx_r);
2556 __Pyx_RefNannyFinishContext();
2569 static PyObject *__pyx_pw_20canalyticalSolutions_9diffusionSin1D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2570 static PyMethodDef __pyx_mdef_20canalyticalSolutions_9diffusionSin1D_r = {
"diffusionSin1D_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_9diffusionSin1D_r, METH_VARARGS|METH_KEYWORDS, 0};
2571 static PyObject *__pyx_pw_20canalyticalSolutions_9diffusionSin1D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2572 PyArrayObject *__pyx_v_iwork = 0;
2573 PyArrayObject *__pyx_v_rwork = 0;
2575 PyArrayObject *__pyx_v_x = 0;
2576 PyArrayObject *__pyx_v_u = 0;
2577 PyArrayObject *__pyx_v_r = 0;
2578 int __pyx_lineno = 0;
2579 const char *__pyx_filename = NULL;
2580 int __pyx_clineno = 0;
2581 PyObject *__pyx_r = 0;
2582 __Pyx_RefNannyDeclarations
2583 __Pyx_RefNannySetupContext(
"diffusionSin1D_r (wrapper)", 0);
2585 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
2586 PyObject* values[6] = {0,0,0,0,0,0};
2587 if (unlikely(__pyx_kwds)) {
2589 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2591 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2593 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2595 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2597 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2599 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2601 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2604 default:
goto __pyx_L5_argtuple_error;
2606 kw_args = PyDict_Size(__pyx_kwds);
2609 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
2610 else goto __pyx_L5_argtuple_error;
2613 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
2615 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D_r", 1, 6, 6, 1); __PYX_ERR(0, 66, __pyx_L3_error)
2619 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2621 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D_r", 1, 6, 6, 2); __PYX_ERR(0, 66, __pyx_L3_error)
2625 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2627 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D_r", 1, 6, 6, 3); __PYX_ERR(0, 66, __pyx_L3_error)
2631 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
2633 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D_r", 1, 6, 6, 4); __PYX_ERR(0, 66, __pyx_L3_error)
2637 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
2639 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D_r", 1, 6, 6, 5); __PYX_ERR(0, 66, __pyx_L3_error)
2642 if (unlikely(kw_args > 0)) {
2643 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"diffusionSin1D_r") < 0)) __PYX_ERR(0, 66, __pyx_L3_error)
2645 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
2646 goto __pyx_L5_argtuple_error;
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);
2655 __pyx_v_iwork = ((PyArrayObject *)values[0]);
2656 __pyx_v_rwork = ((PyArrayObject *)values[1]);
2657 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L3_error)
2658 __pyx_v_x = ((PyArrayObject *)values[3]);
2659 __pyx_v_u = ((PyArrayObject *)values[4]);
2660 __pyx_v_r = ((PyArrayObject *)values[5]);
2662 goto __pyx_L4_argument_unpacking_done;
2663 __pyx_L5_argtuple_error:;
2664 __Pyx_RaiseArgtupleInvalid(
"diffusionSin1D_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 66, __pyx_L3_error)
2666 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin1D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
2667 __Pyx_RefNannyFinishContext();
2669 __pyx_L4_argument_unpacking_done:;
2670 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
2671 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
2672 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
2673 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
2674 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 66, __pyx_L1_error)
2675 __pyx_r = __pyx_pf_20canalyticalSolutions_8diffusionSin1D_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
2682 __Pyx_RefNannyFinishContext();
2686 static PyObject *__pyx_pf_20canalyticalSolutions_8diffusionSin1D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
2687 PyObject *__pyx_r = NULL;
2688 __Pyx_RefNannyDeclarations
2689 PyObject *__pyx_t_1 = NULL;
2690 PyObject *__pyx_t_2 = NULL;
2691 PyObject *__pyx_t_3 = NULL;
2693 int __pyx_lineno = 0;
2694 const char *__pyx_filename = NULL;
2695 int __pyx_clineno = 0;
2696 __Pyx_RefNannySetupContext(
"diffusionSin1D_r", 0);
2705 __Pyx_XDECREF(__pyx_r);
2706 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
2707 __Pyx_GOTREF(__pyx_t_1);
2708 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
2709 __Pyx_GOTREF(__pyx_t_2);
2710 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
2711 __Pyx_GOTREF(__pyx_t_3);
2712 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2713 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2714 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 67, __pyx_L1_error)
2715 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2716 __pyx_t_3 = __Pyx_PyInt_From_int(
diffusionSin1D_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
2717 __Pyx_GOTREF(__pyx_t_3);
2718 __pyx_r = __pyx_t_3;
2732 __Pyx_XDECREF(__pyx_t_1);
2733 __Pyx_XDECREF(__pyx_t_2);
2734 __Pyx_XDECREF(__pyx_t_3);
2735 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin1D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
2738 __Pyx_XGIVEREF(__pyx_r);
2739 __Pyx_RefNannyFinishContext();
2752 static PyObject *__pyx_pw_20canalyticalSolutions_11diffusionSin2D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2753 static PyMethodDef __pyx_mdef_20canalyticalSolutions_11diffusionSin2D_r = {
"diffusionSin2D_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_11diffusionSin2D_r, METH_VARARGS|METH_KEYWORDS, 0};
2754 static PyObject *__pyx_pw_20canalyticalSolutions_11diffusionSin2D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2755 PyArrayObject *__pyx_v_iwork = 0;
2756 PyArrayObject *__pyx_v_rwork = 0;
2758 PyArrayObject *__pyx_v_x = 0;
2759 PyArrayObject *__pyx_v_u = 0;
2760 PyArrayObject *__pyx_v_r = 0;
2761 int __pyx_lineno = 0;
2762 const char *__pyx_filename = NULL;
2763 int __pyx_clineno = 0;
2764 PyObject *__pyx_r = 0;
2765 __Pyx_RefNannyDeclarations
2766 __Pyx_RefNannySetupContext(
"diffusionSin2D_r (wrapper)", 0);
2768 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
2769 PyObject* values[6] = {0,0,0,0,0,0};
2770 if (unlikely(__pyx_kwds)) {
2772 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2774 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2776 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2778 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2780 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2782 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2784 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2787 default:
goto __pyx_L5_argtuple_error;
2789 kw_args = PyDict_Size(__pyx_kwds);
2792 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
2793 else goto __pyx_L5_argtuple_error;
2796 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
2798 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D_r", 1, 6, 6, 1); __PYX_ERR(0, 70, __pyx_L3_error)
2802 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2804 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D_r", 1, 6, 6, 2); __PYX_ERR(0, 70, __pyx_L3_error)
2808 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2810 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D_r", 1, 6, 6, 3); __PYX_ERR(0, 70, __pyx_L3_error)
2814 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
2816 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D_r", 1, 6, 6, 4); __PYX_ERR(0, 70, __pyx_L3_error)
2820 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
2822 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D_r", 1, 6, 6, 5); __PYX_ERR(0, 70, __pyx_L3_error)
2825 if (unlikely(kw_args > 0)) {
2826 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"diffusionSin2D_r") < 0)) __PYX_ERR(0, 70, __pyx_L3_error)
2828 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
2829 goto __pyx_L5_argtuple_error;
2831 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2832 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2833 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2834 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2835 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2836 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2838 __pyx_v_iwork = ((PyArrayObject *)values[0]);
2839 __pyx_v_rwork = ((PyArrayObject *)values[1]);
2840 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 70, __pyx_L3_error)
2841 __pyx_v_x = ((PyArrayObject *)values[3]);
2842 __pyx_v_u = ((PyArrayObject *)values[4]);
2843 __pyx_v_r = ((PyArrayObject *)values[5]);
2845 goto __pyx_L4_argument_unpacking_done;
2846 __pyx_L5_argtuple_error:;
2847 __Pyx_RaiseArgtupleInvalid(
"diffusionSin2D_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error)
2849 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin2D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
2850 __Pyx_RefNannyFinishContext();
2852 __pyx_L4_argument_unpacking_done:;
2853 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2854 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2855 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2856 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2857 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2858 __pyx_r = __pyx_pf_20canalyticalSolutions_10diffusionSin2D_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
2865 __Pyx_RefNannyFinishContext();
2869 static PyObject *__pyx_pf_20canalyticalSolutions_10diffusionSin2D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
2870 PyObject *__pyx_r = NULL;
2871 __Pyx_RefNannyDeclarations
2872 PyObject *__pyx_t_1 = NULL;
2873 PyObject *__pyx_t_2 = NULL;
2874 PyObject *__pyx_t_3 = NULL;
2876 int __pyx_lineno = 0;
2877 const char *__pyx_filename = NULL;
2878 int __pyx_clineno = 0;
2879 __Pyx_RefNannySetupContext(
"diffusionSin2D_r", 0);
2888 __Pyx_XDECREF(__pyx_r);
2889 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2890 __Pyx_GOTREF(__pyx_t_1);
2891 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
2892 __Pyx_GOTREF(__pyx_t_2);
2893 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
2894 __Pyx_GOTREF(__pyx_t_3);
2895 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2896 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2897 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 71, __pyx_L1_error)
2898 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2899 __pyx_t_3 = __Pyx_PyInt_From_int(
diffusionSin2D_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
2900 __Pyx_GOTREF(__pyx_t_3);
2901 __pyx_r = __pyx_t_3;
2915 __Pyx_XDECREF(__pyx_t_1);
2916 __Pyx_XDECREF(__pyx_t_2);
2917 __Pyx_XDECREF(__pyx_t_3);
2918 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin2D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
2921 __Pyx_XGIVEREF(__pyx_r);
2922 __Pyx_RefNannyFinishContext();
2935 static PyObject *__pyx_pw_20canalyticalSolutions_13diffusionSin3D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2936 static PyMethodDef __pyx_mdef_20canalyticalSolutions_13diffusionSin3D_r = {
"diffusionSin3D_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_13diffusionSin3D_r, METH_VARARGS|METH_KEYWORDS, 0};
2937 static PyObject *__pyx_pw_20canalyticalSolutions_13diffusionSin3D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2938 PyArrayObject *__pyx_v_iwork = 0;
2939 PyArrayObject *__pyx_v_rwork = 0;
2941 PyArrayObject *__pyx_v_x = 0;
2942 PyArrayObject *__pyx_v_u = 0;
2943 PyArrayObject *__pyx_v_r = 0;
2944 int __pyx_lineno = 0;
2945 const char *__pyx_filename = NULL;
2946 int __pyx_clineno = 0;
2947 PyObject *__pyx_r = 0;
2948 __Pyx_RefNannyDeclarations
2949 __Pyx_RefNannySetupContext(
"diffusionSin3D_r (wrapper)", 0);
2951 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
2952 PyObject* values[6] = {0,0,0,0,0,0};
2953 if (unlikely(__pyx_kwds)) {
2955 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2957 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2959 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2961 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2963 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2965 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2967 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2970 default:
goto __pyx_L5_argtuple_error;
2972 kw_args = PyDict_Size(__pyx_kwds);
2975 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
2976 else goto __pyx_L5_argtuple_error;
2979 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
2981 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D_r", 1, 6, 6, 1); __PYX_ERR(0, 74, __pyx_L3_error)
2985 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
2987 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D_r", 1, 6, 6, 2); __PYX_ERR(0, 74, __pyx_L3_error)
2991 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
2993 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D_r", 1, 6, 6, 3); __PYX_ERR(0, 74, __pyx_L3_error)
2997 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
2999 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D_r", 1, 6, 6, 4); __PYX_ERR(0, 74, __pyx_L3_error)
3003 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
3005 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D_r", 1, 6, 6, 5); __PYX_ERR(0, 74, __pyx_L3_error)
3008 if (unlikely(kw_args > 0)) {
3009 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"diffusionSin3D_r") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
3011 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
3012 goto __pyx_L5_argtuple_error;
3014 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3015 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3016 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3017 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3018 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3019 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3021 __pyx_v_iwork = ((PyArrayObject *)values[0]);
3022 __pyx_v_rwork = ((PyArrayObject *)values[1]);
3023 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L3_error)
3024 __pyx_v_x = ((PyArrayObject *)values[3]);
3025 __pyx_v_u = ((PyArrayObject *)values[4]);
3026 __pyx_v_r = ((PyArrayObject *)values[5]);
3028 goto __pyx_L4_argument_unpacking_done;
3029 __pyx_L5_argtuple_error:;
3030 __Pyx_RaiseArgtupleInvalid(
"diffusionSin3D_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error)
3032 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin3D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
3033 __Pyx_RefNannyFinishContext();
3035 __pyx_L4_argument_unpacking_done:;
3036 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 74, __pyx_L1_error)
3037 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 74, __pyx_L1_error)
3038 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 74, __pyx_L1_error)
3039 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 74, __pyx_L1_error)
3040 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 74, __pyx_L1_error)
3041 __pyx_r = __pyx_pf_20canalyticalSolutions_12diffusionSin3D_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
3048 __Pyx_RefNannyFinishContext();
3052 static PyObject *__pyx_pf_20canalyticalSolutions_12diffusionSin3D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
3053 PyObject *__pyx_r = NULL;
3054 __Pyx_RefNannyDeclarations
3055 PyObject *__pyx_t_1 = NULL;
3056 PyObject *__pyx_t_2 = NULL;
3057 PyObject *__pyx_t_3 = NULL;
3059 int __pyx_lineno = 0;
3060 const char *__pyx_filename = NULL;
3061 int __pyx_clineno = 0;
3062 __Pyx_RefNannySetupContext(
"diffusionSin3D_r", 0);
3071 __Pyx_XDECREF(__pyx_r);
3072 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
3073 __Pyx_GOTREF(__pyx_t_1);
3074 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
3075 __Pyx_GOTREF(__pyx_t_2);
3076 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error)
3077 __Pyx_GOTREF(__pyx_t_3);
3078 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3079 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3080 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error)
3081 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3082 __pyx_t_3 = __Pyx_PyInt_From_int(
diffusionSin3D_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error)
3083 __Pyx_GOTREF(__pyx_t_3);
3084 __pyx_r = __pyx_t_3;
3098 __Pyx_XDECREF(__pyx_t_1);
3099 __Pyx_XDECREF(__pyx_t_2);
3100 __Pyx_XDECREF(__pyx_t_3);
3101 __Pyx_AddTraceback(
"canalyticalSolutions.diffusionSin3D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
3104 __Pyx_XGIVEREF(__pyx_r);
3105 __Pyx_RefNannyFinishContext();
3118 static PyObject *__pyx_pw_20canalyticalSolutions_15LinearAD_DiracIC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3119 static PyMethodDef __pyx_mdef_20canalyticalSolutions_15LinearAD_DiracIC = {
"LinearAD_DiracIC", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_15LinearAD_DiracIC, METH_VARARGS|METH_KEYWORDS, 0};
3120 static PyObject *__pyx_pw_20canalyticalSolutions_15LinearAD_DiracIC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3121 PyArrayObject *__pyx_v_iwork = 0;
3122 PyArrayObject *__pyx_v_rwork = 0;
3124 PyArrayObject *__pyx_v_x = 0;
3125 PyArrayObject *__pyx_v_u = 0;
3126 int __pyx_lineno = 0;
3127 const char *__pyx_filename = NULL;
3128 int __pyx_clineno = 0;
3129 PyObject *__pyx_r = 0;
3130 __Pyx_RefNannyDeclarations
3131 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC (wrapper)", 0);
3133 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
3134 PyObject* values[5] = {0,0,0,0,0};
3135 if (unlikely(__pyx_kwds)) {
3137 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3139 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3141 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3143 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3145 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3147 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3150 default:
goto __pyx_L5_argtuple_error;
3152 kw_args = PyDict_Size(__pyx_kwds);
3155 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
3156 else goto __pyx_L5_argtuple_error;
3159 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
3161 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC", 1, 5, 5, 1); __PYX_ERR(0, 78, __pyx_L3_error)
3165 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
3167 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC", 1, 5, 5, 2); __PYX_ERR(0, 78, __pyx_L3_error)
3171 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3173 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC", 1, 5, 5, 3); __PYX_ERR(0, 78, __pyx_L3_error)
3177 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
3179 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC", 1, 5, 5, 4); __PYX_ERR(0, 78, __pyx_L3_error)
3182 if (unlikely(kw_args > 0)) {
3183 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearAD_DiracIC") < 0)) __PYX_ERR(0, 78, __pyx_L3_error)
3185 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3186 goto __pyx_L5_argtuple_error;
3188 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3189 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3190 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3191 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3192 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3194 __pyx_v_iwork = ((PyArrayObject *)values[0]);
3195 __pyx_v_rwork = ((PyArrayObject *)values[1]);
3196 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 78, __pyx_L3_error)
3197 __pyx_v_x = ((PyArrayObject *)values[3]);
3198 __pyx_v_u = ((PyArrayObject *)values[4]);
3200 goto __pyx_L4_argument_unpacking_done;
3201 __pyx_L5_argtuple_error:;
3202 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 78, __pyx_L3_error)
3204 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC", __pyx_clineno, __pyx_lineno, __pyx_filename);
3205 __Pyx_RefNannyFinishContext();
3207 __pyx_L4_argument_unpacking_done:;
3208 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 78, __pyx_L1_error)
3209 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 78, __pyx_L1_error)
3210 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 78, __pyx_L1_error)
3211 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 78, __pyx_L1_error)
3212 __pyx_r = __pyx_pf_20canalyticalSolutions_14LinearAD_DiracIC(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
3219 __Pyx_RefNannyFinishContext();
3223 static PyObject *__pyx_pf_20canalyticalSolutions_14LinearAD_DiracIC(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
3224 PyObject *__pyx_r = NULL;
3225 __Pyx_RefNannyDeclarations
3226 PyObject *__pyx_t_1 = NULL;
3227 PyObject *__pyx_t_2 = NULL;
3228 PyObject *__pyx_t_3 = NULL;
3230 int __pyx_lineno = 0;
3231 const char *__pyx_filename = NULL;
3232 int __pyx_clineno = 0;
3233 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC", 0);
3242 __Pyx_XDECREF(__pyx_r);
3243 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
3244 __Pyx_GOTREF(__pyx_t_1);
3245 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
3246 __Pyx_GOTREF(__pyx_t_2);
3247 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)
3248 __Pyx_GOTREF(__pyx_t_3);
3249 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3250 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3251 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error)
3252 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3253 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearAD_DiracIC(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)
3254 __Pyx_GOTREF(__pyx_t_3);
3255 __pyx_r = __pyx_t_3;
3269 __Pyx_XDECREF(__pyx_t_1);
3270 __Pyx_XDECREF(__pyx_t_2);
3271 __Pyx_XDECREF(__pyx_t_3);
3272 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC", __pyx_clineno, __pyx_lineno, __pyx_filename);
3275 __Pyx_XGIVEREF(__pyx_r);
3276 __Pyx_RefNannyFinishContext();
3289 static PyObject *__pyx_pw_20canalyticalSolutions_17LinearAD_DiracIC_advectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3290 static PyMethodDef __pyx_mdef_20canalyticalSolutions_17LinearAD_DiracIC_advectiveVelocity = {
"LinearAD_DiracIC_advectiveVelocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_17LinearAD_DiracIC_advectiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
3291 static PyObject *__pyx_pw_20canalyticalSolutions_17LinearAD_DiracIC_advectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3292 PyArrayObject *__pyx_v_iwork = 0;
3293 PyArrayObject *__pyx_v_rwork = 0;
3295 PyArrayObject *__pyx_v_x = 0;
3296 PyArrayObject *__pyx_v_f = 0;
3297 int __pyx_lineno = 0;
3298 const char *__pyx_filename = NULL;
3299 int __pyx_clineno = 0;
3300 PyObject *__pyx_r = 0;
3301 __Pyx_RefNannyDeclarations
3302 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_advectiveVelocity (wrapper)", 0);
3304 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_f,0};
3305 PyObject* values[5] = {0,0,0,0,0};
3306 if (unlikely(__pyx_kwds)) {
3308 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3310 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3312 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3314 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3316 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3318 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3321 default:
goto __pyx_L5_argtuple_error;
3323 kw_args = PyDict_Size(__pyx_kwds);
3326 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
3327 else goto __pyx_L5_argtuple_error;
3330 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
3332 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_advectiveVelocity", 1, 5, 5, 1); __PYX_ERR(0, 82, __pyx_L3_error)
3336 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
3338 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_advectiveVelocity", 1, 5, 5, 2); __PYX_ERR(0, 82, __pyx_L3_error)
3342 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3344 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_advectiveVelocity", 1, 5, 5, 3); __PYX_ERR(0, 82, __pyx_L3_error)
3348 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
3350 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_advectiveVelocity", 1, 5, 5, 4); __PYX_ERR(0, 82, __pyx_L3_error)
3353 if (unlikely(kw_args > 0)) {
3354 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearAD_DiracIC_advectiveVelocity") < 0)) __PYX_ERR(0, 82, __pyx_L3_error)
3356 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3357 goto __pyx_L5_argtuple_error;
3359 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3360 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3361 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3362 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3363 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3365 __pyx_v_iwork = ((PyArrayObject *)values[0]);
3366 __pyx_v_rwork = ((PyArrayObject *)values[1]);
3367 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L3_error)
3368 __pyx_v_x = ((PyArrayObject *)values[3]);
3369 __pyx_v_f = ((PyArrayObject *)values[4]);
3371 goto __pyx_L4_argument_unpacking_done;
3372 __pyx_L5_argtuple_error:;
3373 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_advectiveVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error)
3375 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_advectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3376 __Pyx_RefNannyFinishContext();
3378 __pyx_L4_argument_unpacking_done:;
3379 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 82, __pyx_L1_error)
3380 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 82, __pyx_L1_error)
3381 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 82, __pyx_L1_error)
3382 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 82, __pyx_L1_error)
3383 __pyx_r = __pyx_pf_20canalyticalSolutions_16LinearAD_DiracIC_advectiveVelocity(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_f);
3390 __Pyx_RefNannyFinishContext();
3394 static PyObject *__pyx_pf_20canalyticalSolutions_16LinearAD_DiracIC_advectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f) {
3395 PyObject *__pyx_r = NULL;
3396 __Pyx_RefNannyDeclarations
3397 PyObject *__pyx_t_1 = NULL;
3398 PyObject *__pyx_t_2 = NULL;
3399 PyObject *__pyx_t_3 = NULL;
3401 int __pyx_lineno = 0;
3402 const char *__pyx_filename = NULL;
3403 int __pyx_clineno = 0;
3404 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_advectiveVelocity", 0);
3413 __Pyx_XDECREF(__pyx_r);
3414 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
3415 __Pyx_GOTREF(__pyx_t_1);
3416 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
3417 __Pyx_GOTREF(__pyx_t_2);
3418 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
3419 __Pyx_GOTREF(__pyx_t_3);
3420 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3421 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3422 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error)
3423 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3424 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearAD_DiracIC_advectiveVelocity(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_f->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
3425 __Pyx_GOTREF(__pyx_t_3);
3426 __pyx_r = __pyx_t_3;
3440 __Pyx_XDECREF(__pyx_t_1);
3441 __Pyx_XDECREF(__pyx_t_2);
3442 __Pyx_XDECREF(__pyx_t_3);
3443 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_advectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3446 __Pyx_XGIVEREF(__pyx_r);
3447 __Pyx_RefNannyFinishContext();
3460 static PyObject *__pyx_pw_20canalyticalSolutions_19LinearAD_DiracIC_diffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3461 static PyMethodDef __pyx_mdef_20canalyticalSolutions_19LinearAD_DiracIC_diffusiveVelocity = {
"LinearAD_DiracIC_diffusiveVelocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_19LinearAD_DiracIC_diffusiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
3462 static PyObject *__pyx_pw_20canalyticalSolutions_19LinearAD_DiracIC_diffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3463 PyArrayObject *__pyx_v_iwork = 0;
3464 PyArrayObject *__pyx_v_rwork = 0;
3466 PyArrayObject *__pyx_v_x = 0;
3467 PyArrayObject *__pyx_v_f = 0;
3468 int __pyx_lineno = 0;
3469 const char *__pyx_filename = NULL;
3470 int __pyx_clineno = 0;
3471 PyObject *__pyx_r = 0;
3472 __Pyx_RefNannyDeclarations
3473 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_diffusiveVelocity (wrapper)", 0);
3475 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_f,0};
3476 PyObject* values[5] = {0,0,0,0,0};
3477 if (unlikely(__pyx_kwds)) {
3479 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3481 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3483 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3485 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3487 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3489 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3492 default:
goto __pyx_L5_argtuple_error;
3494 kw_args = PyDict_Size(__pyx_kwds);
3497 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
3498 else goto __pyx_L5_argtuple_error;
3501 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
3503 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_diffusiveVelocity", 1, 5, 5, 1); __PYX_ERR(0, 86, __pyx_L3_error)
3507 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
3509 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_diffusiveVelocity", 1, 5, 5, 2); __PYX_ERR(0, 86, __pyx_L3_error)
3513 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3515 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_diffusiveVelocity", 1, 5, 5, 3); __PYX_ERR(0, 86, __pyx_L3_error)
3519 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
3521 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_diffusiveVelocity", 1, 5, 5, 4); __PYX_ERR(0, 86, __pyx_L3_error)
3524 if (unlikely(kw_args > 0)) {
3525 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearAD_DiracIC_diffusiveVelocity") < 0)) __PYX_ERR(0, 86, __pyx_L3_error)
3527 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3528 goto __pyx_L5_argtuple_error;
3530 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3531 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3532 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3533 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3534 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3536 __pyx_v_iwork = ((PyArrayObject *)values[0]);
3537 __pyx_v_rwork = ((PyArrayObject *)values[1]);
3538 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L3_error)
3539 __pyx_v_x = ((PyArrayObject *)values[3]);
3540 __pyx_v_f = ((PyArrayObject *)values[4]);
3542 goto __pyx_L4_argument_unpacking_done;
3543 __pyx_L5_argtuple_error:;
3544 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_diffusiveVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 86, __pyx_L3_error)
3546 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_diffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3547 __Pyx_RefNannyFinishContext();
3549 __pyx_L4_argument_unpacking_done:;
3550 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 86, __pyx_L1_error)
3551 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 86, __pyx_L1_error)
3552 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 86, __pyx_L1_error)
3553 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 86, __pyx_L1_error)
3554 __pyx_r = __pyx_pf_20canalyticalSolutions_18LinearAD_DiracIC_diffusiveVelocity(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_f);
3561 __Pyx_RefNannyFinishContext();
3565 static PyObject *__pyx_pf_20canalyticalSolutions_18LinearAD_DiracIC_diffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f) {
3566 PyObject *__pyx_r = NULL;
3567 __Pyx_RefNannyDeclarations
3568 PyObject *__pyx_t_1 = NULL;
3569 PyObject *__pyx_t_2 = NULL;
3570 PyObject *__pyx_t_3 = NULL;
3572 int __pyx_lineno = 0;
3573 const char *__pyx_filename = NULL;
3574 int __pyx_clineno = 0;
3575 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_diffusiveVelocity", 0);
3584 __Pyx_XDECREF(__pyx_r);
3585 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
3586 __Pyx_GOTREF(__pyx_t_1);
3587 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
3588 __Pyx_GOTREF(__pyx_t_2);
3589 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)
3590 __Pyx_GOTREF(__pyx_t_3);
3591 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3592 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3593 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L1_error)
3594 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3595 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearAD_DiracIC_diffusiveVelocity(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_f->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)
3596 __Pyx_GOTREF(__pyx_t_3);
3597 __pyx_r = __pyx_t_3;
3611 __Pyx_XDECREF(__pyx_t_1);
3612 __Pyx_XDECREF(__pyx_t_2);
3613 __Pyx_XDECREF(__pyx_t_3);
3614 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_diffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3617 __Pyx_XGIVEREF(__pyx_r);
3618 __Pyx_RefNannyFinishContext();
3631 static PyObject *__pyx_pw_20canalyticalSolutions_21LinearAD_DiracIC_du(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3632 static PyMethodDef __pyx_mdef_20canalyticalSolutions_21LinearAD_DiracIC_du = {
"LinearAD_DiracIC_du", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_21LinearAD_DiracIC_du, METH_VARARGS|METH_KEYWORDS, 0};
3633 static PyObject *__pyx_pw_20canalyticalSolutions_21LinearAD_DiracIC_du(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3634 PyArrayObject *__pyx_v_iwork = 0;
3635 PyArrayObject *__pyx_v_rwork = 0;
3637 PyArrayObject *__pyx_v_x = 0;
3638 PyArrayObject *__pyx_v_du = 0;
3639 int __pyx_lineno = 0;
3640 const char *__pyx_filename = NULL;
3641 int __pyx_clineno = 0;
3642 PyObject *__pyx_r = 0;
3643 __Pyx_RefNannyDeclarations
3644 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_du (wrapper)", 0);
3646 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_du,0};
3647 PyObject* values[5] = {0,0,0,0,0};
3648 if (unlikely(__pyx_kwds)) {
3650 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3652 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3654 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3656 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3658 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3660 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3663 default:
goto __pyx_L5_argtuple_error;
3665 kw_args = PyDict_Size(__pyx_kwds);
3668 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
3669 else goto __pyx_L5_argtuple_error;
3672 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
3674 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_du", 1, 5, 5, 1); __PYX_ERR(0, 90, __pyx_L3_error)
3678 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
3680 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_du", 1, 5, 5, 2); __PYX_ERR(0, 90, __pyx_L3_error)
3684 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3686 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_du", 1, 5, 5, 3); __PYX_ERR(0, 90, __pyx_L3_error)
3690 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_du)) != 0)) kw_args--;
3692 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_du", 1, 5, 5, 4); __PYX_ERR(0, 90, __pyx_L3_error)
3695 if (unlikely(kw_args > 0)) {
3696 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearAD_DiracIC_du") < 0)) __PYX_ERR(0, 90, __pyx_L3_error)
3698 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3699 goto __pyx_L5_argtuple_error;
3701 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3702 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3703 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3704 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3705 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3707 __pyx_v_iwork = ((PyArrayObject *)values[0]);
3708 __pyx_v_rwork = ((PyArrayObject *)values[1]);
3709 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 90, __pyx_L3_error)
3710 __pyx_v_x = ((PyArrayObject *)values[3]);
3711 __pyx_v_du = ((PyArrayObject *)values[4]);
3713 goto __pyx_L4_argument_unpacking_done;
3714 __pyx_L5_argtuple_error:;
3715 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_du", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 90, __pyx_L3_error)
3717 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_du", __pyx_clineno, __pyx_lineno, __pyx_filename);
3718 __Pyx_RefNannyFinishContext();
3720 __pyx_L4_argument_unpacking_done:;
3721 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 90, __pyx_L1_error)
3722 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 90, __pyx_L1_error)
3723 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 90, __pyx_L1_error)
3724 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_du), __pyx_ptype_5numpy_ndarray, 1,
"du", 0))) __PYX_ERR(0, 90, __pyx_L1_error)
3725 __pyx_r = __pyx_pf_20canalyticalSolutions_20LinearAD_DiracIC_du(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_du);
3732 __Pyx_RefNannyFinishContext();
3736 static PyObject *__pyx_pf_20canalyticalSolutions_20LinearAD_DiracIC_du(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_du) {
3737 PyObject *__pyx_r = NULL;
3738 __Pyx_RefNannyDeclarations
3739 PyObject *__pyx_t_1 = NULL;
3740 PyObject *__pyx_t_2 = NULL;
3741 PyObject *__pyx_t_3 = NULL;
3743 int __pyx_lineno = 0;
3744 const char *__pyx_filename = NULL;
3745 int __pyx_clineno = 0;
3746 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_du", 0);
3755 __Pyx_XDECREF(__pyx_r);
3756 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
3757 __Pyx_GOTREF(__pyx_t_1);
3758 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
3759 __Pyx_GOTREF(__pyx_t_2);
3760 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
3761 __Pyx_GOTREF(__pyx_t_3);
3762 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3763 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3764 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error)
3765 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3766 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearAD_DiracIC_du(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_du->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
3767 __Pyx_GOTREF(__pyx_t_3);
3768 __pyx_r = __pyx_t_3;
3782 __Pyx_XDECREF(__pyx_t_1);
3783 __Pyx_XDECREF(__pyx_t_2);
3784 __Pyx_XDECREF(__pyx_t_3);
3785 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_du", __pyx_clineno, __pyx_lineno, __pyx_filename);
3788 __Pyx_XGIVEREF(__pyx_r);
3789 __Pyx_RefNannyFinishContext();
3802 static PyObject *__pyx_pw_20canalyticalSolutions_23LinearAD_DiracIC_totalVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3803 static PyMethodDef __pyx_mdef_20canalyticalSolutions_23LinearAD_DiracIC_totalVelocity = {
"LinearAD_DiracIC_totalVelocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_23LinearAD_DiracIC_totalVelocity, METH_VARARGS|METH_KEYWORDS, 0};
3804 static PyObject *__pyx_pw_20canalyticalSolutions_23LinearAD_DiracIC_totalVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3805 PyArrayObject *__pyx_v_iwork = 0;
3806 PyArrayObject *__pyx_v_rwork = 0;
3808 PyArrayObject *__pyx_v_x = 0;
3809 PyArrayObject *__pyx_v_u = 0;
3810 int __pyx_lineno = 0;
3811 const char *__pyx_filename = NULL;
3812 int __pyx_clineno = 0;
3813 PyObject *__pyx_r = 0;
3814 __Pyx_RefNannyDeclarations
3815 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_totalVelocity (wrapper)", 0);
3817 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
3818 PyObject* values[5] = {0,0,0,0,0};
3819 if (unlikely(__pyx_kwds)) {
3821 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3823 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3825 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3827 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3829 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3831 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3834 default:
goto __pyx_L5_argtuple_error;
3836 kw_args = PyDict_Size(__pyx_kwds);
3839 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
3840 else goto __pyx_L5_argtuple_error;
3843 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
3845 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_totalVelocity", 1, 5, 5, 1); __PYX_ERR(0, 94, __pyx_L3_error)
3849 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
3851 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_totalVelocity", 1, 5, 5, 2); __PYX_ERR(0, 94, __pyx_L3_error)
3855 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
3857 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_totalVelocity", 1, 5, 5, 3); __PYX_ERR(0, 94, __pyx_L3_error)
3861 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
3863 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_totalVelocity", 1, 5, 5, 4); __PYX_ERR(0, 94, __pyx_L3_error)
3866 if (unlikely(kw_args > 0)) {
3867 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearAD_DiracIC_totalVelocity") < 0)) __PYX_ERR(0, 94, __pyx_L3_error)
3869 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
3870 goto __pyx_L5_argtuple_error;
3872 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3873 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3874 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3875 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3876 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3878 __pyx_v_iwork = ((PyArrayObject *)values[0]);
3879 __pyx_v_rwork = ((PyArrayObject *)values[1]);
3880 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L3_error)
3881 __pyx_v_x = ((PyArrayObject *)values[3]);
3882 __pyx_v_u = ((PyArrayObject *)values[4]);
3884 goto __pyx_L4_argument_unpacking_done;
3885 __pyx_L5_argtuple_error:;
3886 __Pyx_RaiseArgtupleInvalid(
"LinearAD_DiracIC_totalVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 94, __pyx_L3_error)
3888 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_totalVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3889 __Pyx_RefNannyFinishContext();
3891 __pyx_L4_argument_unpacking_done:;
3892 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 94, __pyx_L1_error)
3893 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 94, __pyx_L1_error)
3894 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 94, __pyx_L1_error)
3895 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 94, __pyx_L1_error)
3896 __pyx_r = __pyx_pf_20canalyticalSolutions_22LinearAD_DiracIC_totalVelocity(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
3903 __Pyx_RefNannyFinishContext();
3907 static PyObject *__pyx_pf_20canalyticalSolutions_22LinearAD_DiracIC_totalVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
3908 PyObject *__pyx_r = NULL;
3909 __Pyx_RefNannyDeclarations
3910 PyObject *__pyx_t_1 = NULL;
3911 PyObject *__pyx_t_2 = NULL;
3912 PyObject *__pyx_t_3 = NULL;
3914 int __pyx_lineno = 0;
3915 const char *__pyx_filename = NULL;
3916 int __pyx_clineno = 0;
3917 __Pyx_RefNannySetupContext(
"LinearAD_DiracIC_totalVelocity", 0);
3926 __Pyx_XDECREF(__pyx_r);
3927 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
3928 __Pyx_GOTREF(__pyx_t_1);
3929 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
3930 __Pyx_GOTREF(__pyx_t_2);
3931 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
3932 __Pyx_GOTREF(__pyx_t_3);
3933 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3934 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3935 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error)
3936 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3937 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearAD_DiracIC_totalVelocity(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
3938 __Pyx_GOTREF(__pyx_t_3);
3939 __pyx_r = __pyx_t_3;
3953 __Pyx_XDECREF(__pyx_t_1);
3954 __Pyx_XDECREF(__pyx_t_2);
3955 __Pyx_XDECREF(__pyx_t_3);
3956 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_DiracIC_totalVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
3959 __Pyx_XGIVEREF(__pyx_r);
3960 __Pyx_RefNannyFinishContext();
3973 static PyObject *__pyx_pw_20canalyticalSolutions_25LinearAD_SteadyState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3974 static PyMethodDef __pyx_mdef_20canalyticalSolutions_25LinearAD_SteadyState = {
"LinearAD_SteadyState", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_25LinearAD_SteadyState, METH_VARARGS|METH_KEYWORDS, 0};
3975 static PyObject *__pyx_pw_20canalyticalSolutions_25LinearAD_SteadyState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3976 PyArrayObject *__pyx_v_iwork = 0;
3977 PyArrayObject *__pyx_v_rwork = 0;
3979 PyArrayObject *__pyx_v_x = 0;
3980 PyArrayObject *__pyx_v_u = 0;
3981 int __pyx_lineno = 0;
3982 const char *__pyx_filename = NULL;
3983 int __pyx_clineno = 0;
3984 PyObject *__pyx_r = 0;
3985 __Pyx_RefNannyDeclarations
3986 __Pyx_RefNannySetupContext(
"LinearAD_SteadyState (wrapper)", 0);
3988 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
3989 PyObject* values[5] = {0,0,0,0,0};
3990 if (unlikely(__pyx_kwds)) {
3992 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3994 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3996 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3998 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4000 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4002 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4005 default:
goto __pyx_L5_argtuple_error;
4007 kw_args = PyDict_Size(__pyx_kwds);
4010 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
4011 else goto __pyx_L5_argtuple_error;
4014 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
4016 __Pyx_RaiseArgtupleInvalid(
"LinearAD_SteadyState", 1, 5, 5, 1); __PYX_ERR(0, 98, __pyx_L3_error)
4020 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4022 __Pyx_RaiseArgtupleInvalid(
"LinearAD_SteadyState", 1, 5, 5, 2); __PYX_ERR(0, 98, __pyx_L3_error)
4026 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4028 __Pyx_RaiseArgtupleInvalid(
"LinearAD_SteadyState", 1, 5, 5, 3); __PYX_ERR(0, 98, __pyx_L3_error)
4032 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
4034 __Pyx_RaiseArgtupleInvalid(
"LinearAD_SteadyState", 1, 5, 5, 4); __PYX_ERR(0, 98, __pyx_L3_error)
4037 if (unlikely(kw_args > 0)) {
4038 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearAD_SteadyState") < 0)) __PYX_ERR(0, 98, __pyx_L3_error)
4040 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
4041 goto __pyx_L5_argtuple_error;
4043 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4044 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4045 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4046 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4047 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4049 __pyx_v_iwork = ((PyArrayObject *)values[0]);
4050 __pyx_v_rwork = ((PyArrayObject *)values[1]);
4051 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error)
4052 __pyx_v_x = ((PyArrayObject *)values[3]);
4053 __pyx_v_u = ((PyArrayObject *)values[4]);
4055 goto __pyx_L4_argument_unpacking_done;
4056 __pyx_L5_argtuple_error:;
4057 __Pyx_RaiseArgtupleInvalid(
"LinearAD_SteadyState", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 98, __pyx_L3_error)
4059 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_SteadyState", __pyx_clineno, __pyx_lineno, __pyx_filename);
4060 __Pyx_RefNannyFinishContext();
4062 __pyx_L4_argument_unpacking_done:;
4063 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 98, __pyx_L1_error)
4064 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 98, __pyx_L1_error)
4065 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 98, __pyx_L1_error)
4066 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 98, __pyx_L1_error)
4067 __pyx_r = __pyx_pf_20canalyticalSolutions_24LinearAD_SteadyState(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
4074 __Pyx_RefNannyFinishContext();
4078 static PyObject *__pyx_pf_20canalyticalSolutions_24LinearAD_SteadyState(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
4079 PyObject *__pyx_r = NULL;
4080 __Pyx_RefNannyDeclarations
4081 PyObject *__pyx_t_1 = NULL;
4082 PyObject *__pyx_t_2 = NULL;
4083 PyObject *__pyx_t_3 = NULL;
4085 int __pyx_lineno = 0;
4086 const char *__pyx_filename = NULL;
4087 int __pyx_clineno = 0;
4088 __Pyx_RefNannySetupContext(
"LinearAD_SteadyState", 0);
4097 __Pyx_XDECREF(__pyx_r);
4098 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
4099 __Pyx_GOTREF(__pyx_t_1);
4100 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
4101 __Pyx_GOTREF(__pyx_t_2);
4102 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
4103 __Pyx_GOTREF(__pyx_t_3);
4104 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4105 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4106 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L1_error)
4107 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4108 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearAD_SteadyState(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
4109 __Pyx_GOTREF(__pyx_t_3);
4110 __pyx_r = __pyx_t_3;
4124 __Pyx_XDECREF(__pyx_t_1);
4125 __Pyx_XDECREF(__pyx_t_2);
4126 __Pyx_XDECREF(__pyx_t_3);
4127 __Pyx_AddTraceback(
"canalyticalSolutions.LinearAD_SteadyState", __pyx_clineno, __pyx_lineno, __pyx_filename);
4130 __Pyx_XGIVEREF(__pyx_r);
4131 __Pyx_RefNannyFinishContext();
4144 static PyObject *__pyx_pw_20canalyticalSolutions_27LinearADR_Decay_DiracIC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4145 static PyMethodDef __pyx_mdef_20canalyticalSolutions_27LinearADR_Decay_DiracIC = {
"LinearADR_Decay_DiracIC", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_27LinearADR_Decay_DiracIC, METH_VARARGS|METH_KEYWORDS, 0};
4146 static PyObject *__pyx_pw_20canalyticalSolutions_27LinearADR_Decay_DiracIC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4147 PyArrayObject *__pyx_v_iwork = 0;
4148 PyArrayObject *__pyx_v_rwork = 0;
4150 PyArrayObject *__pyx_v_x = 0;
4151 PyArrayObject *__pyx_v_u = 0;
4152 int __pyx_lineno = 0;
4153 const char *__pyx_filename = NULL;
4154 int __pyx_clineno = 0;
4155 PyObject *__pyx_r = 0;
4156 __Pyx_RefNannyDeclarations
4157 __Pyx_RefNannySetupContext(
"LinearADR_Decay_DiracIC (wrapper)", 0);
4159 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
4160 PyObject* values[5] = {0,0,0,0,0};
4161 if (unlikely(__pyx_kwds)) {
4163 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4165 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4167 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4169 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4171 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4173 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4176 default:
goto __pyx_L5_argtuple_error;
4178 kw_args = PyDict_Size(__pyx_kwds);
4181 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
4182 else goto __pyx_L5_argtuple_error;
4185 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
4187 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC", 1, 5, 5, 1); __PYX_ERR(0, 102, __pyx_L3_error)
4191 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4193 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC", 1, 5, 5, 2); __PYX_ERR(0, 102, __pyx_L3_error)
4197 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4199 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC", 1, 5, 5, 3); __PYX_ERR(0, 102, __pyx_L3_error)
4203 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
4205 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC", 1, 5, 5, 4); __PYX_ERR(0, 102, __pyx_L3_error)
4208 if (unlikely(kw_args > 0)) {
4209 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Decay_DiracIC") < 0)) __PYX_ERR(0, 102, __pyx_L3_error)
4211 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
4212 goto __pyx_L5_argtuple_error;
4214 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4215 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4216 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4217 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4218 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4220 __pyx_v_iwork = ((PyArrayObject *)values[0]);
4221 __pyx_v_rwork = ((PyArrayObject *)values[1]);
4222 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L3_error)
4223 __pyx_v_x = ((PyArrayObject *)values[3]);
4224 __pyx_v_u = ((PyArrayObject *)values[4]);
4226 goto __pyx_L4_argument_unpacking_done;
4227 __pyx_L5_argtuple_error:;
4228 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 102, __pyx_L3_error)
4230 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Decay_DiracIC", __pyx_clineno, __pyx_lineno, __pyx_filename);
4231 __Pyx_RefNannyFinishContext();
4233 __pyx_L4_argument_unpacking_done:;
4234 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 102, __pyx_L1_error)
4235 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 102, __pyx_L1_error)
4236 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 102, __pyx_L1_error)
4237 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 102, __pyx_L1_error)
4238 __pyx_r = __pyx_pf_20canalyticalSolutions_26LinearADR_Decay_DiracIC(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
4245 __Pyx_RefNannyFinishContext();
4249 static PyObject *__pyx_pf_20canalyticalSolutions_26LinearADR_Decay_DiracIC(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
4250 PyObject *__pyx_r = NULL;
4251 __Pyx_RefNannyDeclarations
4252 PyObject *__pyx_t_1 = NULL;
4253 PyObject *__pyx_t_2 = NULL;
4254 PyObject *__pyx_t_3 = NULL;
4256 int __pyx_lineno = 0;
4257 const char *__pyx_filename = NULL;
4258 int __pyx_clineno = 0;
4259 __Pyx_RefNannySetupContext(
"LinearADR_Decay_DiracIC", 0);
4268 __Pyx_XDECREF(__pyx_r);
4269 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
4270 __Pyx_GOTREF(__pyx_t_1);
4271 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
4272 __Pyx_GOTREF(__pyx_t_2);
4273 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
4274 __Pyx_GOTREF(__pyx_t_3);
4275 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4276 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4277 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L1_error)
4278 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4279 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Decay_DiracIC(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
4280 __Pyx_GOTREF(__pyx_t_3);
4281 __pyx_r = __pyx_t_3;
4295 __Pyx_XDECREF(__pyx_t_1);
4296 __Pyx_XDECREF(__pyx_t_2);
4297 __Pyx_XDECREF(__pyx_t_3);
4298 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Decay_DiracIC", __pyx_clineno, __pyx_lineno, __pyx_filename);
4301 __Pyx_XGIVEREF(__pyx_r);
4302 __Pyx_RefNannyFinishContext();
4315 static PyObject *__pyx_pw_20canalyticalSolutions_29LinearADR_Decay_DiracIC_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4316 static PyMethodDef __pyx_mdef_20canalyticalSolutions_29LinearADR_Decay_DiracIC_dr = {
"LinearADR_Decay_DiracIC_dr", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_29LinearADR_Decay_DiracIC_dr, METH_VARARGS|METH_KEYWORDS, 0};
4317 static PyObject *__pyx_pw_20canalyticalSolutions_29LinearADR_Decay_DiracIC_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4318 PyArrayObject *__pyx_v_iwork = 0;
4319 PyArrayObject *__pyx_v_rwork = 0;
4321 PyArrayObject *__pyx_v_x = 0;
4322 PyArrayObject *__pyx_v_u = 0;
4323 PyArrayObject *__pyx_v_dr = 0;
4324 int __pyx_lineno = 0;
4325 const char *__pyx_filename = NULL;
4326 int __pyx_clineno = 0;
4327 PyObject *__pyx_r = 0;
4328 __Pyx_RefNannyDeclarations
4329 __Pyx_RefNannySetupContext(
"LinearADR_Decay_DiracIC_dr (wrapper)", 0);
4331 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_dr,0};
4332 PyObject* values[6] = {0,0,0,0,0,0};
4333 if (unlikely(__pyx_kwds)) {
4335 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4337 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4339 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4341 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4343 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4345 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4347 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4350 default:
goto __pyx_L5_argtuple_error;
4352 kw_args = PyDict_Size(__pyx_kwds);
4355 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
4356 else goto __pyx_L5_argtuple_error;
4359 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
4361 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_dr", 1, 6, 6, 1); __PYX_ERR(0, 106, __pyx_L3_error)
4365 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4367 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_dr", 1, 6, 6, 2); __PYX_ERR(0, 106, __pyx_L3_error)
4371 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4373 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_dr", 1, 6, 6, 3); __PYX_ERR(0, 106, __pyx_L3_error)
4377 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
4379 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_dr", 1, 6, 6, 4); __PYX_ERR(0, 106, __pyx_L3_error)
4383 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
4385 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_dr", 1, 6, 6, 5); __PYX_ERR(0, 106, __pyx_L3_error)
4388 if (unlikely(kw_args > 0)) {
4389 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Decay_DiracIC_dr") < 0)) __PYX_ERR(0, 106, __pyx_L3_error)
4391 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
4392 goto __pyx_L5_argtuple_error;
4394 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4395 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4396 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4397 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4398 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4399 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4401 __pyx_v_iwork = ((PyArrayObject *)values[0]);
4402 __pyx_v_rwork = ((PyArrayObject *)values[1]);
4403 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L3_error)
4404 __pyx_v_x = ((PyArrayObject *)values[3]);
4405 __pyx_v_u = ((PyArrayObject *)values[4]);
4406 __pyx_v_dr = ((PyArrayObject *)values[5]);
4408 goto __pyx_L4_argument_unpacking_done;
4409 __pyx_L5_argtuple_error:;
4410 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_dr", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 106, __pyx_L3_error)
4412 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Decay_DiracIC_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
4413 __Pyx_RefNannyFinishContext();
4415 __pyx_L4_argument_unpacking_done:;
4416 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 106, __pyx_L1_error)
4417 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 106, __pyx_L1_error)
4418 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 106, __pyx_L1_error)
4419 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 106, __pyx_L1_error)
4420 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 106, __pyx_L1_error)
4421 __pyx_r = __pyx_pf_20canalyticalSolutions_28LinearADR_Decay_DiracIC_dr(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_dr);
4428 __Pyx_RefNannyFinishContext();
4432 static PyObject *__pyx_pf_20canalyticalSolutions_28LinearADR_Decay_DiracIC_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr) {
4433 PyObject *__pyx_r = NULL;
4434 __Pyx_RefNannyDeclarations
4435 PyObject *__pyx_t_1 = NULL;
4436 PyObject *__pyx_t_2 = NULL;
4437 PyObject *__pyx_t_3 = NULL;
4439 int __pyx_lineno = 0;
4440 const char *__pyx_filename = NULL;
4441 int __pyx_clineno = 0;
4442 __Pyx_RefNannySetupContext(
"LinearADR_Decay_DiracIC_dr", 0);
4451 __Pyx_XDECREF(__pyx_r);
4452 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
4453 __Pyx_GOTREF(__pyx_t_1);
4454 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
4455 __Pyx_GOTREF(__pyx_t_2);
4456 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
4457 __Pyx_GOTREF(__pyx_t_3);
4458 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4459 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4460 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error)
4461 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4462 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Decay_DiracIC_dr(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_dr->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
4463 __Pyx_GOTREF(__pyx_t_3);
4464 __pyx_r = __pyx_t_3;
4478 __Pyx_XDECREF(__pyx_t_1);
4479 __Pyx_XDECREF(__pyx_t_2);
4480 __Pyx_XDECREF(__pyx_t_3);
4481 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Decay_DiracIC_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
4484 __Pyx_XGIVEREF(__pyx_r);
4485 __Pyx_RefNannyFinishContext();
4498 static PyObject *__pyx_pw_20canalyticalSolutions_31LinearADR_Decay_DiracIC_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4499 static PyMethodDef __pyx_mdef_20canalyticalSolutions_31LinearADR_Decay_DiracIC_r = {
"LinearADR_Decay_DiracIC_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_31LinearADR_Decay_DiracIC_r, METH_VARARGS|METH_KEYWORDS, 0};
4500 static PyObject *__pyx_pw_20canalyticalSolutions_31LinearADR_Decay_DiracIC_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4501 PyArrayObject *__pyx_v_iwork = 0;
4502 PyArrayObject *__pyx_v_rwork = 0;
4504 PyArrayObject *__pyx_v_x = 0;
4505 PyArrayObject *__pyx_v_u = 0;
4506 PyArrayObject *__pyx_v_r = 0;
4507 int __pyx_lineno = 0;
4508 const char *__pyx_filename = NULL;
4509 int __pyx_clineno = 0;
4510 PyObject *__pyx_r = 0;
4511 __Pyx_RefNannyDeclarations
4512 __Pyx_RefNannySetupContext(
"LinearADR_Decay_DiracIC_r (wrapper)", 0);
4514 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
4515 PyObject* values[6] = {0,0,0,0,0,0};
4516 if (unlikely(__pyx_kwds)) {
4518 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4520 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4522 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4524 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4526 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4528 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4530 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4533 default:
goto __pyx_L5_argtuple_error;
4535 kw_args = PyDict_Size(__pyx_kwds);
4538 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
4539 else goto __pyx_L5_argtuple_error;
4542 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
4544 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_r", 1, 6, 6, 1); __PYX_ERR(0, 110, __pyx_L3_error)
4548 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4550 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_r", 1, 6, 6, 2); __PYX_ERR(0, 110, __pyx_L3_error)
4554 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4556 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_r", 1, 6, 6, 3); __PYX_ERR(0, 110, __pyx_L3_error)
4560 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
4562 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_r", 1, 6, 6, 4); __PYX_ERR(0, 110, __pyx_L3_error)
4566 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
4568 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_r", 1, 6, 6, 5); __PYX_ERR(0, 110, __pyx_L3_error)
4571 if (unlikely(kw_args > 0)) {
4572 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Decay_DiracIC_r") < 0)) __PYX_ERR(0, 110, __pyx_L3_error)
4574 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
4575 goto __pyx_L5_argtuple_error;
4577 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4578 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4579 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4580 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4581 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4582 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4584 __pyx_v_iwork = ((PyArrayObject *)values[0]);
4585 __pyx_v_rwork = ((PyArrayObject *)values[1]);
4586 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L3_error)
4587 __pyx_v_x = ((PyArrayObject *)values[3]);
4588 __pyx_v_u = ((PyArrayObject *)values[4]);
4589 __pyx_v_r = ((PyArrayObject *)values[5]);
4591 goto __pyx_L4_argument_unpacking_done;
4592 __pyx_L5_argtuple_error:;
4593 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Decay_DiracIC_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 110, __pyx_L3_error)
4595 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Decay_DiracIC_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
4596 __Pyx_RefNannyFinishContext();
4598 __pyx_L4_argument_unpacking_done:;
4599 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 110, __pyx_L1_error)
4600 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 110, __pyx_L1_error)
4601 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 110, __pyx_L1_error)
4602 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 110, __pyx_L1_error)
4603 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 110, __pyx_L1_error)
4604 __pyx_r = __pyx_pf_20canalyticalSolutions_30LinearADR_Decay_DiracIC_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
4611 __Pyx_RefNannyFinishContext();
4615 static PyObject *__pyx_pf_20canalyticalSolutions_30LinearADR_Decay_DiracIC_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
4616 PyObject *__pyx_r = NULL;
4617 __Pyx_RefNannyDeclarations
4618 PyObject *__pyx_t_1 = NULL;
4619 PyObject *__pyx_t_2 = NULL;
4620 PyObject *__pyx_t_3 = NULL;
4622 int __pyx_lineno = 0;
4623 const char *__pyx_filename = NULL;
4624 int __pyx_clineno = 0;
4625 __Pyx_RefNannySetupContext(
"LinearADR_Decay_DiracIC_r", 0);
4634 __Pyx_XDECREF(__pyx_r);
4635 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
4636 __Pyx_GOTREF(__pyx_t_1);
4637 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
4638 __Pyx_GOTREF(__pyx_t_2);
4639 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
4640 __Pyx_GOTREF(__pyx_t_3);
4641 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4642 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4643 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
4644 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4645 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Decay_DiracIC_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
4646 __Pyx_GOTREF(__pyx_t_3);
4647 __pyx_r = __pyx_t_3;
4661 __Pyx_XDECREF(__pyx_t_1);
4662 __Pyx_XDECREF(__pyx_t_2);
4663 __Pyx_XDECREF(__pyx_t_3);
4664 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Decay_DiracIC_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
4667 __Pyx_XGIVEREF(__pyx_r);
4668 __Pyx_RefNannyFinishContext();
4681 static PyObject *__pyx_pw_20canalyticalSolutions_33LinearADR_Sine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4682 static PyMethodDef __pyx_mdef_20canalyticalSolutions_33LinearADR_Sine = {
"LinearADR_Sine", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_33LinearADR_Sine, METH_VARARGS|METH_KEYWORDS, 0};
4683 static PyObject *__pyx_pw_20canalyticalSolutions_33LinearADR_Sine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4684 PyArrayObject *__pyx_v_iwork = 0;
4685 PyArrayObject *__pyx_v_rwork = 0;
4687 PyArrayObject *__pyx_v_x = 0;
4688 PyArrayObject *__pyx_v_u = 0;
4689 int __pyx_lineno = 0;
4690 const char *__pyx_filename = NULL;
4691 int __pyx_clineno = 0;
4692 PyObject *__pyx_r = 0;
4693 __Pyx_RefNannyDeclarations
4694 __Pyx_RefNannySetupContext(
"LinearADR_Sine (wrapper)", 0);
4696 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
4697 PyObject* values[5] = {0,0,0,0,0};
4698 if (unlikely(__pyx_kwds)) {
4700 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4702 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4704 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4706 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4708 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4710 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4713 default:
goto __pyx_L5_argtuple_error;
4715 kw_args = PyDict_Size(__pyx_kwds);
4718 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
4719 else goto __pyx_L5_argtuple_error;
4722 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
4724 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine", 1, 5, 5, 1); __PYX_ERR(0, 114, __pyx_L3_error)
4728 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4730 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine", 1, 5, 5, 2); __PYX_ERR(0, 114, __pyx_L3_error)
4734 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4736 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine", 1, 5, 5, 3); __PYX_ERR(0, 114, __pyx_L3_error)
4740 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
4742 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine", 1, 5, 5, 4); __PYX_ERR(0, 114, __pyx_L3_error)
4745 if (unlikely(kw_args > 0)) {
4746 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine") < 0)) __PYX_ERR(0, 114, __pyx_L3_error)
4748 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
4749 goto __pyx_L5_argtuple_error;
4751 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4752 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4753 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4754 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4755 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4757 __pyx_v_iwork = ((PyArrayObject *)values[0]);
4758 __pyx_v_rwork = ((PyArrayObject *)values[1]);
4759 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error)
4760 __pyx_v_x = ((PyArrayObject *)values[3]);
4761 __pyx_v_u = ((PyArrayObject *)values[4]);
4763 goto __pyx_L4_argument_unpacking_done;
4764 __pyx_L5_argtuple_error:;
4765 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 114, __pyx_L3_error)
4767 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine", __pyx_clineno, __pyx_lineno, __pyx_filename);
4768 __Pyx_RefNannyFinishContext();
4770 __pyx_L4_argument_unpacking_done:;
4771 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 114, __pyx_L1_error)
4772 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 114, __pyx_L1_error)
4773 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 114, __pyx_L1_error)
4774 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 114, __pyx_L1_error)
4775 __pyx_r = __pyx_pf_20canalyticalSolutions_32LinearADR_Sine(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
4782 __Pyx_RefNannyFinishContext();
4786 static PyObject *__pyx_pf_20canalyticalSolutions_32LinearADR_Sine(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
4787 PyObject *__pyx_r = NULL;
4788 __Pyx_RefNannyDeclarations
4789 PyObject *__pyx_t_1 = NULL;
4790 PyObject *__pyx_t_2 = NULL;
4791 PyObject *__pyx_t_3 = NULL;
4793 int __pyx_lineno = 0;
4794 const char *__pyx_filename = NULL;
4795 int __pyx_clineno = 0;
4796 __Pyx_RefNannySetupContext(
"LinearADR_Sine", 0);
4805 __Pyx_XDECREF(__pyx_r);
4806 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
4807 __Pyx_GOTREF(__pyx_t_1);
4808 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
4809 __Pyx_GOTREF(__pyx_t_2);
4810 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
4811 __Pyx_GOTREF(__pyx_t_3);
4812 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4813 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4814 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L1_error)
4815 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4816 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
4817 __Pyx_GOTREF(__pyx_t_3);
4818 __pyx_r = __pyx_t_3;
4832 __Pyx_XDECREF(__pyx_t_1);
4833 __Pyx_XDECREF(__pyx_t_2);
4834 __Pyx_XDECREF(__pyx_t_3);
4835 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine", __pyx_clineno, __pyx_lineno, __pyx_filename);
4838 __Pyx_XGIVEREF(__pyx_r);
4839 __Pyx_RefNannyFinishContext();
4852 static PyObject *__pyx_pw_20canalyticalSolutions_35LinearADR_Sine_advectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4853 static PyMethodDef __pyx_mdef_20canalyticalSolutions_35LinearADR_Sine_advectiveVelocity = {
"LinearADR_Sine_advectiveVelocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_35LinearADR_Sine_advectiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
4854 static PyObject *__pyx_pw_20canalyticalSolutions_35LinearADR_Sine_advectiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4855 PyArrayObject *__pyx_v_iwork = 0;
4856 PyArrayObject *__pyx_v_rwork = 0;
4858 PyArrayObject *__pyx_v_x = 0;
4859 PyArrayObject *__pyx_v_f = 0;
4860 int __pyx_lineno = 0;
4861 const char *__pyx_filename = NULL;
4862 int __pyx_clineno = 0;
4863 PyObject *__pyx_r = 0;
4864 __Pyx_RefNannyDeclarations
4865 __Pyx_RefNannySetupContext(
"LinearADR_Sine_advectiveVelocity (wrapper)", 0);
4867 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_f,0};
4868 PyObject* values[5] = {0,0,0,0,0};
4869 if (unlikely(__pyx_kwds)) {
4871 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4873 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4875 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4877 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4879 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4881 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4884 default:
goto __pyx_L5_argtuple_error;
4886 kw_args = PyDict_Size(__pyx_kwds);
4889 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
4890 else goto __pyx_L5_argtuple_error;
4893 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
4895 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_advectiveVelocity", 1, 5, 5, 1); __PYX_ERR(0, 118, __pyx_L3_error)
4899 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4901 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_advectiveVelocity", 1, 5, 5, 2); __PYX_ERR(0, 118, __pyx_L3_error)
4905 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
4907 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_advectiveVelocity", 1, 5, 5, 3); __PYX_ERR(0, 118, __pyx_L3_error)
4911 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
4913 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_advectiveVelocity", 1, 5, 5, 4); __PYX_ERR(0, 118, __pyx_L3_error)
4916 if (unlikely(kw_args > 0)) {
4917 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine_advectiveVelocity") < 0)) __PYX_ERR(0, 118, __pyx_L3_error)
4919 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
4920 goto __pyx_L5_argtuple_error;
4922 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4923 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4924 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4925 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4926 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4928 __pyx_v_iwork = ((PyArrayObject *)values[0]);
4929 __pyx_v_rwork = ((PyArrayObject *)values[1]);
4930 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error)
4931 __pyx_v_x = ((PyArrayObject *)values[3]);
4932 __pyx_v_f = ((PyArrayObject *)values[4]);
4934 goto __pyx_L4_argument_unpacking_done;
4935 __pyx_L5_argtuple_error:;
4936 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_advectiveVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 118, __pyx_L3_error)
4938 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_advectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
4939 __Pyx_RefNannyFinishContext();
4941 __pyx_L4_argument_unpacking_done:;
4942 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 118, __pyx_L1_error)
4943 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 118, __pyx_L1_error)
4944 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 118, __pyx_L1_error)
4945 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 118, __pyx_L1_error)
4946 __pyx_r = __pyx_pf_20canalyticalSolutions_34LinearADR_Sine_advectiveVelocity(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_f);
4953 __Pyx_RefNannyFinishContext();
4957 static PyObject *__pyx_pf_20canalyticalSolutions_34LinearADR_Sine_advectiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f) {
4958 PyObject *__pyx_r = NULL;
4959 __Pyx_RefNannyDeclarations
4960 PyObject *__pyx_t_1 = NULL;
4961 PyObject *__pyx_t_2 = NULL;
4962 PyObject *__pyx_t_3 = NULL;
4964 int __pyx_lineno = 0;
4965 const char *__pyx_filename = NULL;
4966 int __pyx_clineno = 0;
4967 __Pyx_RefNannySetupContext(
"LinearADR_Sine_advectiveVelocity", 0);
4976 __Pyx_XDECREF(__pyx_r);
4977 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
4978 __Pyx_GOTREF(__pyx_t_1);
4979 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
4980 __Pyx_GOTREF(__pyx_t_2);
4981 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
4982 __Pyx_GOTREF(__pyx_t_3);
4983 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4984 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4985 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
4986 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4987 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine_advectiveVelocity(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_f->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
4988 __Pyx_GOTREF(__pyx_t_3);
4989 __pyx_r = __pyx_t_3;
5003 __Pyx_XDECREF(__pyx_t_1);
5004 __Pyx_XDECREF(__pyx_t_2);
5005 __Pyx_XDECREF(__pyx_t_3);
5006 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_advectiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
5009 __Pyx_XGIVEREF(__pyx_r);
5010 __Pyx_RefNannyFinishContext();
5023 static PyObject *__pyx_pw_20canalyticalSolutions_37LinearADR_Sine_diffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5024 static PyMethodDef __pyx_mdef_20canalyticalSolutions_37LinearADR_Sine_diffusiveVelocity = {
"LinearADR_Sine_diffusiveVelocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_37LinearADR_Sine_diffusiveVelocity, METH_VARARGS|METH_KEYWORDS, 0};
5025 static PyObject *__pyx_pw_20canalyticalSolutions_37LinearADR_Sine_diffusiveVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5026 PyArrayObject *__pyx_v_iwork = 0;
5027 PyArrayObject *__pyx_v_rwork = 0;
5029 PyArrayObject *__pyx_v_x = 0;
5030 PyArrayObject *__pyx_v_f = 0;
5031 int __pyx_lineno = 0;
5032 const char *__pyx_filename = NULL;
5033 int __pyx_clineno = 0;
5034 PyObject *__pyx_r = 0;
5035 __Pyx_RefNannyDeclarations
5036 __Pyx_RefNannySetupContext(
"LinearADR_Sine_diffusiveVelocity (wrapper)", 0);
5038 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_f,0};
5039 PyObject* values[5] = {0,0,0,0,0};
5040 if (unlikely(__pyx_kwds)) {
5042 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5044 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5046 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5048 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5050 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5052 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5055 default:
goto __pyx_L5_argtuple_error;
5057 kw_args = PyDict_Size(__pyx_kwds);
5060 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
5061 else goto __pyx_L5_argtuple_error;
5064 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
5066 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_diffusiveVelocity", 1, 5, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
5070 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5072 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_diffusiveVelocity", 1, 5, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
5076 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5078 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_diffusiveVelocity", 1, 5, 5, 3); __PYX_ERR(0, 122, __pyx_L3_error)
5082 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
5084 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_diffusiveVelocity", 1, 5, 5, 4); __PYX_ERR(0, 122, __pyx_L3_error)
5087 if (unlikely(kw_args > 0)) {
5088 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine_diffusiveVelocity") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
5090 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5091 goto __pyx_L5_argtuple_error;
5093 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5094 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5095 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5096 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5097 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5099 __pyx_v_iwork = ((PyArrayObject *)values[0]);
5100 __pyx_v_rwork = ((PyArrayObject *)values[1]);
5101 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
5102 __pyx_v_x = ((PyArrayObject *)values[3]);
5103 __pyx_v_f = ((PyArrayObject *)values[4]);
5105 goto __pyx_L4_argument_unpacking_done;
5106 __pyx_L5_argtuple_error:;
5107 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_diffusiveVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
5109 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_diffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
5110 __Pyx_RefNannyFinishContext();
5112 __pyx_L4_argument_unpacking_done:;
5113 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 122, __pyx_L1_error)
5114 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 122, __pyx_L1_error)
5115 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 122, __pyx_L1_error)
5116 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_5numpy_ndarray, 1,
"f", 0))) __PYX_ERR(0, 122, __pyx_L1_error)
5117 __pyx_r = __pyx_pf_20canalyticalSolutions_36LinearADR_Sine_diffusiveVelocity(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_f);
5124 __Pyx_RefNannyFinishContext();
5128 static PyObject *__pyx_pf_20canalyticalSolutions_36LinearADR_Sine_diffusiveVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_f) {
5129 PyObject *__pyx_r = NULL;
5130 __Pyx_RefNannyDeclarations
5131 PyObject *__pyx_t_1 = NULL;
5132 PyObject *__pyx_t_2 = NULL;
5133 PyObject *__pyx_t_3 = NULL;
5135 int __pyx_lineno = 0;
5136 const char *__pyx_filename = NULL;
5137 int __pyx_clineno = 0;
5138 __Pyx_RefNannySetupContext(
"LinearADR_Sine_diffusiveVelocity", 0);
5147 __Pyx_XDECREF(__pyx_r);
5148 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
5149 __Pyx_GOTREF(__pyx_t_1);
5150 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
5151 __Pyx_GOTREF(__pyx_t_2);
5152 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
5153 __Pyx_GOTREF(__pyx_t_3);
5154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5155 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5156 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L1_error)
5157 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5158 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine_diffusiveVelocity(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_f->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
5159 __Pyx_GOTREF(__pyx_t_3);
5160 __pyx_r = __pyx_t_3;
5174 __Pyx_XDECREF(__pyx_t_1);
5175 __Pyx_XDECREF(__pyx_t_2);
5176 __Pyx_XDECREF(__pyx_t_3);
5177 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_diffusiveVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
5180 __Pyx_XGIVEREF(__pyx_r);
5181 __Pyx_RefNannyFinishContext();
5194 static PyObject *__pyx_pw_20canalyticalSolutions_39LinearADR_Sine_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5195 static PyMethodDef __pyx_mdef_20canalyticalSolutions_39LinearADR_Sine_dr = {
"LinearADR_Sine_dr", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_39LinearADR_Sine_dr, METH_VARARGS|METH_KEYWORDS, 0};
5196 static PyObject *__pyx_pw_20canalyticalSolutions_39LinearADR_Sine_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5197 PyArrayObject *__pyx_v_iwork = 0;
5198 PyArrayObject *__pyx_v_rwork = 0;
5200 PyArrayObject *__pyx_v_x = 0;
5201 PyArrayObject *__pyx_v_u = 0;
5202 PyArrayObject *__pyx_v_dr = 0;
5203 int __pyx_lineno = 0;
5204 const char *__pyx_filename = NULL;
5205 int __pyx_clineno = 0;
5206 PyObject *__pyx_r = 0;
5207 __Pyx_RefNannyDeclarations
5208 __Pyx_RefNannySetupContext(
"LinearADR_Sine_dr (wrapper)", 0);
5210 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_dr,0};
5211 PyObject* values[6] = {0,0,0,0,0,0};
5212 if (unlikely(__pyx_kwds)) {
5214 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5216 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5218 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5220 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5222 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5224 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5226 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5229 default:
goto __pyx_L5_argtuple_error;
5231 kw_args = PyDict_Size(__pyx_kwds);
5234 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
5235 else goto __pyx_L5_argtuple_error;
5238 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
5240 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_dr", 1, 6, 6, 1); __PYX_ERR(0, 126, __pyx_L3_error)
5244 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5246 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_dr", 1, 6, 6, 2); __PYX_ERR(0, 126, __pyx_L3_error)
5250 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5252 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_dr", 1, 6, 6, 3); __PYX_ERR(0, 126, __pyx_L3_error)
5256 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
5258 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_dr", 1, 6, 6, 4); __PYX_ERR(0, 126, __pyx_L3_error)
5262 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
5264 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_dr", 1, 6, 6, 5); __PYX_ERR(0, 126, __pyx_L3_error)
5267 if (unlikely(kw_args > 0)) {
5268 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine_dr") < 0)) __PYX_ERR(0, 126, __pyx_L3_error)
5270 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
5271 goto __pyx_L5_argtuple_error;
5273 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5274 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5275 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5276 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5277 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5278 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5280 __pyx_v_iwork = ((PyArrayObject *)values[0]);
5281 __pyx_v_rwork = ((PyArrayObject *)values[1]);
5282 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L3_error)
5283 __pyx_v_x = ((PyArrayObject *)values[3]);
5284 __pyx_v_u = ((PyArrayObject *)values[4]);
5285 __pyx_v_dr = ((PyArrayObject *)values[5]);
5287 goto __pyx_L4_argument_unpacking_done;
5288 __pyx_L5_argtuple_error:;
5289 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_dr", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 126, __pyx_L3_error)
5291 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5292 __Pyx_RefNannyFinishContext();
5294 __pyx_L4_argument_unpacking_done:;
5295 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 126, __pyx_L1_error)
5296 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 126, __pyx_L1_error)
5297 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 126, __pyx_L1_error)
5298 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 126, __pyx_L1_error)
5299 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 126, __pyx_L1_error)
5300 __pyx_r = __pyx_pf_20canalyticalSolutions_38LinearADR_Sine_dr(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_dr);
5307 __Pyx_RefNannyFinishContext();
5311 static PyObject *__pyx_pf_20canalyticalSolutions_38LinearADR_Sine_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr) {
5312 PyObject *__pyx_r = NULL;
5313 __Pyx_RefNannyDeclarations
5314 PyObject *__pyx_t_1 = NULL;
5315 PyObject *__pyx_t_2 = NULL;
5316 PyObject *__pyx_t_3 = NULL;
5318 int __pyx_lineno = 0;
5319 const char *__pyx_filename = NULL;
5320 int __pyx_clineno = 0;
5321 __Pyx_RefNannySetupContext(
"LinearADR_Sine_dr", 0);
5330 __Pyx_XDECREF(__pyx_r);
5331 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
5332 __Pyx_GOTREF(__pyx_t_1);
5333 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
5334 __Pyx_GOTREF(__pyx_t_2);
5335 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
5336 __Pyx_GOTREF(__pyx_t_3);
5337 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5338 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5339 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error)
5340 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5341 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine_dr(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_dr->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
5342 __Pyx_GOTREF(__pyx_t_3);
5343 __pyx_r = __pyx_t_3;
5357 __Pyx_XDECREF(__pyx_t_1);
5358 __Pyx_XDECREF(__pyx_t_2);
5359 __Pyx_XDECREF(__pyx_t_3);
5360 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5363 __Pyx_XGIVEREF(__pyx_r);
5364 __Pyx_RefNannyFinishContext();
5377 static PyObject *__pyx_pw_20canalyticalSolutions_41LinearADR_Sine_du(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5378 static PyMethodDef __pyx_mdef_20canalyticalSolutions_41LinearADR_Sine_du = {
"LinearADR_Sine_du", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_41LinearADR_Sine_du, METH_VARARGS|METH_KEYWORDS, 0};
5379 static PyObject *__pyx_pw_20canalyticalSolutions_41LinearADR_Sine_du(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5380 PyArrayObject *__pyx_v_iwork = 0;
5381 PyArrayObject *__pyx_v_rwork = 0;
5383 PyArrayObject *__pyx_v_x = 0;
5384 PyArrayObject *__pyx_v_du = 0;
5385 int __pyx_lineno = 0;
5386 const char *__pyx_filename = NULL;
5387 int __pyx_clineno = 0;
5388 PyObject *__pyx_r = 0;
5389 __Pyx_RefNannyDeclarations
5390 __Pyx_RefNannySetupContext(
"LinearADR_Sine_du (wrapper)", 0);
5392 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_du,0};
5393 PyObject* values[5] = {0,0,0,0,0};
5394 if (unlikely(__pyx_kwds)) {
5396 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5398 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5400 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5402 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5404 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5406 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5409 default:
goto __pyx_L5_argtuple_error;
5411 kw_args = PyDict_Size(__pyx_kwds);
5414 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
5415 else goto __pyx_L5_argtuple_error;
5418 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
5420 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_du", 1, 5, 5, 1); __PYX_ERR(0, 130, __pyx_L3_error)
5424 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5426 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_du", 1, 5, 5, 2); __PYX_ERR(0, 130, __pyx_L3_error)
5430 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5432 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_du", 1, 5, 5, 3); __PYX_ERR(0, 130, __pyx_L3_error)
5436 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_du)) != 0)) kw_args--;
5438 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_du", 1, 5, 5, 4); __PYX_ERR(0, 130, __pyx_L3_error)
5441 if (unlikely(kw_args > 0)) {
5442 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine_du") < 0)) __PYX_ERR(0, 130, __pyx_L3_error)
5444 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5445 goto __pyx_L5_argtuple_error;
5447 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5448 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5449 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5450 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5451 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5453 __pyx_v_iwork = ((PyArrayObject *)values[0]);
5454 __pyx_v_rwork = ((PyArrayObject *)values[1]);
5455 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error)
5456 __pyx_v_x = ((PyArrayObject *)values[3]);
5457 __pyx_v_du = ((PyArrayObject *)values[4]);
5459 goto __pyx_L4_argument_unpacking_done;
5460 __pyx_L5_argtuple_error:;
5461 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_du", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 130, __pyx_L3_error)
5463 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_du", __pyx_clineno, __pyx_lineno, __pyx_filename);
5464 __Pyx_RefNannyFinishContext();
5466 __pyx_L4_argument_unpacking_done:;
5467 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 130, __pyx_L1_error)
5468 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 130, __pyx_L1_error)
5469 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 130, __pyx_L1_error)
5470 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_du), __pyx_ptype_5numpy_ndarray, 1,
"du", 0))) __PYX_ERR(0, 130, __pyx_L1_error)
5471 __pyx_r = __pyx_pf_20canalyticalSolutions_40LinearADR_Sine_du(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_du);
5478 __Pyx_RefNannyFinishContext();
5482 static PyObject *__pyx_pf_20canalyticalSolutions_40LinearADR_Sine_du(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_du) {
5483 PyObject *__pyx_r = NULL;
5484 __Pyx_RefNannyDeclarations
5485 PyObject *__pyx_t_1 = NULL;
5486 PyObject *__pyx_t_2 = NULL;
5487 PyObject *__pyx_t_3 = NULL;
5489 int __pyx_lineno = 0;
5490 const char *__pyx_filename = NULL;
5491 int __pyx_clineno = 0;
5492 __Pyx_RefNannySetupContext(
"LinearADR_Sine_du", 0);
5501 __Pyx_XDECREF(__pyx_r);
5502 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
5503 __Pyx_GOTREF(__pyx_t_1);
5504 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
5505 __Pyx_GOTREF(__pyx_t_2);
5506 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
5507 __Pyx_GOTREF(__pyx_t_3);
5508 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5509 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5510 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error)
5511 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5512 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine_du(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_du->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
5513 __Pyx_GOTREF(__pyx_t_3);
5514 __pyx_r = __pyx_t_3;
5528 __Pyx_XDECREF(__pyx_t_1);
5529 __Pyx_XDECREF(__pyx_t_2);
5530 __Pyx_XDECREF(__pyx_t_3);
5531 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_du", __pyx_clineno, __pyx_lineno, __pyx_filename);
5534 __Pyx_XGIVEREF(__pyx_r);
5535 __Pyx_RefNannyFinishContext();
5548 static PyObject *__pyx_pw_20canalyticalSolutions_43LinearADR_Sine_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5549 static PyMethodDef __pyx_mdef_20canalyticalSolutions_43LinearADR_Sine_r = {
"LinearADR_Sine_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_43LinearADR_Sine_r, METH_VARARGS|METH_KEYWORDS, 0};
5550 static PyObject *__pyx_pw_20canalyticalSolutions_43LinearADR_Sine_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5551 PyArrayObject *__pyx_v_iwork = 0;
5552 PyArrayObject *__pyx_v_rwork = 0;
5554 PyArrayObject *__pyx_v_x = 0;
5555 PyArrayObject *__pyx_v_u = 0;
5556 PyArrayObject *__pyx_v_r = 0;
5557 int __pyx_lineno = 0;
5558 const char *__pyx_filename = NULL;
5559 int __pyx_clineno = 0;
5560 PyObject *__pyx_r = 0;
5561 __Pyx_RefNannyDeclarations
5562 __Pyx_RefNannySetupContext(
"LinearADR_Sine_r (wrapper)", 0);
5564 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
5565 PyObject* values[6] = {0,0,0,0,0,0};
5566 if (unlikely(__pyx_kwds)) {
5568 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5570 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5572 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5574 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5576 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5578 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5580 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5583 default:
goto __pyx_L5_argtuple_error;
5585 kw_args = PyDict_Size(__pyx_kwds);
5588 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
5589 else goto __pyx_L5_argtuple_error;
5592 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
5594 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_r", 1, 6, 6, 1); __PYX_ERR(0, 134, __pyx_L3_error)
5598 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5600 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_r", 1, 6, 6, 2); __PYX_ERR(0, 134, __pyx_L3_error)
5604 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5606 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_r", 1, 6, 6, 3); __PYX_ERR(0, 134, __pyx_L3_error)
5610 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
5612 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_r", 1, 6, 6, 4); __PYX_ERR(0, 134, __pyx_L3_error)
5616 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
5618 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_r", 1, 6, 6, 5); __PYX_ERR(0, 134, __pyx_L3_error)
5621 if (unlikely(kw_args > 0)) {
5622 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine_r") < 0)) __PYX_ERR(0, 134, __pyx_L3_error)
5624 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
5625 goto __pyx_L5_argtuple_error;
5627 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5628 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5629 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5630 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5631 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5632 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5634 __pyx_v_iwork = ((PyArrayObject *)values[0]);
5635 __pyx_v_rwork = ((PyArrayObject *)values[1]);
5636 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error)
5637 __pyx_v_x = ((PyArrayObject *)values[3]);
5638 __pyx_v_u = ((PyArrayObject *)values[4]);
5639 __pyx_v_r = ((PyArrayObject *)values[5]);
5641 goto __pyx_L4_argument_unpacking_done;
5642 __pyx_L5_argtuple_error:;
5643 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 134, __pyx_L3_error)
5645 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
5646 __Pyx_RefNannyFinishContext();
5648 __pyx_L4_argument_unpacking_done:;
5649 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 134, __pyx_L1_error)
5650 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 134, __pyx_L1_error)
5651 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 134, __pyx_L1_error)
5652 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 134, __pyx_L1_error)
5653 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 134, __pyx_L1_error)
5654 __pyx_r = __pyx_pf_20canalyticalSolutions_42LinearADR_Sine_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
5661 __Pyx_RefNannyFinishContext();
5665 static PyObject *__pyx_pf_20canalyticalSolutions_42LinearADR_Sine_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
5666 PyObject *__pyx_r = NULL;
5667 __Pyx_RefNannyDeclarations
5668 PyObject *__pyx_t_1 = NULL;
5669 PyObject *__pyx_t_2 = NULL;
5670 PyObject *__pyx_t_3 = NULL;
5672 int __pyx_lineno = 0;
5673 const char *__pyx_filename = NULL;
5674 int __pyx_clineno = 0;
5675 __Pyx_RefNannySetupContext(
"LinearADR_Sine_r", 0);
5684 __Pyx_XDECREF(__pyx_r);
5685 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
5686 __Pyx_GOTREF(__pyx_t_1);
5687 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
5688 __Pyx_GOTREF(__pyx_t_2);
5689 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
5690 __Pyx_GOTREF(__pyx_t_3);
5691 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5692 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5693 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L1_error)
5694 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5695 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
5696 __Pyx_GOTREF(__pyx_t_3);
5697 __pyx_r = __pyx_t_3;
5711 __Pyx_XDECREF(__pyx_t_1);
5712 __Pyx_XDECREF(__pyx_t_2);
5713 __Pyx_XDECREF(__pyx_t_3);
5714 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
5717 __Pyx_XGIVEREF(__pyx_r);
5718 __Pyx_RefNannyFinishContext();
5731 static PyObject *__pyx_pw_20canalyticalSolutions_45LinearADR_Sine_totalVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5732 static PyMethodDef __pyx_mdef_20canalyticalSolutions_45LinearADR_Sine_totalVelocity = {
"LinearADR_Sine_totalVelocity", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_45LinearADR_Sine_totalVelocity, METH_VARARGS|METH_KEYWORDS, 0};
5733 static PyObject *__pyx_pw_20canalyticalSolutions_45LinearADR_Sine_totalVelocity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5734 PyArrayObject *__pyx_v_iwork = 0;
5735 PyArrayObject *__pyx_v_rwork = 0;
5737 PyArrayObject *__pyx_v_x = 0;
5738 PyArrayObject *__pyx_v_u = 0;
5739 int __pyx_lineno = 0;
5740 const char *__pyx_filename = NULL;
5741 int __pyx_clineno = 0;
5742 PyObject *__pyx_r = 0;
5743 __Pyx_RefNannyDeclarations
5744 __Pyx_RefNannySetupContext(
"LinearADR_Sine_totalVelocity (wrapper)", 0);
5746 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
5747 PyObject* values[5] = {0,0,0,0,0};
5748 if (unlikely(__pyx_kwds)) {
5750 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5752 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5754 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5756 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5758 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5760 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5763 default:
goto __pyx_L5_argtuple_error;
5765 kw_args = PyDict_Size(__pyx_kwds);
5768 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
5769 else goto __pyx_L5_argtuple_error;
5772 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
5774 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_totalVelocity", 1, 5, 5, 1); __PYX_ERR(0, 138, __pyx_L3_error)
5778 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5780 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_totalVelocity", 1, 5, 5, 2); __PYX_ERR(0, 138, __pyx_L3_error)
5784 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5786 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_totalVelocity", 1, 5, 5, 3); __PYX_ERR(0, 138, __pyx_L3_error)
5790 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
5792 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_totalVelocity", 1, 5, 5, 4); __PYX_ERR(0, 138, __pyx_L3_error)
5795 if (unlikely(kw_args > 0)) {
5796 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"LinearADR_Sine_totalVelocity") < 0)) __PYX_ERR(0, 138, __pyx_L3_error)
5798 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5799 goto __pyx_L5_argtuple_error;
5801 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5802 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5803 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5804 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5805 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5807 __pyx_v_iwork = ((PyArrayObject *)values[0]);
5808 __pyx_v_rwork = ((PyArrayObject *)values[1]);
5809 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
5810 __pyx_v_x = ((PyArrayObject *)values[3]);
5811 __pyx_v_u = ((PyArrayObject *)values[4]);
5813 goto __pyx_L4_argument_unpacking_done;
5814 __pyx_L5_argtuple_error:;
5815 __Pyx_RaiseArgtupleInvalid(
"LinearADR_Sine_totalVelocity", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 138, __pyx_L3_error)
5817 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_totalVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
5818 __Pyx_RefNannyFinishContext();
5820 __pyx_L4_argument_unpacking_done:;
5821 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 138, __pyx_L1_error)
5822 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 138, __pyx_L1_error)
5823 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 138, __pyx_L1_error)
5824 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 138, __pyx_L1_error)
5825 __pyx_r = __pyx_pf_20canalyticalSolutions_44LinearADR_Sine_totalVelocity(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
5832 __Pyx_RefNannyFinishContext();
5836 static PyObject *__pyx_pf_20canalyticalSolutions_44LinearADR_Sine_totalVelocity(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
5837 PyObject *__pyx_r = NULL;
5838 __Pyx_RefNannyDeclarations
5839 PyObject *__pyx_t_1 = NULL;
5840 PyObject *__pyx_t_2 = NULL;
5841 PyObject *__pyx_t_3 = NULL;
5843 int __pyx_lineno = 0;
5844 const char *__pyx_filename = NULL;
5845 int __pyx_clineno = 0;
5846 __Pyx_RefNannySetupContext(
"LinearADR_Sine_totalVelocity", 0);
5855 __Pyx_XDECREF(__pyx_r);
5856 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
5857 __Pyx_GOTREF(__pyx_t_1);
5858 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
5859 __Pyx_GOTREF(__pyx_t_2);
5860 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
5861 __Pyx_GOTREF(__pyx_t_3);
5862 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5863 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5864 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
5865 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5866 __pyx_t_3 = __Pyx_PyInt_From_int(
LinearADR_Sine_totalVelocity(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
5867 __Pyx_GOTREF(__pyx_t_3);
5868 __pyx_r = __pyx_t_3;
5882 __Pyx_XDECREF(__pyx_t_1);
5883 __Pyx_XDECREF(__pyx_t_2);
5884 __Pyx_XDECREF(__pyx_t_3);
5885 __Pyx_AddTraceback(
"canalyticalSolutions.LinearADR_Sine_totalVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
5888 __Pyx_XGIVEREF(__pyx_r);
5889 __Pyx_RefNannyFinishContext();
5902 static PyObject *__pyx_pw_20canalyticalSolutions_47NonlinearAD_SteadyState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5903 static PyMethodDef __pyx_mdef_20canalyticalSolutions_47NonlinearAD_SteadyState = {
"NonlinearAD_SteadyState", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_47NonlinearAD_SteadyState, METH_VARARGS|METH_KEYWORDS, 0};
5904 static PyObject *__pyx_pw_20canalyticalSolutions_47NonlinearAD_SteadyState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5905 PyArrayObject *__pyx_v_iwork = 0;
5906 PyArrayObject *__pyx_v_rwork = 0;
5908 PyArrayObject *__pyx_v_x = 0;
5909 PyArrayObject *__pyx_v_u = 0;
5910 int __pyx_lineno = 0;
5911 const char *__pyx_filename = NULL;
5912 int __pyx_clineno = 0;
5913 PyObject *__pyx_r = 0;
5914 __Pyx_RefNannyDeclarations
5915 __Pyx_RefNannySetupContext(
"NonlinearAD_SteadyState (wrapper)", 0);
5917 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
5918 PyObject* values[5] = {0,0,0,0,0};
5919 if (unlikely(__pyx_kwds)) {
5921 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5923 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5925 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5927 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5929 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5931 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5934 default:
goto __pyx_L5_argtuple_error;
5936 kw_args = PyDict_Size(__pyx_kwds);
5939 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
5940 else goto __pyx_L5_argtuple_error;
5943 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
5945 __Pyx_RaiseArgtupleInvalid(
"NonlinearAD_SteadyState", 1, 5, 5, 1); __PYX_ERR(0, 142, __pyx_L3_error)
5949 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5951 __Pyx_RaiseArgtupleInvalid(
"NonlinearAD_SteadyState", 1, 5, 5, 2); __PYX_ERR(0, 142, __pyx_L3_error)
5955 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5957 __Pyx_RaiseArgtupleInvalid(
"NonlinearAD_SteadyState", 1, 5, 5, 3); __PYX_ERR(0, 142, __pyx_L3_error)
5961 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
5963 __Pyx_RaiseArgtupleInvalid(
"NonlinearAD_SteadyState", 1, 5, 5, 4); __PYX_ERR(0, 142, __pyx_L3_error)
5966 if (unlikely(kw_args > 0)) {
5967 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"NonlinearAD_SteadyState") < 0)) __PYX_ERR(0, 142, __pyx_L3_error)
5969 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5970 goto __pyx_L5_argtuple_error;
5972 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5973 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5974 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5975 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5976 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5978 __pyx_v_iwork = ((PyArrayObject *)values[0]);
5979 __pyx_v_rwork = ((PyArrayObject *)values[1]);
5980 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L3_error)
5981 __pyx_v_x = ((PyArrayObject *)values[3]);
5982 __pyx_v_u = ((PyArrayObject *)values[4]);
5984 goto __pyx_L4_argument_unpacking_done;
5985 __pyx_L5_argtuple_error:;
5986 __Pyx_RaiseArgtupleInvalid(
"NonlinearAD_SteadyState", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 142, __pyx_L3_error)
5988 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearAD_SteadyState", __pyx_clineno, __pyx_lineno, __pyx_filename);
5989 __Pyx_RefNannyFinishContext();
5991 __pyx_L4_argument_unpacking_done:;
5992 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 142, __pyx_L1_error)
5993 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 142, __pyx_L1_error)
5994 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 142, __pyx_L1_error)
5995 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 142, __pyx_L1_error)
5996 __pyx_r = __pyx_pf_20canalyticalSolutions_46NonlinearAD_SteadyState(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
6003 __Pyx_RefNannyFinishContext();
6007 static PyObject *__pyx_pf_20canalyticalSolutions_46NonlinearAD_SteadyState(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
6008 PyObject *__pyx_r = NULL;
6009 __Pyx_RefNannyDeclarations
6010 PyObject *__pyx_t_1 = NULL;
6011 PyObject *__pyx_t_2 = NULL;
6012 PyObject *__pyx_t_3 = NULL;
6014 int __pyx_lineno = 0;
6015 const char *__pyx_filename = NULL;
6016 int __pyx_clineno = 0;
6017 __Pyx_RefNannySetupContext(
"NonlinearAD_SteadyState", 0);
6026 __Pyx_XDECREF(__pyx_r);
6027 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
6028 __Pyx_GOTREF(__pyx_t_1);
6029 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
6030 __Pyx_GOTREF(__pyx_t_2);
6031 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
6032 __Pyx_GOTREF(__pyx_t_3);
6033 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6034 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6035 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
6036 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6037 __pyx_t_3 = __Pyx_PyInt_From_int(
NonlinearAD_SteadyState(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
6038 __Pyx_GOTREF(__pyx_t_3);
6039 __pyx_r = __pyx_t_3;
6053 __Pyx_XDECREF(__pyx_t_1);
6054 __Pyx_XDECREF(__pyx_t_2);
6055 __Pyx_XDECREF(__pyx_t_3);
6056 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearAD_SteadyState", __pyx_clineno, __pyx_lineno, __pyx_filename);
6059 __Pyx_XGIVEREF(__pyx_r);
6060 __Pyx_RefNannyFinishContext();
6073 static PyObject *__pyx_pw_20canalyticalSolutions_49NonlinearADR_Decay_DiracIC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6074 static PyMethodDef __pyx_mdef_20canalyticalSolutions_49NonlinearADR_Decay_DiracIC = {
"NonlinearADR_Decay_DiracIC", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_49NonlinearADR_Decay_DiracIC, METH_VARARGS|METH_KEYWORDS, 0};
6075 static PyObject *__pyx_pw_20canalyticalSolutions_49NonlinearADR_Decay_DiracIC(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6076 PyArrayObject *__pyx_v_iwork = 0;
6077 PyArrayObject *__pyx_v_rwork = 0;
6079 PyArrayObject *__pyx_v_x = 0;
6080 PyArrayObject *__pyx_v_u = 0;
6081 int __pyx_lineno = 0;
6082 const char *__pyx_filename = NULL;
6083 int __pyx_clineno = 0;
6084 PyObject *__pyx_r = 0;
6085 __Pyx_RefNannyDeclarations
6086 __Pyx_RefNannySetupContext(
"NonlinearADR_Decay_DiracIC (wrapper)", 0);
6088 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
6089 PyObject* values[5] = {0,0,0,0,0};
6090 if (unlikely(__pyx_kwds)) {
6092 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6094 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6096 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6098 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6100 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6102 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6105 default:
goto __pyx_L5_argtuple_error;
6107 kw_args = PyDict_Size(__pyx_kwds);
6110 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
6111 else goto __pyx_L5_argtuple_error;
6114 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
6116 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC", 1, 5, 5, 1); __PYX_ERR(0, 146, __pyx_L3_error)
6120 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
6122 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC", 1, 5, 5, 2); __PYX_ERR(0, 146, __pyx_L3_error)
6126 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
6128 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC", 1, 5, 5, 3); __PYX_ERR(0, 146, __pyx_L3_error)
6132 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
6134 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC", 1, 5, 5, 4); __PYX_ERR(0, 146, __pyx_L3_error)
6137 if (unlikely(kw_args > 0)) {
6138 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"NonlinearADR_Decay_DiracIC") < 0)) __PYX_ERR(0, 146, __pyx_L3_error)
6140 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6141 goto __pyx_L5_argtuple_error;
6143 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6144 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6145 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6146 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6147 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6149 __pyx_v_iwork = ((PyArrayObject *)values[0]);
6150 __pyx_v_rwork = ((PyArrayObject *)values[1]);
6151 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
6152 __pyx_v_x = ((PyArrayObject *)values[3]);
6153 __pyx_v_u = ((PyArrayObject *)values[4]);
6155 goto __pyx_L4_argument_unpacking_done;
6156 __pyx_L5_argtuple_error:;
6157 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error)
6159 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearADR_Decay_DiracIC", __pyx_clineno, __pyx_lineno, __pyx_filename);
6160 __Pyx_RefNannyFinishContext();
6162 __pyx_L4_argument_unpacking_done:;
6163 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 146, __pyx_L1_error)
6164 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 146, __pyx_L1_error)
6165 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 146, __pyx_L1_error)
6166 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 146, __pyx_L1_error)
6167 __pyx_r = __pyx_pf_20canalyticalSolutions_48NonlinearADR_Decay_DiracIC(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
6174 __Pyx_RefNannyFinishContext();
6178 static PyObject *__pyx_pf_20canalyticalSolutions_48NonlinearADR_Decay_DiracIC(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
6179 PyObject *__pyx_r = NULL;
6180 __Pyx_RefNannyDeclarations
6181 PyObject *__pyx_t_1 = NULL;
6182 PyObject *__pyx_t_2 = NULL;
6183 PyObject *__pyx_t_3 = NULL;
6185 int __pyx_lineno = 0;
6186 const char *__pyx_filename = NULL;
6187 int __pyx_clineno = 0;
6188 __Pyx_RefNannySetupContext(
"NonlinearADR_Decay_DiracIC", 0);
6197 __Pyx_XDECREF(__pyx_r);
6198 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
6199 __Pyx_GOTREF(__pyx_t_1);
6200 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
6201 __Pyx_GOTREF(__pyx_t_2);
6202 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
6203 __Pyx_GOTREF(__pyx_t_3);
6204 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6205 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6206 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L1_error)
6207 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6208 __pyx_t_3 = __Pyx_PyInt_From_int(
NonlinearADR_Decay_DiracIC(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
6209 __Pyx_GOTREF(__pyx_t_3);
6210 __pyx_r = __pyx_t_3;
6224 __Pyx_XDECREF(__pyx_t_1);
6225 __Pyx_XDECREF(__pyx_t_2);
6226 __Pyx_XDECREF(__pyx_t_3);
6227 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearADR_Decay_DiracIC", __pyx_clineno, __pyx_lineno, __pyx_filename);
6230 __Pyx_XGIVEREF(__pyx_r);
6231 __Pyx_RefNannyFinishContext();
6244 static PyObject *__pyx_pw_20canalyticalSolutions_51NonlinearADR_Decay_DiracIC_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6245 static PyMethodDef __pyx_mdef_20canalyticalSolutions_51NonlinearADR_Decay_DiracIC_dr = {
"NonlinearADR_Decay_DiracIC_dr", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_51NonlinearADR_Decay_DiracIC_dr, METH_VARARGS|METH_KEYWORDS, 0};
6246 static PyObject *__pyx_pw_20canalyticalSolutions_51NonlinearADR_Decay_DiracIC_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6247 PyArrayObject *__pyx_v_iwork = 0;
6248 PyArrayObject *__pyx_v_rwork = 0;
6250 PyArrayObject *__pyx_v_x = 0;
6251 PyArrayObject *__pyx_v_u = 0;
6252 PyArrayObject *__pyx_v_dr = 0;
6253 int __pyx_lineno = 0;
6254 const char *__pyx_filename = NULL;
6255 int __pyx_clineno = 0;
6256 PyObject *__pyx_r = 0;
6257 __Pyx_RefNannyDeclarations
6258 __Pyx_RefNannySetupContext(
"NonlinearADR_Decay_DiracIC_dr (wrapper)", 0);
6260 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_dr,0};
6261 PyObject* values[6] = {0,0,0,0,0,0};
6262 if (unlikely(__pyx_kwds)) {
6264 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6266 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6268 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6270 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6272 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6274 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6276 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6279 default:
goto __pyx_L5_argtuple_error;
6281 kw_args = PyDict_Size(__pyx_kwds);
6284 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
6285 else goto __pyx_L5_argtuple_error;
6288 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
6290 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_dr", 1, 6, 6, 1); __PYX_ERR(0, 150, __pyx_L3_error)
6294 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
6296 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_dr", 1, 6, 6, 2); __PYX_ERR(0, 150, __pyx_L3_error)
6300 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
6302 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_dr", 1, 6, 6, 3); __PYX_ERR(0, 150, __pyx_L3_error)
6306 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
6308 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_dr", 1, 6, 6, 4); __PYX_ERR(0, 150, __pyx_L3_error)
6312 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
6314 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_dr", 1, 6, 6, 5); __PYX_ERR(0, 150, __pyx_L3_error)
6317 if (unlikely(kw_args > 0)) {
6318 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"NonlinearADR_Decay_DiracIC_dr") < 0)) __PYX_ERR(0, 150, __pyx_L3_error)
6320 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
6321 goto __pyx_L5_argtuple_error;
6323 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6324 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6325 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6326 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6327 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6328 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6330 __pyx_v_iwork = ((PyArrayObject *)values[0]);
6331 __pyx_v_rwork = ((PyArrayObject *)values[1]);
6332 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L3_error)
6333 __pyx_v_x = ((PyArrayObject *)values[3]);
6334 __pyx_v_u = ((PyArrayObject *)values[4]);
6335 __pyx_v_dr = ((PyArrayObject *)values[5]);
6337 goto __pyx_L4_argument_unpacking_done;
6338 __pyx_L5_argtuple_error:;
6339 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_dr", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 150, __pyx_L3_error)
6341 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearADR_Decay_DiracIC_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
6342 __Pyx_RefNannyFinishContext();
6344 __pyx_L4_argument_unpacking_done:;
6345 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
6346 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
6347 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
6348 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
6349 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
6350 __pyx_r = __pyx_pf_20canalyticalSolutions_50NonlinearADR_Decay_DiracIC_dr(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_dr);
6357 __Pyx_RefNannyFinishContext();
6361 static PyObject *__pyx_pf_20canalyticalSolutions_50NonlinearADR_Decay_DiracIC_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr) {
6362 PyObject *__pyx_r = NULL;
6363 __Pyx_RefNannyDeclarations
6364 PyObject *__pyx_t_1 = NULL;
6365 PyObject *__pyx_t_2 = NULL;
6366 PyObject *__pyx_t_3 = NULL;
6368 int __pyx_lineno = 0;
6369 const char *__pyx_filename = NULL;
6370 int __pyx_clineno = 0;
6371 __Pyx_RefNannySetupContext(
"NonlinearADR_Decay_DiracIC_dr", 0);
6380 __Pyx_XDECREF(__pyx_r);
6381 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
6382 __Pyx_GOTREF(__pyx_t_1);
6383 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
6384 __Pyx_GOTREF(__pyx_t_2);
6385 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
6386 __Pyx_GOTREF(__pyx_t_3);
6387 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6388 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6389 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
6390 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6391 __pyx_t_3 = __Pyx_PyInt_From_int(
NonlinearADR_Decay_DiracIC_dr(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_dr->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
6392 __Pyx_GOTREF(__pyx_t_3);
6393 __pyx_r = __pyx_t_3;
6407 __Pyx_XDECREF(__pyx_t_1);
6408 __Pyx_XDECREF(__pyx_t_2);
6409 __Pyx_XDECREF(__pyx_t_3);
6410 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearADR_Decay_DiracIC_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
6413 __Pyx_XGIVEREF(__pyx_r);
6414 __Pyx_RefNannyFinishContext();
6427 static PyObject *__pyx_pw_20canalyticalSolutions_53NonlinearADR_Decay_DiracIC_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6428 static PyMethodDef __pyx_mdef_20canalyticalSolutions_53NonlinearADR_Decay_DiracIC_r = {
"NonlinearADR_Decay_DiracIC_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_53NonlinearADR_Decay_DiracIC_r, METH_VARARGS|METH_KEYWORDS, 0};
6429 static PyObject *__pyx_pw_20canalyticalSolutions_53NonlinearADR_Decay_DiracIC_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6430 PyArrayObject *__pyx_v_iwork = 0;
6431 PyArrayObject *__pyx_v_rwork = 0;
6433 PyArrayObject *__pyx_v_x = 0;
6434 PyArrayObject *__pyx_v_u = 0;
6435 PyArrayObject *__pyx_v_r = 0;
6436 int __pyx_lineno = 0;
6437 const char *__pyx_filename = NULL;
6438 int __pyx_clineno = 0;
6439 PyObject *__pyx_r = 0;
6440 __Pyx_RefNannyDeclarations
6441 __Pyx_RefNannySetupContext(
"NonlinearADR_Decay_DiracIC_r (wrapper)", 0);
6443 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
6444 PyObject* values[6] = {0,0,0,0,0,0};
6445 if (unlikely(__pyx_kwds)) {
6447 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6449 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6451 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6453 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6455 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6457 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6459 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6462 default:
goto __pyx_L5_argtuple_error;
6464 kw_args = PyDict_Size(__pyx_kwds);
6467 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
6468 else goto __pyx_L5_argtuple_error;
6471 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
6473 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_r", 1, 6, 6, 1); __PYX_ERR(0, 154, __pyx_L3_error)
6477 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
6479 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_r", 1, 6, 6, 2); __PYX_ERR(0, 154, __pyx_L3_error)
6483 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
6485 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_r", 1, 6, 6, 3); __PYX_ERR(0, 154, __pyx_L3_error)
6489 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
6491 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_r", 1, 6, 6, 4); __PYX_ERR(0, 154, __pyx_L3_error)
6495 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
6497 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_r", 1, 6, 6, 5); __PYX_ERR(0, 154, __pyx_L3_error)
6500 if (unlikely(kw_args > 0)) {
6501 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"NonlinearADR_Decay_DiracIC_r") < 0)) __PYX_ERR(0, 154, __pyx_L3_error)
6503 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
6504 goto __pyx_L5_argtuple_error;
6506 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6507 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6508 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6509 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6510 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6511 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6513 __pyx_v_iwork = ((PyArrayObject *)values[0]);
6514 __pyx_v_rwork = ((PyArrayObject *)values[1]);
6515 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 154, __pyx_L3_error)
6516 __pyx_v_x = ((PyArrayObject *)values[3]);
6517 __pyx_v_u = ((PyArrayObject *)values[4]);
6518 __pyx_v_r = ((PyArrayObject *)values[5]);
6520 goto __pyx_L4_argument_unpacking_done;
6521 __pyx_L5_argtuple_error:;
6522 __Pyx_RaiseArgtupleInvalid(
"NonlinearADR_Decay_DiracIC_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 154, __pyx_L3_error)
6524 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearADR_Decay_DiracIC_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
6525 __Pyx_RefNannyFinishContext();
6527 __pyx_L4_argument_unpacking_done:;
6528 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 154, __pyx_L1_error)
6529 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 154, __pyx_L1_error)
6530 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 154, __pyx_L1_error)
6531 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 154, __pyx_L1_error)
6532 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 154, __pyx_L1_error)
6533 __pyx_r = __pyx_pf_20canalyticalSolutions_52NonlinearADR_Decay_DiracIC_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
6540 __Pyx_RefNannyFinishContext();
6544 static PyObject *__pyx_pf_20canalyticalSolutions_52NonlinearADR_Decay_DiracIC_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
6545 PyObject *__pyx_r = NULL;
6546 __Pyx_RefNannyDeclarations
6547 PyObject *__pyx_t_1 = NULL;
6548 PyObject *__pyx_t_2 = NULL;
6549 PyObject *__pyx_t_3 = NULL;
6551 int __pyx_lineno = 0;
6552 const char *__pyx_filename = NULL;
6553 int __pyx_clineno = 0;
6554 __Pyx_RefNannySetupContext(
"NonlinearADR_Decay_DiracIC_r", 0);
6563 __Pyx_XDECREF(__pyx_r);
6564 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
6565 __Pyx_GOTREF(__pyx_t_1);
6566 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
6567 __Pyx_GOTREF(__pyx_t_2);
6568 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
6569 __Pyx_GOTREF(__pyx_t_3);
6570 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6571 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6572 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L1_error)
6573 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6574 __pyx_t_3 = __Pyx_PyInt_From_int(
NonlinearADR_Decay_DiracIC_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
6575 __Pyx_GOTREF(__pyx_t_3);
6576 __pyx_r = __pyx_t_3;
6590 __Pyx_XDECREF(__pyx_t_1);
6591 __Pyx_XDECREF(__pyx_t_2);
6592 __Pyx_XDECREF(__pyx_t_3);
6593 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearADR_Decay_DiracIC_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
6596 __Pyx_XGIVEREF(__pyx_r);
6597 __Pyx_RefNannyFinishContext();
6610 static PyObject *__pyx_pw_20canalyticalSolutions_55NonlinearDAE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6611 static PyMethodDef __pyx_mdef_20canalyticalSolutions_55NonlinearDAE = {
"NonlinearDAE", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_55NonlinearDAE, METH_VARARGS|METH_KEYWORDS, 0};
6612 static PyObject *__pyx_pw_20canalyticalSolutions_55NonlinearDAE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6613 PyArrayObject *__pyx_v_iwork = 0;
6614 PyArrayObject *__pyx_v_rwork = 0;
6616 PyArrayObject *__pyx_v_x = 0;
6617 PyArrayObject *__pyx_v_u = 0;
6618 int __pyx_lineno = 0;
6619 const char *__pyx_filename = NULL;
6620 int __pyx_clineno = 0;
6621 PyObject *__pyx_r = 0;
6622 __Pyx_RefNannyDeclarations
6623 __Pyx_RefNannySetupContext(
"NonlinearDAE (wrapper)", 0);
6625 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
6626 PyObject* values[5] = {0,0,0,0,0};
6627 if (unlikely(__pyx_kwds)) {
6629 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6631 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6633 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6635 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6637 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6639 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6642 default:
goto __pyx_L5_argtuple_error;
6644 kw_args = PyDict_Size(__pyx_kwds);
6647 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
6648 else goto __pyx_L5_argtuple_error;
6651 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
6653 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE", 1, 5, 5, 1); __PYX_ERR(0, 158, __pyx_L3_error)
6657 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
6659 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE", 1, 5, 5, 2); __PYX_ERR(0, 158, __pyx_L3_error)
6663 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
6665 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE", 1, 5, 5, 3); __PYX_ERR(0, 158, __pyx_L3_error)
6669 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
6671 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE", 1, 5, 5, 4); __PYX_ERR(0, 158, __pyx_L3_error)
6674 if (unlikely(kw_args > 0)) {
6675 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"NonlinearDAE") < 0)) __PYX_ERR(0, 158, __pyx_L3_error)
6677 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6678 goto __pyx_L5_argtuple_error;
6680 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6681 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6682 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6683 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6684 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6686 __pyx_v_iwork = ((PyArrayObject *)values[0]);
6687 __pyx_v_rwork = ((PyArrayObject *)values[1]);
6688 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L3_error)
6689 __pyx_v_x = ((PyArrayObject *)values[3]);
6690 __pyx_v_u = ((PyArrayObject *)values[4]);
6692 goto __pyx_L4_argument_unpacking_done;
6693 __pyx_L5_argtuple_error:;
6694 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 158, __pyx_L3_error)
6696 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearDAE", __pyx_clineno, __pyx_lineno, __pyx_filename);
6697 __Pyx_RefNannyFinishContext();
6699 __pyx_L4_argument_unpacking_done:;
6700 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 158, __pyx_L1_error)
6701 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 158, __pyx_L1_error)
6702 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 158, __pyx_L1_error)
6703 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 158, __pyx_L1_error)
6704 __pyx_r = __pyx_pf_20canalyticalSolutions_54NonlinearDAE(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
6711 __Pyx_RefNannyFinishContext();
6715 static PyObject *__pyx_pf_20canalyticalSolutions_54NonlinearDAE(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
6716 PyObject *__pyx_r = NULL;
6717 __Pyx_RefNannyDeclarations
6718 PyObject *__pyx_t_1 = NULL;
6719 PyObject *__pyx_t_2 = NULL;
6720 PyObject *__pyx_t_3 = NULL;
6722 int __pyx_lineno = 0;
6723 const char *__pyx_filename = NULL;
6724 int __pyx_clineno = 0;
6725 __Pyx_RefNannySetupContext(
"NonlinearDAE", 0);
6734 __Pyx_XDECREF(__pyx_r);
6735 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
6736 __Pyx_GOTREF(__pyx_t_1);
6737 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
6738 __Pyx_GOTREF(__pyx_t_2);
6739 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
6740 __Pyx_GOTREF(__pyx_t_3);
6741 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6742 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6743 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error)
6744 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6745 __pyx_t_3 = __Pyx_PyInt_From_int(
NonlinearDAE(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
6746 __Pyx_GOTREF(__pyx_t_3);
6747 __pyx_r = __pyx_t_3;
6761 __Pyx_XDECREF(__pyx_t_1);
6762 __Pyx_XDECREF(__pyx_t_2);
6763 __Pyx_XDECREF(__pyx_t_3);
6764 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearDAE", __pyx_clineno, __pyx_lineno, __pyx_filename);
6767 __Pyx_XGIVEREF(__pyx_r);
6768 __Pyx_RefNannyFinishContext();
6781 static PyObject *__pyx_pw_20canalyticalSolutions_57NonlinearDAE_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6782 static PyMethodDef __pyx_mdef_20canalyticalSolutions_57NonlinearDAE_f = {
"NonlinearDAE_f", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_57NonlinearDAE_f, METH_VARARGS|METH_KEYWORDS, 0};
6783 static PyObject *__pyx_pw_20canalyticalSolutions_57NonlinearDAE_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6784 PyArrayObject *__pyx_v_iwork = 0;
6785 PyArrayObject *__pyx_v_rwork = 0;
6787 PyArrayObject *__pyx_v_x = 0;
6788 PyArrayObject *__pyx_v_u = 0;
6789 int __pyx_lineno = 0;
6790 const char *__pyx_filename = NULL;
6791 int __pyx_clineno = 0;
6792 PyObject *__pyx_r = 0;
6793 __Pyx_RefNannyDeclarations
6794 __Pyx_RefNannySetupContext(
"NonlinearDAE_f (wrapper)", 0);
6796 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
6797 PyObject* values[5] = {0,0,0,0,0};
6798 if (unlikely(__pyx_kwds)) {
6800 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6802 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6804 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6806 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6808 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6810 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6813 default:
goto __pyx_L5_argtuple_error;
6815 kw_args = PyDict_Size(__pyx_kwds);
6818 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
6819 else goto __pyx_L5_argtuple_error;
6822 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
6824 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE_f", 1, 5, 5, 1); __PYX_ERR(0, 162, __pyx_L3_error)
6828 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
6830 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE_f", 1, 5, 5, 2); __PYX_ERR(0, 162, __pyx_L3_error)
6834 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
6836 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE_f", 1, 5, 5, 3); __PYX_ERR(0, 162, __pyx_L3_error)
6840 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
6842 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE_f", 1, 5, 5, 4); __PYX_ERR(0, 162, __pyx_L3_error)
6845 if (unlikely(kw_args > 0)) {
6846 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"NonlinearDAE_f") < 0)) __PYX_ERR(0, 162, __pyx_L3_error)
6848 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6849 goto __pyx_L5_argtuple_error;
6851 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6852 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6853 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6854 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6855 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6857 __pyx_v_iwork = ((PyArrayObject *)values[0]);
6858 __pyx_v_rwork = ((PyArrayObject *)values[1]);
6859 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L3_error)
6860 __pyx_v_x = ((PyArrayObject *)values[3]);
6861 __pyx_v_u = ((PyArrayObject *)values[4]);
6863 goto __pyx_L4_argument_unpacking_done;
6864 __pyx_L5_argtuple_error:;
6865 __Pyx_RaiseArgtupleInvalid(
"NonlinearDAE_f", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 162, __pyx_L3_error)
6867 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearDAE_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
6868 __Pyx_RefNannyFinishContext();
6870 __pyx_L4_argument_unpacking_done:;
6871 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 162, __pyx_L1_error)
6872 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 162, __pyx_L1_error)
6873 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 162, __pyx_L1_error)
6874 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 162, __pyx_L1_error)
6875 __pyx_r = __pyx_pf_20canalyticalSolutions_56NonlinearDAE_f(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
6882 __Pyx_RefNannyFinishContext();
6886 static PyObject *__pyx_pf_20canalyticalSolutions_56NonlinearDAE_f(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
6887 PyObject *__pyx_r = NULL;
6888 __Pyx_RefNannyDeclarations
6889 PyObject *__pyx_t_1 = NULL;
6890 PyObject *__pyx_t_2 = NULL;
6891 PyObject *__pyx_t_3 = NULL;
6893 int __pyx_lineno = 0;
6894 const char *__pyx_filename = NULL;
6895 int __pyx_clineno = 0;
6896 __Pyx_RefNannySetupContext(
"NonlinearDAE_f", 0);
6905 __Pyx_XDECREF(__pyx_r);
6906 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
6907 __Pyx_GOTREF(__pyx_t_1);
6908 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
6909 __Pyx_GOTREF(__pyx_t_2);
6910 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
6911 __Pyx_GOTREF(__pyx_t_3);
6912 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6913 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6914 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L1_error)
6915 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6916 __pyx_t_3 = __Pyx_PyInt_From_int(
NonlinearDAE_f(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
6917 __Pyx_GOTREF(__pyx_t_3);
6918 __pyx_r = __pyx_t_3;
6932 __Pyx_XDECREF(__pyx_t_1);
6933 __Pyx_XDECREF(__pyx_t_2);
6934 __Pyx_XDECREF(__pyx_t_3);
6935 __Pyx_AddTraceback(
"canalyticalSolutions.NonlinearDAE_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
6938 __Pyx_XGIVEREF(__pyx_r);
6939 __Pyx_RefNannyFinishContext();
6952 static PyObject *__pyx_pw_20canalyticalSolutions_59PlanePoiseuilleFlow_u(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6953 static PyMethodDef __pyx_mdef_20canalyticalSolutions_59PlanePoiseuilleFlow_u = {
"PlanePoiseuilleFlow_u", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_59PlanePoiseuilleFlow_u, METH_VARARGS|METH_KEYWORDS, 0};
6954 static PyObject *__pyx_pw_20canalyticalSolutions_59PlanePoiseuilleFlow_u(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6955 PyArrayObject *__pyx_v_iwork = 0;
6956 PyArrayObject *__pyx_v_rwork = 0;
6958 PyArrayObject *__pyx_v_x = 0;
6959 PyArrayObject *__pyx_v_u = 0;
6960 int __pyx_lineno = 0;
6961 const char *__pyx_filename = NULL;
6962 int __pyx_clineno = 0;
6963 PyObject *__pyx_r = 0;
6964 __Pyx_RefNannyDeclarations
6965 __Pyx_RefNannySetupContext(
"PlanePoiseuilleFlow_u (wrapper)", 0);
6967 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
6968 PyObject* values[5] = {0,0,0,0,0};
6969 if (unlikely(__pyx_kwds)) {
6971 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6973 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6975 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6977 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6979 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6981 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6984 default:
goto __pyx_L5_argtuple_error;
6986 kw_args = PyDict_Size(__pyx_kwds);
6989 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
6990 else goto __pyx_L5_argtuple_error;
6993 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
6995 __Pyx_RaiseArgtupleInvalid(
"PlanePoiseuilleFlow_u", 1, 5, 5, 1); __PYX_ERR(0, 166, __pyx_L3_error)
6999 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7001 __Pyx_RaiseArgtupleInvalid(
"PlanePoiseuilleFlow_u", 1, 5, 5, 2); __PYX_ERR(0, 166, __pyx_L3_error)
7005 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7007 __Pyx_RaiseArgtupleInvalid(
"PlanePoiseuilleFlow_u", 1, 5, 5, 3); __PYX_ERR(0, 166, __pyx_L3_error)
7011 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
7013 __Pyx_RaiseArgtupleInvalid(
"PlanePoiseuilleFlow_u", 1, 5, 5, 4); __PYX_ERR(0, 166, __pyx_L3_error)
7016 if (unlikely(kw_args > 0)) {
7017 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"PlanePoiseuilleFlow_u") < 0)) __PYX_ERR(0, 166, __pyx_L3_error)
7019 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7020 goto __pyx_L5_argtuple_error;
7022 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7023 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7024 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7025 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7026 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7028 __pyx_v_iwork = ((PyArrayObject *)values[0]);
7029 __pyx_v_rwork = ((PyArrayObject *)values[1]);
7030 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L3_error)
7031 __pyx_v_x = ((PyArrayObject *)values[3]);
7032 __pyx_v_u = ((PyArrayObject *)values[4]);
7034 goto __pyx_L4_argument_unpacking_done;
7035 __pyx_L5_argtuple_error:;
7036 __Pyx_RaiseArgtupleInvalid(
"PlanePoiseuilleFlow_u", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 166, __pyx_L3_error)
7038 __Pyx_AddTraceback(
"canalyticalSolutions.PlanePoiseuilleFlow_u", __pyx_clineno, __pyx_lineno, __pyx_filename);
7039 __Pyx_RefNannyFinishContext();
7041 __pyx_L4_argument_unpacking_done:;
7042 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
7043 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
7044 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
7045 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
7046 __pyx_r = __pyx_pf_20canalyticalSolutions_58PlanePoiseuilleFlow_u(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
7053 __Pyx_RefNannyFinishContext();
7057 static PyObject *__pyx_pf_20canalyticalSolutions_58PlanePoiseuilleFlow_u(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
7058 PyObject *__pyx_r = NULL;
7059 __Pyx_RefNannyDeclarations
7060 PyObject *__pyx_t_1 = NULL;
7061 PyObject *__pyx_t_2 = NULL;
7062 PyObject *__pyx_t_3 = NULL;
7064 int __pyx_lineno = 0;
7065 const char *__pyx_filename = NULL;
7066 int __pyx_clineno = 0;
7067 __Pyx_RefNannySetupContext(
"PlanePoiseuilleFlow_u", 0);
7076 __Pyx_XDECREF(__pyx_r);
7077 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
7078 __Pyx_GOTREF(__pyx_t_1);
7079 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
7080 __Pyx_GOTREF(__pyx_t_2);
7081 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
7082 __Pyx_GOTREF(__pyx_t_3);
7083 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7084 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7085 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
7086 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7087 __pyx_t_3 = __Pyx_PyInt_From_int(
PlanePoiseuilleFlow_u(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
7088 __Pyx_GOTREF(__pyx_t_3);
7089 __pyx_r = __pyx_t_3;
7103 __Pyx_XDECREF(__pyx_t_1);
7104 __Pyx_XDECREF(__pyx_t_2);
7105 __Pyx_XDECREF(__pyx_t_3);
7106 __Pyx_AddTraceback(
"canalyticalSolutions.PlanePoiseuilleFlow_u", __pyx_clineno, __pyx_lineno, __pyx_filename);
7109 __Pyx_XGIVEREF(__pyx_r);
7110 __Pyx_RefNannyFinishContext();
7123 static PyObject *__pyx_pw_20canalyticalSolutions_61PoiseuillePipeFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7124 static PyMethodDef __pyx_mdef_20canalyticalSolutions_61PoiseuillePipeFlow = {
"PoiseuillePipeFlow", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_61PoiseuillePipeFlow, METH_VARARGS|METH_KEYWORDS, 0};
7125 static PyObject *__pyx_pw_20canalyticalSolutions_61PoiseuillePipeFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7126 PyArrayObject *__pyx_v_iwork = 0;
7127 PyArrayObject *__pyx_v_rwork = 0;
7129 PyArrayObject *__pyx_v_x = 0;
7130 PyArrayObject *__pyx_v_u = 0;
7131 int __pyx_lineno = 0;
7132 const char *__pyx_filename = NULL;
7133 int __pyx_clineno = 0;
7134 PyObject *__pyx_r = 0;
7135 __Pyx_RefNannyDeclarations
7136 __Pyx_RefNannySetupContext(
"PoiseuillePipeFlow (wrapper)", 0);
7138 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
7139 PyObject* values[5] = {0,0,0,0,0};
7140 if (unlikely(__pyx_kwds)) {
7142 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7144 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7146 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7148 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7150 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7152 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7155 default:
goto __pyx_L5_argtuple_error;
7157 kw_args = PyDict_Size(__pyx_kwds);
7160 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
7161 else goto __pyx_L5_argtuple_error;
7164 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
7166 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow", 1, 5, 5, 1); __PYX_ERR(0, 170, __pyx_L3_error)
7170 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7172 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow", 1, 5, 5, 2); __PYX_ERR(0, 170, __pyx_L3_error)
7176 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7178 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow", 1, 5, 5, 3); __PYX_ERR(0, 170, __pyx_L3_error)
7182 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
7184 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow", 1, 5, 5, 4); __PYX_ERR(0, 170, __pyx_L3_error)
7187 if (unlikely(kw_args > 0)) {
7188 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"PoiseuillePipeFlow") < 0)) __PYX_ERR(0, 170, __pyx_L3_error)
7190 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7191 goto __pyx_L5_argtuple_error;
7193 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7194 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7195 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7196 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7197 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7199 __pyx_v_iwork = ((PyArrayObject *)values[0]);
7200 __pyx_v_rwork = ((PyArrayObject *)values[1]);
7201 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L3_error)
7202 __pyx_v_x = ((PyArrayObject *)values[3]);
7203 __pyx_v_u = ((PyArrayObject *)values[4]);
7205 goto __pyx_L4_argument_unpacking_done;
7206 __pyx_L5_argtuple_error:;
7207 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 170, __pyx_L3_error)
7209 __Pyx_AddTraceback(
"canalyticalSolutions.PoiseuillePipeFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
7210 __Pyx_RefNannyFinishContext();
7212 __pyx_L4_argument_unpacking_done:;
7213 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
7214 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
7215 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
7216 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
7217 __pyx_r = __pyx_pf_20canalyticalSolutions_60PoiseuillePipeFlow(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
7224 __Pyx_RefNannyFinishContext();
7228 static PyObject *__pyx_pf_20canalyticalSolutions_60PoiseuillePipeFlow(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
7229 PyObject *__pyx_r = NULL;
7230 __Pyx_RefNannyDeclarations
7231 PyObject *__pyx_t_1 = NULL;
7232 PyObject *__pyx_t_2 = NULL;
7233 PyObject *__pyx_t_3 = NULL;
7235 int __pyx_lineno = 0;
7236 const char *__pyx_filename = NULL;
7237 int __pyx_clineno = 0;
7238 __Pyx_RefNannySetupContext(
"PoiseuillePipeFlow", 0);
7247 __Pyx_XDECREF(__pyx_r);
7248 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
7249 __Pyx_GOTREF(__pyx_t_1);
7250 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
7251 __Pyx_GOTREF(__pyx_t_2);
7252 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
7253 __Pyx_GOTREF(__pyx_t_3);
7254 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7255 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7256 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error)
7257 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7258 __pyx_t_3 = __Pyx_PyInt_From_int(
PoiseuillePipeFlow(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
7259 __Pyx_GOTREF(__pyx_t_3);
7260 __pyx_r = __pyx_t_3;
7274 __Pyx_XDECREF(__pyx_t_1);
7275 __Pyx_XDECREF(__pyx_t_2);
7276 __Pyx_XDECREF(__pyx_t_3);
7277 __Pyx_AddTraceback(
"canalyticalSolutions.PoiseuillePipeFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
7280 __Pyx_XGIVEREF(__pyx_r);
7281 __Pyx_RefNannyFinishContext();
7294 static PyObject *__pyx_pw_20canalyticalSolutions_63PoiseuillePipeFlow_P(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7295 static PyMethodDef __pyx_mdef_20canalyticalSolutions_63PoiseuillePipeFlow_P = {
"PoiseuillePipeFlow_P", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_63PoiseuillePipeFlow_P, METH_VARARGS|METH_KEYWORDS, 0};
7296 static PyObject *__pyx_pw_20canalyticalSolutions_63PoiseuillePipeFlow_P(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7297 PyArrayObject *__pyx_v_iwork = 0;
7298 PyArrayObject *__pyx_v_rwork = 0;
7300 PyArrayObject *__pyx_v_x = 0;
7301 PyArrayObject *__pyx_v_u = 0;
7302 int __pyx_lineno = 0;
7303 const char *__pyx_filename = NULL;
7304 int __pyx_clineno = 0;
7305 PyObject *__pyx_r = 0;
7306 __Pyx_RefNannyDeclarations
7307 __Pyx_RefNannySetupContext(
"PoiseuillePipeFlow_P (wrapper)", 0);
7309 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
7310 PyObject* values[5] = {0,0,0,0,0};
7311 if (unlikely(__pyx_kwds)) {
7313 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7315 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7317 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7319 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7321 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7323 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7326 default:
goto __pyx_L5_argtuple_error;
7328 kw_args = PyDict_Size(__pyx_kwds);
7331 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
7332 else goto __pyx_L5_argtuple_error;
7335 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
7337 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow_P", 1, 5, 5, 1); __PYX_ERR(0, 174, __pyx_L3_error)
7341 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7343 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow_P", 1, 5, 5, 2); __PYX_ERR(0, 174, __pyx_L3_error)
7347 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7349 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow_P", 1, 5, 5, 3); __PYX_ERR(0, 174, __pyx_L3_error)
7353 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
7355 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow_P", 1, 5, 5, 4); __PYX_ERR(0, 174, __pyx_L3_error)
7358 if (unlikely(kw_args > 0)) {
7359 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"PoiseuillePipeFlow_P") < 0)) __PYX_ERR(0, 174, __pyx_L3_error)
7361 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7362 goto __pyx_L5_argtuple_error;
7364 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7365 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7366 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7367 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7368 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7370 __pyx_v_iwork = ((PyArrayObject *)values[0]);
7371 __pyx_v_rwork = ((PyArrayObject *)values[1]);
7372 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error)
7373 __pyx_v_x = ((PyArrayObject *)values[3]);
7374 __pyx_v_u = ((PyArrayObject *)values[4]);
7376 goto __pyx_L4_argument_unpacking_done;
7377 __pyx_L5_argtuple_error:;
7378 __Pyx_RaiseArgtupleInvalid(
"PoiseuillePipeFlow_P", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 174, __pyx_L3_error)
7380 __Pyx_AddTraceback(
"canalyticalSolutions.PoiseuillePipeFlow_P", __pyx_clineno, __pyx_lineno, __pyx_filename);
7381 __Pyx_RefNannyFinishContext();
7383 __pyx_L4_argument_unpacking_done:;
7384 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 174, __pyx_L1_error)
7385 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 174, __pyx_L1_error)
7386 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 174, __pyx_L1_error)
7387 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 174, __pyx_L1_error)
7388 __pyx_r = __pyx_pf_20canalyticalSolutions_62PoiseuillePipeFlow_P(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
7395 __Pyx_RefNannyFinishContext();
7399 static PyObject *__pyx_pf_20canalyticalSolutions_62PoiseuillePipeFlow_P(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
7400 PyObject *__pyx_r = NULL;
7401 __Pyx_RefNannyDeclarations
7402 PyObject *__pyx_t_1 = NULL;
7403 PyObject *__pyx_t_2 = NULL;
7404 PyObject *__pyx_t_3 = NULL;
7406 int __pyx_lineno = 0;
7407 const char *__pyx_filename = NULL;
7408 int __pyx_clineno = 0;
7409 __Pyx_RefNannySetupContext(
"PoiseuillePipeFlow_P", 0);
7418 __Pyx_XDECREF(__pyx_r);
7419 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
7420 __Pyx_GOTREF(__pyx_t_1);
7421 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
7422 __Pyx_GOTREF(__pyx_t_2);
7423 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
7424 __Pyx_GOTREF(__pyx_t_3);
7425 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7426 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7427 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L1_error)
7428 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7429 __pyx_t_3 = __Pyx_PyInt_From_int(
PoiseuillePipeFlow_P(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
7430 __Pyx_GOTREF(__pyx_t_3);
7431 __pyx_r = __pyx_t_3;
7445 __Pyx_XDECREF(__pyx_t_1);
7446 __Pyx_XDECREF(__pyx_t_2);
7447 __Pyx_XDECREF(__pyx_t_3);
7448 __Pyx_AddTraceback(
"canalyticalSolutions.PoiseuillePipeFlow_P", __pyx_clineno, __pyx_lineno, __pyx_filename);
7451 __Pyx_XGIVEREF(__pyx_r);
7452 __Pyx_RefNannyFinishContext();
7465 static PyObject *__pyx_pw_20canalyticalSolutions_65poissonsEquationExp1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7466 static PyMethodDef __pyx_mdef_20canalyticalSolutions_65poissonsEquationExp1D = {
"poissonsEquationExp1D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_65poissonsEquationExp1D, METH_VARARGS|METH_KEYWORDS, 0};
7467 static PyObject *__pyx_pw_20canalyticalSolutions_65poissonsEquationExp1D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7468 PyArrayObject *__pyx_v_iwork = 0;
7469 PyArrayObject *__pyx_v_rwork = 0;
7471 PyArrayObject *__pyx_v_x = 0;
7472 PyArrayObject *__pyx_v_u = 0;
7473 int __pyx_lineno = 0;
7474 const char *__pyx_filename = NULL;
7475 int __pyx_clineno = 0;
7476 PyObject *__pyx_r = 0;
7477 __Pyx_RefNannyDeclarations
7478 __Pyx_RefNannySetupContext(
"poissonsEquationExp1D (wrapper)", 0);
7480 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
7481 PyObject* values[5] = {0,0,0,0,0};
7482 if (unlikely(__pyx_kwds)) {
7484 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7486 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7488 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7490 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7492 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7494 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7497 default:
goto __pyx_L5_argtuple_error;
7499 kw_args = PyDict_Size(__pyx_kwds);
7502 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
7503 else goto __pyx_L5_argtuple_error;
7506 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
7508 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D", 1, 5, 5, 1); __PYX_ERR(0, 178, __pyx_L3_error)
7512 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7514 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D", 1, 5, 5, 2); __PYX_ERR(0, 178, __pyx_L3_error)
7518 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7520 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D", 1, 5, 5, 3); __PYX_ERR(0, 178, __pyx_L3_error)
7524 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
7526 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D", 1, 5, 5, 4); __PYX_ERR(0, 178, __pyx_L3_error)
7529 if (unlikely(kw_args > 0)) {
7530 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp1D") < 0)) __PYX_ERR(0, 178, __pyx_L3_error)
7532 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7533 goto __pyx_L5_argtuple_error;
7535 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7536 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7537 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7538 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7539 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7541 __pyx_v_iwork = ((PyArrayObject *)values[0]);
7542 __pyx_v_rwork = ((PyArrayObject *)values[1]);
7543 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error)
7544 __pyx_v_x = ((PyArrayObject *)values[3]);
7545 __pyx_v_u = ((PyArrayObject *)values[4]);
7547 goto __pyx_L4_argument_unpacking_done;
7548 __pyx_L5_argtuple_error:;
7549 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 178, __pyx_L3_error)
7551 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp1D", __pyx_clineno, __pyx_lineno, __pyx_filename);
7552 __Pyx_RefNannyFinishContext();
7554 __pyx_L4_argument_unpacking_done:;
7555 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 178, __pyx_L1_error)
7556 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 178, __pyx_L1_error)
7557 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 178, __pyx_L1_error)
7558 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 178, __pyx_L1_error)
7559 __pyx_r = __pyx_pf_20canalyticalSolutions_64poissonsEquationExp1D(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
7566 __Pyx_RefNannyFinishContext();
7570 static PyObject *__pyx_pf_20canalyticalSolutions_64poissonsEquationExp1D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
7571 PyObject *__pyx_r = NULL;
7572 __Pyx_RefNannyDeclarations
7573 PyObject *__pyx_t_1 = NULL;
7574 PyObject *__pyx_t_2 = NULL;
7575 PyObject *__pyx_t_3 = NULL;
7577 int __pyx_lineno = 0;
7578 const char *__pyx_filename = NULL;
7579 int __pyx_clineno = 0;
7580 __Pyx_RefNannySetupContext(
"poissonsEquationExp1D", 0);
7589 __Pyx_XDECREF(__pyx_r);
7590 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
7591 __Pyx_GOTREF(__pyx_t_1);
7592 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
7593 __Pyx_GOTREF(__pyx_t_2);
7594 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
7595 __Pyx_GOTREF(__pyx_t_3);
7596 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7597 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7598 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L1_error)
7599 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7600 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp1D(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
7601 __Pyx_GOTREF(__pyx_t_3);
7602 __pyx_r = __pyx_t_3;
7616 __Pyx_XDECREF(__pyx_t_1);
7617 __Pyx_XDECREF(__pyx_t_2);
7618 __Pyx_XDECREF(__pyx_t_3);
7619 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp1D", __pyx_clineno, __pyx_lineno, __pyx_filename);
7622 __Pyx_XGIVEREF(__pyx_r);
7623 __Pyx_RefNannyFinishContext();
7636 static PyObject *__pyx_pw_20canalyticalSolutions_67poissonsEquationExp2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7637 static PyMethodDef __pyx_mdef_20canalyticalSolutions_67poissonsEquationExp2D = {
"poissonsEquationExp2D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_67poissonsEquationExp2D, METH_VARARGS|METH_KEYWORDS, 0};
7638 static PyObject *__pyx_pw_20canalyticalSolutions_67poissonsEquationExp2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7639 PyArrayObject *__pyx_v_iwork = 0;
7640 PyArrayObject *__pyx_v_rwork = 0;
7642 PyArrayObject *__pyx_v_x = 0;
7643 PyArrayObject *__pyx_v_u = 0;
7644 int __pyx_lineno = 0;
7645 const char *__pyx_filename = NULL;
7646 int __pyx_clineno = 0;
7647 PyObject *__pyx_r = 0;
7648 __Pyx_RefNannyDeclarations
7649 __Pyx_RefNannySetupContext(
"poissonsEquationExp2D (wrapper)", 0);
7651 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
7652 PyObject* values[5] = {0,0,0,0,0};
7653 if (unlikely(__pyx_kwds)) {
7655 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7657 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7659 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7661 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7663 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7665 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7668 default:
goto __pyx_L5_argtuple_error;
7670 kw_args = PyDict_Size(__pyx_kwds);
7673 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
7674 else goto __pyx_L5_argtuple_error;
7677 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
7679 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D", 1, 5, 5, 1); __PYX_ERR(0, 182, __pyx_L3_error)
7683 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7685 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D", 1, 5, 5, 2); __PYX_ERR(0, 182, __pyx_L3_error)
7689 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7691 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D", 1, 5, 5, 3); __PYX_ERR(0, 182, __pyx_L3_error)
7695 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
7697 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D", 1, 5, 5, 4); __PYX_ERR(0, 182, __pyx_L3_error)
7700 if (unlikely(kw_args > 0)) {
7701 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp2D") < 0)) __PYX_ERR(0, 182, __pyx_L3_error)
7703 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7704 goto __pyx_L5_argtuple_error;
7706 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7707 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7708 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7709 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7710 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7712 __pyx_v_iwork = ((PyArrayObject *)values[0]);
7713 __pyx_v_rwork = ((PyArrayObject *)values[1]);
7714 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L3_error)
7715 __pyx_v_x = ((PyArrayObject *)values[3]);
7716 __pyx_v_u = ((PyArrayObject *)values[4]);
7718 goto __pyx_L4_argument_unpacking_done;
7719 __pyx_L5_argtuple_error:;
7720 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 182, __pyx_L3_error)
7722 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
7723 __Pyx_RefNannyFinishContext();
7725 __pyx_L4_argument_unpacking_done:;
7726 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 182, __pyx_L1_error)
7727 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 182, __pyx_L1_error)
7728 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 182, __pyx_L1_error)
7729 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 182, __pyx_L1_error)
7730 __pyx_r = __pyx_pf_20canalyticalSolutions_66poissonsEquationExp2D(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
7737 __Pyx_RefNannyFinishContext();
7741 static PyObject *__pyx_pf_20canalyticalSolutions_66poissonsEquationExp2D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
7742 PyObject *__pyx_r = NULL;
7743 __Pyx_RefNannyDeclarations
7744 PyObject *__pyx_t_1 = NULL;
7745 PyObject *__pyx_t_2 = NULL;
7746 PyObject *__pyx_t_3 = NULL;
7748 int __pyx_lineno = 0;
7749 const char *__pyx_filename = NULL;
7750 int __pyx_clineno = 0;
7751 __Pyx_RefNannySetupContext(
"poissonsEquationExp2D", 0);
7760 __Pyx_XDECREF(__pyx_r);
7761 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
7762 __Pyx_GOTREF(__pyx_t_1);
7763 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
7764 __Pyx_GOTREF(__pyx_t_2);
7765 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
7766 __Pyx_GOTREF(__pyx_t_3);
7767 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7768 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7769 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L1_error)
7770 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7771 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp2D(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
7772 __Pyx_GOTREF(__pyx_t_3);
7773 __pyx_r = __pyx_t_3;
7787 __Pyx_XDECREF(__pyx_t_1);
7788 __Pyx_XDECREF(__pyx_t_2);
7789 __Pyx_XDECREF(__pyx_t_3);
7790 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
7793 __Pyx_XGIVEREF(__pyx_r);
7794 __Pyx_RefNannyFinishContext();
7807 static PyObject *__pyx_pw_20canalyticalSolutions_69poissonsEquationExp3D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7808 static PyMethodDef __pyx_mdef_20canalyticalSolutions_69poissonsEquationExp3D = {
"poissonsEquationExp3D", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_69poissonsEquationExp3D, METH_VARARGS|METH_KEYWORDS, 0};
7809 static PyObject *__pyx_pw_20canalyticalSolutions_69poissonsEquationExp3D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7810 PyArrayObject *__pyx_v_iwork = 0;
7811 PyArrayObject *__pyx_v_rwork = 0;
7813 PyArrayObject *__pyx_v_x = 0;
7814 PyArrayObject *__pyx_v_u = 0;
7815 int __pyx_lineno = 0;
7816 const char *__pyx_filename = NULL;
7817 int __pyx_clineno = 0;
7818 PyObject *__pyx_r = 0;
7819 __Pyx_RefNannyDeclarations
7820 __Pyx_RefNannySetupContext(
"poissonsEquationExp3D (wrapper)", 0);
7822 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
7823 PyObject* values[5] = {0,0,0,0,0};
7824 if (unlikely(__pyx_kwds)) {
7826 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7828 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7830 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7832 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7834 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7836 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7839 default:
goto __pyx_L5_argtuple_error;
7841 kw_args = PyDict_Size(__pyx_kwds);
7844 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
7845 else goto __pyx_L5_argtuple_error;
7848 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
7850 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D", 1, 5, 5, 1); __PYX_ERR(0, 186, __pyx_L3_error)
7854 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7856 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D", 1, 5, 5, 2); __PYX_ERR(0, 186, __pyx_L3_error)
7860 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
7862 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D", 1, 5, 5, 3); __PYX_ERR(0, 186, __pyx_L3_error)
7866 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
7868 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D", 1, 5, 5, 4); __PYX_ERR(0, 186, __pyx_L3_error)
7871 if (unlikely(kw_args > 0)) {
7872 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp3D") < 0)) __PYX_ERR(0, 186, __pyx_L3_error)
7874 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
7875 goto __pyx_L5_argtuple_error;
7877 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7878 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7879 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7880 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7881 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7883 __pyx_v_iwork = ((PyArrayObject *)values[0]);
7884 __pyx_v_rwork = ((PyArrayObject *)values[1]);
7885 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L3_error)
7886 __pyx_v_x = ((PyArrayObject *)values[3]);
7887 __pyx_v_u = ((PyArrayObject *)values[4]);
7889 goto __pyx_L4_argument_unpacking_done;
7890 __pyx_L5_argtuple_error:;
7891 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 186, __pyx_L3_error)
7893 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
7894 __Pyx_RefNannyFinishContext();
7896 __pyx_L4_argument_unpacking_done:;
7897 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 186, __pyx_L1_error)
7898 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 186, __pyx_L1_error)
7899 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 186, __pyx_L1_error)
7900 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 186, __pyx_L1_error)
7901 __pyx_r = __pyx_pf_20canalyticalSolutions_68poissonsEquationExp3D(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
7908 __Pyx_RefNannyFinishContext();
7912 static PyObject *__pyx_pf_20canalyticalSolutions_68poissonsEquationExp3D(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
7913 PyObject *__pyx_r = NULL;
7914 __Pyx_RefNannyDeclarations
7915 PyObject *__pyx_t_1 = NULL;
7916 PyObject *__pyx_t_2 = NULL;
7917 PyObject *__pyx_t_3 = NULL;
7919 int __pyx_lineno = 0;
7920 const char *__pyx_filename = NULL;
7921 int __pyx_clineno = 0;
7922 __Pyx_RefNannySetupContext(
"poissonsEquationExp3D", 0);
7931 __Pyx_XDECREF(__pyx_r);
7932 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
7933 __Pyx_GOTREF(__pyx_t_1);
7934 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
7935 __Pyx_GOTREF(__pyx_t_2);
7936 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
7937 __Pyx_GOTREF(__pyx_t_3);
7938 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7939 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7940 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L1_error)
7941 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7942 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp3D(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
7943 __Pyx_GOTREF(__pyx_t_3);
7944 __pyx_r = __pyx_t_3;
7958 __Pyx_XDECREF(__pyx_t_1);
7959 __Pyx_XDECREF(__pyx_t_2);
7960 __Pyx_XDECREF(__pyx_t_3);
7961 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
7964 __Pyx_XGIVEREF(__pyx_r);
7965 __Pyx_RefNannyFinishContext();
7978 static PyObject *__pyx_pw_20canalyticalSolutions_71poissonsEquationExp3D_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
7979 static PyMethodDef __pyx_mdef_20canalyticalSolutions_71poissonsEquationExp3D_dr = {
"poissonsEquationExp3D_dr", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_71poissonsEquationExp3D_dr, METH_VARARGS|METH_KEYWORDS, 0};
7980 static PyObject *__pyx_pw_20canalyticalSolutions_71poissonsEquationExp3D_dr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7981 PyArrayObject *__pyx_v_iwork = 0;
7982 PyArrayObject *__pyx_v_rwork = 0;
7984 PyArrayObject *__pyx_v_x = 0;
7985 PyArrayObject *__pyx_v_u = 0;
7986 PyArrayObject *__pyx_v_dr = 0;
7987 int __pyx_lineno = 0;
7988 const char *__pyx_filename = NULL;
7989 int __pyx_clineno = 0;
7990 PyObject *__pyx_r = 0;
7991 __Pyx_RefNannyDeclarations
7992 __Pyx_RefNannySetupContext(
"poissonsEquationExp3D_dr (wrapper)", 0);
7994 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_dr,0};
7995 PyObject* values[6] = {0,0,0,0,0,0};
7996 if (unlikely(__pyx_kwds)) {
7998 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8000 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8002 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8004 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8006 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8008 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8010 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8013 default:
goto __pyx_L5_argtuple_error;
8015 kw_args = PyDict_Size(__pyx_kwds);
8018 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
8019 else goto __pyx_L5_argtuple_error;
8022 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
8024 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_dr", 1, 6, 6, 1); __PYX_ERR(0, 190, __pyx_L3_error)
8028 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8030 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_dr", 1, 6, 6, 2); __PYX_ERR(0, 190, __pyx_L3_error)
8034 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
8036 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_dr", 1, 6, 6, 3); __PYX_ERR(0, 190, __pyx_L3_error)
8040 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8042 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_dr", 1, 6, 6, 4); __PYX_ERR(0, 190, __pyx_L3_error)
8046 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dr)) != 0)) kw_args--;
8048 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_dr", 1, 6, 6, 5); __PYX_ERR(0, 190, __pyx_L3_error)
8051 if (unlikely(kw_args > 0)) {
8052 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp3D_dr") < 0)) __PYX_ERR(0, 190, __pyx_L3_error)
8054 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
8055 goto __pyx_L5_argtuple_error;
8057 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8058 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8059 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8060 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8061 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8062 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8064 __pyx_v_iwork = ((PyArrayObject *)values[0]);
8065 __pyx_v_rwork = ((PyArrayObject *)values[1]);
8066 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L3_error)
8067 __pyx_v_x = ((PyArrayObject *)values[3]);
8068 __pyx_v_u = ((PyArrayObject *)values[4]);
8069 __pyx_v_dr = ((PyArrayObject *)values[5]);
8071 goto __pyx_L4_argument_unpacking_done;
8072 __pyx_L5_argtuple_error:;
8073 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_dr", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 190, __pyx_L3_error)
8075 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp3D_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8076 __Pyx_RefNannyFinishContext();
8078 __pyx_L4_argument_unpacking_done:;
8079 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
8080 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
8081 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
8082 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
8083 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dr), __pyx_ptype_5numpy_ndarray, 1,
"dr", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
8084 __pyx_r = __pyx_pf_20canalyticalSolutions_70poissonsEquationExp3D_dr(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_dr);
8091 __Pyx_RefNannyFinishContext();
8095 static PyObject *__pyx_pf_20canalyticalSolutions_70poissonsEquationExp3D_dr(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_dr) {
8096 PyObject *__pyx_r = NULL;
8097 __Pyx_RefNannyDeclarations
8098 PyObject *__pyx_t_1 = NULL;
8099 PyObject *__pyx_t_2 = NULL;
8100 PyObject *__pyx_t_3 = NULL;
8102 int __pyx_lineno = 0;
8103 const char *__pyx_filename = NULL;
8104 int __pyx_clineno = 0;
8105 __Pyx_RefNannySetupContext(
"poissonsEquationExp3D_dr", 0);
8114 __Pyx_XDECREF(__pyx_r);
8115 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
8116 __Pyx_GOTREF(__pyx_t_1);
8117 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
8118 __Pyx_GOTREF(__pyx_t_2);
8119 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
8120 __Pyx_GOTREF(__pyx_t_3);
8121 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8122 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8123 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L1_error)
8124 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8125 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp3D_dr(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_dr->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
8126 __Pyx_GOTREF(__pyx_t_3);
8127 __pyx_r = __pyx_t_3;
8141 __Pyx_XDECREF(__pyx_t_1);
8142 __Pyx_XDECREF(__pyx_t_2);
8143 __Pyx_XDECREF(__pyx_t_3);
8144 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp3D_dr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8147 __Pyx_XGIVEREF(__pyx_r);
8148 __Pyx_RefNannyFinishContext();
8161 static PyObject *__pyx_pw_20canalyticalSolutions_73poissonsEquationExp1D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8162 static PyMethodDef __pyx_mdef_20canalyticalSolutions_73poissonsEquationExp1D_r = {
"poissonsEquationExp1D_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_73poissonsEquationExp1D_r, METH_VARARGS|METH_KEYWORDS, 0};
8163 static PyObject *__pyx_pw_20canalyticalSolutions_73poissonsEquationExp1D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8164 PyArrayObject *__pyx_v_iwork = 0;
8165 PyArrayObject *__pyx_v_rwork = 0;
8167 PyArrayObject *__pyx_v_x = 0;
8168 PyArrayObject *__pyx_v_u = 0;
8169 PyArrayObject *__pyx_v_r = 0;
8170 int __pyx_lineno = 0;
8171 const char *__pyx_filename = NULL;
8172 int __pyx_clineno = 0;
8173 PyObject *__pyx_r = 0;
8174 __Pyx_RefNannyDeclarations
8175 __Pyx_RefNannySetupContext(
"poissonsEquationExp1D_r (wrapper)", 0);
8177 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
8178 PyObject* values[6] = {0,0,0,0,0,0};
8179 if (unlikely(__pyx_kwds)) {
8181 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8183 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8185 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8187 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8189 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8191 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8193 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8196 default:
goto __pyx_L5_argtuple_error;
8198 kw_args = PyDict_Size(__pyx_kwds);
8201 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
8202 else goto __pyx_L5_argtuple_error;
8205 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
8207 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D_r", 1, 6, 6, 1); __PYX_ERR(0, 194, __pyx_L3_error)
8211 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8213 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D_r", 1, 6, 6, 2); __PYX_ERR(0, 194, __pyx_L3_error)
8217 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
8219 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D_r", 1, 6, 6, 3); __PYX_ERR(0, 194, __pyx_L3_error)
8223 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8225 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D_r", 1, 6, 6, 4); __PYX_ERR(0, 194, __pyx_L3_error)
8229 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
8231 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D_r", 1, 6, 6, 5); __PYX_ERR(0, 194, __pyx_L3_error)
8234 if (unlikely(kw_args > 0)) {
8235 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp1D_r") < 0)) __PYX_ERR(0, 194, __pyx_L3_error)
8237 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
8238 goto __pyx_L5_argtuple_error;
8240 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8241 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8242 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8243 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8244 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8245 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8247 __pyx_v_iwork = ((PyArrayObject *)values[0]);
8248 __pyx_v_rwork = ((PyArrayObject *)values[1]);
8249 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error)
8250 __pyx_v_x = ((PyArrayObject *)values[3]);
8251 __pyx_v_u = ((PyArrayObject *)values[4]);
8252 __pyx_v_r = ((PyArrayObject *)values[5]);
8254 goto __pyx_L4_argument_unpacking_done;
8255 __pyx_L5_argtuple_error:;
8256 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp1D_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 194, __pyx_L3_error)
8258 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp1D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
8259 __Pyx_RefNannyFinishContext();
8261 __pyx_L4_argument_unpacking_done:;
8262 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
8263 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
8264 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
8265 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
8266 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
8267 __pyx_r = __pyx_pf_20canalyticalSolutions_72poissonsEquationExp1D_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
8274 __Pyx_RefNannyFinishContext();
8278 static PyObject *__pyx_pf_20canalyticalSolutions_72poissonsEquationExp1D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
8279 PyObject *__pyx_r = NULL;
8280 __Pyx_RefNannyDeclarations
8281 PyObject *__pyx_t_1 = NULL;
8282 PyObject *__pyx_t_2 = NULL;
8283 PyObject *__pyx_t_3 = NULL;
8285 int __pyx_lineno = 0;
8286 const char *__pyx_filename = NULL;
8287 int __pyx_clineno = 0;
8288 __Pyx_RefNannySetupContext(
"poissonsEquationExp1D_r", 0);
8297 __Pyx_XDECREF(__pyx_r);
8298 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
8299 __Pyx_GOTREF(__pyx_t_1);
8300 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
8301 __Pyx_GOTREF(__pyx_t_2);
8302 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
8303 __Pyx_GOTREF(__pyx_t_3);
8304 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8305 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8306 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L1_error)
8307 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8308 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp1D_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
8309 __Pyx_GOTREF(__pyx_t_3);
8310 __pyx_r = __pyx_t_3;
8324 __Pyx_XDECREF(__pyx_t_1);
8325 __Pyx_XDECREF(__pyx_t_2);
8326 __Pyx_XDECREF(__pyx_t_3);
8327 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp1D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
8330 __Pyx_XGIVEREF(__pyx_r);
8331 __Pyx_RefNannyFinishContext();
8344 static PyObject *__pyx_pw_20canalyticalSolutions_75poissonsEquationExp2D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8345 static PyMethodDef __pyx_mdef_20canalyticalSolutions_75poissonsEquationExp2D_r = {
"poissonsEquationExp2D_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_75poissonsEquationExp2D_r, METH_VARARGS|METH_KEYWORDS, 0};
8346 static PyObject *__pyx_pw_20canalyticalSolutions_75poissonsEquationExp2D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8347 PyArrayObject *__pyx_v_iwork = 0;
8348 PyArrayObject *__pyx_v_rwork = 0;
8350 PyArrayObject *__pyx_v_x = 0;
8351 PyArrayObject *__pyx_v_u = 0;
8352 PyArrayObject *__pyx_v_r = 0;
8353 int __pyx_lineno = 0;
8354 const char *__pyx_filename = NULL;
8355 int __pyx_clineno = 0;
8356 PyObject *__pyx_r = 0;
8357 __Pyx_RefNannyDeclarations
8358 __Pyx_RefNannySetupContext(
"poissonsEquationExp2D_r (wrapper)", 0);
8360 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
8361 PyObject* values[6] = {0,0,0,0,0,0};
8362 if (unlikely(__pyx_kwds)) {
8364 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8366 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8368 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8370 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8372 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8374 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8376 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8379 default:
goto __pyx_L5_argtuple_error;
8381 kw_args = PyDict_Size(__pyx_kwds);
8384 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
8385 else goto __pyx_L5_argtuple_error;
8388 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
8390 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D_r", 1, 6, 6, 1); __PYX_ERR(0, 198, __pyx_L3_error)
8394 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8396 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D_r", 1, 6, 6, 2); __PYX_ERR(0, 198, __pyx_L3_error)
8400 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
8402 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D_r", 1, 6, 6, 3); __PYX_ERR(0, 198, __pyx_L3_error)
8406 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8408 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D_r", 1, 6, 6, 4); __PYX_ERR(0, 198, __pyx_L3_error)
8412 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
8414 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D_r", 1, 6, 6, 5); __PYX_ERR(0, 198, __pyx_L3_error)
8417 if (unlikely(kw_args > 0)) {
8418 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp2D_r") < 0)) __PYX_ERR(0, 198, __pyx_L3_error)
8420 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
8421 goto __pyx_L5_argtuple_error;
8423 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8424 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8425 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8426 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8427 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8428 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8430 __pyx_v_iwork = ((PyArrayObject *)values[0]);
8431 __pyx_v_rwork = ((PyArrayObject *)values[1]);
8432 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error)
8433 __pyx_v_x = ((PyArrayObject *)values[3]);
8434 __pyx_v_u = ((PyArrayObject *)values[4]);
8435 __pyx_v_r = ((PyArrayObject *)values[5]);
8437 goto __pyx_L4_argument_unpacking_done;
8438 __pyx_L5_argtuple_error:;
8439 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp2D_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 198, __pyx_L3_error)
8441 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp2D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
8442 __Pyx_RefNannyFinishContext();
8444 __pyx_L4_argument_unpacking_done:;
8445 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
8446 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
8447 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
8448 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
8449 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
8450 __pyx_r = __pyx_pf_20canalyticalSolutions_74poissonsEquationExp2D_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
8457 __Pyx_RefNannyFinishContext();
8461 static PyObject *__pyx_pf_20canalyticalSolutions_74poissonsEquationExp2D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
8462 PyObject *__pyx_r = NULL;
8463 __Pyx_RefNannyDeclarations
8464 PyObject *__pyx_t_1 = NULL;
8465 PyObject *__pyx_t_2 = NULL;
8466 PyObject *__pyx_t_3 = NULL;
8468 int __pyx_lineno = 0;
8469 const char *__pyx_filename = NULL;
8470 int __pyx_clineno = 0;
8471 __Pyx_RefNannySetupContext(
"poissonsEquationExp2D_r", 0);
8480 __Pyx_XDECREF(__pyx_r);
8481 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
8482 __Pyx_GOTREF(__pyx_t_1);
8483 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
8484 __Pyx_GOTREF(__pyx_t_2);
8485 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
8486 __Pyx_GOTREF(__pyx_t_3);
8487 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8488 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8489 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error)
8490 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8491 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp2D_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
8492 __Pyx_GOTREF(__pyx_t_3);
8493 __pyx_r = __pyx_t_3;
8507 __Pyx_XDECREF(__pyx_t_1);
8508 __Pyx_XDECREF(__pyx_t_2);
8509 __Pyx_XDECREF(__pyx_t_3);
8510 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp2D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
8513 __Pyx_XGIVEREF(__pyx_r);
8514 __Pyx_RefNannyFinishContext();
8527 static PyObject *__pyx_pw_20canalyticalSolutions_77poissonsEquationExp3D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8528 static PyMethodDef __pyx_mdef_20canalyticalSolutions_77poissonsEquationExp3D_r = {
"poissonsEquationExp3D_r", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_77poissonsEquationExp3D_r, METH_VARARGS|METH_KEYWORDS, 0};
8529 static PyObject *__pyx_pw_20canalyticalSolutions_77poissonsEquationExp3D_r(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8530 PyArrayObject *__pyx_v_iwork = 0;
8531 PyArrayObject *__pyx_v_rwork = 0;
8533 PyArrayObject *__pyx_v_x = 0;
8534 PyArrayObject *__pyx_v_u = 0;
8535 PyArrayObject *__pyx_v_r = 0;
8536 int __pyx_lineno = 0;
8537 const char *__pyx_filename = NULL;
8538 int __pyx_clineno = 0;
8539 PyObject *__pyx_r = 0;
8540 __Pyx_RefNannyDeclarations
8541 __Pyx_RefNannySetupContext(
"poissonsEquationExp3D_r (wrapper)", 0);
8543 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,&__pyx_n_s_r,0};
8544 PyObject* values[6] = {0,0,0,0,0,0};
8545 if (unlikely(__pyx_kwds)) {
8547 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8549 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8551 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8553 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8555 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8557 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8559 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8562 default:
goto __pyx_L5_argtuple_error;
8564 kw_args = PyDict_Size(__pyx_kwds);
8567 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
8568 else goto __pyx_L5_argtuple_error;
8571 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
8573 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_r", 1, 6, 6, 1); __PYX_ERR(0, 202, __pyx_L3_error)
8577 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8579 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_r", 1, 6, 6, 2); __PYX_ERR(0, 202, __pyx_L3_error)
8583 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
8585 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_r", 1, 6, 6, 3); __PYX_ERR(0, 202, __pyx_L3_error)
8589 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8591 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_r", 1, 6, 6, 4); __PYX_ERR(0, 202, __pyx_L3_error)
8595 if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
8597 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_r", 1, 6, 6, 5); __PYX_ERR(0, 202, __pyx_L3_error)
8600 if (unlikely(kw_args > 0)) {
8601 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"poissonsEquationExp3D_r") < 0)) __PYX_ERR(0, 202, __pyx_L3_error)
8603 }
else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
8604 goto __pyx_L5_argtuple_error;
8606 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8607 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8608 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8609 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8610 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8611 values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8613 __pyx_v_iwork = ((PyArrayObject *)values[0]);
8614 __pyx_v_rwork = ((PyArrayObject *)values[1]);
8615 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 202, __pyx_L3_error)
8616 __pyx_v_x = ((PyArrayObject *)values[3]);
8617 __pyx_v_u = ((PyArrayObject *)values[4]);
8618 __pyx_v_r = ((PyArrayObject *)values[5]);
8620 goto __pyx_L4_argument_unpacking_done;
8621 __pyx_L5_argtuple_error:;
8622 __Pyx_RaiseArgtupleInvalid(
"poissonsEquationExp3D_r", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 202, __pyx_L3_error)
8624 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp3D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
8625 __Pyx_RefNannyFinishContext();
8627 __pyx_L4_argument_unpacking_done:;
8628 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
8629 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
8630 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
8631 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
8632 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_r), __pyx_ptype_5numpy_ndarray, 1,
"r", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
8633 __pyx_r = __pyx_pf_20canalyticalSolutions_76poissonsEquationExp3D_r(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u, __pyx_v_r);
8640 __Pyx_RefNannyFinishContext();
8644 static PyObject *__pyx_pf_20canalyticalSolutions_76poissonsEquationExp3D_r(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u, PyArrayObject *__pyx_v_r) {
8645 PyObject *__pyx_r = NULL;
8646 __Pyx_RefNannyDeclarations
8647 PyObject *__pyx_t_1 = NULL;
8648 PyObject *__pyx_t_2 = NULL;
8649 PyObject *__pyx_t_3 = NULL;
8651 int __pyx_lineno = 0;
8652 const char *__pyx_filename = NULL;
8653 int __pyx_clineno = 0;
8654 __Pyx_RefNannySetupContext(
"poissonsEquationExp3D_r", 0);
8663 __Pyx_XDECREF(__pyx_r);
8664 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
8665 __Pyx_GOTREF(__pyx_t_1);
8666 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
8667 __Pyx_GOTREF(__pyx_t_2);
8668 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
8669 __Pyx_GOTREF(__pyx_t_3);
8670 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8671 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8672 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L1_error)
8673 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8674 __pyx_t_3 = __Pyx_PyInt_From_int(
poissonsEquationExp3D_r(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data), ((
double *)__pyx_v_r->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
8675 __Pyx_GOTREF(__pyx_t_3);
8676 __pyx_r = __pyx_t_3;
8690 __Pyx_XDECREF(__pyx_t_1);
8691 __Pyx_XDECREF(__pyx_t_2);
8692 __Pyx_XDECREF(__pyx_t_3);
8693 __Pyx_AddTraceback(
"canalyticalSolutions.poissonsEquationExp3D_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
8696 __Pyx_XGIVEREF(__pyx_r);
8697 __Pyx_RefNannyFinishContext();
8710 static PyObject *__pyx_pw_20canalyticalSolutions_79STflowSphere_P(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8711 static PyMethodDef __pyx_mdef_20canalyticalSolutions_79STflowSphere_P = {
"STflowSphere_P", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_79STflowSphere_P, METH_VARARGS|METH_KEYWORDS, 0};
8712 static PyObject *__pyx_pw_20canalyticalSolutions_79STflowSphere_P(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8713 PyArrayObject *__pyx_v_iwork = 0;
8714 PyArrayObject *__pyx_v_rwork = 0;
8716 PyArrayObject *__pyx_v_x = 0;
8717 PyArrayObject *__pyx_v_u = 0;
8718 int __pyx_lineno = 0;
8719 const char *__pyx_filename = NULL;
8720 int __pyx_clineno = 0;
8721 PyObject *__pyx_r = 0;
8722 __Pyx_RefNannyDeclarations
8723 __Pyx_RefNannySetupContext(
"STflowSphere_P (wrapper)", 0);
8725 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
8726 PyObject* values[5] = {0,0,0,0,0};
8727 if (unlikely(__pyx_kwds)) {
8729 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8731 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8733 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8735 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8737 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8739 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8742 default:
goto __pyx_L5_argtuple_error;
8744 kw_args = PyDict_Size(__pyx_kwds);
8747 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
8748 else goto __pyx_L5_argtuple_error;
8751 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
8753 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_P", 1, 5, 5, 1); __PYX_ERR(0, 206, __pyx_L3_error)
8757 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8759 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_P", 1, 5, 5, 2); __PYX_ERR(0, 206, __pyx_L3_error)
8763 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
8765 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_P", 1, 5, 5, 3); __PYX_ERR(0, 206, __pyx_L3_error)
8769 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8771 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_P", 1, 5, 5, 4); __PYX_ERR(0, 206, __pyx_L3_error)
8774 if (unlikely(kw_args > 0)) {
8775 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"STflowSphere_P") < 0)) __PYX_ERR(0, 206, __pyx_L3_error)
8777 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
8778 goto __pyx_L5_argtuple_error;
8780 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8781 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8782 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8783 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8784 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8786 __pyx_v_iwork = ((PyArrayObject *)values[0]);
8787 __pyx_v_rwork = ((PyArrayObject *)values[1]);
8788 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 206, __pyx_L3_error)
8789 __pyx_v_x = ((PyArrayObject *)values[3]);
8790 __pyx_v_u = ((PyArrayObject *)values[4]);
8792 goto __pyx_L4_argument_unpacking_done;
8793 __pyx_L5_argtuple_error:;
8794 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_P", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 206, __pyx_L3_error)
8796 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_P", __pyx_clineno, __pyx_lineno, __pyx_filename);
8797 __Pyx_RefNannyFinishContext();
8799 __pyx_L4_argument_unpacking_done:;
8800 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 206, __pyx_L1_error)
8801 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 206, __pyx_L1_error)
8802 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 206, __pyx_L1_error)
8803 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 206, __pyx_L1_error)
8804 __pyx_r = __pyx_pf_20canalyticalSolutions_78STflowSphere_P(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
8811 __Pyx_RefNannyFinishContext();
8815 static PyObject *__pyx_pf_20canalyticalSolutions_78STflowSphere_P(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
8816 PyObject *__pyx_r = NULL;
8817 __Pyx_RefNannyDeclarations
8818 PyObject *__pyx_t_1 = NULL;
8819 PyObject *__pyx_t_2 = NULL;
8820 PyObject *__pyx_t_3 = NULL;
8822 int __pyx_lineno = 0;
8823 const char *__pyx_filename = NULL;
8824 int __pyx_clineno = 0;
8825 __Pyx_RefNannySetupContext(
"STflowSphere_P", 0);
8834 __Pyx_XDECREF(__pyx_r);
8835 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
8836 __Pyx_GOTREF(__pyx_t_1);
8837 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
8838 __Pyx_GOTREF(__pyx_t_2);
8839 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
8840 __Pyx_GOTREF(__pyx_t_3);
8841 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8842 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8843 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error)
8844 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8845 __pyx_t_3 = __Pyx_PyInt_From_int(
STflowSphere_P(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
8846 __Pyx_GOTREF(__pyx_t_3);
8847 __pyx_r = __pyx_t_3;
8861 __Pyx_XDECREF(__pyx_t_1);
8862 __Pyx_XDECREF(__pyx_t_2);
8863 __Pyx_XDECREF(__pyx_t_3);
8864 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_P", __pyx_clineno, __pyx_lineno, __pyx_filename);
8867 __Pyx_XGIVEREF(__pyx_r);
8868 __Pyx_RefNannyFinishContext();
8881 static PyObject *__pyx_pw_20canalyticalSolutions_81STflowSphere_Vx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
8882 static PyMethodDef __pyx_mdef_20canalyticalSolutions_81STflowSphere_Vx = {
"STflowSphere_Vx", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_81STflowSphere_Vx, METH_VARARGS|METH_KEYWORDS, 0};
8883 static PyObject *__pyx_pw_20canalyticalSolutions_81STflowSphere_Vx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8884 PyArrayObject *__pyx_v_iwork = 0;
8885 PyArrayObject *__pyx_v_rwork = 0;
8887 PyArrayObject *__pyx_v_x = 0;
8888 PyArrayObject *__pyx_v_u = 0;
8889 int __pyx_lineno = 0;
8890 const char *__pyx_filename = NULL;
8891 int __pyx_clineno = 0;
8892 PyObject *__pyx_r = 0;
8893 __Pyx_RefNannyDeclarations
8894 __Pyx_RefNannySetupContext(
"STflowSphere_Vx (wrapper)", 0);
8896 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
8897 PyObject* values[5] = {0,0,0,0,0};
8898 if (unlikely(__pyx_kwds)) {
8900 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8902 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8904 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8906 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8908 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8910 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8913 default:
goto __pyx_L5_argtuple_error;
8915 kw_args = PyDict_Size(__pyx_kwds);
8918 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
8919 else goto __pyx_L5_argtuple_error;
8922 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
8924 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vx", 1, 5, 5, 1); __PYX_ERR(0, 210, __pyx_L3_error)
8928 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8930 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vx", 1, 5, 5, 2); __PYX_ERR(0, 210, __pyx_L3_error)
8934 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
8936 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vx", 1, 5, 5, 3); __PYX_ERR(0, 210, __pyx_L3_error)
8940 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
8942 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vx", 1, 5, 5, 4); __PYX_ERR(0, 210, __pyx_L3_error)
8945 if (unlikely(kw_args > 0)) {
8946 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"STflowSphere_Vx") < 0)) __PYX_ERR(0, 210, __pyx_L3_error)
8948 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
8949 goto __pyx_L5_argtuple_error;
8951 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8952 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8953 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8954 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8955 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8957 __pyx_v_iwork = ((PyArrayObject *)values[0]);
8958 __pyx_v_rwork = ((PyArrayObject *)values[1]);
8959 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L3_error)
8960 __pyx_v_x = ((PyArrayObject *)values[3]);
8961 __pyx_v_u = ((PyArrayObject *)values[4]);
8963 goto __pyx_L4_argument_unpacking_done;
8964 __pyx_L5_argtuple_error:;
8965 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vx", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 210, __pyx_L3_error)
8967 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_Vx", __pyx_clineno, __pyx_lineno, __pyx_filename);
8968 __Pyx_RefNannyFinishContext();
8970 __pyx_L4_argument_unpacking_done:;
8971 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 210, __pyx_L1_error)
8972 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 210, __pyx_L1_error)
8973 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 210, __pyx_L1_error)
8974 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 210, __pyx_L1_error)
8975 __pyx_r = __pyx_pf_20canalyticalSolutions_80STflowSphere_Vx(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
8982 __Pyx_RefNannyFinishContext();
8986 static PyObject *__pyx_pf_20canalyticalSolutions_80STflowSphere_Vx(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
8987 PyObject *__pyx_r = NULL;
8988 __Pyx_RefNannyDeclarations
8989 PyObject *__pyx_t_1 = NULL;
8990 PyObject *__pyx_t_2 = NULL;
8991 PyObject *__pyx_t_3 = NULL;
8993 int __pyx_lineno = 0;
8994 const char *__pyx_filename = NULL;
8995 int __pyx_clineno = 0;
8996 __Pyx_RefNannySetupContext(
"STflowSphere_Vx", 0);
9005 __Pyx_XDECREF(__pyx_r);
9006 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
9007 __Pyx_GOTREF(__pyx_t_1);
9008 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
9009 __Pyx_GOTREF(__pyx_t_2);
9010 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
9011 __Pyx_GOTREF(__pyx_t_3);
9012 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9013 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9014 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L1_error)
9015 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9016 __pyx_t_3 = __Pyx_PyInt_From_int(
STflowSphere_Vx(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
9017 __Pyx_GOTREF(__pyx_t_3);
9018 __pyx_r = __pyx_t_3;
9032 __Pyx_XDECREF(__pyx_t_1);
9033 __Pyx_XDECREF(__pyx_t_2);
9034 __Pyx_XDECREF(__pyx_t_3);
9035 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_Vx", __pyx_clineno, __pyx_lineno, __pyx_filename);
9038 __Pyx_XGIVEREF(__pyx_r);
9039 __Pyx_RefNannyFinishContext();
9052 static PyObject *__pyx_pw_20canalyticalSolutions_83STflowSphere_Vy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9053 static PyMethodDef __pyx_mdef_20canalyticalSolutions_83STflowSphere_Vy = {
"STflowSphere_Vy", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_83STflowSphere_Vy, METH_VARARGS|METH_KEYWORDS, 0};
9054 static PyObject *__pyx_pw_20canalyticalSolutions_83STflowSphere_Vy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9055 PyArrayObject *__pyx_v_iwork = 0;
9056 PyArrayObject *__pyx_v_rwork = 0;
9058 PyArrayObject *__pyx_v_x = 0;
9059 PyArrayObject *__pyx_v_u = 0;
9060 int __pyx_lineno = 0;
9061 const char *__pyx_filename = NULL;
9062 int __pyx_clineno = 0;
9063 PyObject *__pyx_r = 0;
9064 __Pyx_RefNannyDeclarations
9065 __Pyx_RefNannySetupContext(
"STflowSphere_Vy (wrapper)", 0);
9067 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
9068 PyObject* values[5] = {0,0,0,0,0};
9069 if (unlikely(__pyx_kwds)) {
9071 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9073 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9075 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9077 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9079 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9081 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9084 default:
goto __pyx_L5_argtuple_error;
9086 kw_args = PyDict_Size(__pyx_kwds);
9089 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
9090 else goto __pyx_L5_argtuple_error;
9093 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
9095 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vy", 1, 5, 5, 1); __PYX_ERR(0, 214, __pyx_L3_error)
9099 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9101 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vy", 1, 5, 5, 2); __PYX_ERR(0, 214, __pyx_L3_error)
9105 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
9107 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vy", 1, 5, 5, 3); __PYX_ERR(0, 214, __pyx_L3_error)
9111 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
9113 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vy", 1, 5, 5, 4); __PYX_ERR(0, 214, __pyx_L3_error)
9116 if (unlikely(kw_args > 0)) {
9117 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"STflowSphere_Vy") < 0)) __PYX_ERR(0, 214, __pyx_L3_error)
9119 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
9120 goto __pyx_L5_argtuple_error;
9122 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9123 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9124 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9125 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9126 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9128 __pyx_v_iwork = ((PyArrayObject *)values[0]);
9129 __pyx_v_rwork = ((PyArrayObject *)values[1]);
9130 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L3_error)
9131 __pyx_v_x = ((PyArrayObject *)values[3]);
9132 __pyx_v_u = ((PyArrayObject *)values[4]);
9134 goto __pyx_L4_argument_unpacking_done;
9135 __pyx_L5_argtuple_error:;
9136 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vy", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 214, __pyx_L3_error)
9138 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_Vy", __pyx_clineno, __pyx_lineno, __pyx_filename);
9139 __Pyx_RefNannyFinishContext();
9141 __pyx_L4_argument_unpacking_done:;
9142 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
9143 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
9144 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
9145 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
9146 __pyx_r = __pyx_pf_20canalyticalSolutions_82STflowSphere_Vy(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
9153 __Pyx_RefNannyFinishContext();
9157 static PyObject *__pyx_pf_20canalyticalSolutions_82STflowSphere_Vy(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
9158 PyObject *__pyx_r = NULL;
9159 __Pyx_RefNannyDeclarations
9160 PyObject *__pyx_t_1 = NULL;
9161 PyObject *__pyx_t_2 = NULL;
9162 PyObject *__pyx_t_3 = NULL;
9164 int __pyx_lineno = 0;
9165 const char *__pyx_filename = NULL;
9166 int __pyx_clineno = 0;
9167 __Pyx_RefNannySetupContext(
"STflowSphere_Vy", 0);
9176 __Pyx_XDECREF(__pyx_r);
9177 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
9178 __Pyx_GOTREF(__pyx_t_1);
9179 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
9180 __Pyx_GOTREF(__pyx_t_2);
9181 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
9182 __Pyx_GOTREF(__pyx_t_3);
9183 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9184 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9185 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error)
9186 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9187 __pyx_t_3 = __Pyx_PyInt_From_int(
STflowSphere_Vy(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
9188 __Pyx_GOTREF(__pyx_t_3);
9189 __pyx_r = __pyx_t_3;
9203 __Pyx_XDECREF(__pyx_t_1);
9204 __Pyx_XDECREF(__pyx_t_2);
9205 __Pyx_XDECREF(__pyx_t_3);
9206 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_Vy", __pyx_clineno, __pyx_lineno, __pyx_filename);
9209 __Pyx_XGIVEREF(__pyx_r);
9210 __Pyx_RefNannyFinishContext();
9222 static PyObject *__pyx_pw_20canalyticalSolutions_85STflowSphere_Vz(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
9223 static PyMethodDef __pyx_mdef_20canalyticalSolutions_85STflowSphere_Vz = {
"STflowSphere_Vz", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_20canalyticalSolutions_85STflowSphere_Vz, METH_VARARGS|METH_KEYWORDS, 0};
9224 static PyObject *__pyx_pw_20canalyticalSolutions_85STflowSphere_Vz(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9225 PyArrayObject *__pyx_v_iwork = 0;
9226 PyArrayObject *__pyx_v_rwork = 0;
9228 PyArrayObject *__pyx_v_x = 0;
9229 PyArrayObject *__pyx_v_u = 0;
9230 int __pyx_lineno = 0;
9231 const char *__pyx_filename = NULL;
9232 int __pyx_clineno = 0;
9233 PyObject *__pyx_r = 0;
9234 __Pyx_RefNannyDeclarations
9235 __Pyx_RefNannySetupContext(
"STflowSphere_Vz (wrapper)", 0);
9237 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_iwork,&__pyx_n_s_rwork,&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_u,0};
9238 PyObject* values[5] = {0,0,0,0,0};
9239 if (unlikely(__pyx_kwds)) {
9241 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9243 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9245 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9247 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9249 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9251 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9254 default:
goto __pyx_L5_argtuple_error;
9256 kw_args = PyDict_Size(__pyx_kwds);
9259 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iwork)) != 0)) kw_args--;
9260 else goto __pyx_L5_argtuple_error;
9263 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rwork)) != 0)) kw_args--;
9265 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vz", 1, 5, 5, 1); __PYX_ERR(0, 218, __pyx_L3_error)
9269 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9271 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vz", 1, 5, 5, 2); __PYX_ERR(0, 218, __pyx_L3_error)
9275 if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
9277 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vz", 1, 5, 5, 3); __PYX_ERR(0, 218, __pyx_L3_error)
9281 if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
9283 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vz", 1, 5, 5, 4); __PYX_ERR(0, 218, __pyx_L3_error)
9286 if (unlikely(kw_args > 0)) {
9287 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"STflowSphere_Vz") < 0)) __PYX_ERR(0, 218, __pyx_L3_error)
9289 }
else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
9290 goto __pyx_L5_argtuple_error;
9292 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9293 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9294 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9295 values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9296 values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
9298 __pyx_v_iwork = ((PyArrayObject *)values[0]);
9299 __pyx_v_rwork = ((PyArrayObject *)values[1]);
9300 __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]);
if (unlikely((__pyx_v_t == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L3_error)
9301 __pyx_v_x = ((PyArrayObject *)values[3]);
9302 __pyx_v_u = ((PyArrayObject *)values[4]);
9304 goto __pyx_L4_argument_unpacking_done;
9305 __pyx_L5_argtuple_error:;
9306 __Pyx_RaiseArgtupleInvalid(
"STflowSphere_Vz", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 218, __pyx_L3_error)
9308 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_Vz", __pyx_clineno, __pyx_lineno, __pyx_filename);
9309 __Pyx_RefNannyFinishContext();
9311 __pyx_L4_argument_unpacking_done:;
9312 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iwork), __pyx_ptype_5numpy_ndarray, 1,
"iwork", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
9313 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rwork), __pyx_ptype_5numpy_ndarray, 1,
"rwork", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
9314 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1,
"x", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
9315 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1,
"u", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
9316 __pyx_r = __pyx_pf_20canalyticalSolutions_84STflowSphere_Vz(__pyx_self, __pyx_v_iwork, __pyx_v_rwork, __pyx_v_t, __pyx_v_x, __pyx_v_u);
9323 __Pyx_RefNannyFinishContext();
9327 static PyObject *__pyx_pf_20canalyticalSolutions_84STflowSphere_Vz(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_iwork, PyArrayObject *__pyx_v_rwork,
double __pyx_v_t, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_u) {
9328 PyObject *__pyx_r = NULL;
9329 __Pyx_RefNannyDeclarations
9330 PyObject *__pyx_t_1 = NULL;
9331 PyObject *__pyx_t_2 = NULL;
9332 PyObject *__pyx_t_3 = NULL;
9334 int __pyx_lineno = 0;
9335 const char *__pyx_filename = NULL;
9336 int __pyx_clineno = 0;
9337 __Pyx_RefNannySetupContext(
"STflowSphere_Vz", 0);
9344 __Pyx_XDECREF(__pyx_r);
9345 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_x), __pyx_n_s_size);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
9346 __Pyx_GOTREF(__pyx_t_1);
9347 __pyx_t_2 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_x->dimensions[(__pyx_v_x->nd - 1)]));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
9348 __Pyx_GOTREF(__pyx_t_2);
9349 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
9350 __Pyx_GOTREF(__pyx_t_3);
9351 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9352 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9353 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3);
if (unlikely((__pyx_t_4 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L1_error)
9354 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9355 __pyx_t_3 = __Pyx_PyInt_From_int(
STflowSphere_Vz(((
int *)__pyx_v_iwork->data), ((
double *)__pyx_v_rwork->data), __pyx_t_4, __pyx_v_t, ((
double *)__pyx_v_x->data), ((
double *)__pyx_v_u->data)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
9356 __Pyx_GOTREF(__pyx_t_3);
9357 __pyx_r = __pyx_t_3;
9370 __Pyx_XDECREF(__pyx_t_1);
9371 __Pyx_XDECREF(__pyx_t_2);
9372 __Pyx_XDECREF(__pyx_t_3);
9373 __Pyx_AddTraceback(
"canalyticalSolutions.STflowSphere_Vz", __pyx_clineno, __pyx_lineno, __pyx_filename);
9376 __Pyx_XGIVEREF(__pyx_r);
9377 __Pyx_RefNannyFinishContext();
9389 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
9390 PyObject *__pyx_r = NULL;
9391 __Pyx_RefNannyDeclarations
9392 PyObject *__pyx_t_1 = NULL;
9393 int __pyx_lineno = 0;
9394 const char *__pyx_filename = NULL;
9395 int __pyx_clineno = 0;
9396 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
9405 __Pyx_XDECREF(__pyx_r);
9406 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error)
9407 __Pyx_GOTREF(__pyx_t_1);
9408 __pyx_r = __pyx_t_1;
9422 __Pyx_XDECREF(__pyx_t_1);
9423 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
9426 __Pyx_XGIVEREF(__pyx_r);
9427 __Pyx_RefNannyFinishContext();
9439 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
9440 PyObject *__pyx_r = NULL;
9441 __Pyx_RefNannyDeclarations
9442 PyObject *__pyx_t_1 = NULL;
9443 int __pyx_lineno = 0;
9444 const char *__pyx_filename = NULL;
9445 int __pyx_clineno = 0;
9446 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
9455 __Pyx_XDECREF(__pyx_r);
9456 __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)
9457 __Pyx_GOTREF(__pyx_t_1);
9458 __pyx_r = __pyx_t_1;
9472 __Pyx_XDECREF(__pyx_t_1);
9473 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
9476 __Pyx_XGIVEREF(__pyx_r);
9477 __Pyx_RefNannyFinishContext();
9489 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
9490 PyObject *__pyx_r = NULL;
9491 __Pyx_RefNannyDeclarations
9492 PyObject *__pyx_t_1 = NULL;
9493 int __pyx_lineno = 0;
9494 const char *__pyx_filename = NULL;
9495 int __pyx_clineno = 0;
9496 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
9505 __Pyx_XDECREF(__pyx_r);
9506 __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)
9507 __Pyx_GOTREF(__pyx_t_1);
9508 __pyx_r = __pyx_t_1;
9522 __Pyx_XDECREF(__pyx_t_1);
9523 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
9526 __Pyx_XGIVEREF(__pyx_r);
9527 __Pyx_RefNannyFinishContext();
9539 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) {
9540 PyObject *__pyx_r = NULL;
9541 __Pyx_RefNannyDeclarations
9542 PyObject *__pyx_t_1 = NULL;
9543 int __pyx_lineno = 0;
9544 const char *__pyx_filename = NULL;
9545 int __pyx_clineno = 0;
9546 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
9555 __Pyx_XDECREF(__pyx_r);
9556 __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)
9557 __Pyx_GOTREF(__pyx_t_1);
9558 __pyx_r = __pyx_t_1;
9572 __Pyx_XDECREF(__pyx_t_1);
9573 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
9576 __Pyx_XGIVEREF(__pyx_r);
9577 __Pyx_RefNannyFinishContext();
9589 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) {
9590 PyObject *__pyx_r = NULL;
9591 __Pyx_RefNannyDeclarations
9592 PyObject *__pyx_t_1 = NULL;
9593 int __pyx_lineno = 0;
9594 const char *__pyx_filename = NULL;
9595 int __pyx_clineno = 0;
9596 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
9605 __Pyx_XDECREF(__pyx_r);
9606 __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)
9607 __Pyx_GOTREF(__pyx_t_1);
9608 __pyx_r = __pyx_t_1;
9622 __Pyx_XDECREF(__pyx_t_1);
9623 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
9626 __Pyx_XGIVEREF(__pyx_r);
9627 __Pyx_RefNannyFinishContext();
9639 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
9640 PyObject *__pyx_r = NULL;
9641 __Pyx_RefNannyDeclarations
9643 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
9652 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
9662 __Pyx_XDECREF(__pyx_r);
9663 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
9664 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
9684 __Pyx_XDECREF(__pyx_r);
9685 __Pyx_INCREF(__pyx_empty_tuple);
9686 __pyx_r = __pyx_empty_tuple;
9700 __Pyx_XGIVEREF(__pyx_r);
9701 __Pyx_RefNannyFinishContext();
9713 static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
9714 __Pyx_RefNannyDeclarations
9715 __Pyx_RefNannySetupContext(
"set_array_base", 0);
9724 Py_INCREF(__pyx_v_base);
9733 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
9744 __Pyx_RefNannyFinishContext();
9755 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
9756 PyObject *__pyx_v_base;
9757 PyObject *__pyx_r = NULL;
9758 __Pyx_RefNannyDeclarations
9760 __Pyx_RefNannySetupContext(
"get_array_base", 0);
9769 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
9778 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
9788 __Pyx_XDECREF(__pyx_r);
9789 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9808 __Pyx_XDECREF(__pyx_r);
9809 __Pyx_INCREF(((PyObject *)__pyx_v_base));
9810 __pyx_r = ((PyObject *)__pyx_v_base);
9823 __Pyx_XGIVEREF(__pyx_r);
9824 __Pyx_RefNannyFinishContext();
9836 static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
9838 __Pyx_RefNannyDeclarations
9839 PyObject *__pyx_t_1 = NULL;
9840 PyObject *__pyx_t_2 = NULL;
9841 PyObject *__pyx_t_3 = NULL;
9843 PyObject *__pyx_t_5 = NULL;
9844 PyObject *__pyx_t_6 = NULL;
9845 PyObject *__pyx_t_7 = NULL;
9846 PyObject *__pyx_t_8 = NULL;
9847 int __pyx_lineno = 0;
9848 const char *__pyx_filename = NULL;
9849 int __pyx_clineno = 0;
9850 __Pyx_RefNannySetupContext(
"import_array", 0);
9860 __Pyx_PyThreadState_declare
9861 __Pyx_PyThreadState_assign
9862 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9863 __Pyx_XGOTREF(__pyx_t_1);
9864 __Pyx_XGOTREF(__pyx_t_2);
9865 __Pyx_XGOTREF(__pyx_t_3);
9875 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 943, __pyx_L3_error)
9885 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9886 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9887 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9888 goto __pyx_L8_try_end;
9898 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9900 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
9901 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 944, __pyx_L5_except_error)
9902 __Pyx_GOTREF(__pyx_t_5);
9903 __Pyx_GOTREF(__pyx_t_6);
9904 __Pyx_GOTREF(__pyx_t_7);
9913 __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)
9914 __Pyx_GOTREF(__pyx_t_8);
9915 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9916 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9917 __PYX_ERR(1, 945, __pyx_L5_except_error)
9919 goto __pyx_L5_except_error;
9920 __pyx_L5_except_error:;
9929 __Pyx_XGIVEREF(__pyx_t_1);
9930 __Pyx_XGIVEREF(__pyx_t_2);
9931 __Pyx_XGIVEREF(__pyx_t_3);
9932 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9933 goto __pyx_L1_error;
9949 __Pyx_XDECREF(__pyx_t_5);
9950 __Pyx_XDECREF(__pyx_t_6);
9951 __Pyx_XDECREF(__pyx_t_7);
9952 __Pyx_XDECREF(__pyx_t_8);
9953 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
9956 __Pyx_RefNannyFinishContext();
9968 static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
9970 __Pyx_RefNannyDeclarations
9971 PyObject *__pyx_t_1 = NULL;
9972 PyObject *__pyx_t_2 = NULL;
9973 PyObject *__pyx_t_3 = NULL;
9975 PyObject *__pyx_t_5 = NULL;
9976 PyObject *__pyx_t_6 = NULL;
9977 PyObject *__pyx_t_7 = NULL;
9978 PyObject *__pyx_t_8 = NULL;
9979 int __pyx_lineno = 0;
9980 const char *__pyx_filename = NULL;
9981 int __pyx_clineno = 0;
9982 __Pyx_RefNannySetupContext(
"import_umath", 0);
9992 __Pyx_PyThreadState_declare
9993 __Pyx_PyThreadState_assign
9994 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9995 __Pyx_XGOTREF(__pyx_t_1);
9996 __Pyx_XGOTREF(__pyx_t_2);
9997 __Pyx_XGOTREF(__pyx_t_3);
10007 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 949, __pyx_L3_error)
10017 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10018 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10019 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10020 goto __pyx_L8_try_end;
10030 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
10032 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
10033 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 950, __pyx_L5_except_error)
10034 __Pyx_GOTREF(__pyx_t_5);
10035 __Pyx_GOTREF(__pyx_t_6);
10036 __Pyx_GOTREF(__pyx_t_7);
10045 __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)
10046 __Pyx_GOTREF(__pyx_t_8);
10047 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
10048 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10049 __PYX_ERR(1, 951, __pyx_L5_except_error)
10051 goto __pyx_L5_except_error;
10052 __pyx_L5_except_error:;
10061 __Pyx_XGIVEREF(__pyx_t_1);
10062 __Pyx_XGIVEREF(__pyx_t_2);
10063 __Pyx_XGIVEREF(__pyx_t_3);
10064 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10065 goto __pyx_L1_error;
10081 __Pyx_XDECREF(__pyx_t_5);
10082 __Pyx_XDECREF(__pyx_t_6);
10083 __Pyx_XDECREF(__pyx_t_7);
10084 __Pyx_XDECREF(__pyx_t_8);
10085 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
10088 __Pyx_RefNannyFinishContext();
10100 static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
10102 __Pyx_RefNannyDeclarations
10103 PyObject *__pyx_t_1 = NULL;
10104 PyObject *__pyx_t_2 = NULL;
10105 PyObject *__pyx_t_3 = NULL;
10107 PyObject *__pyx_t_5 = NULL;
10108 PyObject *__pyx_t_6 = NULL;
10109 PyObject *__pyx_t_7 = NULL;
10110 PyObject *__pyx_t_8 = NULL;
10111 int __pyx_lineno = 0;
10112 const char *__pyx_filename = NULL;
10113 int __pyx_clineno = 0;
10114 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
10124 __Pyx_PyThreadState_declare
10125 __Pyx_PyThreadState_assign
10126 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10127 __Pyx_XGOTREF(__pyx_t_1);
10128 __Pyx_XGOTREF(__pyx_t_2);
10129 __Pyx_XGOTREF(__pyx_t_3);
10139 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 955, __pyx_L3_error)
10149 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10150 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10151 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10152 goto __pyx_L8_try_end;
10162 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
10164 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
10165 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 956, __pyx_L5_except_error)
10166 __Pyx_GOTREF(__pyx_t_5);
10167 __Pyx_GOTREF(__pyx_t_6);
10168 __Pyx_GOTREF(__pyx_t_7);
10177 __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)
10178 __Pyx_GOTREF(__pyx_t_8);
10179 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
10180 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10181 __PYX_ERR(1, 957, __pyx_L5_except_error)
10183 goto __pyx_L5_except_error;
10184 __pyx_L5_except_error:;
10193 __Pyx_XGIVEREF(__pyx_t_1);
10194 __Pyx_XGIVEREF(__pyx_t_2);
10195 __Pyx_XGIVEREF(__pyx_t_3);
10196 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10197 goto __pyx_L1_error;
10213 __Pyx_XDECREF(__pyx_t_5);
10214 __Pyx_XDECREF(__pyx_t_6);
10215 __Pyx_XDECREF(__pyx_t_7);
10216 __Pyx_XDECREF(__pyx_t_8);
10217 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
10220 __Pyx_RefNannyFinishContext();
10232 static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
10234 __Pyx_RefNannyDeclarations
10235 __Pyx_RefNannySetupContext(
"is_timedelta64_object", 0);
10244 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
10257 __Pyx_RefNannyFinishContext();
10269 static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
10271 __Pyx_RefNannyDeclarations
10272 __Pyx_RefNannySetupContext(
"is_datetime64_object", 0);
10281 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
10294 __Pyx_RefNannyFinishContext();
10306 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
10307 npy_datetime __pyx_r;
10316 __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
10340 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
10341 npy_timedelta __pyx_r;
10350 __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
10374 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
10375 NPY_DATETIMEUNIT __pyx_r;
10382 __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
10398 static PyMethodDef __pyx_methods[] = {
10402 #if PY_MAJOR_VERSION >= 3
10403 #if CYTHON_PEP489_MULTI_PHASE_INIT
10404 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
10405 static int __pyx_pymod_exec_canalyticalSolutions(PyObject* module);
10406 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
10407 {Py_mod_create, (
void*)__pyx_pymod_create},
10408 {Py_mod_exec, (
void*)__pyx_pymod_exec_canalyticalSolutions},
10413 static struct PyModuleDef __pyx_moduledef = {
10414 PyModuleDef_HEAD_INIT,
10415 "canalyticalSolutions",
10417 #if CYTHON_PEP489_MULTI_PHASE_INIT
10423 #if CYTHON_PEP489_MULTI_PHASE_INIT
10424 __pyx_moduledef_slots,
10433 #ifndef CYTHON_SMALL_CODE
10434 #if defined(__clang__)
10435 #define CYTHON_SMALL_CODE
10436 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
10437 #define CYTHON_SMALL_CODE __attribute__((cold))
10439 #define CYTHON_SMALL_CODE
10443 static __Pyx_StringTabEntry __pyx_string_tab[] = {
10444 {&__pyx_n_s_ImportError, __pyx_k_ImportError,
sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
10445 {&__pyx_n_s_LinearADR_Decay_DiracIC, __pyx_k_LinearADR_Decay_DiracIC,
sizeof(__pyx_k_LinearADR_Decay_DiracIC), 0, 0, 1, 1},
10446 {&__pyx_n_s_LinearADR_Decay_DiracIC_dr, __pyx_k_LinearADR_Decay_DiracIC_dr,
sizeof(__pyx_k_LinearADR_Decay_DiracIC_dr), 0, 0, 1, 1},
10447 {&__pyx_n_s_LinearADR_Decay_DiracIC_r, __pyx_k_LinearADR_Decay_DiracIC_r,
sizeof(__pyx_k_LinearADR_Decay_DiracIC_r), 0, 0, 1, 1},
10448 {&__pyx_n_s_LinearADR_Sine, __pyx_k_LinearADR_Sine,
sizeof(__pyx_k_LinearADR_Sine), 0, 0, 1, 1},
10449 {&__pyx_n_s_LinearADR_Sine_advectiveVelocity, __pyx_k_LinearADR_Sine_advectiveVelocity,
sizeof(__pyx_k_LinearADR_Sine_advectiveVelocity), 0, 0, 1, 1},
10450 {&__pyx_n_s_LinearADR_Sine_diffusiveVelocity, __pyx_k_LinearADR_Sine_diffusiveVelocity,
sizeof(__pyx_k_LinearADR_Sine_diffusiveVelocity), 0, 0, 1, 1},
10451 {&__pyx_n_s_LinearADR_Sine_dr, __pyx_k_LinearADR_Sine_dr,
sizeof(__pyx_k_LinearADR_Sine_dr), 0, 0, 1, 1},
10452 {&__pyx_n_s_LinearADR_Sine_du, __pyx_k_LinearADR_Sine_du,
sizeof(__pyx_k_LinearADR_Sine_du), 0, 0, 1, 1},
10453 {&__pyx_n_s_LinearADR_Sine_r, __pyx_k_LinearADR_Sine_r,
sizeof(__pyx_k_LinearADR_Sine_r), 0, 0, 1, 1},
10454 {&__pyx_n_s_LinearADR_Sine_totalVelocity, __pyx_k_LinearADR_Sine_totalVelocity,
sizeof(__pyx_k_LinearADR_Sine_totalVelocity), 0, 0, 1, 1},
10455 {&__pyx_n_s_LinearAD_DiracIC, __pyx_k_LinearAD_DiracIC,
sizeof(__pyx_k_LinearAD_DiracIC), 0, 0, 1, 1},
10456 {&__pyx_n_s_LinearAD_DiracIC_advectiveVeloci, __pyx_k_LinearAD_DiracIC_advectiveVeloci,
sizeof(__pyx_k_LinearAD_DiracIC_advectiveVeloci), 0, 0, 1, 1},
10457 {&__pyx_n_s_LinearAD_DiracIC_diffusiveVeloci, __pyx_k_LinearAD_DiracIC_diffusiveVeloci,
sizeof(__pyx_k_LinearAD_DiracIC_diffusiveVeloci), 0, 0, 1, 1},
10458 {&__pyx_n_s_LinearAD_DiracIC_du, __pyx_k_LinearAD_DiracIC_du,
sizeof(__pyx_k_LinearAD_DiracIC_du), 0, 0, 1, 1},
10459 {&__pyx_n_s_LinearAD_DiracIC_totalVelocity, __pyx_k_LinearAD_DiracIC_totalVelocity,
sizeof(__pyx_k_LinearAD_DiracIC_totalVelocity), 0, 0, 1, 1},
10460 {&__pyx_n_s_LinearAD_SteadyState, __pyx_k_LinearAD_SteadyState,
sizeof(__pyx_k_LinearAD_SteadyState), 0, 0, 1, 1},
10461 {&__pyx_n_s_NonlinearADR_Decay_DiracIC, __pyx_k_NonlinearADR_Decay_DiracIC,
sizeof(__pyx_k_NonlinearADR_Decay_DiracIC), 0, 0, 1, 1},
10462 {&__pyx_n_s_NonlinearADR_Decay_DiracIC_dr, __pyx_k_NonlinearADR_Decay_DiracIC_dr,
sizeof(__pyx_k_NonlinearADR_Decay_DiracIC_dr), 0, 0, 1, 1},
10463 {&__pyx_n_s_NonlinearADR_Decay_DiracIC_r, __pyx_k_NonlinearADR_Decay_DiracIC_r,
sizeof(__pyx_k_NonlinearADR_Decay_DiracIC_r), 0, 0, 1, 1},
10464 {&__pyx_n_s_NonlinearAD_SteadyState, __pyx_k_NonlinearAD_SteadyState,
sizeof(__pyx_k_NonlinearAD_SteadyState), 0, 0, 1, 1},
10465 {&__pyx_n_s_NonlinearDAE, __pyx_k_NonlinearDAE,
sizeof(__pyx_k_NonlinearDAE), 0, 0, 1, 1},
10466 {&__pyx_n_s_NonlinearDAE_f, __pyx_k_NonlinearDAE_f,
sizeof(__pyx_k_NonlinearDAE_f), 0, 0, 1, 1},
10467 {&__pyx_n_s_PlaneCouetteFlow_u, __pyx_k_PlaneCouetteFlow_u,
sizeof(__pyx_k_PlaneCouetteFlow_u), 0, 0, 1, 1},
10468 {&__pyx_n_s_PlanePoiseuilleFlow_u, __pyx_k_PlanePoiseuilleFlow_u,
sizeof(__pyx_k_PlanePoiseuilleFlow_u), 0, 0, 1, 1},
10469 {&__pyx_n_s_PoiseuillePipeFlow, __pyx_k_PoiseuillePipeFlow,
sizeof(__pyx_k_PoiseuillePipeFlow), 0, 0, 1, 1},
10470 {&__pyx_n_s_PoiseuillePipeFlow_P, __pyx_k_PoiseuillePipeFlow_P,
sizeof(__pyx_k_PoiseuillePipeFlow_P), 0, 0, 1, 1},
10471 {&__pyx_n_s_STflowSphere_P, __pyx_k_STflowSphere_P,
sizeof(__pyx_k_STflowSphere_P), 0, 0, 1, 1},
10472 {&__pyx_n_s_STflowSphere_Vx, __pyx_k_STflowSphere_Vx,
sizeof(__pyx_k_STflowSphere_Vx), 0, 0, 1, 1},
10473 {&__pyx_n_s_STflowSphere_Vy, __pyx_k_STflowSphere_Vy,
sizeof(__pyx_k_STflowSphere_Vy), 0, 0, 1, 1},
10474 {&__pyx_n_s_STflowSphere_Vz, __pyx_k_STflowSphere_Vz,
sizeof(__pyx_k_STflowSphere_Vz), 0, 0, 1, 1},
10475 {&__pyx_n_s_canalyticalSolutions, __pyx_k_canalyticalSolutions,
sizeof(__pyx_k_canalyticalSolutions), 0, 0, 1, 1},
10476 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback,
sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
10477 {&__pyx_n_s_diffusionSin1D, __pyx_k_diffusionSin1D,
sizeof(__pyx_k_diffusionSin1D), 0, 0, 1, 1},
10478 {&__pyx_n_s_diffusionSin1D_r, __pyx_k_diffusionSin1D_r,
sizeof(__pyx_k_diffusionSin1D_r), 0, 0, 1, 1},
10479 {&__pyx_n_s_diffusionSin2D, __pyx_k_diffusionSin2D,
sizeof(__pyx_k_diffusionSin2D), 0, 0, 1, 1},
10480 {&__pyx_n_s_diffusionSin2D_r, __pyx_k_diffusionSin2D_r,
sizeof(__pyx_k_diffusionSin2D_r), 0, 0, 1, 1},
10481 {&__pyx_n_s_diffusionSin3D, __pyx_k_diffusionSin3D,
sizeof(__pyx_k_diffusionSin3D), 0, 0, 1, 1},
10482 {&__pyx_n_s_diffusionSin3D_r, __pyx_k_diffusionSin3D_r,
sizeof(__pyx_k_diffusionSin3D_r), 0, 0, 1, 1},
10483 {&__pyx_n_s_dr, __pyx_k_dr,
sizeof(__pyx_k_dr), 0, 0, 1, 1},
10484 {&__pyx_n_s_du, __pyx_k_du,
sizeof(__pyx_k_du), 0, 0, 1, 1},
10485 {&__pyx_n_s_f, __pyx_k_f,
sizeof(__pyx_k_f), 0, 0, 1, 1},
10486 {&__pyx_n_s_import, __pyx_k_import,
sizeof(__pyx_k_import), 0, 0, 1, 1},
10487 {&__pyx_n_s_iwork, __pyx_k_iwork,
sizeof(__pyx_k_iwork), 0, 0, 1, 1},
10488 {&__pyx_n_s_main, __pyx_k_main,
sizeof(__pyx_k_main), 0, 0, 1, 1},
10489 {&__pyx_n_s_name, __pyx_k_name,
sizeof(__pyx_k_name), 0, 0, 1, 1},
10490 {&__pyx_n_s_np, __pyx_k_np,
sizeof(__pyx_k_np), 0, 0, 1, 1},
10491 {&__pyx_n_s_numpy, __pyx_k_numpy,
sizeof(__pyx_k_numpy), 0, 0, 1, 1},
10492 {&__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},
10493 {&__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},
10494 {&__pyx_n_s_poissonsEquationExp1D, __pyx_k_poissonsEquationExp1D,
sizeof(__pyx_k_poissonsEquationExp1D), 0, 0, 1, 1},
10495 {&__pyx_n_s_poissonsEquationExp1D_r, __pyx_k_poissonsEquationExp1D_r,
sizeof(__pyx_k_poissonsEquationExp1D_r), 0, 0, 1, 1},
10496 {&__pyx_n_s_poissonsEquationExp2D, __pyx_k_poissonsEquationExp2D,
sizeof(__pyx_k_poissonsEquationExp2D), 0, 0, 1, 1},
10497 {&__pyx_n_s_poissonsEquationExp2D_r, __pyx_k_poissonsEquationExp2D_r,
sizeof(__pyx_k_poissonsEquationExp2D_r), 0, 0, 1, 1},
10498 {&__pyx_n_s_poissonsEquationExp3D, __pyx_k_poissonsEquationExp3D,
sizeof(__pyx_k_poissonsEquationExp3D), 0, 0, 1, 1},
10499 {&__pyx_n_s_poissonsEquationExp3D_dr, __pyx_k_poissonsEquationExp3D_dr,
sizeof(__pyx_k_poissonsEquationExp3D_dr), 0, 0, 1, 1},
10500 {&__pyx_n_s_poissonsEquationExp3D_r, __pyx_k_poissonsEquationExp3D_r,
sizeof(__pyx_k_poissonsEquationExp3D_r), 0, 0, 1, 1},
10501 {&__pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_k_proteus_canalyticalSolutions_pyx,
sizeof(__pyx_k_proteus_canalyticalSolutions_pyx), 0, 0, 1, 0},
10502 {&__pyx_n_s_r, __pyx_k_r,
sizeof(__pyx_k_r), 0, 0, 1, 1},
10503 {&__pyx_n_s_rwork, __pyx_k_rwork,
sizeof(__pyx_k_rwork), 0, 0, 1, 1},
10504 {&__pyx_n_s_size, __pyx_k_size,
sizeof(__pyx_k_size), 0, 0, 1, 1},
10505 {&__pyx_n_s_t, __pyx_k_t,
sizeof(__pyx_k_t), 0, 0, 1, 1},
10506 {&__pyx_n_s_test, __pyx_k_test,
sizeof(__pyx_k_test), 0, 0, 1, 1},
10507 {&__pyx_n_s_u, __pyx_k_u,
sizeof(__pyx_k_u), 0, 0, 1, 1},
10508 {&__pyx_n_s_x, __pyx_k_x,
sizeof(__pyx_k_x), 0, 0, 1, 1},
10509 {0, 0, 0, 0, 0, 0, 0}
10511 static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(
void) {
10512 __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError);
if (!__pyx_builtin_ImportError) __PYX_ERR(1, 945, __pyx_L1_error)
10518 static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(
void) {
10519 __Pyx_RefNannyDeclarations
10520 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
10529 __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to);
if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 945, __pyx_L1_error)
10530 __Pyx_GOTREF(__pyx_tuple_);
10531 __Pyx_GIVEREF(__pyx_tuple_);
10540 __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)
10541 __Pyx_GOTREF(__pyx_tuple__2);
10542 __Pyx_GIVEREF(__pyx_tuple__2);
10551 __pyx_tuple__3 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 50, __pyx_L1_error)
10552 __Pyx_GOTREF(__pyx_tuple__3);
10553 __Pyx_GIVEREF(__pyx_tuple__3);
10554 __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_canalyticalSolutions_pyx, __pyx_n_s_PlaneCouetteFlow_u, 50, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 50, __pyx_L1_error)
10563 __pyx_tuple__5 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 54, __pyx_L1_error)
10564 __Pyx_GOTREF(__pyx_tuple__5);
10565 __Pyx_GIVEREF(__pyx_tuple__5);
10566 __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_canalyticalSolutions_pyx, __pyx_n_s_diffusionSin1D, 54, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 54, __pyx_L1_error)
10575 __pyx_tuple__7 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 58, __pyx_L1_error)
10576 __Pyx_GOTREF(__pyx_tuple__7);
10577 __Pyx_GIVEREF(__pyx_tuple__7);
10578 __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_canalyticalSolutions_pyx, __pyx_n_s_diffusionSin2D, 58, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 58, __pyx_L1_error)
10587 __pyx_tuple__9 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 62, __pyx_L1_error)
10588 __Pyx_GOTREF(__pyx_tuple__9);
10589 __Pyx_GIVEREF(__pyx_tuple__9);
10590 __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_canalyticalSolutions_pyx, __pyx_n_s_diffusionSin3D, 62, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 62, __pyx_L1_error)
10599 __pyx_tuple__11 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 66, __pyx_L1_error)
10600 __Pyx_GOTREF(__pyx_tuple__11);
10601 __Pyx_GIVEREF(__pyx_tuple__11);
10602 __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 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_canalyticalSolutions_pyx, __pyx_n_s_diffusionSin1D_r, 66, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 66, __pyx_L1_error)
10611 __pyx_tuple__13 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 70, __pyx_L1_error)
10612 __Pyx_GOTREF(__pyx_tuple__13);
10613 __Pyx_GIVEREF(__pyx_tuple__13);
10614 __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 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_canalyticalSolutions_pyx, __pyx_n_s_diffusionSin2D_r, 70, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 70, __pyx_L1_error)
10623 __pyx_tuple__15 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 74, __pyx_L1_error)
10624 __Pyx_GOTREF(__pyx_tuple__15);
10625 __Pyx_GIVEREF(__pyx_tuple__15);
10626 __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 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_canalyticalSolutions_pyx, __pyx_n_s_diffusionSin3D_r, 74, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 74, __pyx_L1_error)
10635 __pyx_tuple__17 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 78, __pyx_L1_error)
10636 __Pyx_GOTREF(__pyx_tuple__17);
10637 __Pyx_GIVEREF(__pyx_tuple__17);
10638 __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_canalyticalSolutions_pyx, __pyx_n_s_LinearAD_DiracIC, 78, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 78, __pyx_L1_error)
10647 __pyx_tuple__19 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_f);
if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 82, __pyx_L1_error)
10648 __Pyx_GOTREF(__pyx_tuple__19);
10649 __Pyx_GIVEREF(__pyx_tuple__19);
10650 __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_canalyticalSolutions_pyx, __pyx_n_s_LinearAD_DiracIC_advectiveVeloci, 82, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 82, __pyx_L1_error)
10659 __pyx_tuple__21 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_f);
if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 86, __pyx_L1_error)
10660 __Pyx_GOTREF(__pyx_tuple__21);
10661 __Pyx_GIVEREF(__pyx_tuple__21);
10662 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearAD_DiracIC_diffusiveVeloci, 86, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 86, __pyx_L1_error)
10671 __pyx_tuple__23 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_du);
if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 90, __pyx_L1_error)
10672 __Pyx_GOTREF(__pyx_tuple__23);
10673 __Pyx_GIVEREF(__pyx_tuple__23);
10674 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearAD_DiracIC_du, 90, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 90, __pyx_L1_error)
10683 __pyx_tuple__25 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 94, __pyx_L1_error)
10684 __Pyx_GOTREF(__pyx_tuple__25);
10685 __Pyx_GIVEREF(__pyx_tuple__25);
10686 __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearAD_DiracIC_totalVelocity, 94, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 94, __pyx_L1_error)
10695 __pyx_tuple__27 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 98, __pyx_L1_error)
10696 __Pyx_GOTREF(__pyx_tuple__27);
10697 __Pyx_GIVEREF(__pyx_tuple__27);
10698 __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearAD_SteadyState, 98, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 98, __pyx_L1_error)
10707 __pyx_tuple__29 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 102, __pyx_L1_error)
10708 __Pyx_GOTREF(__pyx_tuple__29);
10709 __Pyx_GIVEREF(__pyx_tuple__29);
10710 __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Decay_DiracIC, 102, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 102, __pyx_L1_error)
10719 __pyx_tuple__31 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_dr);
if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 106, __pyx_L1_error)
10720 __Pyx_GOTREF(__pyx_tuple__31);
10721 __Pyx_GIVEREF(__pyx_tuple__31);
10722 __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Decay_DiracIC_dr, 106, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 106, __pyx_L1_error)
10731 __pyx_tuple__33 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 110, __pyx_L1_error)
10732 __Pyx_GOTREF(__pyx_tuple__33);
10733 __Pyx_GIVEREF(__pyx_tuple__33);
10734 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Decay_DiracIC_r, 110, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 110, __pyx_L1_error)
10743 __pyx_tuple__35 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 114, __pyx_L1_error)
10744 __Pyx_GOTREF(__pyx_tuple__35);
10745 __Pyx_GIVEREF(__pyx_tuple__35);
10746 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine, 114, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 114, __pyx_L1_error)
10755 __pyx_tuple__37 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_f);
if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 118, __pyx_L1_error)
10756 __Pyx_GOTREF(__pyx_tuple__37);
10757 __Pyx_GIVEREF(__pyx_tuple__37);
10758 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine_advectiveVelocity, 118, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 118, __pyx_L1_error)
10767 __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_f);
if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 122, __pyx_L1_error)
10768 __Pyx_GOTREF(__pyx_tuple__39);
10769 __Pyx_GIVEREF(__pyx_tuple__39);
10770 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine_diffusiveVelocity, 122, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 122, __pyx_L1_error)
10779 __pyx_tuple__41 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_dr);
if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 126, __pyx_L1_error)
10780 __Pyx_GOTREF(__pyx_tuple__41);
10781 __Pyx_GIVEREF(__pyx_tuple__41);
10782 __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine_dr, 126, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 126, __pyx_L1_error)
10791 __pyx_tuple__43 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_du);
if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 130, __pyx_L1_error)
10792 __Pyx_GOTREF(__pyx_tuple__43);
10793 __Pyx_GIVEREF(__pyx_tuple__43);
10794 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine_du, 130, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 130, __pyx_L1_error)
10803 __pyx_tuple__45 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 134, __pyx_L1_error)
10804 __Pyx_GOTREF(__pyx_tuple__45);
10805 __Pyx_GIVEREF(__pyx_tuple__45);
10806 __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine_r, 134, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 134, __pyx_L1_error)
10815 __pyx_tuple__47 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 138, __pyx_L1_error)
10816 __Pyx_GOTREF(__pyx_tuple__47);
10817 __Pyx_GIVEREF(__pyx_tuple__47);
10818 __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_LinearADR_Sine_totalVelocity, 138, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 138, __pyx_L1_error)
10827 __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 142, __pyx_L1_error)
10828 __Pyx_GOTREF(__pyx_tuple__49);
10829 __Pyx_GIVEREF(__pyx_tuple__49);
10830 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_NonlinearAD_SteadyState, 142, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 142, __pyx_L1_error)
10839 __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 146, __pyx_L1_error)
10840 __Pyx_GOTREF(__pyx_tuple__51);
10841 __Pyx_GIVEREF(__pyx_tuple__51);
10842 __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_NonlinearADR_Decay_DiracIC, 146, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 146, __pyx_L1_error)
10851 __pyx_tuple__53 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_dr);
if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 150, __pyx_L1_error)
10852 __Pyx_GOTREF(__pyx_tuple__53);
10853 __Pyx_GIVEREF(__pyx_tuple__53);
10854 __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_NonlinearADR_Decay_DiracIC_dr, 150, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 150, __pyx_L1_error)
10863 __pyx_tuple__55 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 154, __pyx_L1_error)
10864 __Pyx_GOTREF(__pyx_tuple__55);
10865 __Pyx_GIVEREF(__pyx_tuple__55);
10866 __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_NonlinearADR_Decay_DiracIC_r, 154, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 154, __pyx_L1_error)
10875 __pyx_tuple__57 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 158, __pyx_L1_error)
10876 __Pyx_GOTREF(__pyx_tuple__57);
10877 __Pyx_GIVEREF(__pyx_tuple__57);
10878 __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_NonlinearDAE, 158, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 158, __pyx_L1_error)
10887 __pyx_tuple__59 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 162, __pyx_L1_error)
10888 __Pyx_GOTREF(__pyx_tuple__59);
10889 __Pyx_GIVEREF(__pyx_tuple__59);
10890 __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_NonlinearDAE_f, 162, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 162, __pyx_L1_error)
10899 __pyx_tuple__61 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 166, __pyx_L1_error)
10900 __Pyx_GOTREF(__pyx_tuple__61);
10901 __Pyx_GIVEREF(__pyx_tuple__61);
10902 __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_PlanePoiseuilleFlow_u, 166, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 166, __pyx_L1_error)
10911 __pyx_tuple__63 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 170, __pyx_L1_error)
10912 __Pyx_GOTREF(__pyx_tuple__63);
10913 __Pyx_GIVEREF(__pyx_tuple__63);
10914 __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_PoiseuillePipeFlow, 170, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 170, __pyx_L1_error)
10923 __pyx_tuple__65 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 174, __pyx_L1_error)
10924 __Pyx_GOTREF(__pyx_tuple__65);
10925 __Pyx_GIVEREF(__pyx_tuple__65);
10926 __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_PoiseuillePipeFlow_P, 174, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 174, __pyx_L1_error)
10935 __pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 178, __pyx_L1_error)
10936 __Pyx_GOTREF(__pyx_tuple__67);
10937 __Pyx_GIVEREF(__pyx_tuple__67);
10938 __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp1D, 178, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 178, __pyx_L1_error)
10947 __pyx_tuple__69 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 182, __pyx_L1_error)
10948 __Pyx_GOTREF(__pyx_tuple__69);
10949 __Pyx_GIVEREF(__pyx_tuple__69);
10950 __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp2D, 182, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 182, __pyx_L1_error)
10959 __pyx_tuple__71 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 186, __pyx_L1_error)
10960 __Pyx_GOTREF(__pyx_tuple__71);
10961 __Pyx_GIVEREF(__pyx_tuple__71);
10962 __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp3D, 186, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 186, __pyx_L1_error)
10971 __pyx_tuple__73 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_dr);
if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 190, __pyx_L1_error)
10972 __Pyx_GOTREF(__pyx_tuple__73);
10973 __Pyx_GIVEREF(__pyx_tuple__73);
10974 __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp3D_dr, 190, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 190, __pyx_L1_error)
10983 __pyx_tuple__75 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 194, __pyx_L1_error)
10984 __Pyx_GOTREF(__pyx_tuple__75);
10985 __Pyx_GIVEREF(__pyx_tuple__75);
10986 __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp1D_r, 194, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 194, __pyx_L1_error)
10995 __pyx_tuple__77 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 198, __pyx_L1_error)
10996 __Pyx_GOTREF(__pyx_tuple__77);
10997 __Pyx_GIVEREF(__pyx_tuple__77);
10998 __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp2D_r, 198, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 198, __pyx_L1_error)
11007 __pyx_tuple__79 = PyTuple_Pack(6, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u, __pyx_n_s_r);
if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 202, __pyx_L1_error)
11008 __Pyx_GOTREF(__pyx_tuple__79);
11009 __Pyx_GIVEREF(__pyx_tuple__79);
11010 __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_poissonsEquationExp3D_r, 202, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 202, __pyx_L1_error)
11019 __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 206, __pyx_L1_error)
11020 __Pyx_GOTREF(__pyx_tuple__81);
11021 __Pyx_GIVEREF(__pyx_tuple__81);
11022 __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_STflowSphere_P, 206, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 206, __pyx_L1_error)
11031 __pyx_tuple__83 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 210, __pyx_L1_error)
11032 __Pyx_GOTREF(__pyx_tuple__83);
11033 __Pyx_GIVEREF(__pyx_tuple__83);
11034 __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_STflowSphere_Vx, 210, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 210, __pyx_L1_error)
11043 __pyx_tuple__85 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 214, __pyx_L1_error)
11044 __Pyx_GOTREF(__pyx_tuple__85);
11045 __Pyx_GIVEREF(__pyx_tuple__85);
11046 __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_STflowSphere_Vy, 214, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 214, __pyx_L1_error)
11054 __pyx_tuple__87 = PyTuple_Pack(5, __pyx_n_s_iwork, __pyx_n_s_rwork, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_u);
if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 218, __pyx_L1_error)
11055 __Pyx_GOTREF(__pyx_tuple__87);
11056 __Pyx_GIVEREF(__pyx_tuple__87);
11057 __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_canalyticalSolutions_pyx, __pyx_n_s_STflowSphere_Vz, 218, __pyx_empty_bytes);
if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 218, __pyx_L1_error)
11058 __Pyx_RefNannyFinishContext();
11061 __Pyx_RefNannyFinishContext();
11065 static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void) {
11066 if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
11072 static CYTHON_SMALL_CODE
int __Pyx_modinit_global_init_code(
void);
11073 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_export_code(
void);
11074 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_export_code(
void);
11075 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_init_code(
void);
11076 static CYTHON_SMALL_CODE
int __Pyx_modinit_type_import_code(
void);
11077 static CYTHON_SMALL_CODE
int __Pyx_modinit_variable_import_code(
void);
11078 static CYTHON_SMALL_CODE
int __Pyx_modinit_function_import_code(
void);
11080 static int __Pyx_modinit_global_init_code(
void) {
11081 __Pyx_RefNannyDeclarations
11082 __Pyx_RefNannySetupContext(
"__Pyx_modinit_global_init_code", 0);
11084 __Pyx_RefNannyFinishContext();
11088 static int __Pyx_modinit_variable_export_code(
void) {
11089 __Pyx_RefNannyDeclarations
11090 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_export_code", 0);
11092 __Pyx_RefNannyFinishContext();
11096 static int __Pyx_modinit_function_export_code(
void) {
11097 __Pyx_RefNannyDeclarations
11098 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_export_code", 0);
11100 __Pyx_RefNannyFinishContext();
11104 static int __Pyx_modinit_type_init_code(
void) {
11105 __Pyx_RefNannyDeclarations
11106 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_init_code", 0);
11108 __Pyx_RefNannyFinishContext();
11112 static int __Pyx_modinit_type_import_code(
void) {
11113 __Pyx_RefNannyDeclarations
11114 PyObject *__pyx_t_1 = NULL;
11115 int __pyx_lineno = 0;
11116 const char *__pyx_filename = NULL;
11117 int __pyx_clineno = 0;
11118 __Pyx_RefNannySetupContext(
"__Pyx_modinit_type_import_code", 0);
11120 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
11121 __Pyx_GOTREF(__pyx_t_1);
11122 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME,
"type",
11123 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
11124 sizeof(PyTypeObject),
11126 sizeof(PyHeapTypeObject),
11128 __Pyx_ImportType_CheckSize_Warn);
11129 if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
11130 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11131 __pyx_t_1 = PyImport_ImportModule(
"numpy");
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
11132 __Pyx_GOTREF(__pyx_t_1);
11133 __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1,
"numpy",
"dtype",
sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
11134 if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error)
11135 __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1,
"numpy",
"flatiter",
sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
11136 if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error)
11137 __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1,
"numpy",
"broadcast",
sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
11138 if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error)
11139 __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1,
"numpy",
"ndarray",
sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
11140 if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error)
11141 __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1,
"numpy",
"generic",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11142 if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error)
11143 __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1,
"numpy",
"number",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11144 if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error)
11145 __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1,
"numpy",
"integer",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11146 if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error)
11147 __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1,
"numpy",
"signedinteger",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11148 if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error)
11149 __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1,
"numpy",
"unsignedinteger",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11150 if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error)
11151 __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1,
"numpy",
"inexact",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11152 if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error)
11153 __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1,
"numpy",
"floating",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11154 if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error)
11155 __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1,
"numpy",
"complexfloating",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11156 if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error)
11157 __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1,
"numpy",
"flexible",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11158 if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error)
11159 __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1,
"numpy",
"character",
sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
11160 if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error)
11161 __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1,
"numpy",
"ufunc",
sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
11162 if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error)
11163 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11164 __Pyx_RefNannyFinishContext();
11167 __Pyx_XDECREF(__pyx_t_1);
11168 __Pyx_RefNannyFinishContext();
11172 static int __Pyx_modinit_variable_import_code(
void) {
11173 __Pyx_RefNannyDeclarations
11174 __Pyx_RefNannySetupContext(
"__Pyx_modinit_variable_import_code", 0);
11176 __Pyx_RefNannyFinishContext();
11180 static int __Pyx_modinit_function_import_code(
void) {
11181 __Pyx_RefNannyDeclarations
11182 __Pyx_RefNannySetupContext(
"__Pyx_modinit_function_import_code", 0);
11184 __Pyx_RefNannyFinishContext();
11189 #ifndef CYTHON_NO_PYINIT_EXPORT
11190 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
11191 #elif PY_MAJOR_VERSION < 3
11193 #define __Pyx_PyMODINIT_FUNC extern "C" void
11195 #define __Pyx_PyMODINIT_FUNC void
11199 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
11201 #define __Pyx_PyMODINIT_FUNC PyObject *
11206 #if PY_MAJOR_VERSION < 3
11207 __Pyx_PyMODINIT_FUNC initcanalyticalSolutions(
void) CYTHON_SMALL_CODE;
11208 __Pyx_PyMODINIT_FUNC initcanalyticalSolutions(
void)
11210 __Pyx_PyMODINIT_FUNC PyInit_canalyticalSolutions(
void) CYTHON_SMALL_CODE;
11211 __Pyx_PyMODINIT_FUNC PyInit_canalyticalSolutions(
void)
11212 #if CYTHON_PEP489_MULTI_PHASE_INIT
11214 return PyModuleDef_Init(&__pyx_moduledef);
11216 static CYTHON_SMALL_CODE
int __Pyx_check_single_interpreter(
void) {
11217 #if PY_VERSION_HEX >= 0x030700A1
11218 static PY_INT64_T main_interpreter_id = -1;
11219 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
11220 if (main_interpreter_id == -1) {
11221 main_interpreter_id = current_id;
11222 return (unlikely(current_id == -1)) ? -1 : 0;
11223 }
else if (unlikely(main_interpreter_id != current_id))
11225 static PyInterpreterState *main_interpreter = NULL;
11226 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
11227 if (!main_interpreter) {
11228 main_interpreter = current_interpreter;
11229 }
else if (unlikely(main_interpreter != current_interpreter))
11234 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
11239 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) {
11240 PyObject *value = PyObject_GetAttrString(spec, from_name);
11242 if (likely(value)) {
11243 if (allow_none || value != Py_None) {
11244 result = PyDict_SetItemString(moddict, to_name, value);
11247 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
11254 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
11255 PyObject *module = NULL, *moddict, *modname;
11256 if (__Pyx_check_single_interpreter())
11259 return __Pyx_NewRef(__pyx_m);
11260 modname = PyObject_GetAttrString(spec,
"name");
11261 if (unlikely(!modname))
goto bad;
11262 module = PyModule_NewObject(modname);
11263 Py_DECREF(modname);
11264 if (unlikely(!module))
goto bad;
11265 moddict = PyModule_GetDict(module);
11266 if (unlikely(!moddict))
goto bad;
11267 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"loader",
"__loader__", 1) < 0))
goto bad;
11268 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"origin",
"__file__", 1) < 0))
goto bad;
11269 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"parent",
"__package__", 1) < 0))
goto bad;
11270 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"submodule_search_locations",
"__path__", 0) < 0))
goto bad;
11273 Py_XDECREF(module);
11278 static CYTHON_SMALL_CODE
int __pyx_pymod_exec_canalyticalSolutions(PyObject *__pyx_pyinit_module)
11282 PyObject *__pyx_t_1 = NULL;
11283 int __pyx_lineno = 0;
11284 const char *__pyx_filename = NULL;
11285 int __pyx_clineno = 0;
11286 __Pyx_RefNannyDeclarations
11287 #if CYTHON_PEP489_MULTI_PHASE_INIT
11289 if (__pyx_m == __pyx_pyinit_module)
return 0;
11290 PyErr_SetString(PyExc_RuntimeError,
"Module 'canalyticalSolutions' has already been imported. Re-initialisation is not supported.");
11293 #elif PY_MAJOR_VERSION >= 3
11294 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
11296 #if CYTHON_REFNANNY
11297 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
11298 if (!__Pyx_RefNanny) {
11300 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
11301 if (!__Pyx_RefNanny)
11302 Py_FatalError(
"failed to import 'refnanny' module");
11305 __Pyx_RefNannySetupContext(
"__Pyx_PyMODINIT_FUNC PyInit_canalyticalSolutions(void)", 0);
11306 if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11307 #ifdef __Pxy_PyFrame_Initialize_Offsets
11308 __Pxy_PyFrame_Initialize_Offsets();
11310 __pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
11311 __pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
11312 __pyx_empty_unicode = PyUnicode_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
11313 #ifdef __Pyx_CyFunction_USED
11314 if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11316 #ifdef __Pyx_FusedFunction_USED
11317 if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11319 #ifdef __Pyx_Coroutine_USED
11320 if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11322 #ifdef __Pyx_Generator_USED
11323 if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11325 #ifdef __Pyx_AsyncGen_USED
11326 if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11328 #ifdef __Pyx_StopAsyncIteration_USED
11329 if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11333 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
11334 PyEval_InitThreads();
11337 #if CYTHON_PEP489_MULTI_PHASE_INIT
11338 __pyx_m = __pyx_pyinit_module;
11339 Py_INCREF(__pyx_m);
11341 #if PY_MAJOR_VERSION < 3
11342 __pyx_m = Py_InitModule4(
"canalyticalSolutions", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
11344 __pyx_m = PyModule_Create(&__pyx_moduledef);
11346 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
11348 __pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
11349 Py_INCREF(__pyx_d);
11350 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
11351 Py_INCREF(__pyx_b);
11352 __pyx_cython_runtime = PyImport_AddModule((
char *)
"cython_runtime");
if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
11353 Py_INCREF(__pyx_cython_runtime);
11354 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
11356 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11357 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
11358 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11360 if (__pyx_module_is_main_canalyticalSolutions) {
11361 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11363 #if PY_MAJOR_VERSION >= 3
11365 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
11366 if (!PyDict_GetItemString(modules,
"canalyticalSolutions")) {
11367 if (unlikely(PyDict_SetItemString(modules,
"canalyticalSolutions", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
11372 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11374 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11376 (void)__Pyx_modinit_global_init_code();
11377 (void)__Pyx_modinit_variable_export_code();
11378 (void)__Pyx_modinit_function_export_code();
11379 (void)__Pyx_modinit_type_init_code();
11380 if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
11381 (void)__Pyx_modinit_variable_import_code();
11382 (void)__Pyx_modinit_function_import_code();
11384 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
11385 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11394 __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
11395 __Pyx_GOTREF(__pyx_t_1);
11396 if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
11397 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11406 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_1PlaneCouetteFlow_u, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
11407 __Pyx_GOTREF(__pyx_t_1);
11408 if (PyDict_SetItem(__pyx_d, __pyx_n_s_PlaneCouetteFlow_u, __pyx_t_1) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
11409 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11418 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_3diffusionSin1D, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
11419 __Pyx_GOTREF(__pyx_t_1);
11420 if (PyDict_SetItem(__pyx_d, __pyx_n_s_diffusionSin1D, __pyx_t_1) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
11421 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11430 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_5diffusionSin2D, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
11431 __Pyx_GOTREF(__pyx_t_1);
11432 if (PyDict_SetItem(__pyx_d, __pyx_n_s_diffusionSin2D, __pyx_t_1) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
11433 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11442 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_7diffusionSin3D, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
11443 __Pyx_GOTREF(__pyx_t_1);
11444 if (PyDict_SetItem(__pyx_d, __pyx_n_s_diffusionSin3D, __pyx_t_1) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
11445 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11454 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_9diffusionSin1D_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
11455 __Pyx_GOTREF(__pyx_t_1);
11456 if (PyDict_SetItem(__pyx_d, __pyx_n_s_diffusionSin1D_r, __pyx_t_1) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
11457 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11466 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_11diffusionSin2D_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
11467 __Pyx_GOTREF(__pyx_t_1);
11468 if (PyDict_SetItem(__pyx_d, __pyx_n_s_diffusionSin2D_r, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
11469 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11478 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_13diffusionSin3D_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
11479 __Pyx_GOTREF(__pyx_t_1);
11480 if (PyDict_SetItem(__pyx_d, __pyx_n_s_diffusionSin3D_r, __pyx_t_1) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
11481 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11490 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_15LinearAD_DiracIC, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
11491 __Pyx_GOTREF(__pyx_t_1);
11492 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearAD_DiracIC, __pyx_t_1) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
11493 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11502 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_17LinearAD_DiracIC_advectiveVelocity, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
11503 __Pyx_GOTREF(__pyx_t_1);
11504 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearAD_DiracIC_advectiveVeloci, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
11505 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11514 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_19LinearAD_DiracIC_diffusiveVelocity, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
11515 __Pyx_GOTREF(__pyx_t_1);
11516 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearAD_DiracIC_diffusiveVeloci, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
11517 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11526 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_21LinearAD_DiracIC_du, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
11527 __Pyx_GOTREF(__pyx_t_1);
11528 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearAD_DiracIC_du, __pyx_t_1) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
11529 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11538 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_23LinearAD_DiracIC_totalVelocity, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
11539 __Pyx_GOTREF(__pyx_t_1);
11540 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearAD_DiracIC_totalVelocity, __pyx_t_1) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
11541 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11550 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_25LinearAD_SteadyState, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
11551 __Pyx_GOTREF(__pyx_t_1);
11552 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearAD_SteadyState, __pyx_t_1) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
11553 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11562 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_27LinearADR_Decay_DiracIC, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
11563 __Pyx_GOTREF(__pyx_t_1);
11564 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Decay_DiracIC, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
11565 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11574 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_29LinearADR_Decay_DiracIC_dr, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
11575 __Pyx_GOTREF(__pyx_t_1);
11576 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Decay_DiracIC_dr, __pyx_t_1) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
11577 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11586 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_31LinearADR_Decay_DiracIC_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
11587 __Pyx_GOTREF(__pyx_t_1);
11588 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Decay_DiracIC_r, __pyx_t_1) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
11589 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11598 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_33LinearADR_Sine, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
11599 __Pyx_GOTREF(__pyx_t_1);
11600 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine, __pyx_t_1) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
11601 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11610 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_35LinearADR_Sine_advectiveVelocity, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
11611 __Pyx_GOTREF(__pyx_t_1);
11612 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine_advectiveVelocity, __pyx_t_1) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
11613 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11622 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_37LinearADR_Sine_diffusiveVelocity, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
11623 __Pyx_GOTREF(__pyx_t_1);
11624 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine_diffusiveVelocity, __pyx_t_1) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
11625 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11634 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_39LinearADR_Sine_dr, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
11635 __Pyx_GOTREF(__pyx_t_1);
11636 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine_dr, __pyx_t_1) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
11637 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11646 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_41LinearADR_Sine_du, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
11647 __Pyx_GOTREF(__pyx_t_1);
11648 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine_du, __pyx_t_1) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
11649 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11658 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_43LinearADR_Sine_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
11659 __Pyx_GOTREF(__pyx_t_1);
11660 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine_r, __pyx_t_1) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
11661 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11670 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_45LinearADR_Sine_totalVelocity, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
11671 __Pyx_GOTREF(__pyx_t_1);
11672 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearADR_Sine_totalVelocity, __pyx_t_1) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
11673 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11682 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_47NonlinearAD_SteadyState, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
11683 __Pyx_GOTREF(__pyx_t_1);
11684 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearAD_SteadyState, __pyx_t_1) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
11685 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11694 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_49NonlinearADR_Decay_DiracIC, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
11695 __Pyx_GOTREF(__pyx_t_1);
11696 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearADR_Decay_DiracIC, __pyx_t_1) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
11697 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11706 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_51NonlinearADR_Decay_DiracIC_dr, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
11707 __Pyx_GOTREF(__pyx_t_1);
11708 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearADR_Decay_DiracIC_dr, __pyx_t_1) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
11709 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11718 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_53NonlinearADR_Decay_DiracIC_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
11719 __Pyx_GOTREF(__pyx_t_1);
11720 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearADR_Decay_DiracIC_r, __pyx_t_1) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
11721 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11730 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_55NonlinearDAE, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
11731 __Pyx_GOTREF(__pyx_t_1);
11732 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearDAE, __pyx_t_1) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
11733 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11742 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_57NonlinearDAE_f, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
11743 __Pyx_GOTREF(__pyx_t_1);
11744 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearDAE_f, __pyx_t_1) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
11745 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11754 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_59PlanePoiseuilleFlow_u, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
11755 __Pyx_GOTREF(__pyx_t_1);
11756 if (PyDict_SetItem(__pyx_d, __pyx_n_s_PlanePoiseuilleFlow_u, __pyx_t_1) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
11757 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11766 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_61PoiseuillePipeFlow, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
11767 __Pyx_GOTREF(__pyx_t_1);
11768 if (PyDict_SetItem(__pyx_d, __pyx_n_s_PoiseuillePipeFlow, __pyx_t_1) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
11769 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11778 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_63PoiseuillePipeFlow_P, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
11779 __Pyx_GOTREF(__pyx_t_1);
11780 if (PyDict_SetItem(__pyx_d, __pyx_n_s_PoiseuillePipeFlow_P, __pyx_t_1) < 0) __PYX_ERR(0, 174, __pyx_L1_error)
11781 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11790 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_65poissonsEquationExp1D, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
11791 __Pyx_GOTREF(__pyx_t_1);
11792 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp1D, __pyx_t_1) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
11793 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11802 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_67poissonsEquationExp2D, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
11803 __Pyx_GOTREF(__pyx_t_1);
11804 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp2D, __pyx_t_1) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
11805 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11814 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_69poissonsEquationExp3D, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
11815 __Pyx_GOTREF(__pyx_t_1);
11816 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp3D, __pyx_t_1) < 0) __PYX_ERR(0, 186, __pyx_L1_error)
11817 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11826 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_71poissonsEquationExp3D_dr, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
11827 __Pyx_GOTREF(__pyx_t_1);
11828 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp3D_dr, __pyx_t_1) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
11829 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11838 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_73poissonsEquationExp1D_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
11839 __Pyx_GOTREF(__pyx_t_1);
11840 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp1D_r, __pyx_t_1) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
11841 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11850 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_75poissonsEquationExp2D_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
11851 __Pyx_GOTREF(__pyx_t_1);
11852 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp2D_r, __pyx_t_1) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
11853 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11862 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_77poissonsEquationExp3D_r, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
11863 __Pyx_GOTREF(__pyx_t_1);
11864 if (PyDict_SetItem(__pyx_d, __pyx_n_s_poissonsEquationExp3D_r, __pyx_t_1) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
11865 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11874 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_79STflowSphere_P, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
11875 __Pyx_GOTREF(__pyx_t_1);
11876 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STflowSphere_P, __pyx_t_1) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
11877 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11886 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_81STflowSphere_Vx, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
11887 __Pyx_GOTREF(__pyx_t_1);
11888 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STflowSphere_Vx, __pyx_t_1) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
11889 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11898 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_83STflowSphere_Vy, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
11899 __Pyx_GOTREF(__pyx_t_1);
11900 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STflowSphere_Vy, __pyx_t_1) < 0) __PYX_ERR(0, 214, __pyx_L1_error)
11901 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11909 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_20canalyticalSolutions_85STflowSphere_Vz, NULL, __pyx_n_s_canalyticalSolutions);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
11910 __Pyx_GOTREF(__pyx_t_1);
11911 if (PyDict_SetItem(__pyx_d, __pyx_n_s_STflowSphere_Vz, __pyx_t_1) < 0) __PYX_ERR(0, 218, __pyx_L1_error)
11912 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11919 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
11920 __Pyx_GOTREF(__pyx_t_1);
11921 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11922 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11936 __Pyx_XDECREF(__pyx_t_1);
11939 __Pyx_AddTraceback(
"init canalyticalSolutions", __pyx_clineno, __pyx_lineno, __pyx_filename);
11942 }
else if (!PyErr_Occurred()) {
11943 PyErr_SetString(PyExc_ImportError,
"init canalyticalSolutions");
11946 __Pyx_RefNannyFinishContext();
11947 #if CYTHON_PEP489_MULTI_PHASE_INIT
11948 return (__pyx_m != NULL) ? 0 : -1;
11949 #elif PY_MAJOR_VERSION >= 3
11958 #if CYTHON_REFNANNY
11959 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
11960 PyObject *m = NULL, *p = NULL;
11962 m = PyImport_ImportModule(modname);
11964 p = PyObject_GetAttrString(m,
"RefNannyAPI");
11966 r = PyLong_AsVoidPtr(p);
11970 return (__Pyx_RefNannyAPIStruct *)
r;
11975 static void __Pyx_RaiseArgtupleInvalid(
11976 const char* func_name,
11978 Py_ssize_t num_min,
11979 Py_ssize_t num_max,
11980 Py_ssize_t num_found)
11982 Py_ssize_t num_expected;
11983 const char *more_or_less;
11984 if (num_found < num_min) {
11985 num_expected = num_min;
11986 more_or_less =
"at least";
11988 num_expected = num_max;
11989 more_or_less =
"at most";
11992 more_or_less =
"exactly";
11994 PyErr_Format(PyExc_TypeError,
11995 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
11996 func_name, more_or_less, num_expected,
11997 (num_expected == 1) ?
"" :
"s", num_found);
12001 static void __Pyx_RaiseDoubleKeywordsError(
12002 const char* func_name,
12005 PyErr_Format(PyExc_TypeError,
12006 #
if PY_MAJOR_VERSION >= 3
12007 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
12009 "%s() got multiple values for keyword argument '%s'", func_name,
12010 PyString_AsString(kw_name));
12015 static int __Pyx_ParseOptionalKeywords(
12017 PyObject **argnames[],
12019 PyObject *values[],
12020 Py_ssize_t num_pos_args,
12021 const char* function_name)
12023 PyObject *key = 0, *value = 0;
12024 Py_ssize_t
pos = 0;
12026 PyObject*** first_kw_arg = argnames + num_pos_args;
12027 while (PyDict_Next(kwds, &
pos, &key, &value)) {
12028 name = first_kw_arg;
12029 while (*name && (**name != key)) name++;
12031 values[name-argnames] = value;
12034 name = first_kw_arg;
12035 #if PY_MAJOR_VERSION < 3
12036 if (likely(PyString_Check(key))) {
12038 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
12039 && _PyString_Eq(**name, key)) {
12040 values[name-argnames] = value;
12045 if (*name)
continue;
12047 PyObject*** argname = argnames;
12048 while (argname != first_kw_arg) {
12049 if ((**argname == key) || (
12050 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
12051 && _PyString_Eq(**argname, key))) {
12052 goto arg_passed_twice;
12059 if (likely(PyUnicode_Check(key))) {
12061 int cmp = (**name == key) ? 0 :
12062 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
12063 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
12065 PyUnicode_Compare(**name, key);
12066 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
12068 values[name-argnames] = value;
12073 if (*name)
continue;
12075 PyObject*** argname = argnames;
12076 while (argname != first_kw_arg) {
12077 int cmp = (**argname == key) ? 0 :
12078 #
if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
12079 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
12081 PyUnicode_Compare(**argname, key);
12082 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
12083 if (cmp == 0)
goto arg_passed_twice;
12088 goto invalid_keyword_type;
12090 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
12092 goto invalid_keyword;
12097 __Pyx_RaiseDoubleKeywordsError(function_name, key);
12099 invalid_keyword_type:
12100 PyErr_Format(PyExc_TypeError,
12101 "%.200s() keywords must be strings", function_name);
12104 PyErr_Format(PyExc_TypeError,
12105 #
if PY_MAJOR_VERSION < 3
12106 "%.200s() got an unexpected keyword argument '%.200s'",
12107 function_name, PyString_AsString(key));
12109 "%s() got an unexpected keyword argument '%U'",
12110 function_name, key);
12117 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact)
12119 if (unlikely(!type)) {
12120 PyErr_SetString(PyExc_SystemError,
"Missing type object");
12124 #if PY_MAJOR_VERSION == 2
12125 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj)))
return 1;
12129 if (likely(__Pyx_TypeCheck(obj, type)))
return 1;
12131 PyErr_Format(PyExc_TypeError,
12132 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
12133 name, type->tp_name, Py_TYPE(obj)->tp_name);
12138 #if CYTHON_USE_TYPE_SLOTS
12139 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
12140 PyTypeObject* tp = Py_TYPE(obj);
12141 if (likely(tp->tp_getattro))
12142 return tp->tp_getattro(obj, attr_name);
12143 #if PY_MAJOR_VERSION < 3
12144 if (likely(tp->tp_getattr))
12145 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
12147 return PyObject_GetAttr(obj, attr_name);
12152 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
12153 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
12154 if (unlikely(!result)) {
12155 PyErr_Format(PyExc_NameError,
12156 #
if PY_MAJOR_VERSION >= 3
12157 "name '%U' is not defined", name);
12159 "name '%.200s' is not defined", PyString_AS_STRING(name));
12166 #if CYTHON_USE_EXC_INFO_STACK
12167 static _PyErr_StackItem *
12168 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
12170 _PyErr_StackItem *exc_info = tstate->exc_info;
12171 while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
12172 exc_info->previous_item != NULL)
12174 exc_info = exc_info->previous_item;
12181 #if CYTHON_FAST_THREAD_STATE
12182 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
12183 #if CYTHON_USE_EXC_INFO_STACK
12184 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
12185 *type = exc_info->exc_type;
12186 *value = exc_info->exc_value;
12187 *tb = exc_info->exc_traceback;
12189 *type = tstate->exc_type;
12190 *value = tstate->exc_value;
12191 *tb = tstate->exc_traceback;
12194 Py_XINCREF(*value);
12197 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
12198 PyObject *tmp_type, *tmp_value, *tmp_tb;
12199 #if CYTHON_USE_EXC_INFO_STACK
12200 _PyErr_StackItem *exc_info = tstate->exc_info;
12201 tmp_type = exc_info->exc_type;
12202 tmp_value = exc_info->exc_value;
12203 tmp_tb = exc_info->exc_traceback;
12204 exc_info->exc_type = type;
12205 exc_info->exc_value = value;
12206 exc_info->exc_traceback = tb;
12208 tmp_type = tstate->exc_type;
12209 tmp_value = tstate->exc_value;
12210 tmp_tb = tstate->exc_traceback;
12211 tstate->exc_type = type;
12212 tstate->exc_value = value;
12213 tstate->exc_traceback = tb;
12215 Py_XDECREF(tmp_type);
12216 Py_XDECREF(tmp_value);
12217 Py_XDECREF(tmp_tb);
12222 #if CYTHON_FAST_THREAD_STATE
12223 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
12225 n = PyTuple_GET_SIZE(tuple);
12226 #if PY_MAJOR_VERSION >= 3
12227 for (i=0; i<
n; i++) {
12228 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
12231 for (i=0; i<
n; i++) {
12232 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i)))
return 1;
12236 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
12237 PyObject *exc_type = tstate->curexc_type;
12238 if (exc_type == err)
return 1;
12239 if (unlikely(!exc_type))
return 0;
12240 if (unlikely(PyTuple_Check(err)))
12241 return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
12242 return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
12247 #if CYTHON_FAST_THREAD_STATE
12248 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
12250 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
12253 PyObject *local_type, *local_value, *local_tb;
12254 #if CYTHON_FAST_THREAD_STATE
12255 PyObject *tmp_type, *tmp_value, *tmp_tb;
12256 local_type = tstate->curexc_type;
12257 local_value = tstate->curexc_value;
12258 local_tb = tstate->curexc_traceback;
12259 tstate->curexc_type = 0;
12260 tstate->curexc_value = 0;
12261 tstate->curexc_traceback = 0;
12263 PyErr_Fetch(&local_type, &local_value, &local_tb);
12265 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
12266 #if CYTHON_FAST_THREAD_STATE
12267 if (unlikely(tstate->curexc_type))
12269 if (unlikely(PyErr_Occurred()))
12272 #if PY_MAJOR_VERSION >= 3
12274 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
12278 Py_XINCREF(local_tb);
12279 Py_XINCREF(local_type);
12280 Py_XINCREF(local_value);
12281 *type = local_type;
12282 *value = local_value;
12284 #if CYTHON_FAST_THREAD_STATE
12285 #if CYTHON_USE_EXC_INFO_STACK
12287 _PyErr_StackItem *exc_info = tstate->exc_info;
12288 tmp_type = exc_info->exc_type;
12289 tmp_value = exc_info->exc_value;
12290 tmp_tb = exc_info->exc_traceback;
12291 exc_info->exc_type = local_type;
12292 exc_info->exc_value = local_value;
12293 exc_info->exc_traceback = local_tb;
12296 tmp_type = tstate->exc_type;
12297 tmp_value = tstate->exc_value;
12298 tmp_tb = tstate->exc_traceback;
12299 tstate->exc_type = local_type;
12300 tstate->exc_value = local_value;
12301 tstate->exc_traceback = local_tb;
12303 Py_XDECREF(tmp_type);
12304 Py_XDECREF(tmp_value);
12305 Py_XDECREF(tmp_tb);
12307 PyErr_SetExcInfo(local_type, local_value, local_tb);
12314 Py_XDECREF(local_type);
12315 Py_XDECREF(local_value);
12316 Py_XDECREF(local_tb);
12321 #if CYTHON_COMPILING_IN_CPYTHON
12322 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
12324 ternaryfunc call = Py_TYPE(func)->tp_call;
12325 if (unlikely(!call))
12326 return PyObject_Call(func, arg, kw);
12327 if (unlikely(Py_EnterRecursiveCall((
char*)
" while calling a Python object")))
12329 result = (*call)(func, arg, kw);
12330 Py_LeaveRecursiveCall();
12331 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
12334 "NULL result without error in PyObject_Call");
12341 #if CYTHON_FAST_THREAD_STATE
12342 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
12343 PyObject *tmp_type, *tmp_value, *tmp_tb;
12344 tmp_type = tstate->curexc_type;
12345 tmp_value = tstate->curexc_value;
12346 tmp_tb = tstate->curexc_traceback;
12347 tstate->curexc_type = type;
12348 tstate->curexc_value = value;
12349 tstate->curexc_traceback = tb;
12350 Py_XDECREF(tmp_type);
12351 Py_XDECREF(tmp_value);
12352 Py_XDECREF(tmp_tb);
12354 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
12355 *type = tstate->curexc_type;
12356 *value = tstate->curexc_value;
12357 *tb = tstate->curexc_traceback;
12358 tstate->curexc_type = 0;
12359 tstate->curexc_value = 0;
12360 tstate->curexc_traceback = 0;
12365 #if PY_MAJOR_VERSION < 3
12366 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
12367 CYTHON_UNUSED PyObject *cause) {
12368 __Pyx_PyThreadState_declare
12370 if (!value || value == Py_None)
12374 if (!tb || tb == Py_None)
12378 if (!PyTraceBack_Check(tb)) {
12379 PyErr_SetString(PyExc_TypeError,
12380 "raise: arg 3 must be a traceback or None");
12384 if (PyType_Check(type)) {
12385 #if CYTHON_COMPILING_IN_PYPY
12387 Py_INCREF(Py_None);
12391 PyErr_NormalizeException(&type, &value, &tb);
12394 PyErr_SetString(PyExc_TypeError,
12395 "instance exception may not have a separate value");
12399 type = (PyObject*) Py_TYPE(type);
12401 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
12402 PyErr_SetString(PyExc_TypeError,
12403 "raise: exception class must be a subclass of BaseException");
12407 __Pyx_PyThreadState_assign
12408 __Pyx_ErrRestore(type, value, tb);
12417 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
12418 PyObject* owned_instance = NULL;
12419 if (tb == Py_None) {
12421 }
else if (tb && !PyTraceBack_Check(tb)) {
12422 PyErr_SetString(PyExc_TypeError,
12423 "raise: arg 3 must be a traceback or None");
12426 if (value == Py_None)
12428 if (PyExceptionInstance_Check(type)) {
12430 PyErr_SetString(PyExc_TypeError,
12431 "instance exception may not have a separate value");
12435 type = (PyObject*) Py_TYPE(value);
12436 }
else if (PyExceptionClass_Check(type)) {
12437 PyObject *instance_class = NULL;
12438 if (value && PyExceptionInstance_Check(value)) {
12439 instance_class = (PyObject*) Py_TYPE(value);
12440 if (instance_class != type) {
12441 int is_subclass = PyObject_IsSubclass(instance_class, type);
12442 if (!is_subclass) {
12443 instance_class = NULL;
12444 }
else if (unlikely(is_subclass == -1)) {
12447 type = instance_class;
12451 if (!instance_class) {
12454 args = PyTuple_New(0);
12455 else if (PyTuple_Check(value)) {
12459 args = PyTuple_Pack(1, value);
12462 owned_instance = PyObject_Call(type, args, NULL);
12464 if (!owned_instance)
12466 value = owned_instance;
12467 if (!PyExceptionInstance_Check(value)) {
12468 PyErr_Format(PyExc_TypeError,
12469 "calling %R should have returned an instance of "
12470 "BaseException, not %R",
12471 type, Py_TYPE(value));
12476 PyErr_SetString(PyExc_TypeError,
12477 "raise: exception class must be a subclass of BaseException");
12481 PyObject *fixed_cause;
12482 if (cause == Py_None) {
12483 fixed_cause = NULL;
12484 }
else if (PyExceptionClass_Check(cause)) {
12485 fixed_cause = PyObject_CallObject(cause, NULL);
12486 if (fixed_cause == NULL)
12488 }
else if (PyExceptionInstance_Check(cause)) {
12489 fixed_cause = cause;
12490 Py_INCREF(fixed_cause);
12492 PyErr_SetString(PyExc_TypeError,
12493 "exception causes must derive from "
12497 PyException_SetCause(value, fixed_cause);
12499 PyErr_SetObject(type, value);
12501 #if CYTHON_COMPILING_IN_PYPY
12502 PyObject *tmp_type, *tmp_value, *tmp_tb;
12503 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
12505 PyErr_Restore(tmp_type, tmp_value, tb);
12506 Py_XDECREF(tmp_tb);
12508 PyThreadState *tstate = __Pyx_PyThreadState_Current;
12509 PyObject* tmp_tb = tstate->curexc_traceback;
12510 if (tb != tmp_tb) {
12512 tstate->curexc_traceback = tb;
12513 Py_XDECREF(tmp_tb);
12518 Py_XDECREF(owned_instance);
12524 #ifndef __PYX_HAVE_RT_ImportType
12525 #define __PYX_HAVE_RT_ImportType
12526 static PyTypeObject *__Pyx_ImportType(PyObject *module,
const char *module_name,
const char *class_name,
12527 size_t size,
enum __Pyx_ImportType_CheckSize check_size)
12529 PyObject *result = 0;
12531 Py_ssize_t basicsize;
12532 #ifdef Py_LIMITED_API
12533 PyObject *py_basicsize;
12535 result = PyObject_GetAttrString(module, class_name);
12538 if (!PyType_Check(result)) {
12539 PyErr_Format(PyExc_TypeError,
12540 "%.200s.%.200s is not a type object",
12541 module_name, class_name);
12544 #ifndef Py_LIMITED_API
12545 basicsize = ((PyTypeObject *)result)->tp_basicsize;
12547 py_basicsize = PyObject_GetAttrString(result,
"__basicsize__");
12550 basicsize = PyLong_AsSsize_t(py_basicsize);
12551 Py_DECREF(py_basicsize);
12553 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
12556 if ((
size_t)basicsize < size) {
12557 PyErr_Format(PyExc_ValueError,
12558 "%.200s.%.200s size changed, may indicate binary incompatibility. "
12559 "Expected %zd from C header, got %zd from PyObject",
12560 module_name, class_name, size, basicsize);
12563 if (check_size == __Pyx_ImportType_CheckSize_Error && (
size_t)basicsize != size) {
12564 PyErr_Format(PyExc_ValueError,
12565 "%.200s.%.200s size changed, may indicate binary incompatibility. "
12566 "Expected %zd from C header, got %zd from PyObject",
12567 module_name, class_name, size, basicsize);
12570 else if (check_size == __Pyx_ImportType_CheckSize_Warn && (
size_t)basicsize > size) {
12571 PyOS_snprintf(warning,
sizeof(warning),
12572 "%s.%s size changed, may indicate binary incompatibility. "
12573 "Expected %zd from C header, got %zd from PyObject",
12574 module_name, class_name, size, basicsize);
12575 if (PyErr_WarnEx(NULL, warning, 0) < 0)
goto bad;
12577 return (PyTypeObject *)result;
12579 Py_XDECREF(result);
12585 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level) {
12586 PyObject *empty_list = 0;
12587 PyObject *module = 0;
12588 PyObject *global_dict = 0;
12589 PyObject *empty_dict = 0;
12591 #if PY_MAJOR_VERSION < 3
12592 PyObject *py_import;
12593 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
12600 empty_list = PyList_New(0);
12605 global_dict = PyModule_GetDict(__pyx_m);
12608 empty_dict = PyDict_New();
12612 #if PY_MAJOR_VERSION >= 3
12614 if ((1) && (strchr(__Pyx_MODULE_NAME,
'.'))) {
12615 module = PyImport_ImportModuleLevelObject(
12616 name, global_dict, empty_dict, list, 1);
12618 if (!PyErr_ExceptionMatches(PyExc_ImportError))
12627 #if PY_MAJOR_VERSION < 3
12628 PyObject *py_level = PyInt_FromLong(level);
12631 module = PyObject_CallFunctionObjArgs(py_import,
12632 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
12633 Py_DECREF(py_level);
12635 module = PyImport_ImportModuleLevelObject(
12636 name, global_dict, empty_dict, list, level);
12641 #if PY_MAJOR_VERSION < 3
12642 Py_XDECREF(py_import);
12644 Py_XDECREF(empty_list);
12645 Py_XDECREF(empty_dict);
12650 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
12651 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
12652 PyObject *dict = Py_TYPE(obj)->tp_dict;
12653 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
12655 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
12656 PyObject **dictptr = NULL;
12657 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
12659 #if CYTHON_COMPILING_IN_CPYTHON
12660 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)obj + offset) : _PyObject_GetDictPtr(obj);
12662 dictptr = _PyObject_GetDictPtr(obj);
12665 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
12667 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
12668 PyObject *dict = Py_TYPE(obj)->tp_dict;
12669 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
12671 return obj_dict_version == __Pyx_get_object_dict_version(obj);
12676 #ifndef CYTHON_CLINE_IN_TRACEBACK
12677 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate,
int c_line) {
12678 PyObject *use_cline;
12679 PyObject *ptype, *pvalue, *ptraceback;
12680 #if CYTHON_COMPILING_IN_CPYTHON
12681 PyObject **cython_runtime_dict;
12683 if (unlikely(!__pyx_cython_runtime)) {
12686 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12687 #if CYTHON_COMPILING_IN_CPYTHON
12688 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
12689 if (likely(cython_runtime_dict)) {
12690 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
12691 use_cline, *cython_runtime_dict,
12692 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
12696 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
12697 if (use_cline_obj) {
12698 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
12699 Py_DECREF(use_cline_obj);
12707 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
12709 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
12712 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12718 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
12719 int start = 0, mid = 0, end = count - 1;
12720 if (end >= 0 && code_line > entries[end].code_line) {
12723 while (start < end) {
12724 mid = start + (end - start) / 2;
12725 if (code_line < entries[mid].code_line) {
12727 }
else if (code_line > entries[mid].code_line) {
12733 if (code_line <= entries[mid].code_line) {
12739 static PyCodeObject *__pyx_find_code_object(
int code_line) {
12740 PyCodeObject* code_object;
12742 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
12745 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
12746 if (unlikely(
pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[
pos].code_line != code_line)) {
12749 code_object = __pyx_code_cache.entries[
pos].code_object;
12750 Py_INCREF(code_object);
12751 return code_object;
12753 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object) {
12755 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
12756 if (unlikely(!code_line)) {
12759 if (unlikely(!entries)) {
12760 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
12761 if (likely(entries)) {
12762 __pyx_code_cache.entries = entries;
12763 __pyx_code_cache.max_count = 64;
12764 __pyx_code_cache.count = 1;
12765 entries[0].code_line = code_line;
12766 entries[0].code_object = code_object;
12767 Py_INCREF(code_object);
12771 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
12772 if ((
pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[
pos].code_line == code_line)) {
12773 PyCodeObject* tmp = entries[
pos].code_object;
12774 entries[
pos].code_object = code_object;
12778 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
12779 int new_max = __pyx_code_cache.max_count + 64;
12780 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
12781 __pyx_code_cache.entries, ((
size_t)new_max) *
sizeof(__Pyx_CodeObjectCacheEntry));
12782 if (unlikely(!entries)) {
12785 __pyx_code_cache.entries = entries;
12786 __pyx_code_cache.max_count = new_max;
12788 for (i=__pyx_code_cache.count; i>
pos; i--) {
12789 entries[i] = entries[i-1];
12791 entries[
pos].code_line = code_line;
12792 entries[
pos].code_object = code_object;
12793 __pyx_code_cache.count++;
12794 Py_INCREF(code_object);
12798 #include "compile.h"
12799 #include "frameobject.h"
12800 #include "traceback.h"
12801 #if PY_VERSION_HEX >= 0x030b00a6
12802 #ifndef Py_BUILD_CORE
12803 #define Py_BUILD_CORE 1
12805 #include "internal/pycore_frame.h"
12807 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
12808 const char *funcname,
int c_line,
12809 int py_line,
const char *filename) {
12810 PyCodeObject *py_code = NULL;
12811 PyObject *py_funcname = NULL;
12812 #if PY_MAJOR_VERSION < 3
12813 PyObject *py_srcfile = NULL;
12814 py_srcfile = PyString_FromString(filename);
12815 if (!py_srcfile)
goto bad;
12818 #if PY_MAJOR_VERSION < 3
12819 py_funcname = PyString_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12820 if (!py_funcname)
goto bad;
12822 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12823 if (!py_funcname)
goto bad;
12824 funcname = PyUnicode_AsUTF8(py_funcname);
12825 if (!funcname)
goto bad;
12829 #if PY_MAJOR_VERSION < 3
12830 py_funcname = PyString_FromString(funcname);
12831 if (!py_funcname)
goto bad;
12834 #if PY_MAJOR_VERSION < 3
12835 py_code = __Pyx_PyCode_New(
12852 Py_DECREF(py_srcfile);
12854 py_code = PyCode_NewEmpty(filename, funcname, py_line);
12856 Py_XDECREF(py_funcname);
12859 Py_XDECREF(py_funcname);
12860 #if PY_MAJOR_VERSION < 3
12861 Py_XDECREF(py_srcfile);
12865 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
12866 int py_line,
const char *filename) {
12867 PyCodeObject *py_code = 0;
12868 PyFrameObject *py_frame = 0;
12869 PyThreadState *tstate = __Pyx_PyThreadState_Current;
12870 PyObject *ptype, *pvalue, *ptraceback;
12872 c_line = __Pyx_CLineForTraceback(tstate, c_line);
12874 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
12876 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12877 py_code = __Pyx_CreateCodeObjectForTraceback(
12878 funcname, c_line, py_line, filename);
12883 Py_XDECREF(pvalue);
12884 Py_XDECREF(ptraceback);
12887 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12888 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
12890 py_frame = PyFrame_New(
12896 if (!py_frame)
goto bad;
12897 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
12898 PyTraceBack_Here(py_frame);
12900 Py_XDECREF(py_code);
12901 Py_XDECREF(py_frame);
12905 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
12906 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
12907 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
12908 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
12909 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
12911 func_type value = func_value;\
12912 if (sizeof(target_type) < sizeof(func_type)) {\
12913 if (unlikely(value != (func_type) (target_type) value)) {\
12914 func_type zero = 0;\
12915 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
12916 return (target_type) -1;\
12917 if (is_unsigned && unlikely(value < zero))\
12918 goto raise_neg_overflow;\
12920 goto raise_overflow;\
12923 return (target_type) value;\
12927 #if CYTHON_CCOMPLEX
12929 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12930 return ::std::complex< float >(x, y);
12933 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12934 return x + y*(__pyx_t_float_complex)_Complex_I;
12938 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
12939 __pyx_t_float_complex
z;
12947 #if CYTHON_CCOMPLEX
12949 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12950 return (a.real == b.real) && (a.imag == b.imag);
12952 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12953 __pyx_t_float_complex
z;
12954 z.real = a.real + b.real;
12955 z.imag = a.imag + b.imag;
12958 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12959 __pyx_t_float_complex
z;
12960 z.real = a.real - b.real;
12961 z.imag = a.imag - b.imag;
12964 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12965 __pyx_t_float_complex
z;
12966 z.real = a.real * b.real - a.imag * b.imag;
12967 z.imag = a.real * b.imag + a.imag * b.real;
12971 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12973 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12974 }
else if (fabsf(b.real) >= fabsf(b.imag)) {
12975 if (b.real == 0 && b.imag == 0) {
12976 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
12978 float r = b.imag / b.real;
12979 float s = (float)(1.0) / (b.real + b.imag *
r);
12980 return __pyx_t_float_complex_from_parts(
12981 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
12984 float r = b.real / b.imag;
12985 float s = (float)(1.0) / (b.imag + b.real *
r);
12986 return __pyx_t_float_complex_from_parts(
12987 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
12991 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12993 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12995 float denom = b.real * b.real + b.imag * b.imag;
12996 return __pyx_t_float_complex_from_parts(
12997 (a.real * b.real + a.imag * b.imag) / denom,
12998 (a.imag * b.real - a.real * b.imag) / denom);
13002 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
13003 __pyx_t_float_complex
z;
13008 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
13009 return (a.real == 0) && (a.imag == 0);
13011 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
13012 __pyx_t_float_complex
z;
13018 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex
z) {
13019 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
13020 return sqrtf(
z.real*
z.real +
z.imag*
z.imag);
13022 return hypotf(
z.real,
z.imag);
13025 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13026 __pyx_t_float_complex
z;
13027 float r, lnr, theta, z_r, z_theta;
13028 if (b.imag == 0 && b.real == (
int)b.real) {
13030 float denom = a.real * a.real + a.imag * a.imag;
13031 a.real = a.real / denom;
13032 a.imag = -a.imag / denom;
13035 switch ((
int)b.real) {
13043 return __Pyx_c_prod_float(a, a);
13045 z = __Pyx_c_prod_float(a, a);
13046 return __Pyx_c_prod_float(
z, a);
13048 z = __Pyx_c_prod_float(a, a);
13049 return __Pyx_c_prod_float(
z,
z);
13055 }
else if (b.imag == 0) {
13056 z.real = powf(a.real, b.real);
13059 }
else if (a.real > 0) {
13064 theta = atan2f(0.0, -1.0);
13067 r = __Pyx_c_abs_float(a);
13068 theta = atan2f(a.imag, a.real);
13071 z_r = expf(lnr * b.real - theta * b.imag);
13072 z_theta = theta * b.real + lnr * b.imag;
13073 z.real = z_r * cosf(z_theta);
13074 z.imag = z_r * sinf(z_theta);
13081 #if CYTHON_CCOMPLEX
13083 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
13084 return ::std::complex< double >(x, y);
13087 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
13088 return x + y*(__pyx_t_double_complex)_Complex_I;
13092 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
13093 __pyx_t_double_complex
z;
13101 #if CYTHON_CCOMPLEX
13103 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13104 return (a.real == b.real) && (a.imag == b.imag);
13106 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13107 __pyx_t_double_complex
z;
13108 z.real = a.real + b.real;
13109 z.imag = a.imag + b.imag;
13112 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13113 __pyx_t_double_complex
z;
13114 z.real = a.real - b.real;
13115 z.imag = a.imag - b.imag;
13118 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13119 __pyx_t_double_complex
z;
13120 z.real = a.real * b.real - a.imag * b.imag;
13121 z.imag = a.real * b.imag + a.imag * b.real;
13125 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13127 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
13128 }
else if (fabs(b.real) >= fabs(b.imag)) {
13129 if (b.real == 0 && b.imag == 0) {
13130 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
13132 double r = b.imag / b.real;
13133 double s = (double)(1.0) / (b.real + b.imag *
r);
13134 return __pyx_t_double_complex_from_parts(
13135 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
13138 double r = b.real / b.imag;
13139 double s = (double)(1.0) / (b.imag + b.real *
r);
13140 return __pyx_t_double_complex_from_parts(
13141 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
13145 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13147 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
13149 double denom = b.real * b.real + b.imag * b.imag;
13150 return __pyx_t_double_complex_from_parts(
13151 (a.real * b.real + a.imag * b.imag) / denom,
13152 (a.imag * b.real - a.real * b.imag) / denom);
13156 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
13157 __pyx_t_double_complex
z;
13162 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
13163 return (a.real == 0) && (a.imag == 0);
13165 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
13166 __pyx_t_double_complex
z;
13172 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex
z) {
13173 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
13174 return sqrt(
z.real*
z.real +
z.imag*
z.imag);
13176 return hypot(
z.real,
z.imag);
13179 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13180 __pyx_t_double_complex
z;
13181 double r, lnr, theta, z_r, z_theta;
13182 if (b.imag == 0 && b.real == (
int)b.real) {
13184 double denom = a.real * a.real + a.imag * a.imag;
13185 a.real = a.real / denom;
13186 a.imag = -a.imag / denom;
13189 switch ((
int)b.real) {
13197 return __Pyx_c_prod_double(a, a);
13199 z = __Pyx_c_prod_double(a, a);
13200 return __Pyx_c_prod_double(
z, a);
13202 z = __Pyx_c_prod_double(a, a);
13203 return __Pyx_c_prod_double(
z,
z);
13209 }
else if (b.imag == 0) {
13210 z.real = pow(a.real, b.real);
13213 }
else if (a.real > 0) {
13218 theta = atan2(0.0, -1.0);
13221 r = __Pyx_c_abs_double(a);
13222 theta = atan2(a.imag, a.real);
13225 z_r = exp(lnr * b.real - theta * b.imag);
13226 z_theta = theta * b.real + lnr * b.imag;
13227 z.real = z_r * cos(z_theta);
13228 z.imag = z_r * sin(z_theta);
13235 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) {
13236 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13237 #pragma GCC diagnostic push
13238 #pragma GCC diagnostic ignored "-Wconversion"
13240 const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0;
13241 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13242 #pragma GCC diagnostic pop
13244 const int is_unsigned = neg_one > const_zero;
13246 if (
sizeof(Py_intptr_t) <
sizeof(long)) {
13247 return PyInt_FromLong((
long) value);
13248 }
else if (
sizeof(Py_intptr_t) <=
sizeof(
unsigned long)) {
13249 return PyLong_FromUnsignedLong((
unsigned long) value);
13250 #ifdef HAVE_LONG_LONG
13251 }
else if (
sizeof(Py_intptr_t) <=
sizeof(
unsigned PY_LONG_LONG)) {
13252 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
13256 if (
sizeof(Py_intptr_t) <=
sizeof(
long)) {
13257 return PyInt_FromLong((
long) value);
13258 #ifdef HAVE_LONG_LONG
13259 }
else if (
sizeof(Py_intptr_t) <=
sizeof(PY_LONG_LONG)) {
13260 return PyLong_FromLongLong((PY_LONG_LONG) value);
13265 int one = 1;
int little = (int)*(
unsigned char *)&one;
13266 unsigned char *bytes = (
unsigned char *)&value;
13267 return _PyLong_FromByteArray(bytes,
sizeof(Py_intptr_t),
13268 little, !is_unsigned);
13273 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *x) {
13274 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13275 #pragma GCC diagnostic push
13276 #pragma GCC diagnostic ignored "-Wconversion"
13278 const int neg_one = (int) -1, const_zero = (
int) 0;
13279 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13280 #pragma GCC diagnostic pop
13282 const int is_unsigned = neg_one > const_zero;
13283 #if PY_MAJOR_VERSION < 3
13284 if (likely(PyInt_Check(x))) {
13285 if (
sizeof(
int) <
sizeof(long)) {
13286 __PYX_VERIFY_RETURN_INT(
int,
long, PyInt_AS_LONG(x))
13288 long val = PyInt_AS_LONG(x);
13289 if (is_unsigned && unlikely(val < 0)) {
13290 goto raise_neg_overflow;
13296 if (likely(PyLong_Check(x))) {
13298 #if CYTHON_USE_PYLONG_INTERNALS
13299 const digit* digits = ((PyLongObject*)x)->ob_digit;
13300 switch (Py_SIZE(x)) {
13301 case 0:
return (
int) 0;
13302 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, digits[0])
13304 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
13305 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
13306 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13307 }
else if (8 *
sizeof(
int) >= 2 * PyLong_SHIFT) {
13308 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
13313 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
13314 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
13315 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13316 }
else if (8 *
sizeof(
int) >= 3 * PyLong_SHIFT) {
13317 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13322 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
13323 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
13324 __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])))
13325 }
else if (8 *
sizeof(
int) >= 4 * PyLong_SHIFT) {
13326 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0]));
13332 #if CYTHON_COMPILING_IN_CPYTHON
13333 if (unlikely(Py_SIZE(x) < 0)) {
13334 goto raise_neg_overflow;
13338 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
13339 if (unlikely(result < 0))
13341 if (unlikely(result == 1))
13342 goto raise_neg_overflow;
13345 if (
sizeof(
int) <=
sizeof(
unsigned long)) {
13346 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
13347 #ifdef HAVE_LONG_LONG
13348 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
13349 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
13353 #if CYTHON_USE_PYLONG_INTERNALS
13354 const digit* digits = ((PyLongObject*)x)->ob_digit;
13355 switch (Py_SIZE(x)) {
13356 case 0:
return (
int) 0;
13357 case -1: __PYX_VERIFY_RETURN_INT(
int, sdigit, (sdigit) (-(sdigit)digits[0]))
13358 case 1: __PYX_VERIFY_RETURN_INT(
int, digit, +digits[0])
13360 if (8 *
sizeof(
int) - 1 > 1 * PyLong_SHIFT) {
13361 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
13362 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13363 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
13364 return (
int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
13369 if (8 *
sizeof(
int) > 1 * PyLong_SHIFT) {
13370 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
13371 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13372 }
else if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
13373 return (
int) ((((((int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
13378 if (8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT) {
13379 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
13380 __PYX_VERIFY_RETURN_INT(
int,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13381 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
13382 return (
int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13387 if (8 *
sizeof(
int) > 2 * PyLong_SHIFT) {
13388 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
13389 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13390 }
else if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
13391 return (
int) ((((((((int)digits[2]) << PyLong_SHIFT) | (
int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13396 if (8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT) {
13397 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
13398 __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])))
13399 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
13400 return (
int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
13405 if (8 *
sizeof(
int) > 3 * PyLong_SHIFT) {
13406 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
13407 __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])))
13408 }
else if (8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT) {
13409 return (
int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (
int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (
int)digits[0])));
13415 if (
sizeof(
int) <=
sizeof(long)) {
13416 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
13417 #ifdef HAVE_LONG_LONG
13418 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
13419 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
13424 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
13425 PyErr_SetString(PyExc_RuntimeError,
13426 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
13429 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
13430 #if PY_MAJOR_VERSION < 3
13431 if (likely(
v) && !PyLong_Check(
v)) {
13433 v = PyNumber_Long(tmp);
13438 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
13439 unsigned char *bytes = (
unsigned char *)&val;
13440 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
13441 bytes,
sizeof(val),
13442 is_little, !is_unsigned);
13452 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
13453 if (!tmp)
return (
int) -1;
13454 val = __Pyx_PyInt_As_int(tmp);
13459 PyErr_SetString(PyExc_OverflowError,
13460 "value too large to convert to int");
13462 raise_neg_overflow:
13463 PyErr_SetString(PyExc_OverflowError,
13464 "can't convert negative value to int");
13469 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value) {
13470 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13471 #pragma GCC diagnostic push
13472 #pragma GCC diagnostic ignored "-Wconversion"
13474 const int neg_one = (int) -1, const_zero = (
int) 0;
13475 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13476 #pragma GCC diagnostic pop
13478 const int is_unsigned = neg_one > const_zero;
13480 if (
sizeof(
int) <
sizeof(long)) {
13481 return PyInt_FromLong((
long) value);
13482 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
13483 return PyLong_FromUnsignedLong((
unsigned long) value);
13484 #ifdef HAVE_LONG_LONG
13485 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
13486 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
13490 if (
sizeof(
int) <=
sizeof(
long)) {
13491 return PyInt_FromLong((
long) value);
13492 #ifdef HAVE_LONG_LONG
13493 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
13494 return PyLong_FromLongLong((PY_LONG_LONG) value);
13499 int one = 1;
int little = (int)*(
unsigned char *)&one;
13500 unsigned char *bytes = (
unsigned char *)&value;
13501 return _PyLong_FromByteArray(bytes,
sizeof(
int),
13502 little, !is_unsigned);
13507 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value) {
13508 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13509 #pragma GCC diagnostic push
13510 #pragma GCC diagnostic ignored "-Wconversion"
13512 const long neg_one = (long) -1, const_zero = (
long) 0;
13513 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13514 #pragma GCC diagnostic pop
13516 const int is_unsigned = neg_one > const_zero;
13518 if (
sizeof(
long) <
sizeof(long)) {
13519 return PyInt_FromLong((
long) value);
13520 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
13521 return PyLong_FromUnsignedLong((
unsigned long) value);
13522 #ifdef HAVE_LONG_LONG
13523 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
13524 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
13528 if (
sizeof(
long) <=
sizeof(
long)) {
13529 return PyInt_FromLong((
long) value);
13530 #ifdef HAVE_LONG_LONG
13531 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
13532 return PyLong_FromLongLong((PY_LONG_LONG) value);
13537 int one = 1;
int little = (int)*(
unsigned char *)&one;
13538 unsigned char *bytes = (
unsigned char *)&value;
13539 return _PyLong_FromByteArray(bytes,
sizeof(
long),
13540 little, !is_unsigned);
13545 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *x) {
13546 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13547 #pragma GCC diagnostic push
13548 #pragma GCC diagnostic ignored "-Wconversion"
13550 const long neg_one = (long) -1, const_zero = (
long) 0;
13551 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13552 #pragma GCC diagnostic pop
13554 const int is_unsigned = neg_one > const_zero;
13555 #if PY_MAJOR_VERSION < 3
13556 if (likely(PyInt_Check(x))) {
13557 if (
sizeof(
long) <
sizeof(long)) {
13558 __PYX_VERIFY_RETURN_INT(
long,
long, PyInt_AS_LONG(x))
13560 long val = PyInt_AS_LONG(x);
13561 if (is_unsigned && unlikely(val < 0)) {
13562 goto raise_neg_overflow;
13568 if (likely(PyLong_Check(x))) {
13570 #if CYTHON_USE_PYLONG_INTERNALS
13571 const digit* digits = ((PyLongObject*)x)->ob_digit;
13572 switch (Py_SIZE(x)) {
13573 case 0:
return (
long) 0;
13574 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, digits[0])
13576 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
13577 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
13578 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13579 }
else if (8 *
sizeof(
long) >= 2 * PyLong_SHIFT) {
13580 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
13585 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
13586 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
13587 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13588 }
else if (8 *
sizeof(
long) >= 3 * PyLong_SHIFT) {
13589 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13594 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
13595 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
13596 __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])))
13597 }
else if (8 *
sizeof(
long) >= 4 * PyLong_SHIFT) {
13598 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0]));
13604 #if CYTHON_COMPILING_IN_CPYTHON
13605 if (unlikely(Py_SIZE(x) < 0)) {
13606 goto raise_neg_overflow;
13610 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
13611 if (unlikely(result < 0))
13613 if (unlikely(result == 1))
13614 goto raise_neg_overflow;
13617 if (
sizeof(
long) <=
sizeof(
unsigned long)) {
13618 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
13619 #ifdef HAVE_LONG_LONG
13620 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
13621 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
13625 #if CYTHON_USE_PYLONG_INTERNALS
13626 const digit* digits = ((PyLongObject*)x)->ob_digit;
13627 switch (Py_SIZE(x)) {
13628 case 0:
return (
long) 0;
13629 case -1: __PYX_VERIFY_RETURN_INT(
long, sdigit, (sdigit) (-(sdigit)digits[0]))
13630 case 1: __PYX_VERIFY_RETURN_INT(
long, digit, +digits[0])
13632 if (8 *
sizeof(
long) - 1 > 1 * PyLong_SHIFT) {
13633 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
13634 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13635 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
13636 return (
long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
13641 if (8 *
sizeof(
long) > 1 * PyLong_SHIFT) {
13642 if (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT) {
13643 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13644 }
else if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
13645 return (
long) ((((((long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
13650 if (8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
13651 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
13652 __PYX_VERIFY_RETURN_INT(
long,
long, -(
long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13653 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
13654 return (
long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13659 if (8 *
sizeof(
long) > 2 * PyLong_SHIFT) {
13660 if (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT) {
13661 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
13662 }
else if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
13663 return (
long) ((((((((long)digits[2]) << PyLong_SHIFT) | (
long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13668 if (8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
13669 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
13670 __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])))
13671 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
13672 return (
long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
13677 if (8 *
sizeof(
long) > 3 * PyLong_SHIFT) {
13678 if (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT) {
13679 __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])))
13680 }
else if (8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
13681 return (
long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (
long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (
long)digits[0])));
13687 if (
sizeof(
long) <=
sizeof(long)) {
13688 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
13689 #ifdef HAVE_LONG_LONG
13690 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
13691 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
13696 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
13697 PyErr_SetString(PyExc_RuntimeError,
13698 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
13701 PyObject *
v = __Pyx_PyNumber_IntOrLong(x);
13702 #if PY_MAJOR_VERSION < 3
13703 if (likely(
v) && !PyLong_Check(
v)) {
13705 v = PyNumber_Long(tmp);
13710 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
13711 unsigned char *bytes = (
unsigned char *)&val;
13712 int ret = _PyLong_AsByteArray((PyLongObject *)
v,
13713 bytes,
sizeof(val),
13714 is_little, !is_unsigned);
13724 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
13725 if (!tmp)
return (
long) -1;
13726 val = __Pyx_PyInt_As_long(tmp);
13731 PyErr_SetString(PyExc_OverflowError,
13732 "value too large to convert to long");
13734 raise_neg_overflow:
13735 PyErr_SetString(PyExc_OverflowError,
13736 "can't convert negative value to long");
13741 #if CYTHON_COMPILING_IN_CPYTHON
13742 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
13748 return b == &PyBaseObject_Type;
13750 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
13752 if (a == b)
return 1;
13756 n = PyTuple_GET_SIZE(mro);
13757 for (i = 0; i <
n; i++) {
13758 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
13763 return __Pyx_InBases(a, b);
13765 #if PY_MAJOR_VERSION == 2
13766 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
13767 PyObject *exception, *value, *tb;
13769 __Pyx_PyThreadState_declare
13770 __Pyx_PyThreadState_assign
13771 __Pyx_ErrFetch(&exception, &value, &tb);
13772 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
13773 if (unlikely(res == -1)) {
13774 PyErr_WriteUnraisable(err);
13778 res = PyObject_IsSubclass(err, exc_type2);
13779 if (unlikely(res == -1)) {
13780 PyErr_WriteUnraisable(err);
13784 __Pyx_ErrRestore(exception, value, tb);
13788 static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
13789 int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
13791 res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
13796 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
13798 assert(PyExceptionClass_Check(exc_type));
13799 n = PyTuple_GET_SIZE(tuple);
13800 #if PY_MAJOR_VERSION >= 3
13801 for (i=0; i<
n; i++) {
13802 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
13805 for (i=0; i<
n; i++) {
13806 PyObject *t = PyTuple_GET_ITEM(tuple, i);
13807 #if PY_MAJOR_VERSION < 3
13808 if (likely(exc_type == t))
return 1;
13810 if (likely(PyExceptionClass_Check(t))) {
13811 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t))
return 1;
13817 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
13818 if (likely(err == exc_type))
return 1;
13819 if (likely(PyExceptionClass_Check(err))) {
13820 if (likely(PyExceptionClass_Check(exc_type))) {
13821 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
13822 }
else if (likely(PyTuple_Check(exc_type))) {
13823 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
13827 return PyErr_GivenExceptionMatches(err, exc_type);
13829 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
13830 assert(PyExceptionClass_Check(exc_type1));
13831 assert(PyExceptionClass_Check(exc_type2));
13832 if (likely(err == exc_type1 || err == exc_type2))
return 1;
13833 if (likely(PyExceptionClass_Check(err))) {
13834 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
13836 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
13841 static int __Pyx_check_binary_version(
void) {
13843 int same=1, i, found_dot;
13844 const char* rt_from_call = Py_GetVersion();
13845 PyOS_snprintf(ctversion, 5,
"%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
13847 for (i = 0; i < 4; i++) {
13848 if (!ctversion[i]) {
13849 same = (rt_from_call[i] <
'0' || rt_from_call[i] >
'9');
13852 if (rt_from_call[i] != ctversion[i]) {
13858 char rtversion[5] = {
'\0'};
13860 for (i=0; i<4; ++i) {
13861 if (rt_from_call[i] ==
'.') {
13862 if (found_dot)
break;
13864 }
else if (rt_from_call[i] <
'0' || rt_from_call[i] >
'9') {
13867 rtversion[i] = rt_from_call[i];
13869 PyOS_snprintf(message,
sizeof(message),
13870 "compiletime version %s of module '%.100s' "
13871 "does not match runtime version %s",
13872 ctversion, __Pyx_MODULE_NAME, rtversion);
13873 return PyErr_WarnEx(NULL, message, 1);
13879 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
13881 #if PY_MAJOR_VERSION < 3
13882 if (t->is_unicode) {
13883 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
13884 }
else if (t->intern) {
13885 *t->p = PyString_InternFromString(t->s);
13887 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
13890 if (t->is_unicode | t->is_str) {
13892 *t->p = PyUnicode_InternFromString(t->s);
13893 }
else if (t->encoding) {
13894 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
13896 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
13899 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
13904 if (PyObject_Hash(*t->p) == -1)
13911 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
13912 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
13914 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
13916 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
13918 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
13919 #if !CYTHON_PEP393_ENABLED
13920 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13922 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
13923 if (!defenc)
return NULL;
13924 defenc_c = PyBytes_AS_STRING(defenc);
13925 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13927 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
13929 for (
c = defenc_c;
c < end;
c++) {
13930 if ((
unsigned char) (*
c) >= 128) {
13931 PyUnicode_AsASCIIString(o);
13937 *length = PyBytes_GET_SIZE(defenc);
13941 static CYTHON_INLINE
const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13942 if (unlikely(__Pyx_PyUnicode_READY(o) == -1))
return NULL;
13943 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13944 if (likely(PyUnicode_IS_ASCII(o))) {
13945 *length = PyUnicode_GET_LENGTH(o);
13946 return PyUnicode_AsUTF8(o);
13948 PyUnicode_AsASCIIString(o);
13952 return PyUnicode_AsUTF8AndSize(o, length);
13957 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13958 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
13960 #
if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13961 __Pyx_sys_getdefaultencoding_not_ascii &&
13963 PyUnicode_Check(o)) {
13964 return __Pyx_PyUnicode_AsStringAndSize(o, length);
13967 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
13968 if (PyByteArray_Check(o)) {
13969 *length = PyByteArray_GET_SIZE(o);
13970 return PyByteArray_AS_STRING(o);
13975 int r = PyBytes_AsStringAndSize(o, &result, length);
13976 if (unlikely(
r < 0)) {
13983 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
13984 int is_true = x == Py_True;
13985 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
13986 else return PyObject_IsTrue(x);
13988 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
13990 if (unlikely(!x))
return -1;
13991 retval = __Pyx_PyObject_IsTrue(x);
13995 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result,
const char* type_name) {
13996 #if PY_MAJOR_VERSION >= 3
13997 if (PyLong_Check(result)) {
13998 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
13999 "__int__ returned non-int (type %.200s). "
14000 "The ability to return an instance of a strict subclass of int "
14001 "is deprecated, and may be removed in a future version of Python.",
14002 Py_TYPE(result)->tp_name)) {
14009 PyErr_Format(PyExc_TypeError,
14010 "__%.4s__ returned non-%.4s (type %.200s)",
14011 type_name, type_name, Py_TYPE(result)->tp_name);
14015 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
14016 #if CYTHON_USE_TYPE_SLOTS
14017 PyNumberMethods *m;
14019 const char *name = NULL;
14020 PyObject *res = NULL;
14021 #if PY_MAJOR_VERSION < 3
14022 if (likely(PyInt_Check(x) || PyLong_Check(x)))
14024 if (likely(PyLong_Check(x)))
14026 return __Pyx_NewRef(x);
14027 #if CYTHON_USE_TYPE_SLOTS
14028 m = Py_TYPE(x)->tp_as_number;
14029 #if PY_MAJOR_VERSION < 3
14030 if (m && m->nb_int) {
14032 res = m->nb_int(x);
14034 else if (m && m->nb_long) {
14036 res = m->nb_long(x);
14039 if (likely(m && m->nb_int)) {
14041 res = m->nb_int(x);
14045 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
14046 res = PyNumber_Int(x);
14050 #if PY_MAJOR_VERSION < 3
14051 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
14053 if (unlikely(!PyLong_CheckExact(res))) {
14055 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
14058 else if (!PyErr_Occurred()) {
14059 PyErr_SetString(PyExc_TypeError,
14060 "an integer is required");
14064 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
14067 #if PY_MAJOR_VERSION < 3
14068 if (likely(PyInt_CheckExact(b))) {
14069 if (
sizeof(Py_ssize_t) >=
sizeof(
long))
14070 return PyInt_AS_LONG(b);
14072 return PyInt_AsSsize_t(b);
14075 if (likely(PyLong_CheckExact(b))) {
14076 #if CYTHON_USE_PYLONG_INTERNALS
14077 const digit* digits = ((PyLongObject*)b)->ob_digit;
14078 const Py_ssize_t size = Py_SIZE(b);
14079 if (likely(__Pyx_sst_abs(size) <= 1)) {
14080 ival = likely(size) ? digits[0] : 0;
14081 if (size == -1) ival = -ival;
14086 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
14087 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
14091 if (8 *
sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
14092 return -(Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14096 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
14097 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14101 if (8 *
sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
14102 return -(Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
14106 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
14107 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]));
14111 if (8 *
sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
14112 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]));
14118 return PyLong_AsSsize_t(b);
14120 x = PyNumber_Index(b);
14122 ival = PyInt_AsSsize_t(x);
14126 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
14127 if (
sizeof(Py_hash_t) ==
sizeof(Py_ssize_t)) {
14128 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
14129 #if PY_MAJOR_VERSION < 3
14130 }
else if (likely(PyInt_CheckExact(o))) {
14131 return PyInt_AS_LONG(o);
14136 x = PyNumber_Index(o);
14138 ival = PyInt_AsLong(x);
14143 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
14144 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
14146 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t ival) {
14147 return PyInt_FromSize_t(ival);