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
307 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
309 #ifndef CYTHON_INLINE
310 #if defined(__clang__)
311 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
313 #define CYTHON_INLINE inline
317 void __Pyx_call_destructor(
T& x) {
321 class __Pyx_FakeReference {
323 __Pyx_FakeReference() : ptr(NULL) { }
324 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<
T*>(&ref)) { }
325 T *operator->() {
return ptr; }
326 T *operator&() {
return ptr; }
327 operator T&() {
return *ptr; }
328 template<
typename U>
bool operator ==(
U other) {
return *ptr == other; }
329 template<
typename U>
bool operator !=(
U other) {
return *ptr != other; }
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335 #define Py_OptimizeFlag 0
337 #define __PYX_BUILD_PY_SSIZE_T "n"
338 #define CYTHON_FORMAT_SSIZE_T "z"
339 #if PY_MAJOR_VERSION < 3
340 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
341 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
342 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
343 #define __Pyx_DefaultClassType PyClass_Type
345 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
346 #define __Pyx_DefaultClassType PyType_Type
347 #if PY_VERSION_HEX >= 0x030B00A1
348 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(
int a,
int k,
int l,
int s,
int f,
349 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
350 PyObject *fv, PyObject *cell, PyObject* fn,
351 PyObject *name,
int fline, PyObject *lnos) {
352 PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
353 PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
354 const char *fn_cstr=NULL;
355 const char *name_cstr=NULL;
356 PyCodeObject* co=NULL;
357 PyObject *type, *value, *traceback;
358 PyErr_Fetch(&type, &value, &traceback);
359 if (!(kwds=PyDict_New()))
goto end;
360 if (!(argcount=PyLong_FromLong(a)))
goto end;
361 if (PyDict_SetItemString(kwds,
"co_argcount", argcount) != 0)
goto end;
362 if (!(posonlyargcount=PyLong_FromLong(0)))
goto end;
363 if (PyDict_SetItemString(kwds,
"co_posonlyargcount", posonlyargcount) != 0)
goto end;
364 if (!(kwonlyargcount=PyLong_FromLong(k)))
goto end;
365 if (PyDict_SetItemString(kwds,
"co_kwonlyargcount", kwonlyargcount) != 0)
goto end;
366 if (!(nlocals=PyLong_FromLong(l)))
goto end;
367 if (PyDict_SetItemString(kwds,
"co_nlocals", nlocals) != 0)
goto end;
368 if (!(stacksize=PyLong_FromLong(
s)))
goto end;
369 if (PyDict_SetItemString(kwds,
"co_stacksize", stacksize) != 0)
goto end;
370 if (!(flags=PyLong_FromLong(
f)))
goto end;
371 if (PyDict_SetItemString(kwds,
"co_flags", flags) != 0)
goto end;
372 if (PyDict_SetItemString(kwds,
"co_code", code) != 0)
goto end;
373 if (PyDict_SetItemString(kwds,
"co_consts",
c) != 0)
goto end;
374 if (PyDict_SetItemString(kwds,
"co_names",
n) != 0)
goto end;
375 if (PyDict_SetItemString(kwds,
"co_varnames",
v) != 0)
goto end;
376 if (PyDict_SetItemString(kwds,
"co_freevars", fv) != 0)
goto end;
377 if (PyDict_SetItemString(kwds,
"co_cellvars", cell) != 0)
goto end;
378 if (PyDict_SetItemString(kwds,
"co_linetable", lnos) != 0)
goto end;
379 if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL)))
goto end;
380 if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL)))
goto end;
381 if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline)))
goto end;
382 if (!(replace = PyObject_GetAttrString((PyObject*)co,
"replace")))
goto cleanup_code_too;
383 if (!(empty = PyTuple_New(0)))
goto cleanup_code_too;
384 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
385 Py_XDECREF((PyObject*)co);
386 co = (PyCodeObject*)call_result;
390 Py_XDECREF((PyObject*)co);
395 Py_XDECREF(argcount);
396 Py_XDECREF(posonlyargcount);
397 Py_XDECREF(kwonlyargcount);
399 Py_XDECREF(stacksize);
401 Py_XDECREF(call_result);
404 PyErr_Restore(type, value, traceback);
409 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
410 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
412 #define __Pyx_DefaultClassType PyType_Type
414 #ifndef Py_TPFLAGS_CHECKTYPES
415 #define Py_TPFLAGS_CHECKTYPES 0
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418 #define Py_TPFLAGS_HAVE_INDEX 0
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424 #define Py_TPFLAGS_HAVE_FINALIZE 0
426 #ifndef METH_STACKLESS
427 #define METH_STACKLESS 0
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430 #ifndef METH_FASTCALL
431 #define METH_FASTCALL 0x80
433 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *
self, PyObject *
const *args, Py_ssize_t nargs);
434 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *
self, PyObject *
const *args,
435 Py_ssize_t nargs, PyObject *kwnames);
437 #define __Pyx_PyCFunctionFast _PyCFunctionFast
438 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
440 #if CYTHON_FAST_PYCCALL
441 #define __Pyx_PyFastCFunction_Check(func)\
442 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
444 #define __Pyx_PyFastCFunction_Check(func) 0
446 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
447 #define PyObject_Malloc(s) PyMem_Malloc(s)
448 #define PyObject_Free(p) PyMem_Free(p)
449 #define PyObject_Realloc(p) PyMem_Realloc(p)
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
452 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
453 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
454 #define PyMem_RawFree(p) PyMem_Free(p)
456 #if CYTHON_COMPILING_IN_PYSTON
457 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
458 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
460 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
463 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
464 #define __Pyx_PyThreadState_Current PyThreadState_GET()
465 #elif PY_VERSION_HEX >= 0x03060000
466 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
467 #elif PY_VERSION_HEX >= 0x03000000
468 #define __Pyx_PyThreadState_Current PyThreadState_GET()
470 #define __Pyx_PyThreadState_Current _PyThreadState_Current
472 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
473 #include "pythread.h"
474 #define Py_tss_NEEDS_INIT 0
475 typedef int Py_tss_t;
476 static CYTHON_INLINE
int PyThread_tss_create(Py_tss_t *key) {
477 *key = PyThread_create_key();
480 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(
void) {
481 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(
sizeof(Py_tss_t));
482 *key = Py_tss_NEEDS_INIT;
485 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
488 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
489 return *key != Py_tss_NEEDS_INIT;
491 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
492 PyThread_delete_key(*key);
493 *key = Py_tss_NEEDS_INIT;
495 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
496 return PyThread_set_key_value(*key, value);
498 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
499 return PyThread_get_key_value(*key);
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
507 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
508 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
509 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
511 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
514 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
515 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
519 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
520 #define CYTHON_PEP393_ENABLED 1
521 #if defined(PyUnicode_IS_READY)
522 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
523 0 : _PyUnicode_Ready((PyObject *)(op)))
525 #define __Pyx_PyUnicode_READY(op) (0)
527 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
528 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
529 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
530 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
531 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
532 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
533 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
534 #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
535 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
536 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
538 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
541 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
544 #define CYTHON_PEP393_ENABLED 0
545 #define PyUnicode_1BYTE_KIND 1
546 #define PyUnicode_2BYTE_KIND 2
547 #define PyUnicode_4BYTE_KIND 4
548 #define __Pyx_PyUnicode_READY(op) (0)
549 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
550 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
551 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
552 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
553 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
554 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
555 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
556 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
558 #if CYTHON_COMPILING_IN_PYPY
559 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
560 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
562 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
563 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
564 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
575 #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))
576 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
577 #if PY_MAJOR_VERSION >= 3
578 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
580 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583 #define PyObject_ASCII(o) PyObject_Repr(o)
585 #if PY_MAJOR_VERSION >= 3
586 #define PyBaseString_Type PyUnicode_Type
587 #define PyStringObject PyUnicodeObject
588 #define PyString_Type PyUnicode_Type
589 #define PyString_Check PyUnicode_Check
590 #define PyString_CheckExact PyUnicode_CheckExact
591 #ifndef PyObject_Unicode
592 #define PyObject_Unicode PyObject_Str
595 #if PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
599 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
602 #ifndef PySet_CheckExact
603 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
605 #if PY_VERSION_HEX >= 0x030900A4
606 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
607 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
609 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
612 #if CYTHON_ASSUME_SAFE_MACROS
613 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
615 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
617 #if PY_MAJOR_VERSION >= 3
618 #define PyIntObject PyLongObject
619 #define PyInt_Type PyLong_Type
620 #define PyInt_Check(op) PyLong_Check(op)
621 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
622 #define PyInt_FromString PyLong_FromString
623 #define PyInt_FromUnicode PyLong_FromUnicode
624 #define PyInt_FromLong PyLong_FromLong
625 #define PyInt_FromSize_t PyLong_FromSize_t
626 #define PyInt_FromSsize_t PyLong_FromSsize_t
627 #define PyInt_AsLong PyLong_AsLong
628 #define PyInt_AS_LONG PyLong_AS_LONG
629 #define PyInt_AsSsize_t PyLong_AsSsize_t
630 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
631 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
632 #define PyNumber_Int PyNumber_Long
634 #if PY_MAJOR_VERSION >= 3
635 #define PyBoolObject PyLongObject
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638 #ifndef PyUnicode_InternFromString
639 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
642 #if PY_VERSION_HEX < 0x030200A4
643 typedef long Py_hash_t;
644 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
645 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
647 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
650 #if PY_MAJOR_VERSION >= 3
651 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
653 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
655 #if CYTHON_USE_ASYNC_SLOTS
656 #if PY_VERSION_HEX >= 0x030500B1
657 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
658 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
660 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
663 #define __Pyx_PyType_AsAsync(obj) NULL
665 #ifndef __Pyx_PyAsyncMethodsStruct
670 } __Pyx_PyAsyncMethodsStruct;
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674 #if !defined(_USE_MATH_DEFINES)
675 #define _USE_MATH_DEFINES
680 #define __PYX_NAN() ((float) NAN)
682 static CYTHON_INLINE
float __PYX_NAN() {
684 memset(&value, 0xFF,
sizeof(value));
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
691 #define __Pyx_truncl truncl
694 #define __PYX_MARK_ERR_POS(f_index, lineno) \
695 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
696 #define __PYX_ERR(f_index, lineno, Ln_error) \
697 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
699 #ifndef __PYX_EXTERN_C
701 #define __PYX_EXTERN_C extern "C"
703 #define __PYX_EXTERN_C extern
707 #define __PYX_HAVE__BoundaryConditions
708 #define __PYX_HAVE_API__BoundaryConditions
712 #include "numpy/arrayobject.h"
713 #include "numpy/ndarrayobject.h"
714 #include "numpy/ndarraytypes.h"
715 #include "numpy/arrayscalars.h"
716 #include "numpy/ufuncobject.h"
720 #include "pythread.h"
727 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
728 #define CYTHON_WITHOUT_ASSERTIONS
731 typedef struct {PyObject **p;
const char *
s;
const Py_ssize_t
n;
const char* encoding;
732 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
734 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
736 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
737 #define __PYX_DEFAULT_STRING_ENCODING ""
738 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
739 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
740 #define __Pyx_uchar_cast(c) ((unsigned char)c)
741 #define __Pyx_long_cast(x) ((long)x)
742 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
743 (sizeof(type) < sizeof(Py_ssize_t)) ||\
744 (sizeof(type) > sizeof(Py_ssize_t) &&\
745 likely(v < (type)PY_SSIZE_T_MAX ||\
746 v == (type)PY_SSIZE_T_MAX) &&\
747 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
748 v == (type)PY_SSIZE_T_MIN))) ||\
749 (sizeof(type) == sizeof(Py_ssize_t) &&\
750 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
751 v == (type)PY_SSIZE_T_MAX))) )
752 static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
753 return (
size_t) i < (size_t) limit;
755 #if defined (__cplusplus) && __cplusplus >= 201103L
757 #define __Pyx_sst_abs(value) std::abs(value)
758 #elif SIZEOF_INT >= SIZEOF_SIZE_T
759 #define __Pyx_sst_abs(value) abs(value)
760 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
761 #define __Pyx_sst_abs(value) labs(value)
762 #elif defined (_MSC_VER)
763 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
764 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
765 #define __Pyx_sst_abs(value) llabs(value)
766 #elif defined (__GNUC__)
767 #define __Pyx_sst_abs(value) __builtin_llabs(value)
769 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
771 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
772 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
773 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
774 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
775 #define __Pyx_PyBytes_FromString PyBytes_FromString
776 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
777 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
778 #if PY_MAJOR_VERSION < 3
779 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
780 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
782 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
783 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
785 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
786 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
792 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
797 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
798 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
799 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
800 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
801 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *
u) {
802 const Py_UNICODE *u_end =
u;
804 return (
size_t)(u_end -
u - 1);
806 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
807 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
808 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
809 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
810 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
811 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
812 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
813 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
814 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
815 #define __Pyx_PySequence_Tuple(obj)\
816 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
817 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
818 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
819 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
820 #if CYTHON_ASSUME_SAFE_MACROS
821 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
823 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
825 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
826 #if PY_MAJOR_VERSION >= 3
827 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
829 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
831 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
832 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
833 static int __Pyx_sys_getdefaultencoding_not_ascii;
834 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
836 PyObject* default_encoding = NULL;
837 PyObject* ascii_chars_u = NULL;
838 PyObject* ascii_chars_b = NULL;
839 const char* default_encoding_c;
840 sys = PyImport_ImportModule(
"sys");
842 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
844 if (!default_encoding)
goto bad;
845 default_encoding_c = PyBytes_AsString(default_encoding);
846 if (!default_encoding_c)
goto bad;
847 if (strcmp(default_encoding_c,
"ascii") == 0) {
848 __Pyx_sys_getdefaultencoding_not_ascii = 0;
850 char ascii_chars[128];
852 for (
c = 0;
c < 128;
c++) {
855 __Pyx_sys_getdefaultencoding_not_ascii = 1;
856 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
857 if (!ascii_chars_u)
goto bad;
858 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
859 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
862 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
866 Py_DECREF(ascii_chars_u);
867 Py_DECREF(ascii_chars_b);
869 Py_DECREF(default_encoding);
872 Py_XDECREF(default_encoding);
873 Py_XDECREF(ascii_chars_u);
874 Py_XDECREF(ascii_chars_b);
878 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
879 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
881 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
882 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
883 static char* __PYX_DEFAULT_STRING_ENCODING;
884 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
886 PyObject* default_encoding = NULL;
887 char* default_encoding_c;
888 sys = PyImport_ImportModule(
"sys");
890 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
892 if (!default_encoding)
goto bad;
893 default_encoding_c = PyBytes_AsString(default_encoding);
894 if (!default_encoding_c)
goto bad;
895 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c) + 1);
896 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
897 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
898 Py_DECREF(default_encoding);
901 Py_XDECREF(default_encoding);
909 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
910 #define likely(x) __builtin_expect(!!(x), 1)
911 #define unlikely(x) __builtin_expect(!!(x), 0)
913 #define likely(x) (x)
914 #define unlikely(x) (x)
916 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
918 static PyObject *__pyx_m = NULL;
919 static PyObject *__pyx_d;
920 static PyObject *__pyx_b;
921 static PyObject *__pyx_cython_runtime = NULL;
922 static PyObject *__pyx_empty_tuple;
923 static PyObject *__pyx_empty_bytes;
924 static PyObject *__pyx_empty_unicode;
925 static int __pyx_lineno;
926 static int __pyx_clineno = 0;
927 static const char * __pyx_cfilenm= __FILE__;
928 static const char *__pyx_filename;
931 #if !defined(CYTHON_CCOMPLEX)
932 #if defined(__cplusplus)
933 #define CYTHON_CCOMPLEX 1
934 #elif defined(_Complex_I)
935 #define CYTHON_CCOMPLEX 1
937 #define CYTHON_CCOMPLEX 0
947 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
949 #define _Complex_I 1.0fj
953 static const char *__pyx_f[] = {
954 "proteus/BoundaryConditions.py",
956 "proteus/BoundaryConditions.pxd",
961 struct __pyx_memoryview_obj;
963 struct __pyx_memoryview_obj *memview;
966 Py_ssize_t strides[8];
967 Py_ssize_t suboffsets[8];
968 } __Pyx_memviewslice;
969 #define __Pyx_MemoryView_Len(m) (m.shape[0])
972 #include <pythread.h>
973 #ifndef CYTHON_ATOMICS
974 #define CYTHON_ATOMICS 1
976 #define __pyx_atomic_int_type int
977 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
978 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
980 #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
981 #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
982 #ifdef __PYX_DEBUG_ATOMICS
983 #warning "Using GNU atomics"
985 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
987 #undef __pyx_atomic_int_type
988 #define __pyx_atomic_int_type LONG
989 #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
990 #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
991 #ifdef __PYX_DEBUG_ATOMICS
992 #pragma message ("Using MSVC atomics")
994 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
995 #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
996 #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
997 #ifdef __PYX_DEBUG_ATOMICS
998 #warning "Using Intel atomics"
1001 #undef CYTHON_ATOMICS
1002 #define CYTHON_ATOMICS 0
1003 #ifdef __PYX_DEBUG_ATOMICS
1004 #warning "Not using atomics"
1007 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1009 #define __pyx_add_acquisition_count(memview)\
1010 __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1011 #define __pyx_sub_acquisition_count(memview)\
1012 __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1014 #define __pyx_add_acquisition_count(memview)\
1015 __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1016 #define __pyx_sub_acquisition_count(memview)\
1017 __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1021 #ifndef __PYX_FORCE_INIT_THREADS
1022 #define __PYX_FORCE_INIT_THREADS 0
1026 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1027 #define __Pyx_PyGILState_Release PyGILState_Release
1028 #define __Pyx_FastGIL_Remember()
1029 #define __Pyx_FastGIL_Forget()
1030 #define __Pyx_FastGilFuncInit()
1033 #define IS_UNSIGNED(type) (((type) -1) > 0)
1034 struct __Pyx_StructField_;
1035 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1038 struct __Pyx_StructField_* fields;
1040 size_t arraysize[8];
1046 typedef struct __Pyx_StructField_ {
1047 __Pyx_TypeInfo* type;
1050 } __Pyx_StructField;
1052 __Pyx_StructField* field;
1053 size_t parent_offset;
1054 } __Pyx_BufFmt_StackElem;
1056 __Pyx_StructField root;
1057 __Pyx_BufFmt_StackElem* head;
1059 size_t new_count, enc_count;
1060 size_t struct_alignment;
1065 char is_valid_array;
1066 } __Pyx_BufFmt_Context;
1076 typedef npy_int8 __pyx_t_5numpy_int8_t;
1085 typedef npy_int16 __pyx_t_5numpy_int16_t;
1094 typedef npy_int32 __pyx_t_5numpy_int32_t;
1103 typedef npy_int64 __pyx_t_5numpy_int64_t;
1112 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1121 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1130 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1139 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1148 typedef npy_float32 __pyx_t_5numpy_float32_t;
1157 typedef npy_float64 __pyx_t_5numpy_float64_t;
1166 typedef npy_long __pyx_t_5numpy_int_t;
1175 typedef npy_longlong __pyx_t_5numpy_long_t;
1184 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1193 typedef npy_ulong __pyx_t_5numpy_uint_t;
1202 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1211 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1220 typedef npy_intp __pyx_t_5numpy_intp_t;
1229 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1238 typedef npy_double __pyx_t_5numpy_float_t;
1247 typedef npy_double __pyx_t_5numpy_double_t;
1256 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1260 typedef ::std::complex< float > __pyx_t_float_complex;
1262 typedef float _Complex __pyx_t_float_complex;
1265 typedef struct {
float real, imag; } __pyx_t_float_complex;
1267 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1272 typedef ::std::complex< double > __pyx_t_double_complex;
1274 typedef double _Complex __pyx_t_double_complex;
1277 typedef struct {
double real, imag; } __pyx_t_double_complex;
1279 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1283 struct __pyx_obj_18BoundaryConditions_BC_Base;
1284 struct __pyx_obj_18BoundaryConditions_BoundaryCondition;
1285 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC;
1286 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC;
1287 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp;
1288 struct __pyx_array_obj;
1289 struct __pyx_MemviewEnum_obj;
1290 struct __pyx_memoryview_obj;
1291 struct __pyx_memoryviewslice_obj;
1300 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1309 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1318 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1327 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1328 struct __pyx_defaults;
1329 typedef struct __pyx_defaults __pyx_defaults;
1330 struct __pyx_defaults1;
1331 typedef struct __pyx_defaults1 __pyx_defaults1;
1332 struct __pyx_defaults2;
1333 typedef struct __pyx_defaults2 __pyx_defaults2;
1342 typedef double (*__pyx_t_18BoundaryConditions_cpp_uOfXT)(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *, __Pyx_memviewslice, double);
1343 struct __pyx_defaults {
1344 PyObject *__pyx_arg_n;
1346 struct __pyx_defaults1 {
1347 PyObject *__pyx_arg_n;
1349 struct __pyx_defaults2 {
1350 PyObject *__pyx_arg_n;
1360 struct __pyx_obj_18BoundaryConditions_BC_Base {
1362 __Pyx_memviewslice _b_or;
1378 struct __pyx_obj_18BoundaryConditions_BoundaryCondition {
1380 struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtab;
1381 __pyx_t_18BoundaryConditions_cpp_uOfXT uuOfXT;
1393 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC {
1395 PyObject *__pyx_v_value;
1406 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC {
1408 PyObject *__pyx_v_a;
1409 PyObject *__pyx_v_a0;
1420 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp {
1422 PyObject *__pyx_v_t1;
1423 PyObject *__pyx_v_value;
1434 struct __pyx_array_obj {
1436 struct __pyx_vtabstruct_array *__pyx_vtab;
1442 Py_ssize_t *_strides;
1443 Py_ssize_t itemsize;
1446 void (*callback_free_data)(
void *);
1448 int dtype_is_object;
1459 struct __pyx_MemviewEnum_obj {
1472 struct __pyx_memoryview_obj {
1474 struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1477 PyObject *_array_interface;
1478 PyThread_type_lock lock;
1479 __pyx_atomic_int acquisition_count[2];
1480 __pyx_atomic_int *acquisition_count_aligned_p;
1483 int dtype_is_object;
1484 __Pyx_TypeInfo *typeinfo;
1495 struct __pyx_memoryviewslice_obj {
1496 struct __pyx_memoryview_obj __pyx_base;
1497 __Pyx_memviewslice from_slice;
1498 PyObject *from_object;
1499 PyObject *(*to_object_func)(
char *);
1500 int (*to_dtype_func)(
char *, PyObject *);
1513 struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition {
1514 void (*resetBC)(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *,
int __pyx_skip_dispatch);
1516 static struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtabptr_18BoundaryConditions_BoundaryCondition;
1527 struct __pyx_vtabstruct_array {
1528 PyObject *(*get_memview)(
struct __pyx_array_obj *);
1530 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1541 struct __pyx_vtabstruct_memoryview {
1542 char *(*get_item_pointer)(
struct __pyx_memoryview_obj *, PyObject *);
1543 PyObject *(*is_slice)(
struct __pyx_memoryview_obj *, PyObject *);
1544 PyObject *(*setitem_slice_assignment)(
struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1545 PyObject *(*setitem_slice_assign_scalar)(
struct __pyx_memoryview_obj *,
struct __pyx_memoryview_obj *, PyObject *);
1546 PyObject *(*setitem_indexed)(
struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1547 PyObject *(*convert_item_to_object)(
struct __pyx_memoryview_obj *,
char *);
1548 PyObject *(*assign_item_from_object)(
struct __pyx_memoryview_obj *,
char *, PyObject *);
1550 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1561 struct __pyx_vtabstruct__memoryviewslice {
1562 struct __pyx_vtabstruct_memoryview __pyx_base;
1564 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1568 #ifndef CYTHON_REFNANNY
1569 #define CYTHON_REFNANNY 0
1573 void (*INCREF)(
void*, PyObject*, int);
1574 void (*DECREF)(
void*, PyObject*, int);
1575 void (*GOTREF)(
void*, PyObject*, int);
1576 void (*GIVEREF)(
void*, PyObject*, int);
1577 void* (*SetupContext)(
const char*, int,
const char*);
1578 void (*FinishContext)(
void**);
1579 } __Pyx_RefNannyAPIStruct;
1580 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1581 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
1582 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1584 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1586 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1587 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1588 PyGILState_Release(__pyx_gilstate_save);\
1590 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1593 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1594 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1596 #define __Pyx_RefNannyFinishContext()\
1597 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1598 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1599 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1600 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1601 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1602 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1603 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1604 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1605 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1607 #define __Pyx_RefNannyDeclarations
1608 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1609 #define __Pyx_RefNannyFinishContext()
1610 #define __Pyx_INCREF(r) Py_INCREF(r)
1611 #define __Pyx_DECREF(r) Py_DECREF(r)
1612 #define __Pyx_GOTREF(r)
1613 #define __Pyx_GIVEREF(r)
1614 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1615 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1616 #define __Pyx_XGOTREF(r)
1617 #define __Pyx_XGIVEREF(r)
1619 #define __Pyx_XDECREF_SET(r, v) do {\
1620 PyObject *tmp = (PyObject *) r;\
1621 r = v; __Pyx_XDECREF(tmp);\
1623 #define __Pyx_DECREF_SET(r, v) do {\
1624 PyObject *tmp = (PyObject *) r;\
1625 r = v; __Pyx_DECREF(tmp);\
1627 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1628 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1631 #if CYTHON_USE_TYPE_SLOTS
1632 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1634 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1638 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1641 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
1644 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1645 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1646 const char* function_name);
1649 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
1650 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1653 #if CYTHON_FAST_THREAD_STATE
1654 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1655 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1656 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1658 #define __Pyx_PyThreadState_declare
1659 #define __Pyx_PyThreadState_assign
1660 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1664 #if CYTHON_FAST_THREAD_STATE
1665 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1666 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1667 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1668 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1669 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1670 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1671 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1672 #if CYTHON_COMPILING_IN_CPYTHON
1673 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1675 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1678 #define __Pyx_PyErr_Clear() PyErr_Clear()
1679 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1680 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1681 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1682 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1683 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1684 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1685 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1689 #ifndef CYTHON_PROFILE
1690 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
1691 #define CYTHON_PROFILE 0
1693 #define CYTHON_PROFILE 1
1696 #ifndef CYTHON_TRACE_NOGIL
1697 #define CYTHON_TRACE_NOGIL 0
1699 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1700 #define CYTHON_TRACE 1
1703 #ifndef CYTHON_TRACE
1704 #define CYTHON_TRACE 0
1707 #undef CYTHON_PROFILE_REUSE_FRAME
1709 #ifndef CYTHON_PROFILE_REUSE_FRAME
1710 #define CYTHON_PROFILE_REUSE_FRAME 0
1712 #if CYTHON_PROFILE || CYTHON_TRACE
1713 #include "compile.h"
1714 #include "frameobject.h"
1715 #include "traceback.h"
1716 #if PY_VERSION_HEX >= 0x030b00a6
1717 #ifndef Py_BUILD_CORE
1718 #define Py_BUILD_CORE 1
1720 #include "internal/pycore_frame.h"
1722 #if CYTHON_PROFILE_REUSE_FRAME
1723 #define CYTHON_FRAME_MODIFIER static
1724 #define CYTHON_FRAME_DEL(frame)
1726 #define CYTHON_FRAME_MODIFIER
1727 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
1729 #define __Pyx_TraceDeclarations\
1730 static PyCodeObject *__pyx_frame_code = NULL;\
1731 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
1732 int __Pyx_use_tracing = 0;
1733 #define __Pyx_TraceFrameInit(codeobj)\
1734 if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
1735 #if PY_VERSION_HEX >= 0x030b00a2
1736 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1737 (unlikely((tstate)->cframe->use_tracing) &&\
1738 (!(check_tracing) || !(tstate)->tracing) &&\
1739 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1740 #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
1741 #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
1742 #elif PY_VERSION_HEX >= 0x030a00b1
1743 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1744 (unlikely((tstate)->cframe->use_tracing) &&\
1745 (!(check_tracing) || !(tstate)->tracing) &&\
1746 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1747 #define __Pyx_EnterTracing(tstate)\
1748 do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
1749 #define __Pyx_LeaveTracing(tstate)\
1752 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1753 || tstate->c_profilefunc != NULL);\
1756 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1757 (unlikely((tstate)->use_tracing) &&\
1758 (!(check_tracing) || !(tstate)->tracing) &&\
1759 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1760 #define __Pyx_EnterTracing(tstate)\
1761 do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
1762 #define __Pyx_LeaveTracing(tstate)\
1765 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1766 || tstate->c_profilefunc != NULL);\
1770 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1772 if (CYTHON_TRACE_NOGIL) {\
1773 PyThreadState *tstate;\
1774 PyGILState_STATE state = PyGILState_Ensure();\
1775 tstate = __Pyx_PyThreadState_Current;\
1776 if (__Pyx_IsTracing(tstate, 1, 1)) {\
1777 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1779 PyGILState_Release(state);\
1780 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1783 PyThreadState* tstate = PyThreadState_GET();\
1784 if (__Pyx_IsTracing(tstate, 1, 1)) {\
1785 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1786 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1790 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1791 { PyThreadState* tstate = PyThreadState_GET();\
1792 if (__Pyx_IsTracing(tstate, 1, 1)) {\
1793 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1794 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1798 #define __Pyx_TraceException()\
1799 if (likely(!__Pyx_use_tracing)); else {\
1800 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1801 if (__Pyx_IsTracing(tstate, 0, 1)) {\
1802 __Pyx_EnterTracing(tstate);\
1803 PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
1805 if (CYTHON_TRACE && tstate->c_tracefunc)\
1806 tstate->c_tracefunc(\
1807 tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
1808 tstate->c_profilefunc(\
1809 tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
1810 Py_DECREF(exc_info);\
1812 __Pyx_LeaveTracing(tstate);\
1815 static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
1816 PyObject *type, *value, *traceback;
1817 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
1818 __Pyx_EnterTracing(tstate);
1819 if (CYTHON_TRACE && tstate->c_tracefunc)
1820 tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
1821 if (tstate->c_profilefunc)
1822 tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
1823 CYTHON_FRAME_DEL(frame);
1824 __Pyx_LeaveTracing(tstate);
1825 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1828 #define __Pyx_TraceReturn(result, nogil)\
1829 if (likely(!__Pyx_use_tracing)); else {\
1831 if (CYTHON_TRACE_NOGIL) {\
1832 PyThreadState *tstate;\
1833 PyGILState_STATE state = PyGILState_Ensure();\
1834 tstate = __Pyx_PyThreadState_Current;\
1835 if (__Pyx_IsTracing(tstate, 0, 0)) {\
1836 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1838 PyGILState_Release(state);\
1841 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1842 if (__Pyx_IsTracing(tstate, 0, 0)) {\
1843 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1848 #define __Pyx_TraceReturn(result, nogil)\
1849 if (likely(!__Pyx_use_tracing)); else {\
1850 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1851 if (__Pyx_IsTracing(tstate, 0, 0)) {\
1852 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1856 static PyCodeObject *__Pyx_createFrameCodeObject(
const char *funcname,
const char *srcfile,
int firstlineno);
1857 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate,
const char *funcname,
const char *srcfile,
int firstlineno);
1859 #define __Pyx_TraceDeclarations
1860 #define __Pyx_TraceFrameInit(codeobj)
1861 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
1862 #define __Pyx_TraceException()
1863 #define __Pyx_TraceReturn(result, nogil)
1866 static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame,
int lineno) {
1868 PyObject *type, *value, *traceback;
1869 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
1870 __Pyx_PyFrame_SetLineNumber(frame, lineno);
1871 __Pyx_EnterTracing(tstate);
1872 ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
1873 __Pyx_LeaveTracing(tstate);
1875 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1879 Py_XDECREF(traceback);
1884 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1885 if (likely(!__Pyx_use_tracing)); else {\
1887 if (CYTHON_TRACE_NOGIL) {\
1889 PyThreadState *tstate;\
1890 PyGILState_STATE state = PyGILState_Ensure();\
1891 tstate = __Pyx_PyThreadState_Current;\
1892 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1893 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1895 PyGILState_Release(state);\
1896 if (unlikely(ret)) goto_error;\
1899 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1900 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1901 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1902 if (unlikely(ret)) goto_error;\
1907 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1908 if (likely(!__Pyx_use_tracing)); else {\
1909 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1910 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1911 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1912 if (unlikely(ret)) goto_error;\
1917 #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
1921 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1922 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1923 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1924 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1925 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1926 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1927 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1928 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1929 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1930 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1931 int wraparound,
int boundscheck);
1932 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1933 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1934 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1935 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1936 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1937 int wraparound,
int boundscheck);
1938 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1939 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1940 int is_list,
int wraparound,
int boundscheck);
1943 #if CYTHON_USE_TYPE_SLOTS
1944 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1946 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1950 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
1951 #define __Pyx_MEMVIEW_DIRECT 1
1952 #define __Pyx_MEMVIEW_PTR 2
1953 #define __Pyx_MEMVIEW_FULL 4
1954 #define __Pyx_MEMVIEW_CONTIG 8
1955 #define __Pyx_MEMVIEW_STRIDED 16
1956 #define __Pyx_MEMVIEW_FOLLOW 32
1957 #define __Pyx_IS_C_CONTIG 1
1958 #define __Pyx_IS_F_CONTIG 2
1959 static int __Pyx_init_memviewslice(
1960 struct __pyx_memoryview_obj *memview,
1962 __Pyx_memviewslice *memviewslice,
1963 int memview_is_new_reference);
1964 static CYTHON_INLINE
int __pyx_add_acquisition_count_locked(
1965 __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
1966 static CYTHON_INLINE
int __pyx_sub_acquisition_count_locked(
1967 __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
1968 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
1969 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
1970 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
1971 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
1972 static CYTHON_INLINE
void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *,
int,
int);
1973 static CYTHON_INLINE
void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *,
int,
int);
1976 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
1979 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1982 #if CYTHON_FAST_PYCALL
1983 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1984 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1985 #if 1 || PY_VERSION_HEX < 0x030600B1
1986 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1988 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1990 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1991 (sizeof(char [1 - 2*!(cond)]) - 1)
1992 #ifndef Py_MEMBER_SIZE
1993 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1995 #if CYTHON_FAST_PYCALL
1996 static size_t __pyx_pyframe_localsplus_offset = 0;
1997 #include "frameobject.h"
1998 #if PY_VERSION_HEX >= 0x030b00a6
1999 #ifndef Py_BUILD_CORE
2000 #define Py_BUILD_CORE 1
2002 #include "internal/pycore_frame.h"
2004 #define __Pxy_PyFrame_Initialize_Offsets()\
2005 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
2006 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
2007 #define __Pyx_PyFrame_GetLocalsplus(frame)\
2008 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
2009 #endif // CYTHON_FAST_PYCALL
2013 #if CYTHON_COMPILING_IN_CPYTHON
2014 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2016 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2020 #if CYTHON_COMPILING_IN_CPYTHON
2021 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2025 #if CYTHON_COMPILING_IN_CPYTHON
2026 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2028 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2032 #if CYTHON_FAST_PYCCALL
2033 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
2035 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
2039 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2042 #if CYTHON_FAST_THREAD_STATE
2043 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2044 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2046 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2050 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2053 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2056 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2057 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2058 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2059 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2060 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2061 (cache_var) = (value);
2062 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2063 static PY_UINT64_T __pyx_dict_version = 0;\
2064 static PyObject *__pyx_dict_cached_value = NULL;\
2065 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2066 (VAR) = __pyx_dict_cached_value;\
2068 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2069 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2072 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2073 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2074 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2076 #define __PYX_GET_DICT_VERSION(dict) (0)
2077 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2078 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2082 #if CYTHON_USE_DICT_VERSIONS
2083 #define __Pyx_GetModuleGlobalName(var, name) {\
2084 static PY_UINT64_T __pyx_dict_version = 0;\
2085 static PyObject *__pyx_dict_cached_value = NULL;\
2086 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
2087 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2088 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2090 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
2091 PY_UINT64_T __pyx_dict_version;\
2092 PyObject *__pyx_dict_cached_value;\
2093 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2095 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2097 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2098 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2099 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2103 static int __Pyx_CheckKeywordStrings(PyObject *kwdict,
const char* function_name,
int kw_allowed);
2106 static void __Pyx_WriteUnraisable(
const char *name,
int clineno,
2107 int lineno,
const char *filename,
2108 int full_traceback,
int nogil);
2111 static CYTHON_INLINE
void __Pyx_RaiseClosureNameError(
const char *varname);
2114 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2117 #define __Pyx_CyFunction_USED 1
2118 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2119 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2120 #define __Pyx_CYFUNCTION_CCLASS 0x04
2121 #define __Pyx_CyFunction_GetClosure(f)\
2122 (((__pyx_CyFunctionObject *) (f))->func_closure)
2123 #define __Pyx_CyFunction_GetClassObj(f)\
2124 (((__pyx_CyFunctionObject *) (f))->func_classobj)
2125 #define __Pyx_CyFunction_Defaults(type, f)\
2126 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2127 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2128 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2130 PyCFunctionObject func;
2131 #if PY_VERSION_HEX < 0x030500A0
2132 PyObject *func_weakreflist;
2134 PyObject *func_dict;
2135 PyObject *func_name;
2136 PyObject *func_qualname;
2138 PyObject *func_globals;
2139 PyObject *func_code;
2140 PyObject *func_closure;
2141 PyObject *func_classobj;
2143 int defaults_pyobjects;
2144 size_t defaults_size;
2146 PyObject *defaults_tuple;
2147 PyObject *defaults_kwdict;
2148 PyObject *(*defaults_getter)(PyObject *);
2149 PyObject *func_annotations;
2150 } __pyx_CyFunctionObject;
2151 static PyTypeObject *__pyx_CyFunctionType = 0;
2152 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
2153 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2154 int flags, PyObject* qualname,
2156 PyObject *module, PyObject *globals,
2158 static CYTHON_INLINE
void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2161 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2163 static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2165 static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2167 static int __pyx_CyFunction_init(
void);
2170 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2171 int flags, PyObject* qualname,
2173 PyObject *module, PyObject *globals,
2177 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject*
function, PyObject* arg1, PyObject* arg2);
2180 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
2181 PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
2182 PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2183 int has_cstart,
int has_cstop,
int wraparound);
2186 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2189 static CYTHON_INLINE
int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq,
int eq) {
2190 int result = PySequence_Contains(seq, item);
2191 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2195 static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
2198 #if CYTHON_USE_EXC_INFO_STACK
2199 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2203 #if CYTHON_FAST_THREAD_STATE
2204 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2205 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2206 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2207 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2209 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2210 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2214 #if CYTHON_FAST_THREAD_STATE
2215 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2216 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2218 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2222 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2223 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2224 __Pyx__ArgTypeTest(obj, type, name, exact))
2225 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
2231 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
2234 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
2237 #if PY_MAJOR_VERSION >= 3
2238 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2240 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2244 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
2247 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2248 (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2250 static CYTHON_UNUSED
int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2251 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *);
2253 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(
const char *
s, Py_ssize_t size,
const char *errors) {
2255 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
2257 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(
const char *
s, Py_ssize_t size,
const char *errors) {
2259 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
2261 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(
const char *
s, Py_ssize_t size,
const char *errors) {
2263 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
2267 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2268 const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2269 const char* encoding,
const char* errors,
2270 PyObject* (*decode_func)(
const char *
s, Py_ssize_t size,
const char *errors));
2273 static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2276 static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2279 static CYTHON_INLINE
void __Pyx_RaiseNoneNotIterableError(
void);
2282 static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2285 #if CYTHON_FAST_THREAD_STATE
2286 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2287 static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2289 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2293 #if CYTHON_COMPILING_IN_CPYTHON
2294 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2295 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2296 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2297 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2299 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2300 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2301 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2303 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2305 static CYTHON_UNUSED
int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2307 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2308 static CYTHON_INLINE
int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2309 PyListObject*
L = (PyListObject*) list;
2310 Py_ssize_t len = Py_SIZE(list);
2311 if (likely(
L->allocated > len)) {
2313 PyList_SET_ITEM(list, len, x);
2314 __Pyx_SET_SIZE(list, len + 1);
2317 return PyList_Append(list, x);
2320 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2324 #if !CYTHON_COMPILING_IN_PYPY
2325 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
2327 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2328 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2332 static CYTHON_INLINE
int __Pyx_PyList_Extend(PyObject*
L, PyObject*
v) {
2333 #if CYTHON_COMPILING_IN_CPYTHON
2334 PyObject* none = _PyList_Extend((PyListObject*)
L,
v);
2335 if (unlikely(!none))
2340 return PyList_SetSlice(
L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX,
v);
2345 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2346 static CYTHON_INLINE
int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2347 PyListObject*
L = (PyListObject*) list;
2348 Py_ssize_t len = Py_SIZE(list);
2349 if (likely(
L->allocated > len) & likely(len > (
L->allocated >> 1))) {
2351 PyList_SET_ITEM(list, len, x);
2352 __Pyx_SET_SIZE(list, len + 1);
2355 return PyList_Append(list, x);
2358 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2362 static CYTHON_INLINE
void __Pyx_RaiseUnboundLocalError(
const char *varname);
2365 static CYTHON_INLINE
long __Pyx_div_long(
long,
long);
2368 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2369 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2371 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2375 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2376 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2378 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2382 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2385 static int __Pyx_setup_reduce(PyObject* type_obj);
2388 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
2391 #ifndef __PYX_HAVE_RT_ImportType_proto
2392 #define __PYX_HAVE_RT_ImportType_proto
2393 enum __Pyx_ImportType_CheckSize {
2394 __Pyx_ImportType_CheckSize_Error = 0,
2395 __Pyx_ImportType_CheckSize_Warn = 1,
2396 __Pyx_ImportType_CheckSize_Ignore = 2
2398 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
2402 #ifdef CYTHON_CLINE_IN_TRACEBACK
2403 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2405 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
2410 PyCodeObject* code_object;
2412 } __Pyx_CodeObjectCacheEntry;
2413 struct __Pyx_CodeObjectCache {
2416 __Pyx_CodeObjectCacheEntry* entries;
2418 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2419 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
2420 static PyCodeObject *__pyx_find_code_object(
int code_line);
2421 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
2424 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
2425 int py_line,
const char *filename);
2427 #if PY_MAJOR_VERSION < 3
2428 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view,
int flags);
2429 static void __Pyx_ReleaseBuffer(Py_buffer *view);
2431 #define __Pyx_GetBuffer PyObject_GetBuffer
2432 #define __Pyx_ReleaseBuffer PyBuffer_Release
2438 Py_ssize_t shape, strides, suboffsets;
2439 } __Pyx_Buf_DimInfo;
2445 __Pyx_Buffer *rcbuffer;
2447 __Pyx_Buf_DimInfo diminfo[8];
2448 } __Pyx_LocalBuf_ND;
2451 static int __pyx_memviewslice_is_contig(
const __Pyx_memviewslice mvs,
char order,
int ndim);
2454 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2455 __Pyx_memviewslice *slice2,
2456 int ndim,
size_t itemsize);
2459 static CYTHON_INLINE PyObject *__pyx_capsule_create(
void *p,
const char *sig);
2462 static CYTHON_INLINE PyObject *__pyx_memview_get_double(
const char *itemp);
2463 static CYTHON_INLINE
int __pyx_memview_set_double(
const char *itemp, PyObject *obj);
2466 static CYTHON_INLINE
int __Pyx_Is_Little_Endian(
void);
2469 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx,
const char* ts);
2470 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2471 __Pyx_BufFmt_StackElem* stack,
2472 __Pyx_TypeInfo* type);
2475 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2478 static int __Pyx_ValidateAndInit_memviewslice(
2483 __Pyx_TypeInfo *dtype,
2484 __Pyx_BufFmt_StackElem stack[],
2485 __Pyx_memviewslice *memviewslice,
2486 PyObject *original_obj);
2489 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *,
int writable_flag);
2492 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2493 #define __Pyx_HAS_GCC_DIAGNOSTIC
2499 #define __Pyx_CREAL(z) ((z).real())
2500 #define __Pyx_CIMAG(z) ((z).imag())
2502 #define __Pyx_CREAL(z) (__real__(z))
2503 #define __Pyx_CIMAG(z) (__imag__(z))
2506 #define __Pyx_CREAL(z) ((z).real)
2507 #define __Pyx_CIMAG(z) ((z).imag)
2509 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2510 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2511 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2512 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2514 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2515 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2520 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2521 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2522 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2523 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2524 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2525 #define __Pyx_c_neg_float(a) (-(a))
2527 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2528 #define __Pyx_c_conj_float(z) (::std::conj(z))
2530 #define __Pyx_c_abs_float(z) (::std::abs(z))
2531 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2534 #define __Pyx_c_is_zero_float(z) ((z)==0)
2535 #define __Pyx_c_conj_float(z) (conjf(z))
2537 #define __Pyx_c_abs_float(z) (cabsf(z))
2538 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2542 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2543 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2544 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2545 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2546 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2547 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2548 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2549 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2551 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
2552 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2558 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2559 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2560 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2561 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2562 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2563 #define __Pyx_c_neg_double(a) (-(a))
2565 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2566 #define __Pyx_c_conj_double(z) (::std::conj(z))
2568 #define __Pyx_c_abs_double(z) (::std::abs(z))
2569 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2572 #define __Pyx_c_is_zero_double(z) ((z)==0)
2573 #define __Pyx_c_conj_double(z) (conj(z))
2575 #define __Pyx_c_abs_double(z) (cabs(z))
2576 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2580 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2581 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2582 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2583 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2584 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2585 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2586 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2587 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2589 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
2590 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2595 static __Pyx_memviewslice
2596 __pyx_memoryview_copy_new_contig(
const __Pyx_memviewslice *from_mvs,
2597 const char *mode,
int ndim,
2598 size_t sizeof_dtype,
int contig_flag,
2599 int dtype_is_object);
2602 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
2605 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
2608 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
2611 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
2614 static CYTHON_INLINE
char __Pyx_PyInt_As_char(PyObject *);
2617 static int __Pyx_check_binary_version(
void);
2620 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2622 static void __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self,
int __pyx_skip_dispatch);
2623 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *__pyx_v_self);
2624 static char *__pyx_memoryview_get_item_pointer(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
2625 static PyObject *__pyx_memoryview_is_slice(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj);
2626 static PyObject *__pyx_memoryview_setitem_slice_assignment(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src);
2627 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(
struct __pyx_memoryview_obj *__pyx_v_self,
struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value);
2628 static PyObject *__pyx_memoryview_setitem_indexed(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
2629 static PyObject *__pyx_memoryview_convert_item_to_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp);
2630 static PyObject *__pyx_memoryview_assign_item_from_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
2631 static PyObject *__pyx_memoryviewslice_convert_item_to_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp);
2632 static PyObject *__pyx_memoryviewslice_assign_item_from_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
2647 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2660 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2661 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2662 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2663 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2664 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2665 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2666 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2667 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2668 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2669 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2670 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2671 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2672 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2673 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2674 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2677 static PyTypeObject *__pyx_ptype_18BoundaryConditions_BC_Base = 0;
2678 static PyTypeObject *__pyx_ptype_18BoundaryConditions_BoundaryCondition = 0;
2679 static PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC = 0;
2680 static PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC = 0;
2681 static PyTypeObject *__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp = 0;
2682 static PyTypeObject *__pyx_array_type = 0;
2683 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2684 static PyTypeObject *__pyx_memoryview_type = 0;
2685 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2686 static PyObject *
generic = 0;
2687 static PyObject *strided = 0;
2688 static PyObject *indirect = 0;
2689 static PyObject *contiguous = 0;
2690 static PyObject *indirect_contiguous = 0;
2691 static int __pyx_memoryview_thread_locks_used;
2692 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2693 static PyObject *__pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(
struct __pyx_obj_18BoundaryConditions_BC_Base *, PyObject *);
2694 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t,
char *,
char *,
char *);
2695 static void *__pyx_align_pointer(
void *,
size_t);
2696 static PyObject *__pyx_memoryview_new(PyObject *,
int,
int, __Pyx_TypeInfo *);
2697 static CYTHON_INLINE
int __pyx_memoryview_check(PyObject *);
2698 static PyObject *_unellipsify(PyObject *,
int);
2699 static PyObject *assert_direct_dimensions(Py_ssize_t *,
int);
2700 static struct __pyx_memoryview_obj *__pyx_memview_slice(
struct __pyx_memoryview_obj *, PyObject *);
2701 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t,
int,
int,
int *, Py_ssize_t, Py_ssize_t, Py_ssize_t,
int,
int,
int,
int);
2702 static char *__pyx_pybuffer_index(Py_buffer *,
char *, Py_ssize_t, Py_ssize_t);
2703 static int __pyx_memslice_transpose(__Pyx_memviewslice *);
2704 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice,
int, PyObject *(*)(
char *),
int (*)(
char *, PyObject *),
int);
2705 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2706 static void __pyx_memoryview_slice_copy(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2707 static PyObject *__pyx_memoryview_copy_object(
struct __pyx_memoryview_obj *);
2708 static PyObject *__pyx_memoryview_copy_object_from_slice(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2709 static Py_ssize_t abs_py_ssize_t(Py_ssize_t);
2710 static char __pyx_get_best_slice_order(__Pyx_memviewslice *,
int);
2711 static void _copy_strided_to_strided(
char *, Py_ssize_t *,
char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *,
int,
size_t);
2712 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *,
int,
size_t);
2713 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *,
int);
2714 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t,
int,
char);
2715 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *,
char,
int);
2716 static int __pyx_memoryview_err_extents(
int, Py_ssize_t, Py_ssize_t);
2717 static int __pyx_memoryview_err_dim(PyObject *,
char *,
int);
2718 static int __pyx_memoryview_err(PyObject *,
char *);
2719 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice,
int,
int,
int);
2720 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *,
int,
int);
2721 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *,
int,
int,
int);
2722 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
2723 static void __pyx_memoryview_refcount_objects_in_slice(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
2724 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *,
int,
size_t,
void *,
int);
2725 static void __pyx_memoryview__slice_assign_scalar(
char *, Py_ssize_t *, Py_ssize_t *,
int,
size_t,
void *);
2726 static PyObject *__pyx_unpickle_Enum__set_state(
struct __pyx_MemviewEnum_obj *, PyObject *);
2727 static __Pyx_TypeInfo __Pyx_TypeInfo_double = {
"double", NULL,
sizeof(double), { 0 }, 0,
'R', 0, 0 };
2728 #define __Pyx_MODULE_NAME "BoundaryConditions"
2729 extern int __pyx_module_is_main_BoundaryConditions;
2730 int __pyx_module_is_main_BoundaryConditions = 0;
2733 static PyObject *__pyx_builtin_sum;
2734 static PyObject *__pyx_builtin_TypeError;
2735 static PyObject *__pyx_builtin_ImportError;
2736 static PyObject *__pyx_builtin_ValueError;
2737 static PyObject *__pyx_builtin_MemoryError;
2738 static PyObject *__pyx_builtin_enumerate;
2739 static PyObject *__pyx_builtin_range;
2740 static PyObject *__pyx_builtin_Ellipsis;
2741 static PyObject *__pyx_builtin_id;
2742 static PyObject *__pyx_builtin_IndexError;
2743 static const char __pyx_k_O[] =
"O";
2744 static const char __pyx_k_a[] =
"a";
2745 static const char __pyx_k_c[] =
"c";
2746 static const char __pyx_k_n[] =
"n";
2747 static const char __pyx_k_t[] =
"t";
2748 static const char __pyx_k_x[] =
"x";
2749 static const char __pyx_k_a0[] =
"a0";
2750 static const char __pyx_k_id[] =
"id";
2751 static const char __pyx_k_nd[] =
"nd";
2752 static const char __pyx_k_np[] =
"np";
2753 static const char __pyx_k_t1[] =
"t1";
2754 static const char __pyx_k_all[] =
"__all__";
2755 static const char __pyx_k_b_i[] =
"b_i";
2756 static const char __pyx_k_get[] =
"get";
2757 static const char __pyx_k_new[] =
"__new__";
2758 static const char __pyx_k_obj[] =
"obj";
2759 static const char __pyx_k_sum[] =
"sum";
2760 static const char __pyx_k_None[] =
"None";
2761 static const char __pyx_k_b_or[] =
"b_or";
2762 static const char __pyx_k_base[] =
"base";
2763 static const char __pyx_k_dict[] =
"__dict__";
2764 static const char __pyx_k_main[] =
"__main__";
2765 static const char __pyx_k_mode[] =
"mode";
2766 static const char __pyx_k_name[] =
"name";
2767 static const char __pyx_k_ndim[] =
"ndim";
2768 static const char __pyx_k_pack[] =
"pack";
2769 static const char __pyx_k_self[] =
"self";
2770 static const char __pyx_k_size[] =
"size";
2771 static const char __pyx_k_step[] =
"step";
2772 static const char __pyx_k_stop[] =
"stop";
2773 static const char __pyx_k_test[] =
"__test__";
2774 static const char __pyx_k_ASCII[] =
"ASCII";
2775 static const char __pyx_k_class[] =
"__class__";
2776 static const char __pyx_k_error[] =
"error";
2777 static const char __pyx_k_flags[] =
"flags";
2778 static const char __pyx_k_numpy[] =
"numpy";
2779 static const char __pyx_k_range[] =
"range";
2780 static const char __pyx_k_shape[] =
"shape";
2781 static const char __pyx_k_start[] =
"start";
2782 static const char __pyx_k_state[] =
"state";
2783 static const char __pyx_k_value[] =
"value";
2784 static const char __pyx_k_zeros[] =
"zeros";
2785 static const char __pyx_k_Domain[] =
"Domain";
2786 static const char __pyx_k_dict_2[] =
"_dict";
2787 static const char __pyx_k_encode[] =
"encode";
2788 static const char __pyx_k_format[] =
"format";
2789 static const char __pyx_k_import[] =
"__import__";
2790 static const char __pyx_k_name_2[] =
"__name__";
2791 static const char __pyx_k_pickle[] =
"pickle";
2792 static const char __pyx_k_reduce[] =
"__reduce__";
2793 static const char __pyx_k_struct[] =
"struct";
2794 static const char __pyx_k_unpack[] =
"unpack";
2795 static const char __pyx_k_update[] =
"update";
2796 static const char __pyx_k_BC_Base[] =
"BC_Base";
2797 static const char __pyx_k_Context[] =
"Context";
2798 static const char __pyx_k_context[] =
"context";
2799 static const char __pyx_k_fortran[] =
"fortran";
2800 static const char __pyx_k_memview[] =
"memview";
2801 static const char __pyx_k_proteus[] =
"proteus";
2802 static const char __pyx_k_resetBC[] =
"resetBC";
2803 static const char __pyx_k_Ellipsis[] =
"Ellipsis";
2804 static const char __pyx_k_getstate[] =
"__getstate__";
2805 static const char __pyx_k_itemsize[] =
"itemsize";
2806 static const char __pyx_k_pyx_type[] =
"__pyx_type";
2807 static const char __pyx_k_setstate[] =
"__setstate__";
2808 static const char __pyx_k_TypeError[] =
"TypeError";
2809 static const char __pyx_k_enumerate[] =
"enumerate";
2810 static const char __pyx_k_pyx_state[] =
"__pyx_state";
2811 static const char __pyx_k_reduce_ex[] =
"__reduce_ex__";
2812 static const char __pyx_k_IndexError[] =
"IndexError";
2813 static const char __pyx_k_ValueError[] =
"ValueError";
2814 static const char __pyx_k_getContext[] =
"getContext";
2815 static const char __pyx_k_pyx_result[] =
"__pyx_result";
2816 static const char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
2817 static const char __pyx_k_ImportError[] =
"ImportError";
2818 static const char __pyx_k_MemoryError[] =
"MemoryError";
2819 static const char __pyx_k_PickleError[] =
"PickleError";
2820 static const char __pyx_k_init_cython[] =
"init_cython";
2821 static const char __pyx_k_setLinearBC[] =
"setLinearBC";
2822 static const char __pyx_k_pyx_checksum[] =
"__pyx_checksum";
2823 static const char __pyx_k_stringsource[] =
"stringsource";
2824 static const char __pyx_k_use_setstate[] =
"use_setstate";
2825 static const char __pyx_k_pyx_getbuffer[] =
"__pyx_getbuffer";
2826 static const char __pyx_k_reduce_cython[] =
"__reduce_cython__";
2827 static const char __pyx_k_setConstantBC[] =
"setConstantBC";
2828 static const char __pyx_k_setLinearRamp[] =
"setLinearRamp";
2829 static const char __pyx_k_View_MemoryView[] =
"View.MemoryView";
2830 static const char __pyx_k_allocate_buffer[] =
"allocate_buffer";
2831 static const char __pyx_k_dtype_is_object[] =
"dtype_is_object";
2832 static const char __pyx_k_pyx_PickleError[] =
"__pyx_PickleError";
2833 static const char __pyx_k_setstate_cython[] =
"__setstate_cython__";
2834 static const char __pyx_k_BoundaryCondition[] =
"BoundaryCondition";
2835 static const char __pyx_k_pyx_unpickle_Enum[] =
"__pyx_unpickle_Enum";
2836 static const char __pyx_k_BC_Base_getContext[] =
"BC_Base.getContext";
2837 static const char __pyx_k_BoundaryConditions[] =
"BoundaryConditions";
2838 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
2839 static const char __pyx_k_strided_and_direct[] =
"<strided and direct>";
2840 static const char __pyx_k_pyx_unpickle_BC_Base[] =
"__pyx_unpickle_BC_Base";
2841 static const char __pyx_k_strided_and_indirect[] =
"<strided and indirect>";
2842 static const char __pyx_k_contiguous_and_direct[] =
"<contiguous and direct>";
2843 static const char __pyx_k_MemoryView_of_r_object[] =
"<MemoryView of %r object>";
2844 static const char __pyx_k_BC_Base___reduce_cython[] =
"BC_Base.__reduce_cython__";
2845 static const char __pyx_k_MemoryView_of_r_at_0x_x[] =
"<MemoryView of %r at 0x%x>";
2846 static const char __pyx_k_contiguous_and_indirect[] =
"<contiguous and indirect>";
2847 static const char __pyx_k_Cannot_index_with_type_s[] =
"Cannot index with type '%s'";
2848 static const char __pyx_k_BC_Base___setstate_cython[] =
"BC_Base.__setstate_cython__";
2849 static const char __pyx_k_BoundaryCondition_resetBC[] =
"BoundaryCondition.resetBC";
2850 static const char __pyx_k_Invalid_shape_in_axis_d_d[] =
"Invalid shape in axis %d: %d.";
2851 static const char __pyx_k_setLinearBC_locals_lambda[] =
"setLinearBC.<locals>.<lambda>";
2852 static const char __pyx_k_itemsize_0_for_cython_array[] =
"itemsize <= 0 for cython.array";
2853 static const char __pyx_k_setConstantBC_locals_lambda[] =
"setConstantBC.<locals>.<lambda>";
2854 static const char __pyx_k_setLinearRamp_locals_lambda[] =
"setLinearRamp.<locals>.<lambda>";
2855 static const char __pyx_k_BoundaryCondition_init_cython[] =
"BoundaryCondition.init_cython";
2856 static const char __pyx_k_BoundaryCondition_setLinearBC[] =
"BoundaryCondition.setLinearBC";
2857 static const char __pyx_k_proteus_BoundaryConditions_py[] =
"proteus/BoundaryConditions.py";
2858 static const char __pyx_k_unable_to_allocate_array_data[] =
"unable to allocate array data.";
2859 static const char __pyx_k_strided_and_direct_or_indirect[] =
"<strided and direct or indirect>";
2860 static const char __pyx_k_BoundaryCondition_setConstantBC[] =
"BoundaryCondition.setConstantBC";
2861 static const char __pyx_k_BoundaryCondition_setLinearRamp[] =
"BoundaryCondition.setLinearRamp";
2862 static const char __pyx_k_numpy_core_multiarray_failed_to[] =
"numpy.core.multiarray failed to import";
2863 static const char __pyx_k_self_uuOfXT_cannot_be_converted[] =
"self.uuOfXT cannot be converted to a Python object for pickling";
2864 static const char __pyx_k_BoundaryCondition___reduce_cytho[] =
"BoundaryCondition.__reduce_cython__";
2865 static const char __pyx_k_BoundaryCondition___setstate_cyt[] =
"BoundaryCondition.__setstate_cython__";
2866 static const char __pyx_k_Buffer_view_does_not_expose_stri[] =
"Buffer view does not expose strides";
2867 static const char __pyx_k_Can_only_create_a_buffer_that_is[] =
"Can only create a buffer that is contiguous in memory.";
2868 static const char __pyx_k_Cannot_assign_to_read_only_memor[] =
"Cannot assign to read-only memoryview";
2869 static const char __pyx_k_Cannot_create_writable_memory_vi[] =
"Cannot create writable memory view from read-only memoryview";
2870 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] =
"Empty shape tuple for cython.array";
2871 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] =
"Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))";
2872 static const char __pyx_k_Indirect_dimensions_not_supporte[] =
"Indirect dimensions not supported";
2873 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] =
"Invalid mode, expected 'c' or 'fortran', got %s";
2874 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] =
"Out of bounds on buffer access (axis %d)";
2875 static const char __pyx_k_Shape_or_nd_must_be_passed_to_BC[] =
"Shape or nd must be passed to BC";
2876 static const char __pyx_k_Unable_to_convert_item_to_object[] =
"Unable to convert item to object";
2877 static const char __pyx_k_got_differing_extents_in_dimensi[] =
"got differing extents in dimension %d (got %d and %d)";
2878 static const char __pyx_k_no_default___reduce___due_to_non[] =
"no default __reduce__ due to non-trivial __cinit__";
2879 static const char __pyx_k_numpy_core_umath_failed_to_impor[] =
"numpy.core.umath failed to import";
2880 static const char __pyx_k_unable_to_allocate_shape_and_str[] =
"unable to allocate shape and strides.";
2881 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] =
"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2882 static PyObject *__pyx_n_s_ASCII;
2883 static PyObject *__pyx_n_s_BC_Base;
2884 static PyObject *__pyx_n_s_BC_Base___reduce_cython;
2885 static PyObject *__pyx_n_s_BC_Base___setstate_cython;
2886 static PyObject *__pyx_n_s_BC_Base_getContext;
2887 static PyObject *__pyx_n_s_BoundaryCondition;
2888 static PyObject *__pyx_n_s_BoundaryCondition___reduce_cytho;
2889 static PyObject *__pyx_n_s_BoundaryCondition___setstate_cyt;
2890 static PyObject *__pyx_n_s_BoundaryCondition_init_cython;
2891 static PyObject *__pyx_n_s_BoundaryCondition_resetBC;
2892 static PyObject *__pyx_n_s_BoundaryCondition_setConstantBC;
2893 static PyObject *__pyx_n_s_BoundaryCondition_setLinearBC;
2894 static PyObject *__pyx_n_s_BoundaryCondition_setLinearRamp;
2895 static PyObject *__pyx_n_s_BoundaryConditions;
2896 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2897 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2898 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2899 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2900 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2901 static PyObject *__pyx_n_s_Context;
2902 static PyObject *__pyx_n_s_Domain;
2903 static PyObject *__pyx_n_s_Ellipsis;
2904 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2905 static PyObject *__pyx_n_s_ImportError;
2906 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2907 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
2908 static PyObject *__pyx_n_s_IndexError;
2909 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2910 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2911 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2912 static PyObject *__pyx_n_s_MemoryError;
2913 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2914 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2915 static PyObject *__pyx_n_s_None;
2916 static PyObject *__pyx_n_b_O;
2917 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2918 static PyObject *__pyx_n_s_PickleError;
2919 static PyObject *__pyx_kp_s_Shape_or_nd_must_be_passed_to_BC;
2920 static PyObject *__pyx_n_s_TypeError;
2921 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2922 static PyObject *__pyx_n_s_ValueError;
2923 static PyObject *__pyx_n_s_View_MemoryView;
2924 static PyObject *__pyx_n_s_a;
2925 static PyObject *__pyx_n_s_a0;
2926 static PyObject *__pyx_n_s_all;
2927 static PyObject *__pyx_n_s_allocate_buffer;
2928 static PyObject *__pyx_n_s_b_i;
2929 static PyObject *__pyx_n_s_b_or;
2930 static PyObject *__pyx_n_s_base;
2931 static PyObject *__pyx_n_s_c;
2932 static PyObject *__pyx_n_u_c;
2933 static PyObject *__pyx_n_s_class;
2934 static PyObject *__pyx_n_s_cline_in_traceback;
2935 static PyObject *__pyx_n_s_context;
2936 static PyObject *__pyx_kp_s_contiguous_and_direct;
2937 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2938 static PyObject *__pyx_n_s_dict;
2939 static PyObject *__pyx_n_s_dict_2;
2940 static PyObject *__pyx_n_s_dtype_is_object;
2941 static PyObject *__pyx_n_s_encode;
2942 static PyObject *__pyx_n_s_enumerate;
2943 static PyObject *__pyx_n_s_error;
2944 static PyObject *__pyx_n_s_flags;
2945 static PyObject *__pyx_n_s_format;
2946 static PyObject *__pyx_n_s_fortran;
2947 static PyObject *__pyx_n_u_fortran;
2948 static PyObject *__pyx_n_s_get;
2949 static PyObject *__pyx_n_s_getContext;
2950 static PyObject *__pyx_n_s_getstate;
2951 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2952 static PyObject *__pyx_n_s_id;
2953 static PyObject *__pyx_n_s_import;
2954 static PyObject *__pyx_n_s_init_cython;
2955 static PyObject *__pyx_n_s_itemsize;
2956 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2957 static PyObject *__pyx_n_s_main;
2958 static PyObject *__pyx_n_s_memview;
2959 static PyObject *__pyx_n_s_mode;
2960 static PyObject *__pyx_n_s_n;
2961 static PyObject *__pyx_n_s_name;
2962 static PyObject *__pyx_n_s_name_2;
2963 static PyObject *__pyx_n_s_nd;
2964 static PyObject *__pyx_n_s_ndim;
2965 static PyObject *__pyx_n_s_new;
2966 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2967 static PyObject *__pyx_n_s_np;
2968 static PyObject *__pyx_n_s_numpy;
2969 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2970 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2971 static PyObject *__pyx_n_s_obj;
2972 static PyObject *__pyx_n_s_pack;
2973 static PyObject *__pyx_n_s_pickle;
2974 static PyObject *__pyx_n_s_proteus;
2975 static PyObject *__pyx_kp_s_proteus_BoundaryConditions_py;
2976 static PyObject *__pyx_n_s_pyx_PickleError;
2977 static PyObject *__pyx_n_s_pyx_checksum;
2978 static PyObject *__pyx_n_s_pyx_getbuffer;
2979 static PyObject *__pyx_n_s_pyx_result;
2980 static PyObject *__pyx_n_s_pyx_state;
2981 static PyObject *__pyx_n_s_pyx_type;
2982 static PyObject *__pyx_n_s_pyx_unpickle_BC_Base;
2983 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2984 static PyObject *__pyx_n_s_pyx_vtable;
2985 static PyObject *__pyx_n_s_range;
2986 static PyObject *__pyx_n_s_reduce;
2987 static PyObject *__pyx_n_s_reduce_cython;
2988 static PyObject *__pyx_n_s_reduce_ex;
2989 static PyObject *__pyx_n_s_resetBC;
2990 static PyObject *__pyx_n_s_self;
2991 static PyObject *__pyx_kp_s_self_uuOfXT_cannot_be_converted;
2992 static PyObject *__pyx_n_s_setConstantBC;
2993 static PyObject *__pyx_n_s_setConstantBC_locals_lambda;
2994 static PyObject *__pyx_n_s_setLinearBC;
2995 static PyObject *__pyx_n_s_setLinearBC_locals_lambda;
2996 static PyObject *__pyx_n_s_setLinearRamp;
2997 static PyObject *__pyx_n_s_setLinearRamp_locals_lambda;
2998 static PyObject *__pyx_n_s_setstate;
2999 static PyObject *__pyx_n_s_setstate_cython;
3000 static PyObject *__pyx_n_s_shape;
3001 static PyObject *__pyx_n_s_size;
3002 static PyObject *__pyx_n_s_start;
3003 static PyObject *__pyx_n_s_state;
3004 static PyObject *__pyx_n_s_step;
3005 static PyObject *__pyx_n_s_stop;
3006 static PyObject *__pyx_kp_s_strided_and_direct;
3007 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
3008 static PyObject *__pyx_kp_s_strided_and_indirect;
3009 static PyObject *__pyx_kp_s_stringsource;
3010 static PyObject *__pyx_n_s_struct;
3011 static PyObject *__pyx_n_s_sum;
3012 static PyObject *__pyx_n_s_t;
3013 static PyObject *__pyx_n_s_t1;
3014 static PyObject *__pyx_n_s_test;
3015 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
3016 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
3017 static PyObject *__pyx_n_s_unpack;
3018 static PyObject *__pyx_n_s_update;
3019 static PyObject *__pyx_n_s_use_setstate;
3020 static PyObject *__pyx_n_s_value;
3021 static PyObject *__pyx_n_s_x;
3022 static PyObject *__pyx_n_s_zeros;
3023 static int __pyx_pf_18BoundaryConditions_7BC_Base___init__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_name, PyObject *__pyx_v_b_or, PyObject *__pyx_v_b_i, PyObject *__pyx_v_nd);
3024 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2getContext(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_context);
3025 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3026 static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
3027 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3028 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
3029 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3030 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3031 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
3032 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3033 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3034 static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
3035 static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3036 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3037 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value);
3038 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3039 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self);
3040 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v___pyx_state);
3041 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
3042 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
3043 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
3044 static PyObject *__pyx_pf_18BoundaryConditions_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
3045 static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n);
3046 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value);
3047 static PyObject *__pyx_pf_18BoundaryConditions_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
3048 static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n);
3049 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_a0, PyObject *__pyx_v_a);
3050 static PyObject *__pyx_pf_18BoundaryConditions_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self);
3051 static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n);
3052 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_t1, PyObject *__pyx_v_value);
3053 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
3054 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value);
3055 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
3056 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self);
3057 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
3058 static PyObject *__pyx_pf_18BoundaryConditions___pyx_unpickle_BC_Base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type,
long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state);
3059 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode,
int __pyx_v_allocate_buffer);
3060 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(
struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
3061 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(
struct __pyx_array_obj *__pyx_v_self);
3062 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(
struct __pyx_array_obj *__pyx_v_self);
3063 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(
struct __pyx_array_obj *__pyx_v_self);
3064 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr);
3065 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item);
3066 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value);
3067 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self);
3068 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
3069 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name);
3070 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
3071 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
3072 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state);
3073 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj,
int __pyx_v_flags,
int __pyx_v_dtype_is_object);
3074 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(
struct __pyx_memoryview_obj *__pyx_v_self);
3075 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
3076 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
3077 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(
struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
3078 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3079 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3080 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3081 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3082 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3083 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3084 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3085 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3086 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
3087 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(
struct __pyx_memoryview_obj *__pyx_v_self);
3088 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(
struct __pyx_memoryview_obj *__pyx_v_self);
3089 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(
struct __pyx_memoryview_obj *__pyx_v_self);
3090 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
3091 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
3092 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(
struct __pyx_memoryview_obj *__pyx_v_self);
3093 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(
struct __pyx_memoryview_obj *__pyx_v_self);
3094 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self);
3095 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
3096 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
3097 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
3098 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self);
3099 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
3100 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type,
long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state);
3101 static PyObject *__pyx_tp_new_18BoundaryConditions_BC_Base(PyTypeObject *t, PyObject *a, PyObject *k);
3102 static PyObject *__pyx_tp_new_18BoundaryConditions_BoundaryCondition(PyTypeObject *t, PyObject *a, PyObject *k);
3103 static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t, PyObject *a, PyObject *k);
3104 static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t, PyObject *a, PyObject *k);
3105 static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t, PyObject *a, PyObject *k);
3106 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k);
3107 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k);
3108 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k);
3109 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k);
3110 static PyObject *__pyx_int_0;
3111 static PyObject *__pyx_int_1;
3112 static PyObject *__pyx_int_3;
3113 static PyObject *__pyx_int_81007987;
3114 static PyObject *__pyx_int_112105877;
3115 static PyObject *__pyx_int_131364769;
3116 static PyObject *__pyx_int_136983863;
3117 static PyObject *__pyx_int_158231071;
3118 static PyObject *__pyx_int_184977713;
3119 static PyObject *__pyx_int_neg_1;
3120 static PyObject *__pyx_codeobj_;
3121 static PyObject *__pyx_slice__7;
3122 static PyObject *__pyx_tuple__11;
3123 static PyObject *__pyx_tuple__13;
3124 static PyObject *__pyx_tuple__15;
3125 static PyObject *__pyx_tuple__16;
3126 static PyObject *__pyx_tuple__17;
3127 static PyObject *__pyx_tuple__18;
3128 static PyObject *__pyx_tuple__19;
3129 static PyObject *__pyx_tuple__20;
3130 static PyObject *__pyx_tuple__21;
3131 static PyObject *__pyx_tuple__22;
3132 static PyObject *__pyx_tuple__23;
3133 static PyObject *__pyx_tuple__24;
3134 static PyObject *__pyx_tuple__25;
3135 static PyObject *__pyx_tuple__26;
3136 static PyObject *__pyx_tuple__27;
3137 static PyObject *__pyx_tuple__28;
3138 static PyObject *__pyx_tuple__29;
3139 static PyObject *__pyx_tuple__30;
3140 static PyObject *__pyx_tuple__31;
3141 static PyObject *__pyx_tuple__32;
3142 static PyObject *__pyx_tuple__33;
3143 static PyObject *__pyx_tuple__34;
3144 static PyObject *__pyx_tuple__36;
3145 static PyObject *__pyx_tuple__37;
3146 static PyObject *__pyx_tuple__38;
3147 static PyObject *__pyx_tuple__39;
3148 static PyObject *__pyx_tuple__40;
3149 static PyObject *__pyx_tuple__41;
3150 static PyObject *__pyx_tuple__42;
3151 static PyObject *__pyx_tuple__43;
3152 static PyObject *__pyx_tuple__44;
3153 static PyObject *__pyx_tuple__45;
3154 static PyObject *__pyx_tuple__46;
3155 static PyObject *__pyx_tuple__47;
3156 static PyObject *__pyx_tuple__48;
3157 static PyObject *__pyx_tuple__49;
3158 static PyObject *__pyx_tuple__50;
3159 static PyObject *__pyx_tuple__51;
3160 static PyObject *__pyx_tuple__52;
3161 static PyObject *__pyx_tuple__53;
3162 static PyObject *__pyx_codeobj__2;
3163 static PyObject *__pyx_codeobj__3;
3164 static PyObject *__pyx_codeobj__4;
3165 static PyObject *__pyx_codeobj__5;
3166 static PyObject *__pyx_codeobj__6;
3167 static PyObject *__pyx_codeobj__8;
3168 static PyObject *__pyx_codeobj__9;
3169 static PyObject *__pyx_codeobj__10;
3170 static PyObject *__pyx_codeobj__12;
3171 static PyObject *__pyx_codeobj__14;
3172 static PyObject *__pyx_codeobj__35;
3184 static int __pyx_pw_18BoundaryConditions_7BC_Base_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3185 static int __pyx_pw_18BoundaryConditions_7BC_Base_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3186 PyObject *__pyx_v_shape = 0;
3187 PyObject *__pyx_v_name = 0;
3188 PyObject *__pyx_v_b_or = 0;
3189 PyObject *__pyx_v_b_i = 0;
3190 PyObject *__pyx_v_nd = 0;
3191 int __pyx_lineno = 0;
3192 const char *__pyx_filename = NULL;
3193 int __pyx_clineno = 0;
3195 __Pyx_RefNannyDeclarations
3196 __Pyx_RefNannySetupContext(
"__init__ (wrapper)", 0);
3198 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_name,&__pyx_n_s_b_or,&__pyx_n_s_b_i,&__pyx_n_s_nd,0};
3199 PyObject* values[5] = {0,0,0,0,0};
3200 values[0] = ((PyObject *)Py_None);
3201 values[1] = ((PyObject *)Py_None);
3202 values[2] = ((PyObject *)Py_None);
3203 values[3] = ((PyObject *)__pyx_int_0);
3204 values[4] = ((PyObject *)Py_None);
3205 if (unlikely(__pyx_kwds)) {
3207 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3209 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3211 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3213 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3215 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3217 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3220 default:
goto __pyx_L5_argtuple_error;
3222 kw_args = PyDict_Size(__pyx_kwds);
3226 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape);
3227 if (value) { values[0] = value; kw_args--; }
3232 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
3233 if (value) { values[1] = value; kw_args--; }
3238 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b_or);
3239 if (value) { values[2] = value; kw_args--; }
3244 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b_i);
3245 if (value) { values[3] = value; kw_args--; }
3250 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd);
3251 if (value) { values[4] = value; kw_args--; }
3254 if (unlikely(kw_args > 0)) {
3255 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__init__") < 0)) __PYX_ERR(0, 24, __pyx_L3_error)
3258 switch (PyTuple_GET_SIZE(__pyx_args)) {
3259 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3261 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3263 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3265 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3267 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3270 default:
goto __pyx_L5_argtuple_error;
3273 __pyx_v_shape = values[0];
3274 __pyx_v_name = values[1];
3275 __pyx_v_b_or = values[2];
3276 __pyx_v_b_i = values[3];
3277 __pyx_v_nd = values[4];
3279 goto __pyx_L4_argument_unpacking_done;
3280 __pyx_L5_argtuple_error:;
3281 __Pyx_RaiseArgtupleInvalid(
"__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24, __pyx_L3_error)
3283 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3284 __Pyx_RefNannyFinishContext();
3286 __pyx_L4_argument_unpacking_done:;
3287 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base___init__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), __pyx_v_shape, __pyx_v_name, __pyx_v_b_or, __pyx_v_b_i, __pyx_v_nd);
3290 __Pyx_RefNannyFinishContext();
3294 static int __pyx_pf_18BoundaryConditions_7BC_Base___init__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_name, PyObject *__pyx_v_b_or, PyObject *__pyx_v_b_i, PyObject *__pyx_v_nd) {
3296 __Pyx_TraceDeclarations
3297 __Pyx_RefNannyDeclarations
3298 PyObject *__pyx_t_1 = NULL;
3301 PyObject *__pyx_t_4 = NULL;
3303 __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
3304 int __pyx_lineno = 0;
3305 const char *__pyx_filename = NULL;
3306 int __pyx_clineno = 0;
3307 __Pyx_RefNannySetupContext(
"__init__", 0);
3308 __Pyx_TraceCall(
"__init__", __pyx_f[0], 24, 0, __PYX_ERR(0, 24, __pyx_L1_error));
3317 __Pyx_INCREF(__pyx_v_shape);
3318 __Pyx_GIVEREF(__pyx_v_shape);
3319 __Pyx_GOTREF(__pyx_v_self->Shape);
3320 __Pyx_DECREF(__pyx_v_self->Shape);
3321 __pyx_v_self->Shape = __pyx_v_shape;
3330 if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"str", Py_TYPE(__pyx_v_name)->tp_name), 0))) __PYX_ERR(0, 26, __pyx_L1_error)
3331 __pyx_t_1 = __pyx_v_name;
3332 __Pyx_INCREF(__pyx_t_1);
3333 __Pyx_GIVEREF(__pyx_t_1);
3334 __Pyx_GOTREF(__pyx_v_self->name);
3335 __Pyx_DECREF(__pyx_v_self->name);
3336 __pyx_v_self->name = ((PyObject*)__pyx_t_1);
3346 __Pyx_INCREF(__pyx_n_s_None);
3347 __Pyx_GIVEREF(__pyx_n_s_None);
3348 __Pyx_GOTREF(__pyx_v_self->BC_type);
3349 __Pyx_DECREF(__pyx_v_self->BC_type);
3350 __pyx_v_self->BC_type = __pyx_n_s_None;
3359 __pyx_t_2 = (__pyx_v_shape != Py_None);
3360 __pyx_t_3 = (__pyx_t_2 != 0);
3370 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->Shape, __pyx_n_s_Domain);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
3371 __Pyx_GOTREF(__pyx_t_1);
3372 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nd);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
3373 __Pyx_GOTREF(__pyx_t_4);
3374 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3375 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4);
if (unlikely((__pyx_t_5 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29, __pyx_L1_error)
3376 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3377 __pyx_v_self->nd = __pyx_t_5;
3396 __pyx_t_3 = (__pyx_v_nd != Py_None);
3397 __pyx_t_2 = (__pyx_t_3 != 0);
3407 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_nd);
if (unlikely((__pyx_t_5 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L1_error)
3408 __pyx_v_self->nd = __pyx_t_5;
3428 #ifndef CYTHON_WITHOUT_ASSERTIONS
3429 if (unlikely(!Py_OptimizeFlag)) {
3430 __pyx_t_2 = (__pyx_v_nd != Py_None);
3431 if (unlikely(!(__pyx_t_2 != 0))) {
3432 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Shape_or_nd_must_be_passed_to_BC);
3433 __PYX_ERR(0, 33, __pyx_L1_error)
3447 __pyx_t_2 = (__pyx_v_b_or != Py_None);
3448 __pyx_t_3 = (__pyx_t_2 != 0);
3458 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_b_or, __pyx_v_b_i);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error)
3459 __Pyx_GOTREF(__pyx_t_4);
3460 __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE);
if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 35, __pyx_L1_error)
3461 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3462 __PYX_XDEC_MEMVIEW(&__pyx_v_self->_b_or, 0);
3463 __pyx_v_self->_b_or = __pyx_t_6;
3464 __pyx_t_6.memview = NULL;
3465 __pyx_t_6.data = NULL;
3485 __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE);
if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 37, __pyx_L1_error)
3486 __PYX_XDEC_MEMVIEW(&__pyx_v_self->_b_or, 0);
3487 __pyx_v_self->_b_or = __pyx_t_6;
3488 __pyx_t_6.memview = NULL;
3489 __pyx_t_6.data = NULL;
3505 __Pyx_XDECREF(__pyx_t_1);
3506 __Pyx_XDECREF(__pyx_t_4);
3507 __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
3508 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3511 __Pyx_TraceReturn(Py_None, 0);
3512 __Pyx_RefNannyFinishContext();
3525 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_3getContext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
3526 static char __pyx_doc_18BoundaryConditions_7BC_Base_2getContext[] =
"BC_Base.getContext(self, context=None)\n\n Gets context from proteus.Context or\n\n Parameters\n ----------\n context: class, optional\n if set to None, the context will be created from proteus.Context\n ";
3527 static PyMethodDef __pyx_mdef_18BoundaryConditions_7BC_Base_3getContext = {
"getContext", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_7BC_Base_3getContext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_7BC_Base_2getContext};
3528 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_3getContext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3529 PyObject *__pyx_v_context = 0;
3530 int __pyx_lineno = 0;
3531 const char *__pyx_filename = NULL;
3532 int __pyx_clineno = 0;
3533 PyObject *__pyx_r = 0;
3534 __Pyx_RefNannyDeclarations
3535 __Pyx_RefNannySetupContext(
"getContext (wrapper)", 0);
3537 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,0};
3538 PyObject* values[1] = {0};
3539 values[0] = ((PyObject *)Py_None);
3540 if (unlikely(__pyx_kwds)) {
3542 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3544 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3547 default:
goto __pyx_L5_argtuple_error;
3549 kw_args = PyDict_Size(__pyx_kwds);
3553 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context);
3554 if (value) { values[0] = value; kw_args--; }
3557 if (unlikely(kw_args > 0)) {
3558 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"getContext") < 0)) __PYX_ERR(0, 52, __pyx_L3_error)
3561 switch (PyTuple_GET_SIZE(__pyx_args)) {
3562 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3565 default:
goto __pyx_L5_argtuple_error;
3568 __pyx_v_context = values[0];
3570 goto __pyx_L4_argument_unpacking_done;
3571 __pyx_L5_argtuple_error:;
3572 __Pyx_RaiseArgtupleInvalid(
"getContext", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 52, __pyx_L3_error)
3574 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
3575 __Pyx_RefNannyFinishContext();
3577 __pyx_L4_argument_unpacking_done:;
3578 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2getContext(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), __pyx_v_context);
3581 __Pyx_RefNannyFinishContext();
3585 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2getContext(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_context) {
3586 PyObject *__pyx_v_Context = NULL;
3587 PyObject *__pyx_r = NULL;
3588 __Pyx_TraceDeclarations
3589 __Pyx_RefNannyDeclarations
3591 PyObject *__pyx_t_2 = NULL;
3592 PyObject *__pyx_t_3 = NULL;
3593 PyObject *__pyx_t_4 = NULL;
3594 int __pyx_lineno = 0;
3595 const char *__pyx_filename = NULL;
3596 int __pyx_clineno = 0;
3597 __Pyx_TraceFrameInit(__pyx_codeobj_)
3598 __Pyx_RefNannySetupContext(
"getContext", 0);
3599 __Pyx_TraceCall(
"getContext", __pyx_f[0], 52, 0, __PYX_ERR(0, 52, __pyx_L1_error));
3608 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_context);
if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 61, __pyx_L1_error)
3618 __pyx_t_2 = PyList_New(1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
3619 __Pyx_GOTREF(__pyx_t_2);
3620 __Pyx_INCREF(__pyx_n_s_Context);
3621 __Pyx_GIVEREF(__pyx_n_s_Context);
3622 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Context);
3623 __pyx_t_3 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
3624 __Pyx_GOTREF(__pyx_t_3);
3625 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3626 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Context);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
3627 __Pyx_GOTREF(__pyx_t_2);
3628 __Pyx_INCREF(__pyx_t_2);
3629 __pyx_v_Context = __pyx_t_2;
3630 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3631 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3640 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_Context, __pyx_n_s_get);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
3641 __Pyx_GOTREF(__pyx_t_2);
3643 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3644 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
3645 if (likely(__pyx_t_4)) {
3646 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3647 __Pyx_INCREF(__pyx_t_4);
3648 __Pyx_INCREF(
function);
3649 __Pyx_DECREF_SET(__pyx_t_2,
function);
3652 __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
3653 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3654 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
3655 __Pyx_GOTREF(__pyx_t_3);
3656 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3657 __Pyx_GIVEREF(__pyx_t_3);
3658 __Pyx_GOTREF(__pyx_v_self->ct);
3659 __Pyx_DECREF(__pyx_v_self->ct);
3660 __pyx_v_self->ct = __pyx_t_3;
3681 __Pyx_INCREF(__pyx_v_context);
3682 __Pyx_GIVEREF(__pyx_v_context);
3683 __Pyx_GOTREF(__pyx_v_self->ct);
3684 __Pyx_DECREF(__pyx_v_self->ct);
3685 __pyx_v_self->ct = __pyx_v_context;
3698 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3701 __Pyx_XDECREF(__pyx_t_2);
3702 __Pyx_XDECREF(__pyx_t_3);
3703 __Pyx_XDECREF(__pyx_t_4);
3704 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
3707 __Pyx_XDECREF(__pyx_v_Context);
3708 __Pyx_XGIVEREF(__pyx_r);
3709 __Pyx_TraceReturn(__pyx_r, 0);
3710 __Pyx_RefNannyFinishContext();
3723 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(PyObject *__pyx_v_self);
3724 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(PyObject *__pyx_v_self) {
3725 PyObject *__pyx_r = 0;
3726 __Pyx_RefNannyDeclarations
3727 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
3728 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
3731 __Pyx_RefNannyFinishContext();
3735 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
3736 PyObject *__pyx_r = NULL;
3737 __Pyx_TraceDeclarations
3738 __Pyx_RefNannyDeclarations
3739 PyObject *__pyx_t_1 = NULL;
3740 int __pyx_lineno = 0;
3741 const char *__pyx_filename = NULL;
3742 int __pyx_clineno = 0;
3743 __Pyx_RefNannySetupContext(
"__get__", 0);
3744 __Pyx_TraceCall(
"__get__", __pyx_f[2], 8, 0, __PYX_ERR(2, 8, __pyx_L1_error));
3745 __Pyx_XDECREF(__pyx_r);
3746 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nd);
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
3747 __Pyx_GOTREF(__pyx_t_1);
3748 __pyx_r = __pyx_t_1;
3754 __Pyx_XDECREF(__pyx_t_1);
3755 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.nd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3758 __Pyx_XGIVEREF(__pyx_r);
3759 __Pyx_TraceReturn(__pyx_r, 0);
3760 __Pyx_RefNannyFinishContext();
3765 static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
3766 static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3768 __Pyx_RefNannyDeclarations
3769 __Pyx_RefNannySetupContext(
"__set__ (wrapper)", 0);
3770 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
3773 __Pyx_RefNannyFinishContext();
3777 static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
3779 __Pyx_TraceDeclarations
3780 __Pyx_RefNannyDeclarations
3782 int __pyx_lineno = 0;
3783 const char *__pyx_filename = NULL;
3784 int __pyx_clineno = 0;
3785 __Pyx_RefNannySetupContext(
"__set__", 0);
3786 __Pyx_TraceCall(
"__set__", __pyx_f[2], 8, 0, __PYX_ERR(2, 8, __pyx_L1_error));
3787 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value);
if (unlikely((__pyx_t_1 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(2, 8, __pyx_L1_error)
3788 __pyx_v_self->nd = __pyx_t_1;
3794 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.nd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3797 __Pyx_TraceReturn(Py_None, 0);
3798 __Pyx_RefNannyFinishContext();
3811 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(PyObject *__pyx_v_self);
3812 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(PyObject *__pyx_v_self) {
3813 PyObject *__pyx_r = 0;
3814 __Pyx_RefNannyDeclarations
3815 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
3816 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
3819 __Pyx_RefNannyFinishContext();
3823 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
3824 PyObject *__pyx_r = NULL;
3825 __Pyx_TraceDeclarations
3826 __Pyx_RefNannyDeclarations
3827 int __pyx_lineno = 0;
3828 const char *__pyx_filename = NULL;
3829 int __pyx_clineno = 0;
3830 __Pyx_RefNannySetupContext(
"__get__", 0);
3831 __Pyx_TraceCall(
"__get__", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));
3832 __Pyx_XDECREF(__pyx_r);
3833 __Pyx_INCREF(__pyx_v_self->Shape);
3834 __pyx_r = __pyx_v_self->Shape;
3839 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.Shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3842 __Pyx_XGIVEREF(__pyx_r);
3843 __Pyx_TraceReturn(__pyx_r, 0);
3844 __Pyx_RefNannyFinishContext();
3849 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
3850 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3852 __Pyx_RefNannyDeclarations
3853 __Pyx_RefNannySetupContext(
"__set__ (wrapper)", 0);
3854 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
3857 __Pyx_RefNannyFinishContext();
3861 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
3863 __Pyx_TraceDeclarations
3864 __Pyx_RefNannyDeclarations
3865 int __pyx_lineno = 0;
3866 const char *__pyx_filename = NULL;
3867 int __pyx_clineno = 0;
3868 __Pyx_RefNannySetupContext(
"__set__", 0);
3869 __Pyx_TraceCall(
"__set__", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));
3870 __Pyx_INCREF(__pyx_v_value);
3871 __Pyx_GIVEREF(__pyx_v_value);
3872 __Pyx_GOTREF(__pyx_v_self->Shape);
3873 __Pyx_DECREF(__pyx_v_self->Shape);
3874 __pyx_v_self->Shape = __pyx_v_value;
3880 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.Shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3883 __Pyx_TraceReturn(Py_None, 0);
3884 __Pyx_RefNannyFinishContext();
3889 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self);
3890 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self) {
3892 __Pyx_RefNannyDeclarations
3893 __Pyx_RefNannySetupContext(
"__del__ (wrapper)", 0);
3894 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
3897 __Pyx_RefNannyFinishContext();
3901 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
3903 __Pyx_TraceDeclarations
3904 __Pyx_RefNannyDeclarations
3905 int __pyx_lineno = 0;
3906 const char *__pyx_filename = NULL;
3907 int __pyx_clineno = 0;
3908 __Pyx_RefNannySetupContext(
"__del__", 0);
3909 __Pyx_TraceCall(
"__del__", __pyx_f[2], 9, 0, __PYX_ERR(2, 9, __pyx_L1_error));
3910 __Pyx_INCREF(Py_None);
3911 __Pyx_GIVEREF(Py_None);
3912 __Pyx_GOTREF(__pyx_v_self->Shape);
3913 __Pyx_DECREF(__pyx_v_self->Shape);
3914 __pyx_v_self->Shape = Py_None;
3920 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.Shape.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3923 __Pyx_TraceReturn(Py_None, 0);
3924 __Pyx_RefNannyFinishContext();
3937 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(PyObject *__pyx_v_self);
3938 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(PyObject *__pyx_v_self) {
3939 PyObject *__pyx_r = 0;
3940 __Pyx_RefNannyDeclarations
3941 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
3942 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
3945 __Pyx_RefNannyFinishContext();
3949 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
3950 PyObject *__pyx_r = NULL;
3951 __Pyx_TraceDeclarations
3952 __Pyx_RefNannyDeclarations
3953 int __pyx_lineno = 0;
3954 const char *__pyx_filename = NULL;
3955 int __pyx_clineno = 0;
3956 __Pyx_RefNannySetupContext(
"__get__", 0);
3957 __Pyx_TraceCall(
"__get__", __pyx_f[2], 10, 0, __PYX_ERR(2, 10, __pyx_L1_error));
3958 __Pyx_XDECREF(__pyx_r);
3959 __Pyx_INCREF(__pyx_v_self->name);
3960 __pyx_r = __pyx_v_self->name;
3965 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3968 __Pyx_XGIVEREF(__pyx_r);
3969 __Pyx_TraceReturn(__pyx_r, 0);
3970 __Pyx_RefNannyFinishContext();
3975 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
3976 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3978 __Pyx_RefNannyDeclarations
3979 __Pyx_RefNannySetupContext(
"__set__ (wrapper)", 0);
3980 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
3983 __Pyx_RefNannyFinishContext();
3987 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
3989 __Pyx_TraceDeclarations
3990 __Pyx_RefNannyDeclarations
3991 PyObject *__pyx_t_1 = NULL;
3992 int __pyx_lineno = 0;
3993 const char *__pyx_filename = NULL;
3994 int __pyx_clineno = 0;
3995 __Pyx_RefNannySetupContext(
"__set__", 0);
3996 __Pyx_TraceCall(
"__set__", __pyx_f[2], 10, 0, __PYX_ERR(2, 10, __pyx_L1_error));
3997 if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error)
3998 __pyx_t_1 = __pyx_v_value;
3999 __Pyx_INCREF(__pyx_t_1);
4000 __Pyx_GIVEREF(__pyx_t_1);
4001 __Pyx_GOTREF(__pyx_v_self->name);
4002 __Pyx_DECREF(__pyx_v_self->name);
4003 __pyx_v_self->name = ((PyObject*)__pyx_t_1);
4010 __Pyx_XDECREF(__pyx_t_1);
4011 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4014 __Pyx_TraceReturn(Py_None, 0);
4015 __Pyx_RefNannyFinishContext();
4020 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self);
4021 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self) {
4023 __Pyx_RefNannyDeclarations
4024 __Pyx_RefNannySetupContext(
"__del__ (wrapper)", 0);
4025 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
4028 __Pyx_RefNannyFinishContext();
4032 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4034 __Pyx_TraceDeclarations
4035 __Pyx_RefNannyDeclarations
4036 int __pyx_lineno = 0;
4037 const char *__pyx_filename = NULL;
4038 int __pyx_clineno = 0;
4039 __Pyx_RefNannySetupContext(
"__del__", 0);
4040 __Pyx_TraceCall(
"__del__", __pyx_f[2], 10, 0, __PYX_ERR(2, 10, __pyx_L1_error));
4041 __Pyx_INCREF(Py_None);
4042 __Pyx_GIVEREF(Py_None);
4043 __Pyx_GOTREF(__pyx_v_self->name);
4044 __Pyx_DECREF(__pyx_v_self->name);
4045 __pyx_v_self->name = ((PyObject*)Py_None);
4051 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.name.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4054 __Pyx_TraceReturn(Py_None, 0);
4055 __Pyx_RefNannyFinishContext();
4068 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(PyObject *__pyx_v_self);
4069 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(PyObject *__pyx_v_self) {
4070 PyObject *__pyx_r = 0;
4071 __Pyx_RefNannyDeclarations
4072 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
4073 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
4076 __Pyx_RefNannyFinishContext();
4080 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4081 PyObject *__pyx_r = NULL;
4082 __Pyx_TraceDeclarations
4083 __Pyx_RefNannyDeclarations
4084 int __pyx_lineno = 0;
4085 const char *__pyx_filename = NULL;
4086 int __pyx_clineno = 0;
4087 __Pyx_RefNannySetupContext(
"__get__", 0);
4088 __Pyx_TraceCall(
"__get__", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));
4089 __Pyx_XDECREF(__pyx_r);
4090 __Pyx_INCREF(__pyx_v_self->BC_type);
4091 __pyx_r = __pyx_v_self->BC_type;
4096 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.BC_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4099 __Pyx_XGIVEREF(__pyx_r);
4100 __Pyx_TraceReturn(__pyx_r, 0);
4101 __Pyx_RefNannyFinishContext();
4106 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
4107 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4109 __Pyx_RefNannyDeclarations
4110 __Pyx_RefNannySetupContext(
"__set__ (wrapper)", 0);
4111 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
4114 __Pyx_RefNannyFinishContext();
4118 static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
4120 __Pyx_TraceDeclarations
4121 __Pyx_RefNannyDeclarations
4122 PyObject *__pyx_t_1 = NULL;
4123 int __pyx_lineno = 0;
4124 const char *__pyx_filename = NULL;
4125 int __pyx_clineno = 0;
4126 __Pyx_RefNannySetupContext(
"__set__", 0);
4127 __Pyx_TraceCall(
"__set__", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));
4128 if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 11, __pyx_L1_error)
4129 __pyx_t_1 = __pyx_v_value;
4130 __Pyx_INCREF(__pyx_t_1);
4131 __Pyx_GIVEREF(__pyx_t_1);
4132 __Pyx_GOTREF(__pyx_v_self->BC_type);
4133 __Pyx_DECREF(__pyx_v_self->BC_type);
4134 __pyx_v_self->BC_type = ((PyObject*)__pyx_t_1);
4141 __Pyx_XDECREF(__pyx_t_1);
4142 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.BC_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4145 __Pyx_TraceReturn(Py_None, 0);
4146 __Pyx_RefNannyFinishContext();
4151 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self);
4152 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self) {
4154 __Pyx_RefNannyDeclarations
4155 __Pyx_RefNannySetupContext(
"__del__ (wrapper)", 0);
4156 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
4159 __Pyx_RefNannyFinishContext();
4163 static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4165 __Pyx_TraceDeclarations
4166 __Pyx_RefNannyDeclarations
4167 int __pyx_lineno = 0;
4168 const char *__pyx_filename = NULL;
4169 int __pyx_clineno = 0;
4170 __Pyx_RefNannySetupContext(
"__del__", 0);
4171 __Pyx_TraceCall(
"__del__", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error));
4172 __Pyx_INCREF(Py_None);
4173 __Pyx_GIVEREF(Py_None);
4174 __Pyx_GOTREF(__pyx_v_self->BC_type);
4175 __Pyx_DECREF(__pyx_v_self->BC_type);
4176 __pyx_v_self->BC_type = ((PyObject*)Py_None);
4182 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.BC_type.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4185 __Pyx_TraceReturn(Py_None, 0);
4186 __Pyx_RefNannyFinishContext();
4199 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(PyObject *__pyx_v_self);
4200 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(PyObject *__pyx_v_self) {
4201 PyObject *__pyx_r = 0;
4202 __Pyx_RefNannyDeclarations
4203 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
4204 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
4207 __Pyx_RefNannyFinishContext();
4211 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4212 PyObject *__pyx_r = NULL;
4213 __Pyx_TraceDeclarations
4214 __Pyx_RefNannyDeclarations
4215 int __pyx_lineno = 0;
4216 const char *__pyx_filename = NULL;
4217 int __pyx_clineno = 0;
4218 __Pyx_RefNannySetupContext(
"__get__", 0);
4219 __Pyx_TraceCall(
"__get__", __pyx_f[2], 12, 0, __PYX_ERR(2, 12, __pyx_L1_error));
4220 __Pyx_XDECREF(__pyx_r);
4221 __Pyx_INCREF(__pyx_v_self->ct);
4222 __pyx_r = __pyx_v_self->ct;
4227 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.ct.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4230 __Pyx_XGIVEREF(__pyx_r);
4231 __Pyx_TraceReturn(__pyx_r, 0);
4232 __Pyx_RefNannyFinishContext();
4237 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
4238 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4240 __Pyx_RefNannyDeclarations
4241 __Pyx_RefNannySetupContext(
"__set__ (wrapper)", 0);
4242 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v_value));
4245 __Pyx_RefNannyFinishContext();
4249 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
4251 __Pyx_TraceDeclarations
4252 __Pyx_RefNannyDeclarations
4253 int __pyx_lineno = 0;
4254 const char *__pyx_filename = NULL;
4255 int __pyx_clineno = 0;
4256 __Pyx_RefNannySetupContext(
"__set__", 0);
4257 __Pyx_TraceCall(
"__set__", __pyx_f[2], 12, 0, __PYX_ERR(2, 12, __pyx_L1_error));
4258 __Pyx_INCREF(__pyx_v_value);
4259 __Pyx_GIVEREF(__pyx_v_value);
4260 __Pyx_GOTREF(__pyx_v_self->ct);
4261 __Pyx_DECREF(__pyx_v_self->ct);
4262 __pyx_v_self->ct = __pyx_v_value;
4268 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.ct.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4271 __Pyx_TraceReturn(Py_None, 0);
4272 __Pyx_RefNannyFinishContext();
4277 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self);
4278 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self) {
4280 __Pyx_RefNannyDeclarations
4281 __Pyx_RefNannySetupContext(
"__del__ (wrapper)", 0);
4282 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
4285 __Pyx_RefNannyFinishContext();
4289 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4291 __Pyx_TraceDeclarations
4292 __Pyx_RefNannyDeclarations
4293 int __pyx_lineno = 0;
4294 const char *__pyx_filename = NULL;
4295 int __pyx_clineno = 0;
4296 __Pyx_RefNannySetupContext(
"__del__", 0);
4297 __Pyx_TraceCall(
"__del__", __pyx_f[2], 12, 0, __PYX_ERR(2, 12, __pyx_L1_error));
4298 __Pyx_INCREF(Py_None);
4299 __Pyx_GIVEREF(Py_None);
4300 __Pyx_GOTREF(__pyx_v_self->ct);
4301 __Pyx_DECREF(__pyx_v_self->ct);
4302 __pyx_v_self->ct = Py_None;
4308 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.ct.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4311 __Pyx_TraceReturn(Py_None, 0);
4312 __Pyx_RefNannyFinishContext();
4323 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4324 static char __pyx_doc_18BoundaryConditions_7BC_Base_4__reduce_cython__[] =
"BC_Base.__reduce_cython__(self)";
4325 static PyMethodDef __pyx_mdef_18BoundaryConditions_7BC_Base_5__reduce_cython__ = {
"__reduce_cython__", (PyCFunction)__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__, METH_NOARGS, __pyx_doc_18BoundaryConditions_7BC_Base_4__reduce_cython__};
4326 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4327 PyObject *__pyx_r = 0;
4328 __Pyx_RefNannyDeclarations
4329 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
4330 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self));
4333 __Pyx_RefNannyFinishContext();
4337 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4338 PyObject *__pyx_v_state = 0;
4339 PyObject *__pyx_v__dict = 0;
4340 int __pyx_v_use_setstate;
4341 PyObject *__pyx_r = NULL;
4342 __Pyx_TraceDeclarations
4343 __Pyx_RefNannyDeclarations
4344 PyObject *__pyx_t_1 = NULL;
4345 PyObject *__pyx_t_2 = NULL;
4346 PyObject *__pyx_t_3 = NULL;
4350 int __pyx_lineno = 0;
4351 const char *__pyx_filename = NULL;
4352 int __pyx_clineno = 0;
4353 __Pyx_TraceFrameInit(__pyx_codeobj__2)
4354 __Pyx_RefNannySetupContext(
"__reduce_cython__", 0);
4355 __Pyx_TraceCall(
"__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
4364 __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->_b_or, 1, (PyObject *(*)(
char *)) __pyx_memview_get_double, (int (*)(
char *, PyObject *)) __pyx_memview_set_double, 0);;
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
4365 __Pyx_GOTREF(__pyx_t_1);
4366 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nd);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
4367 __Pyx_GOTREF(__pyx_t_2);
4368 __pyx_t_3 = PyTuple_New(6);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
4369 __Pyx_GOTREF(__pyx_t_3);
4370 __Pyx_INCREF(__pyx_v_self->BC_type);
4371 __Pyx_GIVEREF(__pyx_v_self->BC_type);
4372 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->BC_type);
4373 __Pyx_INCREF(__pyx_v_self->Shape);
4374 __Pyx_GIVEREF(__pyx_v_self->Shape);
4375 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->Shape);
4376 __Pyx_GIVEREF(__pyx_t_1);
4377 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
4378 __Pyx_INCREF(__pyx_v_self->ct);
4379 __Pyx_GIVEREF(__pyx_v_self->ct);
4380 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->ct);
4381 __Pyx_INCREF(__pyx_v_self->name);
4382 __Pyx_GIVEREF(__pyx_v_self->name);
4383 PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->name);
4384 __Pyx_GIVEREF(__pyx_t_2);
4385 PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_2);
4388 __pyx_v_state = ((PyObject*)__pyx_t_3);
4398 __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
4399 __Pyx_GOTREF(__pyx_t_3);
4400 __pyx_v__dict = __pyx_t_3;
4410 __pyx_t_4 = (__pyx_v__dict != Py_None);
4411 __pyx_t_5 = (__pyx_t_4 != 0);
4421 __pyx_t_3 = PyTuple_New(1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
4422 __Pyx_GOTREF(__pyx_t_3);
4423 __Pyx_INCREF(__pyx_v__dict);
4424 __Pyx_GIVEREF(__pyx_v__dict);
4425 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
4426 __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
4427 __Pyx_GOTREF(__pyx_t_2);
4428 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4429 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
4439 __pyx_v_use_setstate = 1;
4459 __pyx_t_4 = (__pyx_v_self->BC_type != ((PyObject*)Py_None));
4460 __pyx_t_6 = (__pyx_t_4 != 0);
4463 __pyx_t_5 = __pyx_t_6;
4464 goto __pyx_L4_bool_binop_done;
4466 __pyx_t_6 = (__pyx_v_self->Shape != Py_None);
4467 __pyx_t_4 = (__pyx_t_6 != 0);
4470 __pyx_t_5 = __pyx_t_4;
4471 goto __pyx_L4_bool_binop_done;
4473 __pyx_t_4 = (__pyx_v_self->ct != Py_None);
4474 __pyx_t_6 = (__pyx_t_4 != 0);
4477 __pyx_t_5 = __pyx_t_6;
4478 goto __pyx_L4_bool_binop_done;
4480 __pyx_t_6 = (__pyx_v_self->name != ((PyObject*)Py_None));
4481 __pyx_t_4 = (__pyx_t_6 != 0);
4482 __pyx_t_5 = __pyx_t_4;
4483 __pyx_L4_bool_binop_done:;
4484 __pyx_v_use_setstate = __pyx_t_5;
4495 __pyx_t_5 = (__pyx_v_use_setstate != 0);
4505 __Pyx_XDECREF(__pyx_r);
4506 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_BC_Base);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
4507 __Pyx_GOTREF(__pyx_t_2);
4508 __pyx_t_3 = PyTuple_New(3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
4509 __Pyx_GOTREF(__pyx_t_3);
4510 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4511 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4512 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4513 __Pyx_INCREF(__pyx_int_158231071);
4514 __Pyx_GIVEREF(__pyx_int_158231071);
4515 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_158231071);
4516 __Pyx_INCREF(Py_None);
4517 __Pyx_GIVEREF(Py_None);
4518 PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
4519 __pyx_t_1 = PyTuple_New(3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
4520 __Pyx_GOTREF(__pyx_t_1);
4521 __Pyx_GIVEREF(__pyx_t_2);
4522 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
4523 __Pyx_GIVEREF(__pyx_t_3);
4524 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
4525 __Pyx_INCREF(__pyx_v_state);
4526 __Pyx_GIVEREF(__pyx_v_state);
4527 PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
4530 __pyx_r = __pyx_t_1;
4551 __Pyx_XDECREF(__pyx_r);
4552 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_BC_Base);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
4553 __Pyx_GOTREF(__pyx_t_1);
4554 __pyx_t_3 = PyTuple_New(3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
4555 __Pyx_GOTREF(__pyx_t_3);
4556 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4557 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4558 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
4559 __Pyx_INCREF(__pyx_int_158231071);
4560 __Pyx_GIVEREF(__pyx_int_158231071);
4561 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_158231071);
4562 __Pyx_INCREF(__pyx_v_state);
4563 __Pyx_GIVEREF(__pyx_v_state);
4564 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
4565 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
4566 __Pyx_GOTREF(__pyx_t_2);
4567 __Pyx_GIVEREF(__pyx_t_1);
4568 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4569 __Pyx_GIVEREF(__pyx_t_3);
4570 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4573 __pyx_r = __pyx_t_2;
4586 __Pyx_XDECREF(__pyx_t_1);
4587 __Pyx_XDECREF(__pyx_t_2);
4588 __Pyx_XDECREF(__pyx_t_3);
4589 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4592 __Pyx_XDECREF(__pyx_v_state);
4593 __Pyx_XDECREF(__pyx_v__dict);
4594 __Pyx_XGIVEREF(__pyx_r);
4595 __Pyx_TraceReturn(__pyx_r, 0);
4596 __Pyx_RefNannyFinishContext();
4608 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state);
4609 static char __pyx_doc_18BoundaryConditions_7BC_Base_6__setstate_cython__[] =
"BC_Base.__setstate_cython__(self, __pyx_state)";
4610 static PyMethodDef __pyx_mdef_18BoundaryConditions_7BC_Base_7__setstate_cython__ = {
"__setstate_cython__", (PyCFunction)__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__, METH_O, __pyx_doc_18BoundaryConditions_7BC_Base_6__setstate_cython__};
4611 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
4612 PyObject *__pyx_r = 0;
4613 __Pyx_RefNannyDeclarations
4614 __Pyx_RefNannySetupContext(
"__setstate_cython__ (wrapper)", 0);
4615 __pyx_r = __pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
4618 __Pyx_RefNannyFinishContext();
4622 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_6__setstate_cython__(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
4623 PyObject *__pyx_r = NULL;
4624 __Pyx_TraceDeclarations
4625 __Pyx_RefNannyDeclarations
4626 PyObject *__pyx_t_1 = NULL;
4627 int __pyx_lineno = 0;
4628 const char *__pyx_filename = NULL;
4629 int __pyx_clineno = 0;
4630 __Pyx_TraceFrameInit(__pyx_codeobj__3)
4631 __Pyx_RefNannySetupContext(
"__setstate_cython__", 0);
4632 __Pyx_TraceCall(
"__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
4639 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
4640 __pyx_t_1 = __pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
4641 __Pyx_GOTREF(__pyx_t_1);
4642 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4652 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4655 __Pyx_XDECREF(__pyx_t_1);
4656 __Pyx_AddTraceback(
"BoundaryConditions.BC_Base.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4659 __Pyx_XGIVEREF(__pyx_r);
4660 __Pyx_TraceReturn(__pyx_r, 0);
4661 __Pyx_RefNannyFinishContext();
4674 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
4675 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4677 __Pyx_RefNannyDeclarations
4678 __Pyx_RefNannySetupContext(
"__init__ (wrapper)", 0);
4679 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
4680 __Pyx_RaiseArgtupleInvalid(
"__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args));
return -1;}
4681 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds,
"__init__", 0)))
return -1;
4682 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
4685 __Pyx_RefNannyFinishContext();
4689 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
4691 __Pyx_TraceDeclarations
4692 __Pyx_RefNannyDeclarations
4693 int __pyx_lineno = 0;
4694 const char *__pyx_filename = NULL;
4695 int __pyx_clineno = 0;
4696 __Pyx_RefNannySetupContext(
"__init__", 0);
4697 __Pyx_TraceCall(
"__init__", __pyx_f[0], 78, 0, __PYX_ERR(0, 78, __pyx_L1_error));
4706 __Pyx_INCREF(Py_None);
4707 __Pyx_GIVEREF(Py_None);
4708 __Pyx_GOTREF(__pyx_v_self->uOfXT);
4709 __Pyx_DECREF(__pyx_v_self->uOfXT);
4710 __pyx_v_self->uOfXT = Py_None;
4724 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4727 __Pyx_TraceReturn(Py_None, 0);
4728 __Pyx_RefNannyFinishContext();
4741 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4742 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_2init_cython[] =
"BoundaryCondition.init_cython(self)";
4743 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_3init_cython = {
"init_cython", (PyCFunction)__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython, METH_NOARGS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_2init_cython};
4744 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4745 PyObject *__pyx_r = 0;
4746 __Pyx_RefNannyDeclarations
4747 __Pyx_RefNannySetupContext(
"init_cython (wrapper)", 0);
4748 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
4751 __Pyx_RefNannyFinishContext();
4755 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
4756 PyObject *__pyx_r = NULL;
4757 __Pyx_TraceDeclarations
4758 __Pyx_RefNannyDeclarations
4759 int __pyx_lineno = 0;
4760 const char *__pyx_filename = NULL;
4761 int __pyx_clineno = 0;
4762 __Pyx_TraceFrameInit(__pyx_codeobj__4)
4763 __Pyx_RefNannySetupContext(
"init_cython", 0);
4764 __Pyx_TraceCall(
"init_cython", __pyx_f[0], 81, 0, __PYX_ERR(0, 81, __pyx_L1_error));
4773 __Pyx_XDECREF(__pyx_r);
4774 __Pyx_INCREF(__pyx_v_self->uOfXT);
4775 __pyx_r = __pyx_v_self->uOfXT;
4788 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.init_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
4791 __Pyx_XGIVEREF(__pyx_r);
4792 __Pyx_TraceReturn(__pyx_r, 0);
4793 __Pyx_RefNannyFinishContext();
4805 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4806 static void __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self,
int __pyx_skip_dispatch) {
4807 __Pyx_TraceDeclarations
4808 __Pyx_RefNannyDeclarations
4809 PyObject *__pyx_t_1 = NULL;
4810 PyObject *__pyx_t_2 = NULL;
4811 PyObject *__pyx_t_3 = NULL;
4812 PyObject *__pyx_t_4 = NULL;
4813 int __pyx_lineno = 0;
4814 const char *__pyx_filename = NULL;
4815 int __pyx_clineno = 0;
4816 __Pyx_TraceFrameInit(__pyx_codeobj__5)
4817 __Pyx_RefNannySetupContext(
"resetBC", 0);
4818 __Pyx_TraceCall(
"resetBC", __pyx_f[0], 84, 0, __PYX_ERR(0, 84, __pyx_L1_error));
4820 if (unlikely(__pyx_skip_dispatch)) ;
4822 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
4823 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4824 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
4825 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
4826 PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
4828 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_resetBC);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
4829 __Pyx_GOTREF(__pyx_t_1);
4830 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(
void*)__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC)) {
4831 __Pyx_INCREF(__pyx_t_1);
4832 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
4833 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4834 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4835 if (likely(__pyx_t_4)) {
4836 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
4837 __Pyx_INCREF(__pyx_t_4);
4838 __Pyx_INCREF(
function);
4839 __Pyx_DECREF_SET(__pyx_t_3,
function);
4842 __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4843 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4844 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
4845 __Pyx_GOTREF(__pyx_t_2);
4846 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4847 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4848 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4851 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4852 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
4853 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
4854 if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
4855 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
4858 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4859 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4871 __Pyx_INCREF(Py_None);
4872 __Pyx_GIVEREF(Py_None);
4873 __Pyx_GOTREF(__pyx_v_self->uOfXT);
4874 __Pyx_DECREF(__pyx_v_self->uOfXT);
4875 __pyx_v_self->uOfXT = Py_None;
4888 __Pyx_XDECREF(__pyx_t_1);
4889 __Pyx_XDECREF(__pyx_t_2);
4890 __Pyx_XDECREF(__pyx_t_3);
4891 __Pyx_XDECREF(__pyx_t_4);
4892 __Pyx_WriteUnraisable(
"BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
4894 __Pyx_TraceReturn(Py_None, 0);
4895 __Pyx_RefNannyFinishContext();
4899 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
4900 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_4resetBC[] =
"BoundaryCondition.resetBC(self) -> void";
4901 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_5resetBC = {
"resetBC", (PyCFunction)__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC, METH_NOARGS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_4resetBC};
4902 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4903 PyObject *__pyx_r = 0;
4904 __Pyx_RefNannyDeclarations
4905 __Pyx_RefNannySetupContext(
"resetBC (wrapper)", 0);
4906 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
4909 __Pyx_RefNannyFinishContext();
4913 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
4914 PyObject *__pyx_r = NULL;
4915 __Pyx_TraceDeclarations
4916 __Pyx_RefNannyDeclarations
4917 PyObject *__pyx_t_1 = NULL;
4918 int __pyx_lineno = 0;
4919 const char *__pyx_filename = NULL;
4920 int __pyx_clineno = 0;
4921 __Pyx_TraceFrameInit(__pyx_codeobj__5)
4922 __Pyx_RefNannySetupContext(
"resetBC", 0);
4923 __Pyx_TraceCall(
"resetBC (wrapper)", __pyx_f[0], 84, 0, __PYX_ERR(0, 84, __pyx_L1_error));
4924 __Pyx_XDECREF(__pyx_r);
4925 __pyx_t_1 = __Pyx_void_to_None(__pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(__pyx_v_self, 1));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
4926 __Pyx_GOTREF(__pyx_t_1);
4927 __pyx_r = __pyx_t_1;
4933 __Pyx_XDECREF(__pyx_t_1);
4934 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
4937 __Pyx_XGIVEREF(__pyx_r);
4938 __Pyx_TraceReturn(__pyx_r, 0);
4939 __Pyx_RefNannyFinishContext();
4952 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
4953 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_6setConstantBC[] =
"BoundaryCondition.setConstantBC(self, value)\n\n function returning constant BC\n\n Parameters\n ----------\n value : float\n Constant value\n\n ";
4954 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_7setConstantBC = {
"setConstantBC", (PyCFunction)__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC, METH_O, __pyx_doc_18BoundaryConditions_17BoundaryCondition_6setConstantBC};
4955 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4956 PyObject *__pyx_r = 0;
4957 __Pyx_RefNannyDeclarations
4958 __Pyx_RefNannySetupContext(
"setConstantBC (wrapper)", 0);
4959 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), ((PyObject *)__pyx_v_value));
4962 __Pyx_RefNannyFinishContext();
4974 static PyObject *__pyx_pf_18BoundaryConditions_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
4975 PyObject *__pyx_r = NULL;
4976 __Pyx_TraceDeclarations
4977 __Pyx_RefNannyDeclarations
4978 PyObject *__pyx_t_1 = NULL;
4979 PyObject *__pyx_t_2 = NULL;
4980 int __pyx_lineno = 0;
4981 const char *__pyx_filename = NULL;
4982 int __pyx_clineno = 0;
4983 __Pyx_RefNannySetupContext(
"__defaults__", 0);
4984 __Pyx_TraceCall(
"__defaults__", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error));
4985 __Pyx_XDECREF(__pyx_r);
4986 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
4987 __Pyx_GOTREF(__pyx_t_1);
4988 __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_n);
4989 __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_n);
4990 PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_n);
4991 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
4992 __Pyx_GOTREF(__pyx_t_2);
4993 __Pyx_GIVEREF(__pyx_t_1);
4994 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4995 __Pyx_INCREF(Py_None);
4996 __Pyx_GIVEREF(Py_None);
4997 PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
4999 __pyx_r = __pyx_t_2;
5005 __Pyx_XDECREF(__pyx_t_1);
5006 __Pyx_XDECREF(__pyx_t_2);
5007 __Pyx_AddTraceback(
"BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5010 __Pyx_XGIVEREF(__pyx_r);
5011 __Pyx_TraceReturn(__pyx_r, 0);
5012 __Pyx_RefNannyFinishContext();
5017 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC_lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5018 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setConstantBC_lambda = {
"lambda", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC_lambda, METH_VARARGS|METH_KEYWORDS, 0};
5019 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC_lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5020 CYTHON_UNUSED PyObject *__pyx_v_x = 0;
5021 CYTHON_UNUSED PyObject *__pyx_v_t = 0;
5022 CYTHON_UNUSED PyObject *__pyx_v_n = 0;
5023 int __pyx_lineno = 0;
5024 const char *__pyx_filename = NULL;
5025 int __pyx_clineno = 0;
5026 PyObject *__pyx_r = 0;
5027 __Pyx_RefNannyDeclarations
5028 __Pyx_RefNannySetupContext(
"lambda (wrapper)", 0);
5030 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,&__pyx_n_s_n,0};
5031 PyObject* values[3] = {0,0,0};
5032 __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
5033 values[2] = __pyx_dynamic_args->__pyx_arg_n;
5034 if (unlikely(__pyx_kwds)) {
5036 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5038 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5040 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5042 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5045 default:
goto __pyx_L5_argtuple_error;
5047 kw_args = PyDict_Size(__pyx_kwds);
5050 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5051 else goto __pyx_L5_argtuple_error;
5054 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5056 __Pyx_RaiseArgtupleInvalid(
"lambda", 0, 2, 3, 1); __PYX_ERR(0, 97, __pyx_L3_error)
5061 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
5062 if (value) { values[2] = value; kw_args--; }
5065 if (unlikely(kw_args > 0)) {
5066 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"lambda") < 0)) __PYX_ERR(0, 97, __pyx_L3_error)
5069 switch (PyTuple_GET_SIZE(__pyx_args)) {
5070 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5072 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5073 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5075 default:
goto __pyx_L5_argtuple_error;
5078 __pyx_v_x = values[0];
5079 __pyx_v_t = values[1];
5080 __pyx_v_n = values[2];
5082 goto __pyx_L4_argument_unpacking_done;
5083 __pyx_L5_argtuple_error:;
5084 __Pyx_RaiseArgtupleInvalid(
"lambda", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error)
5086 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
5087 __Pyx_RefNannyFinishContext();
5089 __pyx_L4_argument_unpacking_done:;
5090 __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
5093 __Pyx_RefNannyFinishContext();
5097 static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n) {
5098 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_cur_scope;
5099 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_outer_scope;
5100 PyObject *__pyx_r = NULL;
5101 __Pyx_TraceDeclarations
5102 __Pyx_RefNannyDeclarations
5103 int __pyx_lineno = 0;
5104 const char *__pyx_filename = NULL;
5105 int __pyx_clineno = 0;
5106 __Pyx_RefNannySetupContext(
"lambda", 0);
5107 __pyx_outer_scope = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *) __Pyx_CyFunction_GetClosure(__pyx_self);
5108 __pyx_cur_scope = __pyx_outer_scope;
5109 __Pyx_TraceCall(
"lambda", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error));
5110 __Pyx_XDECREF(__pyx_r);
5111 if (unlikely(!__pyx_cur_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError(
"value"); __PYX_ERR(0, 97, __pyx_L1_error) }
5112 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
5113 __pyx_r = __pyx_cur_scope->__pyx_v_value;
5118 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
5121 __Pyx_XGIVEREF(__pyx_r);
5122 __Pyx_TraceReturn(__pyx_r, 0);
5123 __Pyx_RefNannyFinishContext();
5135 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value) {
5136 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *__pyx_cur_scope;
5137 PyObject *__pyx_r = NULL;
5138 __Pyx_TraceDeclarations
5139 __Pyx_RefNannyDeclarations
5140 PyObject *__pyx_t_1 = NULL;
5141 PyObject *__pyx_t_2 = NULL;
5142 PyObject *__pyx_t_3 = NULL;
5143 PyObject *__pyx_t_4 = NULL;
5144 int __pyx_lineno = 0;
5145 const char *__pyx_filename = NULL;
5146 int __pyx_clineno = 0;
5147 __Pyx_TraceFrameInit(__pyx_codeobj__6)
5148 __Pyx_RefNannySetupContext(
"setConstantBC", 0);
5149 __pyx_cur_scope = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(__pyx_ptype_18BoundaryConditions___pyx_scope_struct__setConstantBC, __pyx_empty_tuple, NULL);
5150 if (unlikely(!__pyx_cur_scope)) {
5151 __pyx_cur_scope = ((
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC *)Py_None);
5152 __Pyx_INCREF(Py_None);
5153 __PYX_ERR(0, 87, __pyx_L1_error)
5155 __Pyx_GOTREF(__pyx_cur_scope);
5157 __Pyx_TraceCall(
"setConstantBC", __pyx_f[0], 87, 0, __PYX_ERR(0, 87, __pyx_L1_error));
5158 __pyx_cur_scope->__pyx_v_value = __pyx_v_value;
5159 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
5160 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value);
5169 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setConstantBC_lambda, 0, __pyx_n_s_setConstantBC_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_BoundaryConditions, __pyx_d, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
5170 __Pyx_GOTREF(__pyx_t_1);
5171 if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1,
sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 97, __pyx_L1_error)
5172 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
5173 __Pyx_GOTREF(__pyx_t_3);
5174 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
5175 __Pyx_GOTREF(__pyx_t_4);
5176 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5178 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5179 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
5180 if (likely(__pyx_t_3)) {
5181 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_4);
5182 __Pyx_INCREF(__pyx_t_3);
5183 __Pyx_INCREF(
function);
5184 __Pyx_DECREF_SET(__pyx_t_4,
function);
5187 __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_3);
5188 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5189 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
5190 __Pyx_GOTREF(__pyx_t_2);
5191 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5192 __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_1)->__pyx_arg_n = __pyx_t_2;
5193 __Pyx_GIVEREF(__pyx_t_2);
5195 __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_18BoundaryConditions_2__defaults__);
5196 __Pyx_GIVEREF(__pyx_t_1);
5197 __Pyx_GOTREF(__pyx_v_self->uOfXT);
5198 __Pyx_DECREF(__pyx_v_self->uOfXT);
5199 __pyx_v_self->uOfXT = __pyx_t_1;
5211 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5214 __Pyx_XDECREF(__pyx_t_1);
5215 __Pyx_XDECREF(__pyx_t_2);
5216 __Pyx_XDECREF(__pyx_t_3);
5217 __Pyx_XDECREF(__pyx_t_4);
5218 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setConstantBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
5221 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5222 __Pyx_XGIVEREF(__pyx_r);
5223 __Pyx_TraceReturn(__pyx_r, 0);
5224 __Pyx_RefNannyFinishContext();
5237 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5238 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_8setLinearBC[] =
"BoundaryCondition.setLinearBC(self, a0, a)\n\n function returning value=a0+ax*x+ay*y+az*z\n\n Parameters\n ----------\n a0 : float\n constant\n a: numpy.ndarray\n ax,ay,az\n\n ";
5239 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_9setLinearBC = {
"setLinearBC", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC, METH_VARARGS|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_8setLinearBC};
5240 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5241 PyObject *__pyx_v_a0 = 0;
5242 PyObject *__pyx_v_a = 0;
5243 int __pyx_lineno = 0;
5244 const char *__pyx_filename = NULL;
5245 int __pyx_clineno = 0;
5246 PyObject *__pyx_r = 0;
5247 __Pyx_RefNannyDeclarations
5248 __Pyx_RefNannySetupContext(
"setLinearBC (wrapper)", 0);
5250 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a0,&__pyx_n_s_a,0};
5251 PyObject* values[2] = {0,0};
5252 if (unlikely(__pyx_kwds)) {
5254 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5256 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5258 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5261 default:
goto __pyx_L5_argtuple_error;
5263 kw_args = PyDict_Size(__pyx_kwds);
5266 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a0)) != 0)) kw_args--;
5267 else goto __pyx_L5_argtuple_error;
5270 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
5272 __Pyx_RaiseArgtupleInvalid(
"setLinearBC", 1, 2, 2, 1); __PYX_ERR(0, 100, __pyx_L3_error)
5275 if (unlikely(kw_args > 0)) {
5276 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"setLinearBC") < 0)) __PYX_ERR(0, 100, __pyx_L3_error)
5278 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5279 goto __pyx_L5_argtuple_error;
5281 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5282 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5284 __pyx_v_a0 = values[0];
5285 __pyx_v_a = values[1];
5287 goto __pyx_L4_argument_unpacking_done;
5288 __pyx_L5_argtuple_error:;
5289 __Pyx_RaiseArgtupleInvalid(
"setLinearBC", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 100, __pyx_L3_error)
5291 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
5292 __Pyx_RefNannyFinishContext();
5294 __pyx_L4_argument_unpacking_done:;
5295 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), __pyx_v_a0, __pyx_v_a);
5298 __Pyx_RefNannyFinishContext();
5310 static PyObject *__pyx_pf_18BoundaryConditions_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
5311 PyObject *__pyx_r = NULL;
5312 __Pyx_TraceDeclarations
5313 __Pyx_RefNannyDeclarations
5314 PyObject *__pyx_t_1 = NULL;
5315 PyObject *__pyx_t_2 = NULL;
5316 int __pyx_lineno = 0;
5317 const char *__pyx_filename = NULL;
5318 int __pyx_clineno = 0;
5319 __Pyx_RefNannySetupContext(
"__defaults__", 0);
5320 __Pyx_TraceCall(
"__defaults__", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));
5321 __Pyx_XDECREF(__pyx_r);
5322 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
5323 __Pyx_GOTREF(__pyx_t_1);
5324 __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_n);
5325 __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_n);
5326 PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_n);
5327 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5328 __Pyx_GOTREF(__pyx_t_2);
5329 __Pyx_GIVEREF(__pyx_t_1);
5330 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5331 __Pyx_INCREF(Py_None);
5332 __Pyx_GIVEREF(Py_None);
5333 PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
5335 __pyx_r = __pyx_t_2;
5341 __Pyx_XDECREF(__pyx_t_1);
5342 __Pyx_XDECREF(__pyx_t_2);
5343 __Pyx_AddTraceback(
"BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5346 __Pyx_XGIVEREF(__pyx_r);
5347 __Pyx_TraceReturn(__pyx_r, 0);
5348 __Pyx_RefNannyFinishContext();
5353 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5354 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearBC_lambda1 = {
"lambda1", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC_lambda1, METH_VARARGS|METH_KEYWORDS, 0};
5355 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5356 PyObject *__pyx_v_x = 0;
5357 CYTHON_UNUSED PyObject *__pyx_v_t = 0;
5358 CYTHON_UNUSED PyObject *__pyx_v_n = 0;
5359 int __pyx_lineno = 0;
5360 const char *__pyx_filename = NULL;
5361 int __pyx_clineno = 0;
5362 PyObject *__pyx_r = 0;
5363 __Pyx_RefNannyDeclarations
5364 __Pyx_RefNannySetupContext(
"lambda1 (wrapper)", 0);
5366 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,&__pyx_n_s_n,0};
5367 PyObject* values[3] = {0,0,0};
5368 __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
5369 values[2] = __pyx_dynamic_args->__pyx_arg_n;
5370 if (unlikely(__pyx_kwds)) {
5372 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5374 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5376 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5378 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5381 default:
goto __pyx_L5_argtuple_error;
5383 kw_args = PyDict_Size(__pyx_kwds);
5386 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5387 else goto __pyx_L5_argtuple_error;
5390 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5392 __Pyx_RaiseArgtupleInvalid(
"lambda1", 0, 2, 3, 1); __PYX_ERR(0, 113, __pyx_L3_error)
5397 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
5398 if (value) { values[2] = value; kw_args--; }
5401 if (unlikely(kw_args > 0)) {
5402 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"lambda1") < 0)) __PYX_ERR(0, 113, __pyx_L3_error)
5405 switch (PyTuple_GET_SIZE(__pyx_args)) {
5406 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5408 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5409 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5411 default:
goto __pyx_L5_argtuple_error;
5414 __pyx_v_x = values[0];
5415 __pyx_v_t = values[1];
5416 __pyx_v_n = values[2];
5418 goto __pyx_L4_argument_unpacking_done;
5419 __pyx_L5_argtuple_error:;
5420 __Pyx_RaiseArgtupleInvalid(
"lambda1", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 113, __pyx_L3_error)
5422 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
5423 __Pyx_RefNannyFinishContext();
5425 __pyx_L4_argument_unpacking_done:;
5426 __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
5429 __Pyx_RefNannyFinishContext();
5433 static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n) {
5434 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_cur_scope;
5435 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_outer_scope;
5436 PyObject *__pyx_r = NULL;
5437 __Pyx_TraceDeclarations
5438 __Pyx_RefNannyDeclarations
5439 PyObject *__pyx_t_1 = NULL;
5440 PyObject *__pyx_t_2 = NULL;
5441 PyObject *__pyx_t_3 = NULL;
5442 int __pyx_lineno = 0;
5443 const char *__pyx_filename = NULL;
5444 int __pyx_clineno = 0;
5445 __Pyx_RefNannySetupContext(
"lambda1", 0);
5446 __pyx_outer_scope = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *) __Pyx_CyFunction_GetClosure(__pyx_self);
5447 __pyx_cur_scope = __pyx_outer_scope;
5448 __Pyx_TraceCall(
"lambda1", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));
5449 __Pyx_XDECREF(__pyx_r);
5450 if (unlikely(!__pyx_cur_scope->__pyx_v_a0)) { __Pyx_RaiseClosureNameError(
"a0"); __PYX_ERR(0, 113, __pyx_L1_error) }
5451 if (unlikely(!__pyx_cur_scope->__pyx_v_a)) { __Pyx_RaiseClosureNameError(
"a"); __PYX_ERR(0, 113, __pyx_L1_error) }
5452 __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_a, 0, 0, NULL, NULL, &__pyx_slice__7, 0, 0, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
5453 __Pyx_GOTREF(__pyx_t_1);
5454 __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_x, 0, 0, NULL, NULL, &__pyx_slice__7, 0, 0, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5455 __Pyx_GOTREF(__pyx_t_2);
5456 __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
5457 __Pyx_GOTREF(__pyx_t_3);
5458 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5459 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5460 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5461 __Pyx_GOTREF(__pyx_t_2);
5462 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5463 __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_a0, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
5464 __Pyx_GOTREF(__pyx_t_3);
5465 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5466 __pyx_r = __pyx_t_3;
5472 __Pyx_XDECREF(__pyx_t_1);
5473 __Pyx_XDECREF(__pyx_t_2);
5474 __Pyx_XDECREF(__pyx_t_3);
5475 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
5478 __Pyx_XGIVEREF(__pyx_r);
5479 __Pyx_TraceReturn(__pyx_r, 0);
5480 __Pyx_RefNannyFinishContext();
5492 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_a0, PyObject *__pyx_v_a) {
5493 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *__pyx_cur_scope;
5494 PyObject *__pyx_r = NULL;
5495 __Pyx_TraceDeclarations
5496 __Pyx_RefNannyDeclarations
5497 PyObject *__pyx_t_1 = NULL;
5498 PyObject *__pyx_t_2 = NULL;
5499 PyObject *__pyx_t_3 = NULL;
5500 PyObject *__pyx_t_4 = NULL;
5501 int __pyx_lineno = 0;
5502 const char *__pyx_filename = NULL;
5503 int __pyx_clineno = 0;
5504 __Pyx_TraceFrameInit(__pyx_codeobj__8)
5505 __Pyx_RefNannySetupContext(
"setLinearBC", 0);
5506 __pyx_cur_scope = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(__pyx_ptype_18BoundaryConditions___pyx_scope_struct_1_setLinearBC, __pyx_empty_tuple, NULL);
5507 if (unlikely(!__pyx_cur_scope)) {
5508 __pyx_cur_scope = ((
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC *)Py_None);
5509 __Pyx_INCREF(Py_None);
5510 __PYX_ERR(0, 100, __pyx_L1_error)
5512 __Pyx_GOTREF(__pyx_cur_scope);
5514 __Pyx_TraceCall(
"setLinearBC", __pyx_f[0], 100, 0, __PYX_ERR(0, 100, __pyx_L1_error));
5515 __pyx_cur_scope->__pyx_v_a0 = __pyx_v_a0;
5516 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_a0);
5517 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a0);
5518 __pyx_cur_scope->__pyx_v_a = __pyx_v_a;
5519 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_a);
5520 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a);
5529 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearBC_lambda1, 0, __pyx_n_s_setLinearBC_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_BoundaryConditions, __pyx_d, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
5530 __Pyx_GOTREF(__pyx_t_1);
5531 if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1,
sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 113, __pyx_L1_error)
5532 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
5533 __Pyx_GOTREF(__pyx_t_3);
5534 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
5535 __Pyx_GOTREF(__pyx_t_4);
5536 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5538 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5539 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
5540 if (likely(__pyx_t_3)) {
5541 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_4);
5542 __Pyx_INCREF(__pyx_t_3);
5543 __Pyx_INCREF(
function);
5544 __Pyx_DECREF_SET(__pyx_t_4,
function);
5547 __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_3);
5548 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5549 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
5550 __Pyx_GOTREF(__pyx_t_2);
5551 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5552 __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_1)->__pyx_arg_n = __pyx_t_2;
5553 __Pyx_GIVEREF(__pyx_t_2);
5555 __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_18BoundaryConditions_4__defaults__);
5556 __Pyx_GIVEREF(__pyx_t_1);
5557 __Pyx_GOTREF(__pyx_v_self->uOfXT);
5558 __Pyx_DECREF(__pyx_v_self->uOfXT);
5559 __pyx_v_self->uOfXT = __pyx_t_1;
5571 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5574 __Pyx_XDECREF(__pyx_t_1);
5575 __Pyx_XDECREF(__pyx_t_2);
5576 __Pyx_XDECREF(__pyx_t_3);
5577 __Pyx_XDECREF(__pyx_t_4);
5578 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
5581 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5582 __Pyx_XGIVEREF(__pyx_r);
5583 __Pyx_TraceReturn(__pyx_r, 0);
5584 __Pyx_RefNannyFinishContext();
5597 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5598 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_10setLinearRamp[] =
"BoundaryCondition.setLinearRamp(self, t1, value)\n\n function setting a linear ramp from t=0 to t=t1\n\n Parameters\n -----------\n t1: float\n Ramp end time\n value: float\n Variable value\n ";
5599 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_11setLinearRamp = {
"setLinearRamp", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_10setLinearRamp};
5600 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5601 PyObject *__pyx_v_t1 = 0;
5602 PyObject *__pyx_v_value = 0;
5603 int __pyx_lineno = 0;
5604 const char *__pyx_filename = NULL;
5605 int __pyx_clineno = 0;
5606 PyObject *__pyx_r = 0;
5607 __Pyx_RefNannyDeclarations
5608 __Pyx_RefNannySetupContext(
"setLinearRamp (wrapper)", 0);
5610 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t1,&__pyx_n_s_value,0};
5611 PyObject* values[2] = {0,0};
5612 if (unlikely(__pyx_kwds)) {
5614 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5616 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5618 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5621 default:
goto __pyx_L5_argtuple_error;
5623 kw_args = PyDict_Size(__pyx_kwds);
5626 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t1)) != 0)) kw_args--;
5627 else goto __pyx_L5_argtuple_error;
5630 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
5632 __Pyx_RaiseArgtupleInvalid(
"setLinearRamp", 1, 2, 2, 1); __PYX_ERR(0, 115, __pyx_L3_error)
5635 if (unlikely(kw_args > 0)) {
5636 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"setLinearRamp") < 0)) __PYX_ERR(0, 115, __pyx_L3_error)
5638 }
else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5639 goto __pyx_L5_argtuple_error;
5641 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5642 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5644 __pyx_v_t1 = values[0];
5645 __pyx_v_value = values[1];
5647 goto __pyx_L4_argument_unpacking_done;
5648 __pyx_L5_argtuple_error:;
5649 __Pyx_RaiseArgtupleInvalid(
"setLinearRamp", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 115, __pyx_L3_error)
5651 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
5652 __Pyx_RefNannyFinishContext();
5654 __pyx_L4_argument_unpacking_done:;
5655 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), __pyx_v_t1, __pyx_v_value);
5658 __Pyx_RefNannyFinishContext();
5668 static PyObject *__pyx_pf_18BoundaryConditions_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
5669 PyObject *__pyx_r = NULL;
5670 __Pyx_TraceDeclarations
5671 __Pyx_RefNannyDeclarations
5672 PyObject *__pyx_t_1 = NULL;
5673 PyObject *__pyx_t_2 = NULL;
5674 int __pyx_lineno = 0;
5675 const char *__pyx_filename = NULL;
5676 int __pyx_clineno = 0;
5677 __Pyx_RefNannySetupContext(
"__defaults__", 0);
5678 __Pyx_TraceCall(
"__defaults__", __pyx_f[0], 126, 0, __PYX_ERR(0, 126, __pyx_L1_error));
5679 __Pyx_XDECREF(__pyx_r);
5680 __pyx_t_1 = PyTuple_New(1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
5681 __Pyx_GOTREF(__pyx_t_1);
5682 __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_n);
5683 __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_n);
5684 PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_n);
5685 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
5686 __Pyx_GOTREF(__pyx_t_2);
5687 __Pyx_GIVEREF(__pyx_t_1);
5688 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5689 __Pyx_INCREF(Py_None);
5690 __Pyx_GIVEREF(Py_None);
5691 PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
5693 __pyx_r = __pyx_t_2;
5699 __Pyx_XDECREF(__pyx_t_1);
5700 __Pyx_XDECREF(__pyx_t_2);
5701 __Pyx_AddTraceback(
"BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5704 __Pyx_XGIVEREF(__pyx_r);
5705 __Pyx_TraceReturn(__pyx_r, 0);
5706 __Pyx_RefNannyFinishContext();
5711 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
5712 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setLinearRamp_lambda2 = {
"lambda2", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp_lambda2, METH_VARARGS|METH_KEYWORDS, 0};
5713 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5714 CYTHON_UNUSED PyObject *__pyx_v_x = 0;
5715 PyObject *__pyx_v_t = 0;
5716 CYTHON_UNUSED PyObject *__pyx_v_n = 0;
5717 int __pyx_lineno = 0;
5718 const char *__pyx_filename = NULL;
5719 int __pyx_clineno = 0;
5720 PyObject *__pyx_r = 0;
5721 __Pyx_RefNannyDeclarations
5722 __Pyx_RefNannySetupContext(
"lambda2 (wrapper)", 0);
5724 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,&__pyx_n_s_n,0};
5725 PyObject* values[3] = {0,0,0};
5726 __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
5727 values[2] = __pyx_dynamic_args->__pyx_arg_n;
5728 if (unlikely(__pyx_kwds)) {
5730 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5732 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5734 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5736 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5739 default:
goto __pyx_L5_argtuple_error;
5741 kw_args = PyDict_Size(__pyx_kwds);
5744 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5745 else goto __pyx_L5_argtuple_error;
5748 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5750 __Pyx_RaiseArgtupleInvalid(
"lambda2", 0, 2, 3, 1); __PYX_ERR(0, 126, __pyx_L3_error)
5755 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
5756 if (value) { values[2] = value; kw_args--; }
5759 if (unlikely(kw_args > 0)) {
5760 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"lambda2") < 0)) __PYX_ERR(0, 126, __pyx_L3_error)
5763 switch (PyTuple_GET_SIZE(__pyx_args)) {
5764 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5766 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5767 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5769 default:
goto __pyx_L5_argtuple_error;
5772 __pyx_v_x = values[0];
5773 __pyx_v_t = values[1];
5774 __pyx_v_n = values[2];
5776 goto __pyx_L4_argument_unpacking_done;
5777 __pyx_L5_argtuple_error:;
5778 __Pyx_RaiseArgtupleInvalid(
"lambda2", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 126, __pyx_L3_error)
5780 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5781 __Pyx_RefNannyFinishContext();
5783 __pyx_L4_argument_unpacking_done:;
5784 __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
5787 __Pyx_RefNannyFinishContext();
5791 static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_n) {
5792 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_cur_scope;
5793 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_outer_scope;
5794 PyObject *__pyx_r = NULL;
5795 __Pyx_TraceDeclarations
5796 __Pyx_RefNannyDeclarations
5798 PyObject *__pyx_t_2 = NULL;
5799 PyObject *__pyx_t_3 = NULL;
5800 PyObject *__pyx_t_4 = NULL;
5801 PyObject *__pyx_t_5 = NULL;
5803 int __pyx_lineno = 0;
5804 const char *__pyx_filename = NULL;
5805 int __pyx_clineno = 0;
5806 __Pyx_RefNannySetupContext(
"lambda2", 0);
5807 __pyx_outer_scope = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *) __Pyx_CyFunction_GetClosure(__pyx_self);
5808 __pyx_cur_scope = __pyx_outer_scope;
5809 __Pyx_TraceCall(
"lambda2", __pyx_f[0], 126, 0, __PYX_ERR(0, 126, __pyx_L1_error));
5810 __Pyx_XDECREF(__pyx_r);
5812 if (unlikely(!__pyx_cur_scope->__pyx_v_t1)) { __Pyx_RaiseClosureNameError(
"t1"); __PYX_ERR(0, 126, __pyx_L1_error) }
5813 __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_t, __pyx_cur_scope->__pyx_v_t1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
5814 __Pyx_GOTREF(__pyx_t_2);
5815 __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
5816 __Pyx_GOTREF(__pyx_t_4);
5817 __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
5818 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5819 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5);
if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 126, __pyx_L1_error)
5820 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5822 __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_1);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
5823 __Pyx_GOTREF(__pyx_t_5);
5824 __pyx_t_3 = __pyx_t_5;
5827 __Pyx_INCREF(__pyx_t_2);
5828 __pyx_t_3 = __pyx_t_2;
5830 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5831 if (unlikely(!__pyx_cur_scope->__pyx_v_value)) { __Pyx_RaiseClosureNameError(
"value"); __PYX_ERR(0, 126, __pyx_L1_error) }
5832 __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_cur_scope->__pyx_v_value);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
5833 __Pyx_GOTREF(__pyx_t_2);
5834 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5835 __pyx_r = __pyx_t_2;
5841 __Pyx_XDECREF(__pyx_t_2);
5842 __Pyx_XDECREF(__pyx_t_3);
5843 __Pyx_XDECREF(__pyx_t_4);
5844 __Pyx_XDECREF(__pyx_t_5);
5845 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5848 __Pyx_XGIVEREF(__pyx_r);
5849 __Pyx_TraceReturn(__pyx_r, 0);
5850 __Pyx_RefNannyFinishContext();
5862 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_t1, PyObject *__pyx_v_value) {
5863 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *__pyx_cur_scope;
5864 PyObject *__pyx_r = NULL;
5865 __Pyx_TraceDeclarations
5866 __Pyx_RefNannyDeclarations
5867 PyObject *__pyx_t_1 = NULL;
5868 PyObject *__pyx_t_2 = NULL;
5869 PyObject *__pyx_t_3 = NULL;
5870 PyObject *__pyx_t_4 = NULL;
5871 int __pyx_lineno = 0;
5872 const char *__pyx_filename = NULL;
5873 int __pyx_clineno = 0;
5874 __Pyx_TraceFrameInit(__pyx_codeobj__9)
5875 __Pyx_RefNannySetupContext(
"setLinearRamp", 0);
5876 __pyx_cur_scope = (
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(__pyx_ptype_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp, __pyx_empty_tuple, NULL);
5877 if (unlikely(!__pyx_cur_scope)) {
5878 __pyx_cur_scope = ((
struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp *)Py_None);
5879 __Pyx_INCREF(Py_None);
5880 __PYX_ERR(0, 115, __pyx_L1_error)
5882 __Pyx_GOTREF(__pyx_cur_scope);
5884 __Pyx_TraceCall(
"setLinearRamp", __pyx_f[0], 115, 0, __PYX_ERR(0, 115, __pyx_L1_error));
5885 __pyx_cur_scope->__pyx_v_t1 = __pyx_v_t1;
5886 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_t1);
5887 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_t1);
5888 __pyx_cur_scope->__pyx_v_value = __pyx_v_value;
5889 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value);
5890 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value);
5897 __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_18BoundaryConditions_17BoundaryCondition_13setLinearRamp_lambda2, 0, __pyx_n_s_setLinearRamp_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_BoundaryConditions, __pyx_d, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
5898 __Pyx_GOTREF(__pyx_t_1);
5899 if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1,
sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 126, __pyx_L1_error)
5900 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
5901 __Pyx_GOTREF(__pyx_t_3);
5902 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
5903 __Pyx_GOTREF(__pyx_t_4);
5904 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5906 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5907 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
5908 if (likely(__pyx_t_3)) {
5909 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_4);
5910 __Pyx_INCREF(__pyx_t_3);
5911 __Pyx_INCREF(
function);
5912 __Pyx_DECREF_SET(__pyx_t_4,
function);
5915 __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_3);
5916 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5917 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
5918 __Pyx_GOTREF(__pyx_t_2);
5919 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5920 __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_1)->__pyx_arg_n = __pyx_t_2;
5921 __Pyx_GIVEREF(__pyx_t_2);
5923 __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_1, __pyx_pf_18BoundaryConditions_6__defaults__);
5924 __Pyx_GIVEREF(__pyx_t_1);
5925 __Pyx_GOTREF(__pyx_v_self->uOfXT);
5926 __Pyx_DECREF(__pyx_v_self->uOfXT);
5927 __pyx_v_self->uOfXT = __pyx_t_1;
5939 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5942 __Pyx_XDECREF(__pyx_t_1);
5943 __Pyx_XDECREF(__pyx_t_2);
5944 __Pyx_XDECREF(__pyx_t_3);
5945 __Pyx_XDECREF(__pyx_t_4);
5946 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
5949 __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5950 __Pyx_XGIVEREF(__pyx_r);
5951 __Pyx_TraceReturn(__pyx_r, 0);
5952 __Pyx_RefNannyFinishContext();
5965 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(PyObject *__pyx_v_self);
5966 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(PyObject *__pyx_v_self) {
5967 PyObject *__pyx_r = 0;
5968 __Pyx_RefNannyDeclarations
5969 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
5970 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
5973 __Pyx_RefNannyFinishContext();
5977 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
5978 PyObject *__pyx_r = NULL;
5979 __Pyx_TraceDeclarations
5980 __Pyx_RefNannyDeclarations
5981 int __pyx_lineno = 0;
5982 const char *__pyx_filename = NULL;
5983 int __pyx_clineno = 0;
5984 __Pyx_RefNannySetupContext(
"__get__", 0);
5985 __Pyx_TraceCall(
"__get__", __pyx_f[2], 20, 0, __PYX_ERR(2, 20, __pyx_L1_error));
5986 __Pyx_XDECREF(__pyx_r);
5987 __Pyx_INCREF(__pyx_v_self->uOfXT);
5988 __pyx_r = __pyx_v_self->uOfXT;
5993 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.uOfXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5996 __Pyx_XGIVEREF(__pyx_r);
5997 __Pyx_TraceReturn(__pyx_r, 0);
5998 __Pyx_RefNannyFinishContext();
6003 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value);
6004 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6006 __Pyx_RefNannyDeclarations
6007 __Pyx_RefNannySetupContext(
"__set__ (wrapper)", 0);
6008 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6011 __Pyx_RefNannyFinishContext();
6015 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value) {
6017 __Pyx_TraceDeclarations
6018 __Pyx_RefNannyDeclarations
6019 int __pyx_lineno = 0;
6020 const char *__pyx_filename = NULL;
6021 int __pyx_clineno = 0;
6022 __Pyx_RefNannySetupContext(
"__set__", 0);
6023 __Pyx_TraceCall(
"__set__", __pyx_f[2], 20, 0, __PYX_ERR(2, 20, __pyx_L1_error));
6024 __Pyx_INCREF(__pyx_v_value);
6025 __Pyx_GIVEREF(__pyx_v_value);
6026 __Pyx_GOTREF(__pyx_v_self->uOfXT);
6027 __Pyx_DECREF(__pyx_v_self->uOfXT);
6028 __pyx_v_self->uOfXT = __pyx_v_value;
6034 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.uOfXT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6037 __Pyx_TraceReturn(Py_None, 0);
6038 __Pyx_RefNannyFinishContext();
6043 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self);
6044 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self) {
6046 __Pyx_RefNannyDeclarations
6047 __Pyx_RefNannySetupContext(
"__del__ (wrapper)", 0);
6048 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
6051 __Pyx_RefNannyFinishContext();
6055 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
6057 __Pyx_TraceDeclarations
6058 __Pyx_RefNannyDeclarations
6059 int __pyx_lineno = 0;
6060 const char *__pyx_filename = NULL;
6061 int __pyx_clineno = 0;
6062 __Pyx_RefNannySetupContext(
"__del__", 0);
6063 __Pyx_TraceCall(
"__del__", __pyx_f[2], 20, 0, __PYX_ERR(2, 20, __pyx_L1_error));
6064 __Pyx_INCREF(Py_None);
6065 __Pyx_GIVEREF(Py_None);
6066 __Pyx_GOTREF(__pyx_v_self->uOfXT);
6067 __Pyx_DECREF(__pyx_v_self->uOfXT);
6068 __pyx_v_self->uOfXT = Py_None;
6074 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.uOfXT.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6077 __Pyx_TraceReturn(Py_None, 0);
6078 __Pyx_RefNannyFinishContext();
6089 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
6090 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__[] =
"BoundaryCondition.__reduce_cython__(self)";
6091 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__ = {
"__reduce_cython__", (PyCFunction)__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__, METH_NOARGS, __pyx_doc_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__};
6092 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6093 PyObject *__pyx_r = 0;
6094 __Pyx_RefNannyDeclarations
6095 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
6096 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self));
6099 __Pyx_RefNannyFinishContext();
6103 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
6104 PyObject *__pyx_r = NULL;
6105 __Pyx_TraceDeclarations
6106 __Pyx_RefNannyDeclarations
6107 PyObject *__pyx_t_1 = NULL;
6108 int __pyx_lineno = 0;
6109 const char *__pyx_filename = NULL;
6110 int __pyx_clineno = 0;
6111 __Pyx_TraceFrameInit(__pyx_codeobj__10)
6112 __Pyx_RefNannySetupContext(
"__reduce_cython__", 0);
6113 __Pyx_TraceCall(
"__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
6121 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
6122 __Pyx_GOTREF(__pyx_t_1);
6123 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6124 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6125 __PYX_ERR(1, 2, __pyx_L1_error)
6135 __Pyx_XDECREF(__pyx_t_1);
6136 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6138 __Pyx_XGIVEREF(__pyx_r);
6139 __Pyx_TraceReturn(__pyx_r, 0);
6140 __Pyx_RefNannyFinishContext();
6152 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state);
6153 static char __pyx_doc_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__[] =
"BoundaryCondition.__setstate_cython__(self, __pyx_state)";
6154 static PyMethodDef __pyx_mdef_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__ = {
"__setstate_cython__", (PyCFunction)__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__, METH_O, __pyx_doc_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__};
6155 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
6156 PyObject *__pyx_r = 0;
6157 __Pyx_RefNannyDeclarations
6158 __Pyx_RefNannySetupContext(
"__setstate_cython__ (wrapper)", 0);
6159 __pyx_r = __pyx_pf_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__(((
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
6162 __Pyx_RefNannyFinishContext();
6166 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_14__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
6167 PyObject *__pyx_r = NULL;
6168 __Pyx_TraceDeclarations
6169 __Pyx_RefNannyDeclarations
6170 PyObject *__pyx_t_1 = NULL;
6171 int __pyx_lineno = 0;
6172 const char *__pyx_filename = NULL;
6173 int __pyx_clineno = 0;
6174 __Pyx_TraceFrameInit(__pyx_codeobj__12)
6175 __Pyx_RefNannySetupContext(
"__setstate_cython__", 0);
6176 __Pyx_TraceCall(
"__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
6183 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
6184 __Pyx_GOTREF(__pyx_t_1);
6185 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6186 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6187 __PYX_ERR(1, 4, __pyx_L1_error)
6198 __Pyx_XDECREF(__pyx_t_1);
6199 __Pyx_AddTraceback(
"BoundaryConditions.BoundaryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6201 __Pyx_XGIVEREF(__pyx_r);
6202 __Pyx_TraceReturn(__pyx_r, 0);
6203 __Pyx_RefNannyFinishContext();
6214 static PyObject *__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6215 static char __pyx_doc_18BoundaryConditions___pyx_unpickle_BC_Base[] =
"__pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, __pyx_state)";
6216 static PyMethodDef __pyx_mdef_18BoundaryConditions_1__pyx_unpickle_BC_Base = {
"__pyx_unpickle_BC_Base", (PyCFunction)(
void*)(PyCFunctionWithKeywords)__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base, METH_VARARGS|METH_KEYWORDS, __pyx_doc_18BoundaryConditions___pyx_unpickle_BC_Base};
6217 static PyObject *__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6218 PyObject *__pyx_v___pyx_type = 0;
6219 long __pyx_v___pyx_checksum;
6220 PyObject *__pyx_v___pyx_state = 0;
6221 int __pyx_lineno = 0;
6222 const char *__pyx_filename = NULL;
6223 int __pyx_clineno = 0;
6224 PyObject *__pyx_r = 0;
6225 __Pyx_RefNannyDeclarations
6226 __Pyx_RefNannySetupContext(
"__pyx_unpickle_BC_Base (wrapper)", 0);
6228 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
6229 PyObject* values[3] = {0,0,0};
6230 if (unlikely(__pyx_kwds)) {
6232 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6234 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6236 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6238 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6241 default:
goto __pyx_L5_argtuple_error;
6243 kw_args = PyDict_Size(__pyx_kwds);
6246 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
6247 else goto __pyx_L5_argtuple_error;
6250 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
6252 __Pyx_RaiseArgtupleInvalid(
"__pyx_unpickle_BC_Base", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
6256 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
6258 __Pyx_RaiseArgtupleInvalid(
"__pyx_unpickle_BC_Base", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
6261 if (unlikely(kw_args > 0)) {
6262 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__pyx_unpickle_BC_Base") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
6264 }
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
6265 goto __pyx_L5_argtuple_error;
6267 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6268 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6269 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6271 __pyx_v___pyx_type = values[0];
6272 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]);
if (unlikely((__pyx_v___pyx_checksum == (
long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
6273 __pyx_v___pyx_state = values[2];
6275 goto __pyx_L4_argument_unpacking_done;
6276 __pyx_L5_argtuple_error:;
6277 __Pyx_RaiseArgtupleInvalid(
"__pyx_unpickle_BC_Base", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
6279 __Pyx_AddTraceback(
"BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
6280 __Pyx_RefNannyFinishContext();
6282 __pyx_L4_argument_unpacking_done:;
6283 __pyx_r = __pyx_pf_18BoundaryConditions___pyx_unpickle_BC_Base(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
6286 __Pyx_RefNannyFinishContext();
6290 static PyObject *__pyx_pf_18BoundaryConditions___pyx_unpickle_BC_Base(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type,
long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
6291 PyObject *__pyx_v___pyx_PickleError = 0;
6292 PyObject *__pyx_v___pyx_result = 0;
6293 PyObject *__pyx_r = NULL;
6294 __Pyx_TraceDeclarations
6295 __Pyx_RefNannyDeclarations
6296 PyObject *__pyx_t_1 = NULL;
6299 PyObject *__pyx_t_4 = NULL;
6300 PyObject *__pyx_t_5 = NULL;
6301 PyObject *__pyx_t_6 = NULL;
6302 int __pyx_lineno = 0;
6303 const char *__pyx_filename = NULL;
6304 int __pyx_clineno = 0;
6305 __Pyx_TraceFrameInit(__pyx_codeobj__14)
6306 __Pyx_RefNannySetupContext(
"__pyx_unpickle_BC_Base", 0);
6307 __Pyx_TraceCall(
"__pyx_unpickle_BC_Base", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
6316 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
6317 __Pyx_GOTREF(__pyx_t_1);
6318 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE));
if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
6319 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6320 __pyx_t_3 = (__pyx_t_2 != 0);
6330 __pyx_t_1 = PyList_New(1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
6331 __Pyx_GOTREF(__pyx_t_1);
6332 __Pyx_INCREF(__pyx_n_s_PickleError);
6333 __Pyx_GIVEREF(__pyx_n_s_PickleError);
6334 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
6335 __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, -1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
6336 __Pyx_GOTREF(__pyx_t_4);
6337 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6338 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
6339 __Pyx_GOTREF(__pyx_t_1);
6340 __Pyx_INCREF(__pyx_t_1);
6341 __pyx_v___pyx_PickleError = __pyx_t_1;
6342 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6343 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6352 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
6353 __Pyx_GOTREF(__pyx_t_1);
6354 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1);
if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
6355 __Pyx_GOTREF(__pyx_t_5);
6356 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6357 __Pyx_INCREF(__pyx_v___pyx_PickleError);
6358 __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
6359 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
6360 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
6361 if (likely(__pyx_t_6)) {
6362 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
6363 __Pyx_INCREF(__pyx_t_6);
6364 __Pyx_INCREF(
function);
6365 __Pyx_DECREF_SET(__pyx_t_1,
function);
6368 __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
6369 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6370 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6371 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
6372 __Pyx_GOTREF(__pyx_t_4);
6373 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6374 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
6375 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6376 __PYX_ERR(1, 6, __pyx_L1_error)
6394 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_18BoundaryConditions_BC_Base), __pyx_n_s_new);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
6395 __Pyx_GOTREF(__pyx_t_1);
6397 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
6398 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
6399 if (likely(__pyx_t_5)) {
6400 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
6401 __Pyx_INCREF(__pyx_t_5);
6402 __Pyx_INCREF(
function);
6403 __Pyx_DECREF_SET(__pyx_t_1,
function);
6406 __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
6407 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6408 if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
6409 __Pyx_GOTREF(__pyx_t_4);
6410 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6411 __pyx_v___pyx_result = __pyx_t_4;
6421 __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
6422 __pyx_t_2 = (__pyx_t_3 != 0);
6432 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
6433 __pyx_t_4 = __pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(((
struct __pyx_obj_18BoundaryConditions_BC_Base *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state));
if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
6434 __Pyx_GOTREF(__pyx_t_4);
6435 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6453 __Pyx_XDECREF(__pyx_r);
6454 __Pyx_INCREF(__pyx_v___pyx_result);
6455 __pyx_r = __pyx_v___pyx_result;
6466 __Pyx_XDECREF(__pyx_t_1);
6467 __Pyx_XDECREF(__pyx_t_4);
6468 __Pyx_XDECREF(__pyx_t_5);
6469 __Pyx_XDECREF(__pyx_t_6);
6470 __Pyx_AddTraceback(
"BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
6473 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
6474 __Pyx_XDECREF(__pyx_v___pyx_result);
6475 __Pyx_XGIVEREF(__pyx_r);
6476 __Pyx_TraceReturn(__pyx_r, 0);
6477 __Pyx_RefNannyFinishContext();
6489 static PyObject *__pyx_f_18BoundaryConditions___pyx_unpickle_BC_Base__set_state(
struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
6490 PyObject *__pyx_r = NULL;
6491 __Pyx_TraceDeclarations
6492 __Pyx_RefNannyDeclarations
6493 PyObject *__pyx_t_1 = NULL;
6494 __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
6497 Py_ssize_t __pyx_t_5;
6500 PyObject *__pyx_t_8 = NULL;
6501 PyObject *__pyx_t_9 = NULL;
6502 int __pyx_lineno = 0;
6503 const char *__pyx_filename = NULL;
6504 int __pyx_clineno = 0;
6505 __Pyx_RefNannySetupContext(
"__pyx_unpickle_BC_Base__set_state", 0);
6506 __Pyx_TraceCall(
"__pyx_unpickle_BC_Base__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
6515 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6516 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not subscriptable");
6517 __PYX_ERR(1, 12, __pyx_L1_error)
6519 if (!(likely(PyString_CheckExact(PyTuple_GET_ITEM(__pyx_v___pyx_state, 0)))||((PyTuple_GET_ITEM(__pyx_v___pyx_state, 0)) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"str", Py_TYPE(PyTuple_GET_ITEM(__pyx_v___pyx_state, 0))->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
6520 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 0);
6521 __Pyx_INCREF(__pyx_t_1);
6522 __Pyx_GIVEREF(__pyx_t_1);
6523 __Pyx_GOTREF(__pyx_v___pyx_result->BC_type);
6524 __Pyx_DECREF(__pyx_v___pyx_result->BC_type);
6525 __pyx_v___pyx_result->BC_type = ((PyObject*)__pyx_t_1);
6527 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6528 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not subscriptable");
6529 __PYX_ERR(1, 12, __pyx_L1_error)
6531 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 1);
6532 __Pyx_INCREF(__pyx_t_1);
6533 __Pyx_GIVEREF(__pyx_t_1);
6534 __Pyx_GOTREF(__pyx_v___pyx_result->Shape);
6535 __Pyx_DECREF(__pyx_v___pyx_result->Shape);
6536 __pyx_v___pyx_result->Shape = __pyx_t_1;
6538 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6539 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not subscriptable");
6540 __PYX_ERR(1, 12, __pyx_L1_error)
6542 __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyTuple_GET_ITEM(__pyx_v___pyx_state, 2), PyBUF_WRITABLE);
if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(1, 12, __pyx_L1_error)
6543 __PYX_XDEC_MEMVIEW(&__pyx_v___pyx_result->_b_or, 0);
6544 __pyx_v___pyx_result->_b_or = __pyx_t_2;
6545 __pyx_t_2.memview = NULL;
6546 __pyx_t_2.data = NULL;
6547 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6548 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not subscriptable");
6549 __PYX_ERR(1, 12, __pyx_L1_error)
6551 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 3);
6552 __Pyx_INCREF(__pyx_t_1);
6553 __Pyx_GIVEREF(__pyx_t_1);
6554 __Pyx_GOTREF(__pyx_v___pyx_result->ct);
6555 __Pyx_DECREF(__pyx_v___pyx_result->ct);
6556 __pyx_v___pyx_result->ct = __pyx_t_1;
6558 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6559 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not subscriptable");
6560 __PYX_ERR(1, 12, __pyx_L1_error)
6562 if (!(likely(PyString_CheckExact(PyTuple_GET_ITEM(__pyx_v___pyx_state, 4)))||((PyTuple_GET_ITEM(__pyx_v___pyx_state, 4)) == Py_None)||(PyErr_Format(PyExc_TypeError,
"Expected %.16s, got %.200s",
"str", Py_TYPE(PyTuple_GET_ITEM(__pyx_v___pyx_state, 4))->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
6563 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v___pyx_state, 4);
6564 __Pyx_INCREF(__pyx_t_1);
6565 __Pyx_GIVEREF(__pyx_t_1);
6566 __Pyx_GOTREF(__pyx_v___pyx_result->name);
6567 __Pyx_DECREF(__pyx_v___pyx_result->name);
6568 __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1);
6570 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6571 PyErr_SetString(PyExc_TypeError,
"'NoneType' object is not subscriptable");
6572 __PYX_ERR(1, 12, __pyx_L1_error)
6574 __pyx_t_3 = __Pyx_PyInt_As_int(PyTuple_GET_ITEM(__pyx_v___pyx_state, 5));
if (unlikely((__pyx_t_3 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
6575 __pyx_v___pyx_result->nd = __pyx_t_3;
6583 if (unlikely(__pyx_v___pyx_state == Py_None)) {
6584 PyErr_SetString(PyExc_TypeError,
"object of type 'NoneType' has no len()");
6585 __PYX_ERR(1, 13, __pyx_L1_error)
6587 __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state);
if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
6588 __pyx_t_6 = ((__pyx_t_5 > 6) != 0);
6591 __pyx_t_4 = __pyx_t_6;
6592 goto __pyx_L4_bool_binop_done;
6594 __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict);
if (unlikely(__pyx_t_6 == ((
int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
6595 __pyx_t_7 = (__pyx_t_6 != 0);
6596 __pyx_t_4 = __pyx_t_7;
6597 __pyx_L4_bool_binop_done:;
6605 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict);
if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14,