proteus  1.8.1
C/C++/Fortran libraries
BoundaryConditions.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.30 */
2 
3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
5 #endif /* PY_SSIZE_T_CLEAN */
6 #include "Python.h"
7 #ifndef Py_PYTHON_H
8  #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10  #error Cython requires Python 2.6+ or Python 3.3+.
11 #else
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
15 #include <stddef.h>
16 #ifndef offsetof
17  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
18 #endif
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
20  #ifndef __stdcall
21  #define __stdcall
22  #endif
23  #ifndef __cdecl
24  #define __cdecl
25  #endif
26  #ifndef __fastcall
27  #define __fastcall
28  #endif
29 #endif
30 #ifndef DL_IMPORT
31  #define DL_IMPORT(t) t
32 #endif
33 #ifndef DL_EXPORT
34  #define DL_EXPORT(t) t
35 #endif
36 #define __PYX_COMMA ,
37 #ifndef HAVE_LONG_LONG
38  #if PY_VERSION_HEX >= 0x02070000
39  #define HAVE_LONG_LONG
40  #endif
41 #endif
42 #ifndef PY_LONG_LONG
43  #define PY_LONG_LONG LONG_LONG
44 #endif
45 #ifndef Py_HUGE_VAL
46  #define Py_HUGE_VAL HUGE_VAL
47 #endif
48 #ifdef PYPY_VERSION
49  #define CYTHON_COMPILING_IN_PYPY 1
50  #define CYTHON_COMPILING_IN_PYSTON 0
51  #define CYTHON_COMPILING_IN_CPYTHON 0
52  #undef CYTHON_USE_TYPE_SLOTS
53  #define CYTHON_USE_TYPE_SLOTS 0
54  #undef CYTHON_USE_PYTYPE_LOOKUP
55  #define CYTHON_USE_PYTYPE_LOOKUP 0
56  #if PY_VERSION_HEX < 0x03050000
57  #undef CYTHON_USE_ASYNC_SLOTS
58  #define CYTHON_USE_ASYNC_SLOTS 0
59  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60  #define CYTHON_USE_ASYNC_SLOTS 1
61  #endif
62  #undef CYTHON_USE_PYLIST_INTERNALS
63  #define CYTHON_USE_PYLIST_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_INTERNALS
65  #define CYTHON_USE_UNICODE_INTERNALS 0
66  #undef CYTHON_USE_UNICODE_WRITER
67  #define CYTHON_USE_UNICODE_WRITER 0
68  #undef CYTHON_USE_PYLONG_INTERNALS
69  #define CYTHON_USE_PYLONG_INTERNALS 0
70  #undef CYTHON_AVOID_BORROWED_REFS
71  #define CYTHON_AVOID_BORROWED_REFS 1
72  #undef CYTHON_ASSUME_SAFE_MACROS
73  #define CYTHON_ASSUME_SAFE_MACROS 0
74  #undef CYTHON_UNPACK_METHODS
75  #define CYTHON_UNPACK_METHODS 0
76  #undef CYTHON_FAST_THREAD_STATE
77  #define CYTHON_FAST_THREAD_STATE 0
78  #undef CYTHON_FAST_PYCALL
79  #define CYTHON_FAST_PYCALL 0
80  #undef CYTHON_PEP489_MULTI_PHASE_INIT
81  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82  #undef CYTHON_USE_TP_FINALIZE
83  #define CYTHON_USE_TP_FINALIZE 0
84  #undef CYTHON_USE_DICT_VERSIONS
85  #define CYTHON_USE_DICT_VERSIONS 0
86  #undef CYTHON_USE_EXC_INFO_STACK
87  #define CYTHON_USE_EXC_INFO_STACK 0
88  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89  #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
90  #endif
91 #elif defined(PYSTON_VERSION)
92  #define CYTHON_COMPILING_IN_PYPY 0
93  #define CYTHON_COMPILING_IN_PYSTON 1
94  #define CYTHON_COMPILING_IN_CPYTHON 0
95  #ifndef CYTHON_USE_TYPE_SLOTS
96  #define CYTHON_USE_TYPE_SLOTS 1
97  #endif
98  #undef CYTHON_USE_PYTYPE_LOOKUP
99  #define CYTHON_USE_PYTYPE_LOOKUP 0
100  #undef CYTHON_USE_ASYNC_SLOTS
101  #define CYTHON_USE_ASYNC_SLOTS 0
102  #undef CYTHON_USE_PYLIST_INTERNALS
103  #define CYTHON_USE_PYLIST_INTERNALS 0
104  #ifndef CYTHON_USE_UNICODE_INTERNALS
105  #define CYTHON_USE_UNICODE_INTERNALS 1
106  #endif
107  #undef CYTHON_USE_UNICODE_WRITER
108  #define CYTHON_USE_UNICODE_WRITER 0
109  #undef CYTHON_USE_PYLONG_INTERNALS
110  #define CYTHON_USE_PYLONG_INTERNALS 0
111  #ifndef CYTHON_AVOID_BORROWED_REFS
112  #define CYTHON_AVOID_BORROWED_REFS 0
113  #endif
114  #ifndef CYTHON_ASSUME_SAFE_MACROS
115  #define CYTHON_ASSUME_SAFE_MACROS 1
116  #endif
117  #ifndef CYTHON_UNPACK_METHODS
118  #define CYTHON_UNPACK_METHODS 1
119  #endif
120  #undef CYTHON_FAST_THREAD_STATE
121  #define CYTHON_FAST_THREAD_STATE 0
122  #undef CYTHON_FAST_PYCALL
123  #define CYTHON_FAST_PYCALL 0
124  #undef CYTHON_PEP489_MULTI_PHASE_INIT
125  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126  #undef CYTHON_USE_TP_FINALIZE
127  #define CYTHON_USE_TP_FINALIZE 0
128  #undef CYTHON_USE_DICT_VERSIONS
129  #define CYTHON_USE_DICT_VERSIONS 0
130  #undef CYTHON_USE_EXC_INFO_STACK
131  #define CYTHON_USE_EXC_INFO_STACK 0
132  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
134  #endif
135 #else
136  #define CYTHON_COMPILING_IN_PYPY 0
137  #define CYTHON_COMPILING_IN_PYSTON 0
138  #define CYTHON_COMPILING_IN_CPYTHON 1
139  #ifndef CYTHON_USE_TYPE_SLOTS
140  #define CYTHON_USE_TYPE_SLOTS 1
141  #endif
142  #if PY_VERSION_HEX < 0x02070000
143  #undef CYTHON_USE_PYTYPE_LOOKUP
144  #define CYTHON_USE_PYTYPE_LOOKUP 0
145  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146  #define CYTHON_USE_PYTYPE_LOOKUP 1
147  #endif
148  #if PY_MAJOR_VERSION < 3
149  #undef CYTHON_USE_ASYNC_SLOTS
150  #define CYTHON_USE_ASYNC_SLOTS 0
151  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152  #define CYTHON_USE_ASYNC_SLOTS 1
153  #endif
154  #if PY_VERSION_HEX < 0x02070000
155  #undef CYTHON_USE_PYLONG_INTERNALS
156  #define CYTHON_USE_PYLONG_INTERNALS 0
157  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158  #define CYTHON_USE_PYLONG_INTERNALS 1
159  #endif
160  #ifndef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 1
162  #endif
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
166  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167  #undef CYTHON_USE_UNICODE_WRITER
168  #define CYTHON_USE_UNICODE_WRITER 0
169  #elif !defined(CYTHON_USE_UNICODE_WRITER)
170  #define CYTHON_USE_UNICODE_WRITER 1
171  #endif
172  #ifndef CYTHON_AVOID_BORROWED_REFS
173  #define CYTHON_AVOID_BORROWED_REFS 0
174  #endif
175  #ifndef CYTHON_ASSUME_SAFE_MACROS
176  #define CYTHON_ASSUME_SAFE_MACROS 1
177  #endif
178  #ifndef CYTHON_UNPACK_METHODS
179  #define CYTHON_UNPACK_METHODS 1
180  #endif
181  #if PY_VERSION_HEX >= 0x030B00A4
182  #undef CYTHON_FAST_THREAD_STATE
183  #define CYTHON_FAST_THREAD_STATE 0
184  #elif !defined(CYTHON_FAST_THREAD_STATE)
185  #define CYTHON_FAST_THREAD_STATE 1
186  #endif
187  #ifndef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
189  #endif
190  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
192  #endif
193  #ifndef CYTHON_USE_TP_FINALIZE
194  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
195  #endif
196  #ifndef CYTHON_USE_DICT_VERSIONS
197  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
198  #endif
199  #if PY_VERSION_HEX >= 0x030B00A4
200  #undef CYTHON_USE_EXC_INFO_STACK
201  #define CYTHON_USE_EXC_INFO_STACK 0
202  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
204  #endif
205  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
207  #endif
208 #endif
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
211 #endif
212 #if CYTHON_USE_PYLONG_INTERNALS
213  #if PY_MAJOR_VERSION < 3
214  #include "longintrepr.h"
215  #endif
216  #undef SHIFT
217  #undef BASE
218  #undef MASK
219  #ifdef SIZEOF_VOID_P
220  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
221  #endif
222 #endif
223 #ifndef __has_attribute
224  #define __has_attribute(x) 0
225 #endif
226 #ifndef __has_cpp_attribute
227  #define __has_cpp_attribute(x) 0
228 #endif
229 #ifndef CYTHON_RESTRICT
230  #if defined(__GNUC__)
231  #define CYTHON_RESTRICT __restrict__
232  #elif defined(_MSC_VER) && _MSC_VER >= 1400
233  #define CYTHON_RESTRICT __restrict
234  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235  #define CYTHON_RESTRICT restrict
236  #else
237  #define CYTHON_RESTRICT
238  #endif
239 #endif
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
244 # else
245 # define CYTHON_UNUSED
246 # endif
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
249 # else
250 # define CYTHON_UNUSED
251 # endif
252 #endif
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
256 # else
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
258 # endif
259 #endif
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
263 # else
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
265 # endif
266 #endif
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
268 #ifdef _MSC_VER
269  #ifndef _MSC_STDINT_H_
270  #if _MSC_VER < 1300
271  typedef unsigned char uint8_t;
272  typedef unsigned int uint32_t;
273  #else
274  typedef unsigned __int8 uint8_t;
275  typedef unsigned __int32 uint32_t;
276  #endif
277  #endif
278 #else
279  #include <stdint.h>
280 #endif
281 #ifndef CYTHON_FALLTHROUGH
282  #if defined(__cplusplus) && __cplusplus >= 201103L
283  #if __has_cpp_attribute(fallthrough)
284  #define CYTHON_FALLTHROUGH [[fallthrough]]
285  #elif __has_cpp_attribute(clang::fallthrough)
286  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287  #elif __has_cpp_attribute(gnu::fallthrough)
288  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
289  #endif
290  #endif
291  #ifndef CYTHON_FALLTHROUGH
292  #if __has_attribute(fallthrough)
293  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
294  #else
295  #define CYTHON_FALLTHROUGH
296  #endif
297  #endif
298  #if defined(__clang__ ) && defined(__apple_build_version__)
299  #if __apple_build_version__ < 7000000
300  #undef CYTHON_FALLTHROUGH
301  #define CYTHON_FALLTHROUGH
302  #endif
303  #endif
304 #endif
305 
306 #ifndef __cplusplus
307  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
308 #endif
309 #ifndef CYTHON_INLINE
310  #if defined(__clang__)
311  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
312  #else
313  #define CYTHON_INLINE inline
314  #endif
315 #endif
316 template<typename T>
317 void __Pyx_call_destructor(T& x) {
318  x.~T();
319 }
320 template<typename T>
321 class __Pyx_FakeReference {
322  public:
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; }
330  private:
331  T *ptr;
332 };
333 
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335  #define Py_OptimizeFlag 0
336 #endif
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
344 #else
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; // unfortunately __pyx_empty_tuple isn't available here
384  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
385  Py_XDECREF((PyObject*)co);
386  co = (PyCodeObject*)call_result;
387  call_result = NULL;
388  if (0) {
389  cleanup_code_too:
390  Py_XDECREF((PyObject*)co);
391  co = NULL;
392  }
393  end:
394  Py_XDECREF(kwds);
395  Py_XDECREF(argcount);
396  Py_XDECREF(posonlyargcount);
397  Py_XDECREF(kwonlyargcount);
398  Py_XDECREF(nlocals);
399  Py_XDECREF(stacksize);
400  Py_XDECREF(replace);
401  Py_XDECREF(call_result);
402  Py_XDECREF(empty);
403  if (type) {
404  PyErr_Restore(type, value, traceback);
405  }
406  return co;
407  }
408 #else
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)
411 #endif
412  #define __Pyx_DefaultClassType PyType_Type
413 #endif
414 #ifndef Py_TPFLAGS_CHECKTYPES
415  #define Py_TPFLAGS_CHECKTYPES 0
416 #endif
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418  #define Py_TPFLAGS_HAVE_INDEX 0
419 #endif
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
422 #endif
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424  #define Py_TPFLAGS_HAVE_FINALIZE 0
425 #endif
426 #ifndef METH_STACKLESS
427  #define METH_STACKLESS 0
428 #endif
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430  #ifndef METH_FASTCALL
431  #define METH_FASTCALL 0x80
432  #endif
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);
436 #else
437  #define __Pyx_PyCFunctionFast _PyCFunctionFast
438  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
439 #endif
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)))))
443 #else
444 #define __Pyx_PyFastCFunction_Check(func) 0
445 #endif
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)
450 #endif
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)
455 #endif
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)
459 #else
460  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
462 #endif
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()
469 #else
470  #define __Pyx_PyThreadState_Current _PyThreadState_Current
471 #endif
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();
478  return 0;
479 }
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;
483  return key;
484 }
485 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
486  PyObject_Free(key);
487 }
488 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
489  return *key != Py_tss_NEEDS_INIT;
490 }
491 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
492  PyThread_delete_key(*key);
493  *key = Py_tss_NEEDS_INIT;
494 }
495 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
496  return PyThread_set_key_value(*key, value);
497 }
498 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
499  return PyThread_get_key_value(*key);
500 }
501 #endif
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
504 #else
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
506 #endif
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)
510 #else
511  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
513 #endif
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)
516 #else
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
518 #endif
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)))
524  #else
525  #define __Pyx_PyUnicode_READY(op) (0)
526  #endif
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))
537  #else
538  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
539  #endif
540  #else
541  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
542  #endif
543 #else
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))
557 #endif
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)
561 #else
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))
565 #endif
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
568 #endif
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
571 #endif
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
574 #endif
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)
579 #else
580  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
581 #endif
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583  #define PyObject_ASCII(o) PyObject_Repr(o)
584 #endif
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
593 #endif
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
598 #else
599  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
601 #endif
602 #ifndef PySet_CheckExact
603  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
604 #endif
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)
608 #else
609  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
611 #endif
612 #if CYTHON_ASSUME_SAFE_MACROS
613  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
614 #else
615  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
616 #endif
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
633 #endif
634 #if PY_MAJOR_VERSION >= 3
635  #define PyBoolObject PyLongObject
636 #endif
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638  #ifndef PyUnicode_InternFromString
639  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
640  #endif
641 #endif
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
646 #else
647  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
649 #endif
650 #if PY_MAJOR_VERSION >= 3
651  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
652 #else
653  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
654 #endif
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)
659  #else
660  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
661  #endif
662 #else
663  #define __Pyx_PyType_AsAsync(obj) NULL
664 #endif
665 #ifndef __Pyx_PyAsyncMethodsStruct
666  typedef struct {
667  unaryfunc am_await;
668  unaryfunc am_aiter;
669  unaryfunc am_anext;
670  } __Pyx_PyAsyncMethodsStruct;
671 #endif
672 
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674  #if !defined(_USE_MATH_DEFINES)
675  #define _USE_MATH_DEFINES
676  #endif
677 #endif
678 #include <math.h>
679 #ifdef NAN
680 #define __PYX_NAN() ((float) NAN)
681 #else
682 static CYTHON_INLINE float __PYX_NAN() {
683  float value;
684  memset(&value, 0xFF, sizeof(value));
685  return value;
686 }
687 #endif
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
690 #else
691 #define __Pyx_truncl truncl
692 #endif
693 
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; }
698 
699 #ifndef __PYX_EXTERN_C
700  #ifdef __cplusplus
701  #define __PYX_EXTERN_C extern "C"
702  #else
703  #define __PYX_EXTERN_C extern
704  #endif
705 #endif
706 
707 #define __PYX_HAVE__BoundaryConditions
708 #define __PYX_HAVE_API__BoundaryConditions
709 /* Early includes */
710 #include <string.h>
711 #include <stdio.h>
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"
717 
718  /* NumPy API declarations from "numpy/__init__.pxd" */
719 
720 #include "pythread.h"
721 #include <stdlib.h>
722 #include "pystate.h"
723 #ifdef _OPENMP
724 #include <omp.h>
725 #endif /* _OPENMP */
726 
727 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
728 #define CYTHON_WITHOUT_ASSERTIONS
729 #endif
730 
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;
733 
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;
754 }
755 #if defined (__cplusplus) && __cplusplus >= 201103L
756  #include <cstdlib>
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)
768 #else
769  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
770 #endif
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
781 #else
782  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
783  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
784 #endif
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;
803  while (*u_end++) ;
804  return (size_t)(u_end - u - 1);
805 }
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))
822 #else
823 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
824 #endif
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))
828 #else
829 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
830 #endif
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) {
835  PyObject* sys;
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");
841  if (!sys) goto bad;
842  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
843  Py_DECREF(sys);
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;
849  } else {
850  char ascii_chars[128];
851  int c;
852  for (c = 0; c < 128; c++) {
853  ascii_chars[c] = c;
854  }
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) {
860  PyErr_Format(
861  PyExc_ValueError,
862  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
863  default_encoding_c);
864  goto bad;
865  }
866  Py_DECREF(ascii_chars_u);
867  Py_DECREF(ascii_chars_b);
868  }
869  Py_DECREF(default_encoding);
870  return 0;
871 bad:
872  Py_XDECREF(default_encoding);
873  Py_XDECREF(ascii_chars_u);
874  Py_XDECREF(ascii_chars_b);
875  return -1;
876 }
877 #endif
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)
880 #else
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) {
885  PyObject* sys;
886  PyObject* default_encoding = NULL;
887  char* default_encoding_c;
888  sys = PyImport_ImportModule("sys");
889  if (!sys) goto bad;
890  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
891  Py_DECREF(sys);
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);
899  return 0;
900 bad:
901  Py_XDECREF(default_encoding);
902  return -1;
903 }
904 #endif
905 #endif
906 
907 
908 /* Test for GCC > 2.95 */
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)
912 #else /* !__GNUC__ or GCC < 2.95 */
913  #define likely(x) (x)
914  #define unlikely(x) (x)
915 #endif /* __GNUC__ */
916 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
917 
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;
929 
930 /* Header.proto */
931 #if !defined(CYTHON_CCOMPLEX)
932  #if defined(__cplusplus)
933  #define CYTHON_CCOMPLEX 1
934  #elif defined(_Complex_I)
935  #define CYTHON_CCOMPLEX 1
936  #else
937  #define CYTHON_CCOMPLEX 0
938  #endif
939 #endif
940 #if CYTHON_CCOMPLEX
941  #ifdef __cplusplus
942  #include <complex>
943  #else
944  #include <complex.h>
945  #endif
946 #endif
947 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
948  #undef _Complex_I
949  #define _Complex_I 1.0fj
950 #endif
951 
952 
953 static const char *__pyx_f[] = {
954  "proteus/BoundaryConditions.py",
955  "stringsource",
956  "proteus/BoundaryConditions.pxd",
957  "__init__.pxd",
958  "type.pxd",
959 };
960 /* MemviewSliceStruct.proto */
961 struct __pyx_memoryview_obj;
962 typedef struct {
963  struct __pyx_memoryview_obj *memview;
964  char *data;
965  Py_ssize_t shape[8];
966  Py_ssize_t strides[8];
967  Py_ssize_t suboffsets[8];
968 } __Pyx_memviewslice;
969 #define __Pyx_MemoryView_Len(m) (m.shape[0])
970 
971 /* Atomics.proto */
972 #include <pythread.h>
973 #ifndef CYTHON_ATOMICS
974  #define CYTHON_ATOMICS 1
975 #endif
976 #define __pyx_atomic_int_type int
977 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
978  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
979  !defined(__i386__)
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"
984  #endif
985 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
986  #include <Windows.h>
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")
993  #endif
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"
999  #endif
1000 #else
1001  #undef CYTHON_ATOMICS
1002  #define CYTHON_ATOMICS 0
1003  #ifdef __PYX_DEBUG_ATOMICS
1004  #warning "Not using atomics"
1005  #endif
1006 #endif
1007 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1008 #if CYTHON_ATOMICS
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)
1013 #else
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)
1018 #endif
1019 
1020 /* ForceInitThreads.proto */
1021 #ifndef __PYX_FORCE_INIT_THREADS
1022  #define __PYX_FORCE_INIT_THREADS 0
1023 #endif
1024 
1025 /* NoFastGil.proto */
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()
1031 
1032 /* BufferFormatStructs.proto */
1033 #define IS_UNSIGNED(type) (((type) -1) > 0)
1034 struct __Pyx_StructField_;
1035 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1036 typedef struct {
1037  const char* name;
1038  struct __Pyx_StructField_* fields;
1039  size_t size;
1040  size_t arraysize[8];
1041  int ndim;
1042  char typegroup;
1043  char is_unsigned;
1044  int flags;
1045 } __Pyx_TypeInfo;
1046 typedef struct __Pyx_StructField_ {
1047  __Pyx_TypeInfo* type;
1048  const char* name;
1049  size_t offset;
1050 } __Pyx_StructField;
1051 typedef struct {
1052  __Pyx_StructField* field;
1053  size_t parent_offset;
1054 } __Pyx_BufFmt_StackElem;
1055 typedef struct {
1056  __Pyx_StructField root;
1057  __Pyx_BufFmt_StackElem* head;
1058  size_t fmt_offset;
1059  size_t new_count, enc_count;
1060  size_t struct_alignment;
1061  int is_complex;
1062  char enc_type;
1063  char new_packmode;
1064  char enc_packmode;
1065  char is_valid_array;
1066 } __Pyx_BufFmt_Context;
1067 
1068 
1069 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1070  * # in Cython to enable them only on the right systems.
1071  *
1072  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1073  * ctypedef npy_int16 int16_t
1074  * ctypedef npy_int32 int32_t
1075  */
1076 typedef npy_int8 __pyx_t_5numpy_int8_t;
1077 
1078 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1079  *
1080  * ctypedef npy_int8 int8_t
1081  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1082  * ctypedef npy_int32 int32_t
1083  * ctypedef npy_int64 int64_t
1084  */
1085 typedef npy_int16 __pyx_t_5numpy_int16_t;
1086 
1087 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1088  * ctypedef npy_int8 int8_t
1089  * ctypedef npy_int16 int16_t
1090  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1091  * ctypedef npy_int64 int64_t
1092  * #ctypedef npy_int96 int96_t
1093  */
1094 typedef npy_int32 __pyx_t_5numpy_int32_t;
1095 
1096 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1097  * ctypedef npy_int16 int16_t
1098  * ctypedef npy_int32 int32_t
1099  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1100  * #ctypedef npy_int96 int96_t
1101  * #ctypedef npy_int128 int128_t
1102  */
1103 typedef npy_int64 __pyx_t_5numpy_int64_t;
1104 
1105 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1106  * #ctypedef npy_int128 int128_t
1107  *
1108  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1109  * ctypedef npy_uint16 uint16_t
1110  * ctypedef npy_uint32 uint32_t
1111  */
1112 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1113 
1114 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1115  *
1116  * ctypedef npy_uint8 uint8_t
1117  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1118  * ctypedef npy_uint32 uint32_t
1119  * ctypedef npy_uint64 uint64_t
1120  */
1121 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1122 
1123 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1124  * ctypedef npy_uint8 uint8_t
1125  * ctypedef npy_uint16 uint16_t
1126  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1127  * ctypedef npy_uint64 uint64_t
1128  * #ctypedef npy_uint96 uint96_t
1129  */
1130 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1131 
1132 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1133  * ctypedef npy_uint16 uint16_t
1134  * ctypedef npy_uint32 uint32_t
1135  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1136  * #ctypedef npy_uint96 uint96_t
1137  * #ctypedef npy_uint128 uint128_t
1138  */
1139 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1140 
1141 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1142  * #ctypedef npy_uint128 uint128_t
1143  *
1144  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1145  * ctypedef npy_float64 float64_t
1146  * #ctypedef npy_float80 float80_t
1147  */
1148 typedef npy_float32 __pyx_t_5numpy_float32_t;
1149 
1150 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1151  *
1152  * ctypedef npy_float32 float32_t
1153  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1154  * #ctypedef npy_float80 float80_t
1155  * #ctypedef npy_float128 float128_t
1156  */
1157 typedef npy_float64 __pyx_t_5numpy_float64_t;
1158 
1159 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1160  * # The int types are mapped a bit surprising --
1161  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1162  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1163  * ctypedef npy_longlong long_t
1164  * ctypedef npy_longlong longlong_t
1165  */
1166 typedef npy_long __pyx_t_5numpy_int_t;
1167 
1168 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1169  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1170  * ctypedef npy_long int_t
1171  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1172  * ctypedef npy_longlong longlong_t
1173  *
1174  */
1175 typedef npy_longlong __pyx_t_5numpy_long_t;
1176 
1177 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1178  * ctypedef npy_long int_t
1179  * ctypedef npy_longlong long_t
1180  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1181  *
1182  * ctypedef npy_ulong uint_t
1183  */
1184 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1185 
1186 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1187  * ctypedef npy_longlong longlong_t
1188  *
1189  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1190  * ctypedef npy_ulonglong ulong_t
1191  * ctypedef npy_ulonglong ulonglong_t
1192  */
1193 typedef npy_ulong __pyx_t_5numpy_uint_t;
1194 
1195 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1196  *
1197  * ctypedef npy_ulong uint_t
1198  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1199  * ctypedef npy_ulonglong ulonglong_t
1200  *
1201  */
1202 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1203 
1204 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1205  * ctypedef npy_ulong uint_t
1206  * ctypedef npy_ulonglong ulong_t
1207  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1208  *
1209  * ctypedef npy_intp intp_t
1210  */
1211 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1212 
1213 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1214  * ctypedef npy_ulonglong ulonglong_t
1215  *
1216  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1217  * ctypedef npy_uintp uintp_t
1218  *
1219  */
1220 typedef npy_intp __pyx_t_5numpy_intp_t;
1221 
1222 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1223  *
1224  * ctypedef npy_intp intp_t
1225  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1226  *
1227  * ctypedef npy_double float_t
1228  */
1229 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1230 
1231 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1232  * ctypedef npy_uintp uintp_t
1233  *
1234  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1235  * ctypedef npy_double double_t
1236  * ctypedef npy_longdouble longdouble_t
1237  */
1238 typedef npy_double __pyx_t_5numpy_float_t;
1239 
1240 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1241  *
1242  * ctypedef npy_double float_t
1243  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1244  * ctypedef npy_longdouble longdouble_t
1245  *
1246  */
1247 typedef npy_double __pyx_t_5numpy_double_t;
1248 
1249 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1250  * ctypedef npy_double float_t
1251  * ctypedef npy_double double_t
1252  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1253  *
1254  * ctypedef npy_cfloat cfloat_t
1255  */
1256 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1257 /* Declarations.proto */
1258 #if CYTHON_CCOMPLEX
1259  #ifdef __cplusplus
1260  typedef ::std::complex< float > __pyx_t_float_complex;
1261  #else
1262  typedef float _Complex __pyx_t_float_complex;
1263  #endif
1264 #else
1265  typedef struct { float real, imag; } __pyx_t_float_complex;
1266 #endif
1267 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1268 
1269 /* Declarations.proto */
1270 #if CYTHON_CCOMPLEX
1271  #ifdef __cplusplus
1272  typedef ::std::complex< double > __pyx_t_double_complex;
1273  #else
1274  typedef double _Complex __pyx_t_double_complex;
1275  #endif
1276 #else
1277  typedef struct { double real, imag; } __pyx_t_double_complex;
1278 #endif
1279 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1280 
1281 
1282 /*--- Type declarations ---*/
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;
1292 
1293 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1294  * ctypedef npy_longdouble longdouble_t
1295  *
1296  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1297  * ctypedef npy_cdouble cdouble_t
1298  * ctypedef npy_clongdouble clongdouble_t
1299  */
1300 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1301 
1302 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1303  *
1304  * ctypedef npy_cfloat cfloat_t
1305  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1306  * ctypedef npy_clongdouble clongdouble_t
1307  *
1308  */
1309 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1310 
1311 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1312  * ctypedef npy_cfloat cfloat_t
1313  * ctypedef npy_cdouble cdouble_t
1314  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1315  *
1316  * ctypedef npy_cdouble complex_t
1317  */
1318 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1319 
1320 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1321  * ctypedef npy_clongdouble clongdouble_t
1322  *
1323  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1324  *
1325  * cdef inline object PyArray_MultiIterNew1(a):
1326  */
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;
1334 
1335 /* "BoundaryConditions.pxd":16
1336  * # cpdef void getContext(BC_Base cls, object context=*)
1337  *
1338  * ctypedef double (*cpp_uOfXT) (BoundaryCondition, double[:], double) # <<<<<<<<<<<<<<
1339  * cdef class BoundaryCondition:
1340  * cdef cpp_uOfXT uuOfXT
1341  */
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;
1345 };
1346 struct __pyx_defaults1 {
1347  PyObject *__pyx_arg_n;
1348 };
1349 struct __pyx_defaults2 {
1350  PyObject *__pyx_arg_n;
1351 };
1352 
1353 /* "BoundaryConditions.pxd":5
1354  * import cython
1355  *
1356  * cdef class BC_Base: # <<<<<<<<<<<<<<
1357  * cdef double[:] _b_or
1358  * cdef public:
1359  */
1360 struct __pyx_obj_18BoundaryConditions_BC_Base {
1361  PyObject_HEAD
1362  __Pyx_memviewslice _b_or;
1363  int nd;
1364  PyObject *Shape;
1365  PyObject *name;
1366  PyObject *BC_type;
1367  PyObject *ct;
1368 };
1369 
1370 
1371 /* "BoundaryConditions.pxd":17
1372  *
1373  * ctypedef double (*cpp_uOfXT) (BoundaryCondition, double[:], double)
1374  * cdef class BoundaryCondition: # <<<<<<<<<<<<<<
1375  * cdef cpp_uOfXT uuOfXT
1376  * cdef public:
1377  */
1378 struct __pyx_obj_18BoundaryConditions_BoundaryCondition {
1379  PyObject_HEAD
1380  struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtab;
1381  __pyx_t_18BoundaryConditions_cpp_uOfXT uuOfXT;
1382  PyObject *uOfXT;
1383 };
1384 
1385 
1386 /* "BoundaryConditions.py":87
1387  * self.uOfXT = None
1388  *
1389  * def setConstantBC(self, value): # <<<<<<<<<<<<<<
1390  * """
1391  * function returning constant BC
1392  */
1393 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct__setConstantBC {
1394  PyObject_HEAD
1395  PyObject *__pyx_v_value;
1396 };
1397 
1398 
1399 /* "BoundaryConditions.py":100
1400  *
1401  *
1402  * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
1403  * """
1404  * function returning value=a0+ax*x+ay*y+az*z
1405  */
1406 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_1_setLinearBC {
1407  PyObject_HEAD
1408  PyObject *__pyx_v_a;
1409  PyObject *__pyx_v_a0;
1410 };
1411 
1412 
1413 /* "BoundaryConditions.py":115
1414  * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
1415  *
1416  * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
1417  * """
1418  * function setting a linear ramp from t=0 to t=t1
1419  */
1420 struct __pyx_obj_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp {
1421  PyObject_HEAD
1422  PyObject *__pyx_v_t1;
1423  PyObject *__pyx_v_value;
1424 };
1425 
1426 
1427 /* "View.MemoryView":105
1428  *
1429  * @cname("__pyx_array")
1430  * cdef class array: # <<<<<<<<<<<<<<
1431  *
1432  * cdef:
1433  */
1434 struct __pyx_array_obj {
1435  PyObject_HEAD
1436  struct __pyx_vtabstruct_array *__pyx_vtab;
1437  char *data;
1438  Py_ssize_t len;
1439  char *format;
1440  int ndim;
1441  Py_ssize_t *_shape;
1442  Py_ssize_t *_strides;
1443  Py_ssize_t itemsize;
1444  PyObject *mode;
1445  PyObject *_format;
1446  void (*callback_free_data)(void *);
1447  int free_data;
1448  int dtype_is_object;
1449 };
1450 
1451 
1452 /* "View.MemoryView":279
1453  *
1454  * @cname('__pyx_MemviewEnum')
1455  * cdef class Enum(object): # <<<<<<<<<<<<<<
1456  * cdef object name
1457  * def __init__(self, name):
1458  */
1459 struct __pyx_MemviewEnum_obj {
1460  PyObject_HEAD
1461  PyObject *name;
1462 };
1463 
1464 
1465 /* "View.MemoryView":330
1466  *
1467  * @cname('__pyx_memoryview')
1468  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1469  *
1470  * cdef object obj
1471  */
1472 struct __pyx_memoryview_obj {
1473  PyObject_HEAD
1474  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1475  PyObject *obj;
1476  PyObject *_size;
1477  PyObject *_array_interface;
1478  PyThread_type_lock lock;
1479  __pyx_atomic_int acquisition_count[2];
1480  __pyx_atomic_int *acquisition_count_aligned_p;
1481  Py_buffer view;
1482  int flags;
1483  int dtype_is_object;
1484  __Pyx_TypeInfo *typeinfo;
1485 };
1486 
1487 
1488 /* "View.MemoryView":965
1489  *
1490  * @cname('__pyx_memoryviewslice')
1491  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1492  * "Internal class for passing memoryview slices to Python"
1493  *
1494  */
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 *);
1501 };
1502 
1503 
1504 
1505 /* "BoundaryConditions.py":68
1506  *
1507  *
1508  * class BoundaryCondition: # <<<<<<<<<<<<<<
1509  * """
1510  * Boundary condition class
1511  */
1512 
1513 struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition {
1514  void (*resetBC)(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *, int __pyx_skip_dispatch);
1515 };
1516 static struct __pyx_vtabstruct_18BoundaryConditions_BoundaryCondition *__pyx_vtabptr_18BoundaryConditions_BoundaryCondition;
1517 
1518 
1519 /* "View.MemoryView":105
1520  *
1521  * @cname("__pyx_array")
1522  * cdef class array: # <<<<<<<<<<<<<<
1523  *
1524  * cdef:
1525  */
1526 
1527 struct __pyx_vtabstruct_array {
1528  PyObject *(*get_memview)(struct __pyx_array_obj *);
1529 };
1530 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1531 
1532 
1533 /* "View.MemoryView":330
1534  *
1535  * @cname('__pyx_memoryview')
1536  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1537  *
1538  * cdef object obj
1539  */
1540 
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 *);
1549 };
1550 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1551 
1552 
1553 /* "View.MemoryView":965
1554  *
1555  * @cname('__pyx_memoryviewslice')
1556  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1557  * "Internal class for passing memoryview slices to Python"
1558  *
1559  */
1560 
1561 struct __pyx_vtabstruct__memoryviewslice {
1562  struct __pyx_vtabstruct_memoryview __pyx_base;
1563 };
1564 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1565 
1566 /* --- Runtime support code (head) --- */
1567 /* Refnanny.proto */
1568 #ifndef CYTHON_REFNANNY
1569  #define CYTHON_REFNANNY 0
1570 #endif
1571 #if CYTHON_REFNANNY
1572  typedef struct {
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;
1583 #ifdef WITH_THREAD
1584  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1585  if (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);\
1589  } else {\
1590  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1591  }
1592 #else
1593  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1594  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1595 #endif
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)
1606 #else
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)
1618 #endif
1619 #define __Pyx_XDECREF_SET(r, v) do {\
1620  PyObject *tmp = (PyObject *) r;\
1621  r = v; __Pyx_XDECREF(tmp);\
1622  } while (0)
1623 #define __Pyx_DECREF_SET(r, v) do {\
1624  PyObject *tmp = (PyObject *) r;\
1625  r = v; __Pyx_DECREF(tmp);\
1626  } while (0)
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)
1629 
1630 /* PyObjectGetAttrStr.proto */
1631 #if CYTHON_USE_TYPE_SLOTS
1632 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1633 #else
1634 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1635 #endif
1636 
1637 /* GetBuiltinName.proto */
1638 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1639 
1640 /* RaiseDoubleKeywords.proto */
1641 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1642 
1643 /* ParseKeywords.proto */
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);
1647 
1648 /* RaiseArgTupleInvalid.proto */
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);
1651 
1652 /* PyThreadStateGet.proto */
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
1657 #else
1658 #define __Pyx_PyThreadState_declare
1659 #define __Pyx_PyThreadState_assign
1660 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1661 #endif
1662 
1663 /* PyErrFetchRestore.proto */
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))
1674 #else
1675 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1676 #endif
1677 #else
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)
1686 #endif
1687 
1688 /* Profile.proto */
1689 #ifndef CYTHON_PROFILE
1690 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
1691  #define CYTHON_PROFILE 0
1692 #else
1693  #define CYTHON_PROFILE 1
1694 #endif
1695 #endif
1696 #ifndef CYTHON_TRACE_NOGIL
1697  #define CYTHON_TRACE_NOGIL 0
1698 #else
1699  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1700  #define CYTHON_TRACE 1
1701  #endif
1702 #endif
1703 #ifndef CYTHON_TRACE
1704  #define CYTHON_TRACE 0
1705 #endif
1706 #if CYTHON_TRACE
1707  #undef CYTHON_PROFILE_REUSE_FRAME
1708 #endif
1709 #ifndef CYTHON_PROFILE_REUSE_FRAME
1710  #define CYTHON_PROFILE_REUSE_FRAME 0
1711 #endif
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
1719  #endif
1720  #include "internal/pycore_frame.h"
1721 #endif
1722  #if CYTHON_PROFILE_REUSE_FRAME
1723  #define CYTHON_FRAME_MODIFIER static
1724  #define CYTHON_FRAME_DEL(frame)
1725  #else
1726  #define CYTHON_FRAME_MODIFIER
1727  #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
1728  #endif
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)\
1750  do {\
1751  tstate->tracing--;\
1752  tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1753  || tstate->c_profilefunc != NULL);\
1754  } while (0)
1755 #else
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)\
1763  do {\
1764  tstate->tracing--;\
1765  tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1766  || tstate->c_profilefunc != NULL);\
1767  } while (0)
1768 #endif
1769  #ifdef WITH_THREAD
1770  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1771  if (nogil) {\
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);\
1778  }\
1779  PyGILState_Release(state);\
1780  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1781  }\
1782  } else {\
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;\
1787  }\
1788  }
1789  #else
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;\
1795  }\
1796  }
1797  #endif
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);\
1804  if (exc_info) {\
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);\
1811  }\
1812  __Pyx_LeaveTracing(tstate);\
1813  }\
1814  }
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);
1826  }
1827  #ifdef WITH_THREAD
1828  #define __Pyx_TraceReturn(result, nogil)\
1829  if (likely(!__Pyx_use_tracing)); else {\
1830  if (nogil) {\
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);\
1837  }\
1838  PyGILState_Release(state);\
1839  }\
1840  } else {\
1841  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1842  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1843  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1844  }\
1845  }\
1846  }
1847  #else
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);\
1853  }\
1854  }
1855  #endif
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);
1858 #else
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)
1864 #endif
1865 #if CYTHON_TRACE
1866  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
1867  int ret;
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);
1874  if (likely(!ret)) {
1875  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1876  } else {
1877  Py_XDECREF(type);
1878  Py_XDECREF(value);
1879  Py_XDECREF(traceback);
1880  }
1881  return ret;
1882  }
1883  #ifdef WITH_THREAD
1884  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1885  if (likely(!__Pyx_use_tracing)); else {\
1886  if (nogil) {\
1887  if (CYTHON_TRACE_NOGIL) {\
1888  int ret = 0;\
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);\
1894  }\
1895  PyGILState_Release(state);\
1896  if (unlikely(ret)) goto_error;\
1897  }\
1898  } else {\
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;\
1903  }\
1904  }\
1905  }
1906  #else
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;\
1913  }\
1914  }
1915  #endif
1916 #else
1917  #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
1918 #endif
1919 
1920 /* GetItemInt.proto */
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);
1941 
1942 /* ObjectGetItem.proto */
1943 #if CYTHON_USE_TYPE_SLOTS
1944 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1945 #else
1946 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1947 #endif
1948 
1949 /* MemviewSliceInit.proto */
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,
1961  int ndim,
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);
1974 
1975 /* Import.proto */
1976 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1977 
1978 /* ImportFrom.proto */
1979 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1980 
1981 /* PyFunctionFastCall.proto */
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);
1987 #else
1988 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1989 #endif
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)
1994 #endif
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
2001  #endif
2002  #include "internal/pycore_frame.h"
2003 #endif
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
2010 #endif
2011 
2012 /* PyObjectCall.proto */
2013 #if CYTHON_COMPILING_IN_CPYTHON
2014 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2015 #else
2016 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2017 #endif
2018 
2019 /* PyObjectCallMethO.proto */
2020 #if CYTHON_COMPILING_IN_CPYTHON
2021 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2022 #endif
2023 
2024 /* PyObjectCallNoArg.proto */
2025 #if CYTHON_COMPILING_IN_CPYTHON
2026 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2027 #else
2028 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2029 #endif
2030 
2031 /* PyCFunctionFastCall.proto */
2032 #if CYTHON_FAST_PYCCALL
2033 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
2034 #else
2035 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
2036 #endif
2037 
2038 /* PyObjectCallOneArg.proto */
2039 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2040 
2041 /* PyErrExceptionMatches.proto */
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);
2045 #else
2046 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2047 #endif
2048 
2049 /* GetAttr.proto */
2050 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2051 
2052 /* GetAttr3.proto */
2053 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2054 
2055 /* PyDictVersioning.proto */
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;\
2067  } else {\
2068  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2069  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2070  }\
2071 }
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);
2075 #else
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);
2079 #endif
2080 
2081 /* GetModuleGlobalName.proto */
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);\
2089 }
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);\
2094 }
2095 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2096 #else
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);
2100 #endif
2101 
2102 /* KeywordStringCheck.proto */
2103 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
2104 
2105 /* WriteUnraisableException.proto */
2106 static void __Pyx_WriteUnraisable(const char *name, int clineno,
2107  int lineno, const char *filename,
2108  int full_traceback, int nogil);
2109 
2110 /* None.proto */
2111 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
2112 
2113 /* FetchCommonType.proto */
2114 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2115 
2116 /* CythonFunctionShared.proto */
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)
2129 typedef struct {
2130  PyCFunctionObject func;
2131 #if PY_VERSION_HEX < 0x030500A0
2132  PyObject *func_weakreflist;
2133 #endif
2134  PyObject *func_dict;
2135  PyObject *func_name;
2136  PyObject *func_qualname;
2137  PyObject *func_doc;
2138  PyObject *func_globals;
2139  PyObject *func_code;
2140  PyObject *func_closure;
2141  PyObject *func_classobj;
2142  void *defaults;
2143  int defaults_pyobjects;
2144  size_t defaults_size; // used by FusedFunction for copying defaults
2145  int flags;
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,
2155  PyObject *self,
2156  PyObject *module, PyObject *globals,
2157  PyObject* code);
2158 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2159  size_t size,
2160  int pyobjects);
2161 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2162  PyObject *tuple);
2163 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2164  PyObject *dict);
2165 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2166  PyObject *dict);
2167 static int __pyx_CyFunction_init(void);
2168 
2169 /* CythonFunction.proto */
2170 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2171  int flags, PyObject* qualname,
2172  PyObject *closure,
2173  PyObject *module, PyObject *globals,
2174  PyObject* code);
2175 
2176 /* PyObjectCall2Args.proto */
2177 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
2178 
2179 /* SliceObject.proto */
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);
2184 
2185 /* RaiseException.proto */
2186 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2187 
2188 /* PySequenceContains.proto */
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));
2192 }
2193 
2194 /* HasAttr.proto */
2195 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2196 
2197 /* GetTopmostException.proto */
2198 #if CYTHON_USE_EXC_INFO_STACK
2199 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2200 #endif
2201 
2202 /* SaveResetException.proto */
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);
2208 #else
2209 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2210 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2211 #endif
2212 
2213 /* GetException.proto */
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);
2217 #else
2218 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2219 #endif
2220 
2221 /* ArgTypeTest.proto */
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);
2226 
2227 /* IncludeStringH.proto */
2228 #include <string.h>
2229 
2230 /* BytesEquals.proto */
2231 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2232 
2233 /* UnicodeEquals.proto */
2234 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2235 
2236 /* StrEquals.proto */
2237 #if PY_MAJOR_VERSION >= 3
2238 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2239 #else
2240 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2241 #endif
2242 
2243 /* DivInt[Py_ssize_t].proto */
2244 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
2245 
2246 /* UnaryNegOverflows.proto */
2247 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2248  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2249 
2250 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2251 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2252 /* decode_c_string_utf16.proto */
2253 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
2254  int byteorder = 0;
2255  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2256 }
2257 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
2258  int byteorder = -1;
2259  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2260 }
2261 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
2262  int byteorder = 1;
2263  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2264 }
2265 
2266 /* decode_c_string.proto */
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));
2271 
2272 /* RaiseTooManyValuesToUnpack.proto */
2273 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2274 
2275 /* RaiseNeedMoreValuesToUnpack.proto */
2276 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2277 
2278 /* RaiseNoneIterError.proto */
2279 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2280 
2281 /* ExtTypeTest.proto */
2282 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2283 
2284 /* SwapException.proto */
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);
2288 #else
2289 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2290 #endif
2291 
2292 /* FastTypeChecks.proto */
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);
2298 #else
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))
2302 #endif
2303 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2304 
2305 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2306 /* ListCompAppend.proto */
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)) {
2312  Py_INCREF(x);
2313  PyList_SET_ITEM(list, len, x);
2314  __Pyx_SET_SIZE(list, len + 1);
2315  return 0;
2316  }
2317  return PyList_Append(list, x);
2318 }
2319 #else
2320 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2321 #endif
2322 
2323 /* PyIntBinop.proto */
2324 #if !CYTHON_COMPILING_IN_PYPY
2325 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2326 #else
2327 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2328  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2329 #endif
2330 
2331 /* ListExtend.proto */
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))
2336  return -1;
2337  Py_DECREF(none);
2338  return 0;
2339 #else
2340  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2341 #endif
2342 }
2343 
2344 /* ListAppend.proto */
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))) {
2350  Py_INCREF(x);
2351  PyList_SET_ITEM(list, len, x);
2352  __Pyx_SET_SIZE(list, len + 1);
2353  return 0;
2354  }
2355  return PyList_Append(list, x);
2356 }
2357 #else
2358 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2359 #endif
2360 
2361 /* None.proto */
2362 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2363 
2364 /* DivInt[long].proto */
2365 static CYTHON_INLINE long __Pyx_div_long(long, long);
2366 
2367 /* PyObject_GenericGetAttrNoDict.proto */
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);
2370 #else
2371 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2372 #endif
2373 
2374 /* PyObject_GenericGetAttr.proto */
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);
2377 #else
2378 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2379 #endif
2380 
2381 /* PyObjectGetAttrStrNoError.proto */
2382 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2383 
2384 /* SetupReduce.proto */
2385 static int __Pyx_setup_reduce(PyObject* type_obj);
2386 
2387 /* SetVTable.proto */
2388 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2389 
2390 /* TypeImport.proto */
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
2397 };
2398 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2399 #endif
2400 
2401 /* CLineInTraceback.proto */
2402 #ifdef CYTHON_CLINE_IN_TRACEBACK
2403 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2404 #else
2405 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2406 #endif
2407 
2408 /* CodeObjectCache.proto */
2409 typedef struct {
2410  PyCodeObject* code_object;
2411  int code_line;
2412 } __Pyx_CodeObjectCacheEntry;
2413 struct __Pyx_CodeObjectCache {
2414  int count;
2415  int max_count;
2416  __Pyx_CodeObjectCacheEntry* entries;
2417 };
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);
2422 
2423 /* AddTraceback.proto */
2424 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2425  int py_line, const char *filename);
2426 
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);
2430 #else
2431  #define __Pyx_GetBuffer PyObject_GetBuffer
2432  #define __Pyx_ReleaseBuffer PyBuffer_Release
2433 #endif
2434 
2435 
2436 /* BufferStructDeclare.proto */
2437 typedef struct {
2438  Py_ssize_t shape, strides, suboffsets;
2439 } __Pyx_Buf_DimInfo;
2440 typedef struct {
2441  size_t refcount;
2442  Py_buffer pybuffer;
2443 } __Pyx_Buffer;
2444 typedef struct {
2445  __Pyx_Buffer *rcbuffer;
2446  char *data;
2447  __Pyx_Buf_DimInfo diminfo[8];
2448 } __Pyx_LocalBuf_ND;
2449 
2450 /* MemviewSliceIsContig.proto */
2451 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2452 
2453 /* OverlappingSlices.proto */
2454 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2455  __Pyx_memviewslice *slice2,
2456  int ndim, size_t itemsize);
2457 
2458 /* Capsule.proto */
2459 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2460 
2461 /* MemviewDtypeToObject.proto */
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);
2464 
2465 /* IsLittleEndian.proto */
2466 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
2467 
2468 /* BufferFormatCheck.proto */
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);
2473 
2474 /* TypeInfoCompare.proto */
2475 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2476 
2477 /* MemviewSliceValidateAndInit.proto */
2478 static int __Pyx_ValidateAndInit_memviewslice(
2479  int *axes_specs,
2480  int c_or_f_flag,
2481  int buf_flags,
2482  int ndim,
2483  __Pyx_TypeInfo *dtype,
2484  __Pyx_BufFmt_StackElem stack[],
2485  __Pyx_memviewslice *memviewslice,
2486  PyObject *original_obj);
2487 
2488 /* ObjectToMemviewSlice.proto */
2489 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
2490 
2491 /* GCCDiagnostics.proto */
2492 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2493 #define __Pyx_HAS_GCC_DIAGNOSTIC
2494 #endif
2495 
2496 /* RealImag.proto */
2497 #if CYTHON_CCOMPLEX
2498  #ifdef __cplusplus
2499  #define __Pyx_CREAL(z) ((z).real())
2500  #define __Pyx_CIMAG(z) ((z).imag())
2501  #else
2502  #define __Pyx_CREAL(z) (__real__(z))
2503  #define __Pyx_CIMAG(z) (__imag__(z))
2504  #endif
2505 #else
2506  #define __Pyx_CREAL(z) ((z).real)
2507  #define __Pyx_CIMAG(z) ((z).imag)
2508 #endif
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))
2513 #else
2514  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2515  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2516 #endif
2517 
2518 /* Arithmetic.proto */
2519 #if CYTHON_CCOMPLEX
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))
2526  #ifdef __cplusplus
2527  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2528  #define __Pyx_c_conj_float(z) (::std::conj(z))
2529  #if 1
2530  #define __Pyx_c_abs_float(z) (::std::abs(z))
2531  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2532  #endif
2533  #else
2534  #define __Pyx_c_is_zero_float(z) ((z)==0)
2535  #define __Pyx_c_conj_float(z) (conjf(z))
2536  #if 1
2537  #define __Pyx_c_abs_float(z) (cabsf(z))
2538  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2539  #endif
2540  #endif
2541 #else
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);
2550  #if 1
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);
2553  #endif
2554 #endif
2555 
2556 /* Arithmetic.proto */
2557 #if CYTHON_CCOMPLEX
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))
2564  #ifdef __cplusplus
2565  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2566  #define __Pyx_c_conj_double(z) (::std::conj(z))
2567  #if 1
2568  #define __Pyx_c_abs_double(z) (::std::abs(z))
2569  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2570  #endif
2571  #else
2572  #define __Pyx_c_is_zero_double(z) ((z)==0)
2573  #define __Pyx_c_conj_double(z) (conj(z))
2574  #if 1
2575  #define __Pyx_c_abs_double(z) (cabs(z))
2576  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2577  #endif
2578  #endif
2579 #else
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);
2588  #if 1
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);
2591  #endif
2592 #endif
2593 
2594 /* MemviewSliceCopyTemplate.proto */
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);
2600 
2601 /* CIntToPy.proto */
2602 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2603 
2604 /* CIntFromPy.proto */
2605 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2606 
2607 /* CIntFromPy.proto */
2608 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2609 
2610 /* CIntToPy.proto */
2611 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2612 
2613 /* CIntFromPy.proto */
2614 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2615 
2616 /* CheckBinaryVersion.proto */
2617 static int __Pyx_check_binary_version(void);
2618 
2619 /* InitStrings.proto */
2620 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2621 
2622 static void __pyx_f_18BoundaryConditions_17BoundaryCondition_resetBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
2623 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2624 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2625 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2626 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
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); /* proto*/
2628 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2629 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2630 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2631 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2632 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2633 
2634 /* Module declarations from 'cython.view' */
2635 
2636 /* Module declarations from 'cython' */
2637 
2638 /* Module declarations from 'cpython.buffer' */
2639 
2640 /* Module declarations from 'libc.string' */
2641 
2642 /* Module declarations from 'libc.stdio' */
2643 
2644 /* Module declarations from '__builtin__' */
2645 
2646 /* Module declarations from 'cpython.type' */
2647 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2648 
2649 /* Module declarations from 'cpython' */
2650 
2651 /* Module declarations from 'cpython.object' */
2652 
2653 /* Module declarations from 'cpython.ref' */
2654 
2655 /* Module declarations from 'cpython.mem' */
2656 
2657 /* Module declarations from 'numpy' */
2658 
2659 /* Module declarations from 'numpy' */
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;
2675 
2676 /* Module declarations from 'BoundaryConditions' */
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 *); /*proto*/
2694 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2695 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2696 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2697 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2698 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2699 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2700 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
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); /*proto*/
2702 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2703 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2704 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2705 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2706 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2707 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2708 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2709 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2710 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2711 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2712 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2713 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2714 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2715 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2716 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2717 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2718 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2719 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2720 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2721 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2722 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2723 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2724 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2725 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2726 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
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;
2731 
2732 /* Implementation of 'BoundaryConditions' */
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); /* proto */
3024 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2getContext(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_context); /* proto */
3025 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2nd___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3026 static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3027 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_5Shape___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3028 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3029 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3030 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4name___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3031 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3032 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3033 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_7BC_type___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
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); /* proto */
3035 static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3036 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_2ct___get__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3037 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3038 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
3039 static PyObject *__pyx_pf_18BoundaryConditions_7BC_Base_4__reduce_cython__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self); /* proto */
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); /* proto */
3041 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
3042 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_2init_cython(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
3043 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_4resetBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
3044 static PyObject *__pyx_pf_18BoundaryConditions_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
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); /* proto */
3046 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_6setConstantBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3047 static PyObject *__pyx_pf_18BoundaryConditions_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
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); /* proto */
3049 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_8setLinearBC(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_a0, PyObject *__pyx_v_a); /* proto */
3050 static PyObject *__pyx_pf_18BoundaryConditions_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
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); /* proto */
3052 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_10setLinearRamp(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_t1, PyObject *__pyx_v_value); /* proto */
3053 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT___get__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
3054 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3055 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
3056 static PyObject *__pyx_pf_18BoundaryConditions_17BoundaryCondition_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
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); /* proto */
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); /* proto */
3061 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3062 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3063 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3064 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
3065 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
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); /* proto */
3067 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
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); /* proto */
3069 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3070 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3071 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3072 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
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); /* proto */
3074 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3075 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
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); /* proto */
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); /* proto */
3078 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3079 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3080 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3081 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3082 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3083 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3084 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3085 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3086 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3087 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3088 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3089 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3090 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3091 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3092 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3093 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3094 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
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); /* proto */
3096 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3097 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3098 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
3101 static PyObject *__pyx_tp_new_18BoundaryConditions_BC_Base(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3102 static PyObject *__pyx_tp_new_18BoundaryConditions_BoundaryCondition(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3103 static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct__setConstantBC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3104 static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_1_setLinearBC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3105 static PyObject *__pyx_tp_new_18BoundaryConditions___pyx_scope_struct_2_setLinearRamp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3106 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3107 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3108 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3109 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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;
3173 /* Late includes */
3174 
3175 /* "BoundaryConditions.py":24
3176  * Generic class regrouping boundary conditions
3177  * """
3178  * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None): # <<<<<<<<<<<<<<
3179  * self.Shape = shape
3180  * self.name = name
3181  */
3182 
3183 /* Python wrapper */
3184 static int __pyx_pw_18BoundaryConditions_7BC_Base_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
3194  int __pyx_r;
3195  __Pyx_RefNannyDeclarations
3196  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3197  {
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)) {
3206  Py_ssize_t kw_args;
3207  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3208  switch (pos_args) {
3209  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3210  CYTHON_FALLTHROUGH;
3211  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3212  CYTHON_FALLTHROUGH;
3213  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3214  CYTHON_FALLTHROUGH;
3215  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3216  CYTHON_FALLTHROUGH;
3217  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3218  CYTHON_FALLTHROUGH;
3219  case 0: break;
3220  default: goto __pyx_L5_argtuple_error;
3221  }
3222  kw_args = PyDict_Size(__pyx_kwds);
3223  switch (pos_args) {
3224  case 0:
3225  if (kw_args > 0) {
3226  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape);
3227  if (value) { values[0] = value; kw_args--; }
3228  }
3229  CYTHON_FALLTHROUGH;
3230  case 1:
3231  if (kw_args > 0) {
3232  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
3233  if (value) { values[1] = value; kw_args--; }
3234  }
3235  CYTHON_FALLTHROUGH;
3236  case 2:
3237  if (kw_args > 0) {
3238  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b_or);
3239  if (value) { values[2] = value; kw_args--; }
3240  }
3241  CYTHON_FALLTHROUGH;
3242  case 3:
3243  if (kw_args > 0) {
3244  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b_i);
3245  if (value) { values[3] = value; kw_args--; }
3246  }
3247  CYTHON_FALLTHROUGH;
3248  case 4:
3249  if (kw_args > 0) {
3250  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd);
3251  if (value) { values[4] = value; kw_args--; }
3252  }
3253  }
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)
3256  }
3257  } else {
3258  switch (PyTuple_GET_SIZE(__pyx_args)) {
3259  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3260  CYTHON_FALLTHROUGH;
3261  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3262  CYTHON_FALLTHROUGH;
3263  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3264  CYTHON_FALLTHROUGH;
3265  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3266  CYTHON_FALLTHROUGH;
3267  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3268  CYTHON_FALLTHROUGH;
3269  case 0: break;
3270  default: goto __pyx_L5_argtuple_error;
3271  }
3272  }
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];
3278  }
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)
3282  __pyx_L3_error:;
3283  __Pyx_AddTraceback("BoundaryConditions.BC_Base.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3284  __Pyx_RefNannyFinishContext();
3285  return -1;
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);
3288 
3289  /* function exit code */
3290  __Pyx_RefNannyFinishContext();
3291  return __pyx_r;
3292 }
3293 
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) {
3295  int __pyx_r;
3296  __Pyx_TraceDeclarations
3297  __Pyx_RefNannyDeclarations
3298  PyObject *__pyx_t_1 = NULL;
3299  int __pyx_t_2;
3300  int __pyx_t_3;
3301  PyObject *__pyx_t_4 = NULL;
3302  int __pyx_t_5;
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));
3309 
3310  /* "BoundaryConditions.py":25
3311  * """
3312  * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None):
3313  * self.Shape = shape # <<<<<<<<<<<<<<
3314  * self.name = name
3315  * self.BC_type = 'None'
3316  */
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;
3322 
3323  /* "BoundaryConditions.py":26
3324  * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None):
3325  * self.Shape = shape
3326  * self.name = name # <<<<<<<<<<<<<<
3327  * self.BC_type = 'None'
3328  * if shape is not None:
3329  */
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);
3337  __pyx_t_1 = 0;
3338 
3339  /* "BoundaryConditions.py":27
3340  * self.Shape = shape
3341  * self.name = name
3342  * self.BC_type = 'None' # <<<<<<<<<<<<<<
3343  * if shape is not None:
3344  * self.nd = self.Shape.Domain.nd
3345  */
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;
3351 
3352  /* "BoundaryConditions.py":28
3353  * self.name = name
3354  * self.BC_type = 'None'
3355  * if shape is not None: # <<<<<<<<<<<<<<
3356  * self.nd = self.Shape.Domain.nd
3357  * elif nd is not None:
3358  */
3359  __pyx_t_2 = (__pyx_v_shape != Py_None);
3360  __pyx_t_3 = (__pyx_t_2 != 0);
3361  if (__pyx_t_3) {
3362 
3363  /* "BoundaryConditions.py":29
3364  * self.BC_type = 'None'
3365  * if shape is not None:
3366  * self.nd = self.Shape.Domain.nd # <<<<<<<<<<<<<<
3367  * elif nd is not None:
3368  * self.nd = nd
3369  */
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;
3378 
3379  /* "BoundaryConditions.py":28
3380  * self.name = name
3381  * self.BC_type = 'None'
3382  * if shape is not None: # <<<<<<<<<<<<<<
3383  * self.nd = self.Shape.Domain.nd
3384  * elif nd is not None:
3385  */
3386  goto __pyx_L3;
3387  }
3388 
3389  /* "BoundaryConditions.py":30
3390  * if shape is not None:
3391  * self.nd = self.Shape.Domain.nd
3392  * elif nd is not None: # <<<<<<<<<<<<<<
3393  * self.nd = nd
3394  * else:
3395  */
3396  __pyx_t_3 = (__pyx_v_nd != Py_None);
3397  __pyx_t_2 = (__pyx_t_3 != 0);
3398  if (__pyx_t_2) {
3399 
3400  /* "BoundaryConditions.py":31
3401  * self.nd = self.Shape.Domain.nd
3402  * elif nd is not None:
3403  * self.nd = nd # <<<<<<<<<<<<<<
3404  * else:
3405  * assert nd is not None, 'Shape or nd must be passed to BC'
3406  */
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;
3409 
3410  /* "BoundaryConditions.py":30
3411  * if shape is not None:
3412  * self.nd = self.Shape.Domain.nd
3413  * elif nd is not None: # <<<<<<<<<<<<<<
3414  * self.nd = nd
3415  * else:
3416  */
3417  goto __pyx_L3;
3418  }
3419 
3420  /* "BoundaryConditions.py":33
3421  * self.nd = nd
3422  * else:
3423  * assert nd is not None, 'Shape or nd must be passed to BC' # <<<<<<<<<<<<<<
3424  * if b_or is not None:
3425  * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
3426  */
3427  /*else*/ {
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)
3434  }
3435  }
3436  #endif
3437  }
3438  __pyx_L3:;
3439 
3440  /* "BoundaryConditions.py":34
3441  * else:
3442  * assert nd is not None, 'Shape or nd must be passed to BC'
3443  * if b_or is not None: # <<<<<<<<<<<<<<
3444  * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
3445  * else:
3446  */
3447  __pyx_t_2 = (__pyx_v_b_or != Py_None);
3448  __pyx_t_3 = (__pyx_t_2 != 0);
3449  if (__pyx_t_3) {
3450 
3451  /* "BoundaryConditions.py":35
3452  * assert nd is not None, 'Shape or nd must be passed to BC'
3453  * if b_or is not None:
3454  * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape # <<<<<<<<<<<<<<
3455  * else:
3456  * self._b_or = None
3457  */
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;
3466 
3467  /* "BoundaryConditions.py":34
3468  * else:
3469  * assert nd is not None, 'Shape or nd must be passed to BC'
3470  * if b_or is not None: # <<<<<<<<<<<<<<
3471  * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
3472  * else:
3473  */
3474  goto __pyx_L4;
3475  }
3476 
3477  /* "BoundaryConditions.py":37
3478  * self._b_or = b_or[b_i] # array of orientation of all boundaries of shape
3479  * else:
3480  * self._b_or = None # <<<<<<<<<<<<<<
3481  *
3482  * # @staticmethod
3483  */
3484  /*else*/ {
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;
3490  }
3491  __pyx_L4:;
3492 
3493  /* "BoundaryConditions.py":24
3494  * Generic class regrouping boundary conditions
3495  * """
3496  * def __init__(self, shape=None, name=None, b_or=None, b_i=0, nd=None): # <<<<<<<<<<<<<<
3497  * self.Shape = shape
3498  * self.name = name
3499  */
3500 
3501  /* function exit code */
3502  __pyx_r = 0;
3503  goto __pyx_L0;
3504  __pyx_L1_error:;
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);
3509  __pyx_r = -1;
3510  __pyx_L0:;
3511  __Pyx_TraceReturn(Py_None, 0);
3512  __Pyx_RefNannyFinishContext();
3513  return __pyx_r;
3514 }
3515 
3516 /* "BoundaryConditions.py":52
3517  * # setattr(BC_Base, name, default_value)
3518  *
3519  * def getContext(self, context=None): # <<<<<<<<<<<<<<
3520  * """
3521  * Gets context from proteus.Context or
3522  */
3523 
3524 /* Python wrapper */
3525 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_3getContext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
3536  {
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)) {
3541  Py_ssize_t kw_args;
3542  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3543  switch (pos_args) {
3544  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3545  CYTHON_FALLTHROUGH;
3546  case 0: break;
3547  default: goto __pyx_L5_argtuple_error;
3548  }
3549  kw_args = PyDict_Size(__pyx_kwds);
3550  switch (pos_args) {
3551  case 0:
3552  if (kw_args > 0) {
3553  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_context);
3554  if (value) { values[0] = value; kw_args--; }
3555  }
3556  }
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)
3559  }
3560  } else {
3561  switch (PyTuple_GET_SIZE(__pyx_args)) {
3562  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3563  CYTHON_FALLTHROUGH;
3564  case 0: break;
3565  default: goto __pyx_L5_argtuple_error;
3566  }
3567  }
3568  __pyx_v_context = values[0];
3569  }
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)
3573  __pyx_L3_error:;
3574  __Pyx_AddTraceback("BoundaryConditions.BC_Base.getContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
3575  __Pyx_RefNannyFinishContext();
3576  return NULL;
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);
3579 
3580  /* function exit code */
3581  __Pyx_RefNannyFinishContext();
3582  return __pyx_r;
3583 }
3584 
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
3590  int __pyx_t_1;
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));
3600 
3601  /* "BoundaryConditions.py":61
3602  * if set to None, the context will be created from proteus.Context
3603  * """
3604  * if context: # <<<<<<<<<<<<<<
3605  * from proteus import Context
3606  * self.ct = Context.get()
3607  */
3608  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_context); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 61, __pyx_L1_error)
3609  if (__pyx_t_1) {
3610 
3611  /* "BoundaryConditions.py":62
3612  * """
3613  * if context:
3614  * from proteus import Context # <<<<<<<<<<<<<<
3615  * self.ct = Context.get()
3616  * else:
3617  */
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;
3632 
3633  /* "BoundaryConditions.py":63
3634  * if context:
3635  * from proteus import Context
3636  * self.ct = Context.get() # <<<<<<<<<<<<<<
3637  * else:
3638  * self.ct = context
3639  */
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);
3642  __pyx_t_4 = NULL;
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);
3650  }
3651  }
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;
3661  __pyx_t_3 = 0;
3662 
3663  /* "BoundaryConditions.py":61
3664  * if set to None, the context will be created from proteus.Context
3665  * """
3666  * if context: # <<<<<<<<<<<<<<
3667  * from proteus import Context
3668  * self.ct = Context.get()
3669  */
3670  goto __pyx_L3;
3671  }
3672 
3673  /* "BoundaryConditions.py":65
3674  * self.ct = Context.get()
3675  * else:
3676  * self.ct = context # <<<<<<<<<<<<<<
3677  *
3678  *
3679  */
3680  /*else*/ {
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;
3686  }
3687  __pyx_L3:;
3688 
3689  /* "BoundaryConditions.py":52
3690  * # setattr(BC_Base, name, default_value)
3691  *
3692  * def getContext(self, context=None): # <<<<<<<<<<<<<<
3693  * """
3694  * Gets context from proteus.Context or
3695  */
3696 
3697  /* function exit code */
3698  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3699  goto __pyx_L0;
3700  __pyx_L1_error:;
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);
3705  __pyx_r = NULL;
3706  __pyx_L0:;
3707  __Pyx_XDECREF(__pyx_v_Context);
3708  __Pyx_XGIVEREF(__pyx_r);
3709  __Pyx_TraceReturn(__pyx_r, 0);
3710  __Pyx_RefNannyFinishContext();
3711  return __pyx_r;
3712 }
3713 
3714 /* "BoundaryConditions.pxd":8
3715  * cdef double[:] _b_or
3716  * cdef public:
3717  * cdef int nd # <<<<<<<<<<<<<<
3718  * object Shape
3719  * str name
3720  */
3721 
3722 /* Python wrapper */
3723 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2nd_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
3729 
3730  /* function exit code */
3731  __Pyx_RefNannyFinishContext();
3732  return __pyx_r;
3733 }
3734 
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;
3749  __pyx_t_1 = 0;
3750  goto __pyx_L0;
3751 
3752  /* function exit code */
3753  __pyx_L1_error:;
3754  __Pyx_XDECREF(__pyx_t_1);
3755  __Pyx_AddTraceback("BoundaryConditions.BC_Base.nd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3756  __pyx_r = NULL;
3757  __pyx_L0:;
3758  __Pyx_XGIVEREF(__pyx_r);
3759  __Pyx_TraceReturn(__pyx_r, 0);
3760  __Pyx_RefNannyFinishContext();
3761  return __pyx_r;
3762 }
3763 
3764 /* Python wrapper */
3765 static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3766 static int __pyx_pw_18BoundaryConditions_7BC_Base_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3767  int __pyx_r;
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));
3771 
3772  /* function exit code */
3773  __Pyx_RefNannyFinishContext();
3774  return __pyx_r;
3775 }
3776 
3777 static int __pyx_pf_18BoundaryConditions_7BC_Base_2nd_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
3778  int __pyx_r;
3779  __Pyx_TraceDeclarations
3780  __Pyx_RefNannyDeclarations
3781  int __pyx_t_1;
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;
3789 
3790  /* function exit code */
3791  __pyx_r = 0;
3792  goto __pyx_L0;
3793  __pyx_L1_error:;
3794  __Pyx_AddTraceback("BoundaryConditions.BC_Base.nd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3795  __pyx_r = -1;
3796  __pyx_L0:;
3797  __Pyx_TraceReturn(Py_None, 0);
3798  __Pyx_RefNannyFinishContext();
3799  return __pyx_r;
3800 }
3801 
3802 /* "BoundaryConditions.pxd":9
3803  * cdef public:
3804  * cdef int nd
3805  * object Shape # <<<<<<<<<<<<<<
3806  * str name
3807  * str BC_type
3808  */
3809 
3810 /* Python wrapper */
3811 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5Shape_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
3817 
3818  /* function exit code */
3819  __Pyx_RefNannyFinishContext();
3820  return __pyx_r;
3821 }
3822 
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;
3835  goto __pyx_L0;
3836 
3837  /* function exit code */
3838  __pyx_L1_error:;
3839  __Pyx_AddTraceback("BoundaryConditions.BC_Base.Shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3840  __pyx_r = NULL;
3841  __pyx_L0:;
3842  __Pyx_XGIVEREF(__pyx_r);
3843  __Pyx_TraceReturn(__pyx_r, 0);
3844  __Pyx_RefNannyFinishContext();
3845  return __pyx_r;
3846 }
3847 
3848 /* Python wrapper */
3849 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3850 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3851  int __pyx_r;
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));
3855 
3856  /* function exit code */
3857  __Pyx_RefNannyFinishContext();
3858  return __pyx_r;
3859 }
3860 
3861 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
3862  int __pyx_r;
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;
3875 
3876  /* function exit code */
3877  __pyx_r = 0;
3878  goto __pyx_L0;
3879  __pyx_L1_error:;
3880  __Pyx_AddTraceback("BoundaryConditions.BC_Base.Shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3881  __pyx_r = -1;
3882  __pyx_L0:;
3883  __Pyx_TraceReturn(Py_None, 0);
3884  __Pyx_RefNannyFinishContext();
3885  return __pyx_r;
3886 }
3887 
3888 /* Python wrapper */
3889 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self); /*proto*/
3890 static int __pyx_pw_18BoundaryConditions_7BC_Base_5Shape_5__del__(PyObject *__pyx_v_self) {
3891  int __pyx_r;
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));
3895 
3896  /* function exit code */
3897  __Pyx_RefNannyFinishContext();
3898  return __pyx_r;
3899 }
3900 
3901 static int __pyx_pf_18BoundaryConditions_7BC_Base_5Shape_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
3902  int __pyx_r;
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;
3915 
3916  /* function exit code */
3917  __pyx_r = 0;
3918  goto __pyx_L0;
3919  __pyx_L1_error:;
3920  __Pyx_AddTraceback("BoundaryConditions.BC_Base.Shape.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3921  __pyx_r = -1;
3922  __pyx_L0:;
3923  __Pyx_TraceReturn(Py_None, 0);
3924  __Pyx_RefNannyFinishContext();
3925  return __pyx_r;
3926 }
3927 
3928 /* "BoundaryConditions.pxd":10
3929  * cdef int nd
3930  * object Shape
3931  * str name # <<<<<<<<<<<<<<
3932  * str BC_type
3933  * object ct
3934  */
3935 
3936 /* Python wrapper */
3937 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
3943 
3944  /* function exit code */
3945  __Pyx_RefNannyFinishContext();
3946  return __pyx_r;
3947 }
3948 
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;
3961  goto __pyx_L0;
3962 
3963  /* function exit code */
3964  __pyx_L1_error:;
3965  __Pyx_AddTraceback("BoundaryConditions.BC_Base.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3966  __pyx_r = NULL;
3967  __pyx_L0:;
3968  __Pyx_XGIVEREF(__pyx_r);
3969  __Pyx_TraceReturn(__pyx_r, 0);
3970  __Pyx_RefNannyFinishContext();
3971  return __pyx_r;
3972 }
3973 
3974 /* Python wrapper */
3975 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3976 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3977  int __pyx_r;
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));
3981 
3982  /* function exit code */
3983  __Pyx_RefNannyFinishContext();
3984  return __pyx_r;
3985 }
3986 
3987 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
3988  int __pyx_r;
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);
4004  __pyx_t_1 = 0;
4005 
4006  /* function exit code */
4007  __pyx_r = 0;
4008  goto __pyx_L0;
4009  __pyx_L1_error:;
4010  __Pyx_XDECREF(__pyx_t_1);
4011  __Pyx_AddTraceback("BoundaryConditions.BC_Base.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4012  __pyx_r = -1;
4013  __pyx_L0:;
4014  __Pyx_TraceReturn(Py_None, 0);
4015  __Pyx_RefNannyFinishContext();
4016  return __pyx_r;
4017 }
4018 
4019 /* Python wrapper */
4020 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
4021 static int __pyx_pw_18BoundaryConditions_7BC_Base_4name_5__del__(PyObject *__pyx_v_self) {
4022  int __pyx_r;
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));
4026 
4027  /* function exit code */
4028  __Pyx_RefNannyFinishContext();
4029  return __pyx_r;
4030 }
4031 
4032 static int __pyx_pf_18BoundaryConditions_7BC_Base_4name_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4033  int __pyx_r;
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);
4046 
4047  /* function exit code */
4048  __pyx_r = 0;
4049  goto __pyx_L0;
4050  __pyx_L1_error:;
4051  __Pyx_AddTraceback("BoundaryConditions.BC_Base.name.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4052  __pyx_r = -1;
4053  __pyx_L0:;
4054  __Pyx_TraceReturn(Py_None, 0);
4055  __Pyx_RefNannyFinishContext();
4056  return __pyx_r;
4057 }
4058 
4059 /* "BoundaryConditions.pxd":11
4060  * object Shape
4061  * str name
4062  * str BC_type # <<<<<<<<<<<<<<
4063  * object ct
4064  * # cpdef void newGlobalBC(BC_Base cls, newstr name, object default_value)
4065  */
4066 
4067 /* Python wrapper */
4068 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
4074 
4075  /* function exit code */
4076  __Pyx_RefNannyFinishContext();
4077  return __pyx_r;
4078 }
4079 
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;
4092  goto __pyx_L0;
4093 
4094  /* function exit code */
4095  __pyx_L1_error:;
4096  __Pyx_AddTraceback("BoundaryConditions.BC_Base.BC_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4097  __pyx_r = NULL;
4098  __pyx_L0:;
4099  __Pyx_XGIVEREF(__pyx_r);
4100  __Pyx_TraceReturn(__pyx_r, 0);
4101  __Pyx_RefNannyFinishContext();
4102  return __pyx_r;
4103 }
4104 
4105 /* Python wrapper */
4106 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
4107 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4108  int __pyx_r;
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));
4112 
4113  /* function exit code */
4114  __Pyx_RefNannyFinishContext();
4115  return __pyx_r;
4116 }
4117 
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) {
4119  int __pyx_r;
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);
4135  __pyx_t_1 = 0;
4136 
4137  /* function exit code */
4138  __pyx_r = 0;
4139  goto __pyx_L0;
4140  __pyx_L1_error:;
4141  __Pyx_XDECREF(__pyx_t_1);
4142  __Pyx_AddTraceback("BoundaryConditions.BC_Base.BC_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4143  __pyx_r = -1;
4144  __pyx_L0:;
4145  __Pyx_TraceReturn(Py_None, 0);
4146  __Pyx_RefNannyFinishContext();
4147  return __pyx_r;
4148 }
4149 
4150 /* Python wrapper */
4151 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self); /*proto*/
4152 static int __pyx_pw_18BoundaryConditions_7BC_Base_7BC_type_5__del__(PyObject *__pyx_v_self) {
4153  int __pyx_r;
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));
4157 
4158  /* function exit code */
4159  __Pyx_RefNannyFinishContext();
4160  return __pyx_r;
4161 }
4162 
4163 static int __pyx_pf_18BoundaryConditions_7BC_Base_7BC_type_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4164  int __pyx_r;
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);
4177 
4178  /* function exit code */
4179  __pyx_r = 0;
4180  goto __pyx_L0;
4181  __pyx_L1_error:;
4182  __Pyx_AddTraceback("BoundaryConditions.BC_Base.BC_type.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4183  __pyx_r = -1;
4184  __pyx_L0:;
4185  __Pyx_TraceReturn(Py_None, 0);
4186  __Pyx_RefNannyFinishContext();
4187  return __pyx_r;
4188 }
4189 
4190 /* "BoundaryConditions.pxd":12
4191  * str name
4192  * str BC_type
4193  * object ct # <<<<<<<<<<<<<<
4194  * # cpdef void newGlobalBC(BC_Base cls, newstr name, object default_value)
4195  * # cpdef void getContext(BC_Base cls, object context=*)
4196  */
4197 
4198 /* Python wrapper */
4199 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_2ct_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
4205 
4206  /* function exit code */
4207  __Pyx_RefNannyFinishContext();
4208  return __pyx_r;
4209 }
4210 
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;
4223  goto __pyx_L0;
4224 
4225  /* function exit code */
4226  __pyx_L1_error:;
4227  __Pyx_AddTraceback("BoundaryConditions.BC_Base.ct.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4228  __pyx_r = NULL;
4229  __pyx_L0:;
4230  __Pyx_XGIVEREF(__pyx_r);
4231  __Pyx_TraceReturn(__pyx_r, 0);
4232  __Pyx_RefNannyFinishContext();
4233  return __pyx_r;
4234 }
4235 
4236 /* Python wrapper */
4237 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
4238 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4239  int __pyx_r;
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));
4243 
4244  /* function exit code */
4245  __Pyx_RefNannyFinishContext();
4246  return __pyx_r;
4247 }
4248 
4249 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_2__set__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self, PyObject *__pyx_v_value) {
4250  int __pyx_r;
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;
4263 
4264  /* function exit code */
4265  __pyx_r = 0;
4266  goto __pyx_L0;
4267  __pyx_L1_error:;
4268  __Pyx_AddTraceback("BoundaryConditions.BC_Base.ct.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4269  __pyx_r = -1;
4270  __pyx_L0:;
4271  __Pyx_TraceReturn(Py_None, 0);
4272  __Pyx_RefNannyFinishContext();
4273  return __pyx_r;
4274 }
4275 
4276 /* Python wrapper */
4277 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self); /*proto*/
4278 static int __pyx_pw_18BoundaryConditions_7BC_Base_2ct_5__del__(PyObject *__pyx_v_self) {
4279  int __pyx_r;
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));
4283 
4284  /* function exit code */
4285  __Pyx_RefNannyFinishContext();
4286  return __pyx_r;
4287 }
4288 
4289 static int __pyx_pf_18BoundaryConditions_7BC_Base_2ct_4__del__(struct __pyx_obj_18BoundaryConditions_BC_Base *__pyx_v_self) {
4290  int __pyx_r;
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;
4303 
4304  /* function exit code */
4305  __pyx_r = 0;
4306  goto __pyx_L0;
4307  __pyx_L1_error:;
4308  __Pyx_AddTraceback("BoundaryConditions.BC_Base.ct.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4309  __pyx_r = -1;
4310  __pyx_L0:;
4311  __Pyx_TraceReturn(Py_None, 0);
4312  __Pyx_RefNannyFinishContext();
4313  return __pyx_r;
4314 }
4315 
4316 /* "(tree fragment)":1
4317  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4318  * cdef tuple state
4319  * cdef object _dict
4320  */
4321 
4322 /* Python wrapper */
4323 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
4331 
4332  /* function exit code */
4333  __Pyx_RefNannyFinishContext();
4334  return __pyx_r;
4335 }
4336 
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;
4347  int __pyx_t_4;
4348  int __pyx_t_5;
4349  int __pyx_t_6;
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));
4356 
4357  /* "(tree fragment)":5
4358  * cdef object _dict
4359  * cdef bint use_setstate
4360  * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd) # <<<<<<<<<<<<<<
4361  * _dict = getattr(self, '__dict__', None)
4362  * if _dict is not None:
4363  */
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);
4386  __pyx_t_1 = 0;
4387  __pyx_t_2 = 0;
4388  __pyx_v_state = ((PyObject*)__pyx_t_3);
4389  __pyx_t_3 = 0;
4390 
4391  /* "(tree fragment)":6
4392  * cdef bint use_setstate
4393  * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
4394  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
4395  * if _dict is not None:
4396  * state += (_dict,)
4397  */
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;
4401  __pyx_t_3 = 0;
4402 
4403  /* "(tree fragment)":7
4404  * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
4405  * _dict = getattr(self, '__dict__', None)
4406  * if _dict is not None: # <<<<<<<<<<<<<<
4407  * state += (_dict,)
4408  * use_setstate = True
4409  */
4410  __pyx_t_4 = (__pyx_v__dict != Py_None);
4411  __pyx_t_5 = (__pyx_t_4 != 0);
4412  if (__pyx_t_5) {
4413 
4414  /* "(tree fragment)":8
4415  * _dict = getattr(self, '__dict__', None)
4416  * if _dict is not None:
4417  * state += (_dict,) # <<<<<<<<<<<<<<
4418  * use_setstate = True
4419  * else:
4420  */
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));
4430  __pyx_t_2 = 0;
4431 
4432  /* "(tree fragment)":9
4433  * if _dict is not None:
4434  * state += (_dict,)
4435  * use_setstate = True # <<<<<<<<<<<<<<
4436  * else:
4437  * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
4438  */
4439  __pyx_v_use_setstate = 1;
4440 
4441  /* "(tree fragment)":7
4442  * state = (self.BC_type, self.Shape, self._b_or, self.ct, self.name, self.nd)
4443  * _dict = getattr(self, '__dict__', None)
4444  * if _dict is not None: # <<<<<<<<<<<<<<
4445  * state += (_dict,)
4446  * use_setstate = True
4447  */
4448  goto __pyx_L3;
4449  }
4450 
4451  /* "(tree fragment)":11
4452  * use_setstate = True
4453  * else:
4454  * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None # <<<<<<<<<<<<<<
4455  * if use_setstate:
4456  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, None), state
4457  */
4458  /*else*/ {
4459  __pyx_t_4 = (__pyx_v_self->BC_type != ((PyObject*)Py_None));
4460  __pyx_t_6 = (__pyx_t_4 != 0);
4461  if (!__pyx_t_6) {
4462  } else {
4463  __pyx_t_5 = __pyx_t_6;
4464  goto __pyx_L4_bool_binop_done;
4465  }
4466  __pyx_t_6 = (__pyx_v_self->Shape != Py_None);
4467  __pyx_t_4 = (__pyx_t_6 != 0);
4468  if (!__pyx_t_4) {
4469  } else {
4470  __pyx_t_5 = __pyx_t_4;
4471  goto __pyx_L4_bool_binop_done;
4472  }
4473  __pyx_t_4 = (__pyx_v_self->ct != Py_None);
4474  __pyx_t_6 = (__pyx_t_4 != 0);
4475  if (!__pyx_t_6) {
4476  } else {
4477  __pyx_t_5 = __pyx_t_6;
4478  goto __pyx_L4_bool_binop_done;
4479  }
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;
4485  }
4486  __pyx_L3:;
4487 
4488  /* "(tree fragment)":12
4489  * else:
4490  * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
4491  * if use_setstate: # <<<<<<<<<<<<<<
4492  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, None), state
4493  * else:
4494  */
4495  __pyx_t_5 = (__pyx_v_use_setstate != 0);
4496  if (__pyx_t_5) {
4497 
4498  /* "(tree fragment)":13
4499  * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
4500  * if use_setstate:
4501  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, None), state # <<<<<<<<<<<<<<
4502  * else:
4503  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, state)
4504  */
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);
4528  __pyx_t_2 = 0;
4529  __pyx_t_3 = 0;
4530  __pyx_r = __pyx_t_1;
4531  __pyx_t_1 = 0;
4532  goto __pyx_L0;
4533 
4534  /* "(tree fragment)":12
4535  * else:
4536  * use_setstate = self.BC_type is not None or self.Shape is not None or self.ct is not None or self.name is not None
4537  * if use_setstate: # <<<<<<<<<<<<<<
4538  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, None), state
4539  * else:
4540  */
4541  }
4542 
4543  /* "(tree fragment)":15
4544  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, None), state
4545  * else:
4546  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, state) # <<<<<<<<<<<<<<
4547  * def __setstate_cython__(self, __pyx_state):
4548  * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
4549  */
4550  /*else*/ {
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);
4571  __pyx_t_1 = 0;
4572  __pyx_t_3 = 0;
4573  __pyx_r = __pyx_t_2;
4574  __pyx_t_2 = 0;
4575  goto __pyx_L0;
4576  }
4577 
4578  /* "(tree fragment)":1
4579  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4580  * cdef tuple state
4581  * cdef object _dict
4582  */
4583 
4584  /* function exit code */
4585  __pyx_L1_error:;
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);
4590  __pyx_r = NULL;
4591  __pyx_L0:;
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();
4597  return __pyx_r;
4598 }
4599 
4600 /* "(tree fragment)":16
4601  * else:
4602  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, state)
4603  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4604  * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
4605  */
4606 
4607 /* Python wrapper */
4608 static PyObject *__pyx_pw_18BoundaryConditions_7BC_Base_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
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));
4616 
4617  /* function exit code */
4618  __Pyx_RefNannyFinishContext();
4619  return __pyx_r;
4620 }
4621 
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));
4633 
4634  /* "(tree fragment)":17
4635  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, state)
4636  * def __setstate_cython__(self, __pyx_state):
4637  * __pyx_unpickle_BC_Base__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
4638  */
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;
4643 
4644  /* "(tree fragment)":16
4645  * else:
4646  * return __pyx_unpickle_BC_Base, (type(self), 0x96e6a1f, state)
4647  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4648  * __pyx_unpickle_BC_Base__set_state(self, __pyx_state)
4649  */
4650 
4651  /* function exit code */
4652  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4653  goto __pyx_L0;
4654  __pyx_L1_error:;
4655  __Pyx_XDECREF(__pyx_t_1);
4656  __Pyx_AddTraceback("BoundaryConditions.BC_Base.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4657  __pyx_r = NULL;
4658  __pyx_L0:;
4659  __Pyx_XGIVEREF(__pyx_r);
4660  __Pyx_TraceReturn(__pyx_r, 0);
4661  __Pyx_RefNannyFinishContext();
4662  return __pyx_r;
4663 }
4664 
4665 /* "BoundaryConditions.py":78
4666  * no boundary condition
4667  * """
4668  * def __init__(self): # <<<<<<<<<<<<<<
4669  * self.uOfXT = None
4670  *
4671  */
4672 
4673 /* Python wrapper */
4674 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4675 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4676  int __pyx_r;
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));
4683 
4684  /* function exit code */
4685  __Pyx_RefNannyFinishContext();
4686  return __pyx_r;
4687 }
4688 
4689 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition___init__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
4690  int __pyx_r;
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));
4698 
4699  /* "BoundaryConditions.py":79
4700  * """
4701  * def __init__(self):
4702  * self.uOfXT = None # <<<<<<<<<<<<<<
4703  *
4704  * def init_cython(self):
4705  */
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;
4711 
4712  /* "BoundaryConditions.py":78
4713  * no boundary condition
4714  * """
4715  * def __init__(self): # <<<<<<<<<<<<<<
4716  * self.uOfXT = None
4717  *
4718  */
4719 
4720  /* function exit code */
4721  __pyx_r = 0;
4722  goto __pyx_L0;
4723  __pyx_L1_error:;
4724  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4725  __pyx_r = -1;
4726  __pyx_L0:;
4727  __Pyx_TraceReturn(Py_None, 0);
4728  __Pyx_RefNannyFinishContext();
4729  return __pyx_r;
4730 }
4731 
4732 /* "BoundaryConditions.py":81
4733  * self.uOfXT = None
4734  *
4735  * def init_cython(self): # <<<<<<<<<<<<<<
4736  * return self.uOfXT
4737  *
4738  */
4739 
4740 /* Python wrapper */
4741 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_3init_cython(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
4749 
4750  /* function exit code */
4751  __Pyx_RefNannyFinishContext();
4752  return __pyx_r;
4753 }
4754 
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));
4765 
4766  /* "BoundaryConditions.py":82
4767  *
4768  * def init_cython(self):
4769  * return self.uOfXT # <<<<<<<<<<<<<<
4770  *
4771  * def resetBC(self):
4772  */
4773  __Pyx_XDECREF(__pyx_r);
4774  __Pyx_INCREF(__pyx_v_self->uOfXT);
4775  __pyx_r = __pyx_v_self->uOfXT;
4776  goto __pyx_L0;
4777 
4778  /* "BoundaryConditions.py":81
4779  * self.uOfXT = None
4780  *
4781  * def init_cython(self): # <<<<<<<<<<<<<<
4782  * return self.uOfXT
4783  *
4784  */
4785 
4786  /* function exit code */
4787  __pyx_L1_error:;
4788  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.init_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
4789  __pyx_r = NULL;
4790  __pyx_L0:;
4791  __Pyx_XGIVEREF(__pyx_r);
4792  __Pyx_TraceReturn(__pyx_r, 0);
4793  __Pyx_RefNannyFinishContext();
4794  return __pyx_r;
4795 }
4796 
4797 /* "BoundaryConditions.py":84
4798  * return self.uOfXT
4799  *
4800  * def resetBC(self): # <<<<<<<<<<<<<<
4801  * self.uOfXT = None
4802  *
4803  */
4804 
4805 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
4819  /* Check if called by wrapper */
4820  if (unlikely(__pyx_skip_dispatch)) ;
4821  /* Check if overridden in Python */
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));
4827  #endif
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);
4840  }
4841  }
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;
4849  goto __pyx_L0;
4850  }
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;
4856  }
4857  #endif
4858  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4859  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4860  }
4861  #endif
4862  }
4863 
4864  /* "BoundaryConditions.py":85
4865  *
4866  * def resetBC(self):
4867  * self.uOfXT = None # <<<<<<<<<<<<<<
4868  *
4869  * def setConstantBC(self, value):
4870  */
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;
4876 
4877  /* "BoundaryConditions.py":84
4878  * return self.uOfXT
4879  *
4880  * def resetBC(self): # <<<<<<<<<<<<<<
4881  * self.uOfXT = None
4882  *
4883  */
4884 
4885  /* function exit code */
4886  goto __pyx_L0;
4887  __pyx_L1_error:;
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);
4893  __pyx_L0:;
4894  __Pyx_TraceReturn(Py_None, 0);
4895  __Pyx_RefNannyFinishContext();
4896 }
4897 
4898 /* Python wrapper */
4899 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5resetBC(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
4907 
4908  /* function exit code */
4909  __Pyx_RefNannyFinishContext();
4910  return __pyx_r;
4911 }
4912 
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;
4928  __pyx_t_1 = 0;
4929  goto __pyx_L0;
4930 
4931  /* function exit code */
4932  __pyx_L1_error:;
4933  __Pyx_XDECREF(__pyx_t_1);
4934  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.resetBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
4935  __pyx_r = NULL;
4936  __pyx_L0:;
4937  __Pyx_XGIVEREF(__pyx_r);
4938  __Pyx_TraceReturn(__pyx_r, 0);
4939  __Pyx_RefNannyFinishContext();
4940  return __pyx_r;
4941 }
4942 
4943 /* "BoundaryConditions.py":87
4944  * self.uOfXT = None
4945  *
4946  * def setConstantBC(self, value): # <<<<<<<<<<<<<<
4947  * """
4948  * function returning constant BC
4949  */
4950 
4951 /* Python wrapper */
4952 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_7setConstantBC(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
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));
4960 
4961  /* function exit code */
4962  __Pyx_RefNannyFinishContext();
4963  return __pyx_r;
4964 }
4965 
4966 /* "BoundaryConditions.py":97
4967  *
4968  * """
4969  * self.uOfXT = lambda x, t, n=np.zeros(3,): value # <<<<<<<<<<<<<<
4970  *
4971  *
4972  */
4973 
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);
4998  __pyx_t_1 = 0;
4999  __pyx_r = __pyx_t_2;
5000  __pyx_t_2 = 0;
5001  goto __pyx_L0;
5002 
5003  /* function exit code */
5004  __pyx_L1_error:;
5005  __Pyx_XDECREF(__pyx_t_1);
5006  __Pyx_XDECREF(__pyx_t_2);
5007  __Pyx_AddTraceback("BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5008  __pyx_r = NULL;
5009  __pyx_L0:;
5010  __Pyx_XGIVEREF(__pyx_r);
5011  __Pyx_TraceReturn(__pyx_r, 0);
5012  __Pyx_RefNannyFinishContext();
5013  return __pyx_r;
5014 }
5015 
5016 /* Python wrapper */
5017 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setConstantBC_lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
5029  {
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)) {
5035  Py_ssize_t kw_args;
5036  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5037  switch (pos_args) {
5038  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5039  CYTHON_FALLTHROUGH;
5040  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5041  CYTHON_FALLTHROUGH;
5042  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5043  CYTHON_FALLTHROUGH;
5044  case 0: break;
5045  default: goto __pyx_L5_argtuple_error;
5046  }
5047  kw_args = PyDict_Size(__pyx_kwds);
5048  switch (pos_args) {
5049  case 0:
5050  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5051  else goto __pyx_L5_argtuple_error;
5052  CYTHON_FALLTHROUGH;
5053  case 1:
5054  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5055  else {
5056  __Pyx_RaiseArgtupleInvalid("lambda", 0, 2, 3, 1); __PYX_ERR(0, 97, __pyx_L3_error)
5057  }
5058  CYTHON_FALLTHROUGH;
5059  case 2:
5060  if (kw_args > 0) {
5061  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
5062  if (value) { values[2] = value; kw_args--; }
5063  }
5064  }
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)
5067  }
5068  } else {
5069  switch (PyTuple_GET_SIZE(__pyx_args)) {
5070  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5071  CYTHON_FALLTHROUGH;
5072  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5073  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5074  break;
5075  default: goto __pyx_L5_argtuple_error;
5076  }
5077  }
5078  __pyx_v_x = values[0];
5079  __pyx_v_t = values[1];
5080  __pyx_v_n = values[2];
5081  }
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)
5085  __pyx_L3_error:;
5086  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
5087  __Pyx_RefNannyFinishContext();
5088  return NULL;
5089  __pyx_L4_argument_unpacking_done:;
5090  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
5091 
5092  /* function exit code */
5093  __Pyx_RefNannyFinishContext();
5094  return __pyx_r;
5095 }
5096 
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;
5114  goto __pyx_L0;
5115 
5116  /* function exit code */
5117  __pyx_L1_error:;
5118  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setConstantBC.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
5119  __pyx_r = NULL;
5120  __pyx_L0:;
5121  __Pyx_XGIVEREF(__pyx_r);
5122  __Pyx_TraceReturn(__pyx_r, 0);
5123  __Pyx_RefNannyFinishContext();
5124  return __pyx_r;
5125 }
5126 
5127 /* "BoundaryConditions.py":87
5128  * self.uOfXT = None
5129  *
5130  * def setConstantBC(self, value): # <<<<<<<<<<<<<<
5131  * """
5132  * function returning constant BC
5133  */
5134 
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)
5154  } else {
5155  __Pyx_GOTREF(__pyx_cur_scope);
5156  }
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);
5161 
5162  /* "BoundaryConditions.py":97
5163  *
5164  * """
5165  * self.uOfXT = lambda x, t, n=np.zeros(3,): value # <<<<<<<<<<<<<<
5166  *
5167  *
5168  */
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;
5177  __pyx_t_3 = NULL;
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);
5185  }
5186  }
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);
5194  __pyx_t_2 = 0;
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;
5200  __pyx_t_1 = 0;
5201 
5202  /* "BoundaryConditions.py":87
5203  * self.uOfXT = None
5204  *
5205  * def setConstantBC(self, value): # <<<<<<<<<<<<<<
5206  * """
5207  * function returning constant BC
5208  */
5209 
5210  /* function exit code */
5211  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5212  goto __pyx_L0;
5213  __pyx_L1_error:;
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);
5219  __pyx_r = NULL;
5220  __pyx_L0:;
5221  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5222  __Pyx_XGIVEREF(__pyx_r);
5223  __Pyx_TraceReturn(__pyx_r, 0);
5224  __Pyx_RefNannyFinishContext();
5225  return __pyx_r;
5226 }
5227 
5228 /* "BoundaryConditions.py":100
5229  *
5230  *
5231  * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
5232  * """
5233  * function returning value=a0+ax*x+ay*y+az*z
5234  */
5235 
5236 /* Python wrapper */
5237 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_9setLinearBC(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
5249  {
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)) {
5253  Py_ssize_t kw_args;
5254  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5255  switch (pos_args) {
5256  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5257  CYTHON_FALLTHROUGH;
5258  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5259  CYTHON_FALLTHROUGH;
5260  case 0: break;
5261  default: goto __pyx_L5_argtuple_error;
5262  }
5263  kw_args = PyDict_Size(__pyx_kwds);
5264  switch (pos_args) {
5265  case 0:
5266  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a0)) != 0)) kw_args--;
5267  else goto __pyx_L5_argtuple_error;
5268  CYTHON_FALLTHROUGH;
5269  case 1:
5270  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
5271  else {
5272  __Pyx_RaiseArgtupleInvalid("setLinearBC", 1, 2, 2, 1); __PYX_ERR(0, 100, __pyx_L3_error)
5273  }
5274  }
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)
5277  }
5278  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5279  goto __pyx_L5_argtuple_error;
5280  } else {
5281  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5282  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5283  }
5284  __pyx_v_a0 = values[0];
5285  __pyx_v_a = values[1];
5286  }
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)
5290  __pyx_L3_error:;
5291  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearBC", __pyx_clineno, __pyx_lineno, __pyx_filename);
5292  __Pyx_RefNannyFinishContext();
5293  return NULL;
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);
5296 
5297  /* function exit code */
5298  __Pyx_RefNannyFinishContext();
5299  return __pyx_r;
5300 }
5301 
5302 /* "BoundaryConditions.py":113
5303  * """
5304  *
5305  * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:]) # <<<<<<<<<<<<<<
5306  *
5307  * def setLinearRamp(self,t1,value):
5308  */
5309 
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);
5334  __pyx_t_1 = 0;
5335  __pyx_r = __pyx_t_2;
5336  __pyx_t_2 = 0;
5337  goto __pyx_L0;
5338 
5339  /* function exit code */
5340  __pyx_L1_error:;
5341  __Pyx_XDECREF(__pyx_t_1);
5342  __Pyx_XDECREF(__pyx_t_2);
5343  __Pyx_AddTraceback("BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5344  __pyx_r = NULL;
5345  __pyx_L0:;
5346  __Pyx_XGIVEREF(__pyx_r);
5347  __Pyx_TraceReturn(__pyx_r, 0);
5348  __Pyx_RefNannyFinishContext();
5349  return __pyx_r;
5350 }
5351 
5352 /* Python wrapper */
5353 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearBC_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
5365  {
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)) {
5371  Py_ssize_t kw_args;
5372  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5373  switch (pos_args) {
5374  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5375  CYTHON_FALLTHROUGH;
5376  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5377  CYTHON_FALLTHROUGH;
5378  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5379  CYTHON_FALLTHROUGH;
5380  case 0: break;
5381  default: goto __pyx_L5_argtuple_error;
5382  }
5383  kw_args = PyDict_Size(__pyx_kwds);
5384  switch (pos_args) {
5385  case 0:
5386  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5387  else goto __pyx_L5_argtuple_error;
5388  CYTHON_FALLTHROUGH;
5389  case 1:
5390  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5391  else {
5392  __Pyx_RaiseArgtupleInvalid("lambda1", 0, 2, 3, 1); __PYX_ERR(0, 113, __pyx_L3_error)
5393  }
5394  CYTHON_FALLTHROUGH;
5395  case 2:
5396  if (kw_args > 0) {
5397  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
5398  if (value) { values[2] = value; kw_args--; }
5399  }
5400  }
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)
5403  }
5404  } else {
5405  switch (PyTuple_GET_SIZE(__pyx_args)) {
5406  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5407  CYTHON_FALLTHROUGH;
5408  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5409  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5410  break;
5411  default: goto __pyx_L5_argtuple_error;
5412  }
5413  }
5414  __pyx_v_x = values[0];
5415  __pyx_v_t = values[1];
5416  __pyx_v_n = values[2];
5417  }
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)
5421  __pyx_L3_error:;
5422  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearBC.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
5423  __Pyx_RefNannyFinishContext();
5424  return NULL;
5425  __pyx_L4_argument_unpacking_done:;
5426  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
5427 
5428  /* function exit code */
5429  __Pyx_RefNannyFinishContext();
5430  return __pyx_r;
5431 }
5432 
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;
5467  __pyx_t_3 = 0;
5468  goto __pyx_L0;
5469 
5470  /* function exit code */
5471  __pyx_L1_error:;
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);
5476  __pyx_r = NULL;
5477  __pyx_L0:;
5478  __Pyx_XGIVEREF(__pyx_r);
5479  __Pyx_TraceReturn(__pyx_r, 0);
5480  __Pyx_RefNannyFinishContext();
5481  return __pyx_r;
5482 }
5483 
5484 /* "BoundaryConditions.py":100
5485  *
5486  *
5487  * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
5488  * """
5489  * function returning value=a0+ax*x+ay*y+az*z
5490  */
5491 
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)
5511  } else {
5512  __Pyx_GOTREF(__pyx_cur_scope);
5513  }
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);
5521 
5522  /* "BoundaryConditions.py":113
5523  * """
5524  *
5525  * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:]) # <<<<<<<<<<<<<<
5526  *
5527  * def setLinearRamp(self,t1,value):
5528  */
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;
5537  __pyx_t_3 = NULL;
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);
5545  }
5546  }
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);
5554  __pyx_t_2 = 0;
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;
5560  __pyx_t_1 = 0;
5561 
5562  /* "BoundaryConditions.py":100
5563  *
5564  *
5565  * def setLinearBC(self, a0, a): # <<<<<<<<<<<<<<
5566  * """
5567  * function returning value=a0+ax*x+ay*y+az*z
5568  */
5569 
5570  /* function exit code */
5571  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5572  goto __pyx_L0;
5573  __pyx_L1_error:;
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);
5579  __pyx_r = NULL;
5580  __pyx_L0:;
5581  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5582  __Pyx_XGIVEREF(__pyx_r);
5583  __Pyx_TraceReturn(__pyx_r, 0);
5584  __Pyx_RefNannyFinishContext();
5585  return __pyx_r;
5586 }
5587 
5588 /* "BoundaryConditions.py":115
5589  * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
5590  *
5591  * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
5592  * """
5593  * function setting a linear ramp from t=0 to t=t1
5594  */
5595 
5596 /* Python wrapper */
5597 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_11setLinearRamp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
5609  {
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)) {
5613  Py_ssize_t kw_args;
5614  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5615  switch (pos_args) {
5616  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5617  CYTHON_FALLTHROUGH;
5618  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5619  CYTHON_FALLTHROUGH;
5620  case 0: break;
5621  default: goto __pyx_L5_argtuple_error;
5622  }
5623  kw_args = PyDict_Size(__pyx_kwds);
5624  switch (pos_args) {
5625  case 0:
5626  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t1)) != 0)) kw_args--;
5627  else goto __pyx_L5_argtuple_error;
5628  CYTHON_FALLTHROUGH;
5629  case 1:
5630  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
5631  else {
5632  __Pyx_RaiseArgtupleInvalid("setLinearRamp", 1, 2, 2, 1); __PYX_ERR(0, 115, __pyx_L3_error)
5633  }
5634  }
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)
5637  }
5638  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5639  goto __pyx_L5_argtuple_error;
5640  } else {
5641  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5642  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5643  }
5644  __pyx_v_t1 = values[0];
5645  __pyx_v_value = values[1];
5646  }
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)
5650  __pyx_L3_error:;
5651  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearRamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
5652  __Pyx_RefNannyFinishContext();
5653  return NULL;
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);
5656 
5657  /* function exit code */
5658  __Pyx_RefNannyFinishContext();
5659  return __pyx_r;
5660 }
5661 
5662 /* "BoundaryConditions.py":126
5663  * Variable value
5664  * """
5665  * self.uOfXT = lambda x, t, n=np.zeros(3,): min( t/t1, 1)*value # <<<<<<<<<<<<<<
5666  */
5667 
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);
5692  __pyx_t_1 = 0;
5693  __pyx_r = __pyx_t_2;
5694  __pyx_t_2 = 0;
5695  goto __pyx_L0;
5696 
5697  /* function exit code */
5698  __pyx_L1_error:;
5699  __Pyx_XDECREF(__pyx_t_1);
5700  __Pyx_XDECREF(__pyx_t_2);
5701  __Pyx_AddTraceback("BoundaryConditions.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5702  __pyx_r = NULL;
5703  __pyx_L0:;
5704  __Pyx_XGIVEREF(__pyx_r);
5705  __Pyx_TraceReturn(__pyx_r, 0);
5706  __Pyx_RefNannyFinishContext();
5707  return __pyx_r;
5708 }
5709 
5710 /* Python wrapper */
5711 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13setLinearRamp_lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
5723  {
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)) {
5729  Py_ssize_t kw_args;
5730  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5731  switch (pos_args) {
5732  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5733  CYTHON_FALLTHROUGH;
5734  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5735  CYTHON_FALLTHROUGH;
5736  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5737  CYTHON_FALLTHROUGH;
5738  case 0: break;
5739  default: goto __pyx_L5_argtuple_error;
5740  }
5741  kw_args = PyDict_Size(__pyx_kwds);
5742  switch (pos_args) {
5743  case 0:
5744  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
5745  else goto __pyx_L5_argtuple_error;
5746  CYTHON_FALLTHROUGH;
5747  case 1:
5748  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5749  else {
5750  __Pyx_RaiseArgtupleInvalid("lambda2", 0, 2, 3, 1); __PYX_ERR(0, 126, __pyx_L3_error)
5751  }
5752  CYTHON_FALLTHROUGH;
5753  case 2:
5754  if (kw_args > 0) {
5755  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n);
5756  if (value) { values[2] = value; kw_args--; }
5757  }
5758  }
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)
5761  }
5762  } else {
5763  switch (PyTuple_GET_SIZE(__pyx_args)) {
5764  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5765  CYTHON_FALLTHROUGH;
5766  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5767  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5768  break;
5769  default: goto __pyx_L5_argtuple_error;
5770  }
5771  }
5772  __pyx_v_x = values[0];
5773  __pyx_v_t = values[1];
5774  __pyx_v_n = values[2];
5775  }
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)
5779  __pyx_L3_error:;
5780  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.setLinearRamp.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5781  __Pyx_RefNannyFinishContext();
5782  return NULL;
5783  __pyx_L4_argument_unpacking_done:;
5784  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_x, __pyx_v_t, __pyx_v_n);
5785 
5786  /* function exit code */
5787  __Pyx_RefNannyFinishContext();
5788  return __pyx_r;
5789 }
5790 
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
5797  long __pyx_t_1;
5798  PyObject *__pyx_t_2 = NULL;
5799  PyObject *__pyx_t_3 = NULL;
5800  PyObject *__pyx_t_4 = NULL;
5801  PyObject *__pyx_t_5 = NULL;
5802  int __pyx_t_6;
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);
5811  __pyx_t_1 = 1;
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;
5821  if (__pyx_t_6) {
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;
5825  __pyx_t_5 = 0;
5826  } else {
5827  __Pyx_INCREF(__pyx_t_2);
5828  __pyx_t_3 = __pyx_t_2;
5829  }
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;
5836  __pyx_t_2 = 0;
5837  goto __pyx_L0;
5838 
5839  /* function exit code */
5840  __pyx_L1_error:;
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);
5846  __pyx_r = NULL;
5847  __pyx_L0:;
5848  __Pyx_XGIVEREF(__pyx_r);
5849  __Pyx_TraceReturn(__pyx_r, 0);
5850  __Pyx_RefNannyFinishContext();
5851  return __pyx_r;
5852 }
5853 
5854 /* "BoundaryConditions.py":115
5855  * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
5856  *
5857  * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
5858  * """
5859  * function setting a linear ramp from t=0 to t=t1
5860  */
5861 
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)
5881  } else {
5882  __Pyx_GOTREF(__pyx_cur_scope);
5883  }
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);
5891 
5892  /* "BoundaryConditions.py":126
5893  * Variable value
5894  * """
5895  * self.uOfXT = lambda x, t, n=np.zeros(3,): min( t/t1, 1)*value # <<<<<<<<<<<<<<
5896  */
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;
5905  __pyx_t_3 = NULL;
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);
5913  }
5914  }
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);
5922  __pyx_t_2 = 0;
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;
5928  __pyx_t_1 = 0;
5929 
5930  /* "BoundaryConditions.py":115
5931  * self.uOfXT = lambda x, t, n=np.zeros(3,): a0+sum(a[:]*x[:])
5932  *
5933  * def setLinearRamp(self,t1,value): # <<<<<<<<<<<<<<
5934  * """
5935  * function setting a linear ramp from t=0 to t=t1
5936  */
5937 
5938  /* function exit code */
5939  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5940  goto __pyx_L0;
5941  __pyx_L1_error:;
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);
5947  __pyx_r = NULL;
5948  __pyx_L0:;
5949  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5950  __Pyx_XGIVEREF(__pyx_r);
5951  __Pyx_TraceReturn(__pyx_r, 0);
5952  __Pyx_RefNannyFinishContext();
5953  return __pyx_r;
5954 }
5955 
5956 /* "BoundaryConditions.pxd":20
5957  * cdef cpp_uOfXT uuOfXT
5958  * cdef public:
5959  * object uOfXT # <<<<<<<<<<<<<<
5960  * cpdef void resetBC(self)
5961  * # cpdef void setConstantBC(self, double value)
5962  */
5963 
5964 /* Python wrapper */
5965 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
5971 
5972  /* function exit code */
5973  __Pyx_RefNannyFinishContext();
5974  return __pyx_r;
5975 }
5976 
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;
5989  goto __pyx_L0;
5990 
5991  /* function exit code */
5992  __pyx_L1_error:;
5993  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.uOfXT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5994  __pyx_r = NULL;
5995  __pyx_L0:;
5996  __Pyx_XGIVEREF(__pyx_r);
5997  __Pyx_TraceReturn(__pyx_r, 0);
5998  __Pyx_RefNannyFinishContext();
5999  return __pyx_r;
6000 }
6001 
6002 /* Python wrapper */
6003 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6004 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6005  int __pyx_r;
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));
6009 
6010  /* function exit code */
6011  __Pyx_RefNannyFinishContext();
6012  return __pyx_r;
6013 }
6014 
6015 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_2__set__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self, PyObject *__pyx_v_value) {
6016  int __pyx_r;
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;
6029 
6030  /* function exit code */
6031  __pyx_r = 0;
6032  goto __pyx_L0;
6033  __pyx_L1_error:;
6034  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.uOfXT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6035  __pyx_r = -1;
6036  __pyx_L0:;
6037  __Pyx_TraceReturn(Py_None, 0);
6038  __Pyx_RefNannyFinishContext();
6039  return __pyx_r;
6040 }
6041 
6042 /* Python wrapper */
6043 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self); /*proto*/
6044 static int __pyx_pw_18BoundaryConditions_17BoundaryCondition_5uOfXT_5__del__(PyObject *__pyx_v_self) {
6045  int __pyx_r;
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));
6049 
6050  /* function exit code */
6051  __Pyx_RefNannyFinishContext();
6052  return __pyx_r;
6053 }
6054 
6055 static int __pyx_pf_18BoundaryConditions_17BoundaryCondition_5uOfXT_4__del__(struct __pyx_obj_18BoundaryConditions_BoundaryCondition *__pyx_v_self) {
6056  int __pyx_r;
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;
6069 
6070  /* function exit code */
6071  __pyx_r = 0;
6072  goto __pyx_L0;
6073  __pyx_L1_error:;
6074  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.uOfXT.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6075  __pyx_r = -1;
6076  __pyx_L0:;
6077  __Pyx_TraceReturn(Py_None, 0);
6078  __Pyx_RefNannyFinishContext();
6079  return __pyx_r;
6080 }
6081 
6082 /* "(tree fragment)":1
6083  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6084  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6085  * def __setstate_cython__(self, __pyx_state):
6086  */
6087 
6088 /* Python wrapper */
6089 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
6097 
6098  /* function exit code */
6099  __Pyx_RefNannyFinishContext();
6100  return __pyx_r;
6101 }
6102 
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));
6114 
6115  /* "(tree fragment)":2
6116  * def __reduce_cython__(self):
6117  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
6118  * def __setstate_cython__(self, __pyx_state):
6119  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6120  */
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)
6126 
6127  /* "(tree fragment)":1
6128  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6129  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6130  * def __setstate_cython__(self, __pyx_state):
6131  */
6132 
6133  /* function exit code */
6134  __pyx_L1_error:;
6135  __Pyx_XDECREF(__pyx_t_1);
6136  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6137  __pyx_r = NULL;
6138  __Pyx_XGIVEREF(__pyx_r);
6139  __Pyx_TraceReturn(__pyx_r, 0);
6140  __Pyx_RefNannyFinishContext();
6141  return __pyx_r;
6142 }
6143 
6144 /* "(tree fragment)":3
6145  * def __reduce_cython__(self):
6146  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6147  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6148  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6149  */
6150 
6151 /* Python wrapper */
6152 static PyObject *__pyx_pw_18BoundaryConditions_17BoundaryCondition_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
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));
6160 
6161  /* function exit code */
6162  __Pyx_RefNannyFinishContext();
6163  return __pyx_r;
6164 }
6165 
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));
6177 
6178  /* "(tree fragment)":4
6179  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6180  * def __setstate_cython__(self, __pyx_state):
6181  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
6182  */
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)
6188 
6189  /* "(tree fragment)":3
6190  * def __reduce_cython__(self):
6191  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6192  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6193  * raise TypeError("self.uuOfXT cannot be converted to a Python object for pickling")
6194  */
6195 
6196  /* function exit code */
6197  __pyx_L1_error:;
6198  __Pyx_XDECREF(__pyx_t_1);
6199  __Pyx_AddTraceback("BoundaryConditions.BoundaryCondition.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6200  __pyx_r = NULL;
6201  __Pyx_XGIVEREF(__pyx_r);
6202  __Pyx_TraceReturn(__pyx_r, 0);
6203  __Pyx_RefNannyFinishContext();
6204  return __pyx_r;
6205 }
6206 
6207 /* "(tree fragment)":1
6208  * def __pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
6209  * cdef object __pyx_PickleError
6210  * cdef object __pyx_result
6211  */
6212 
6213 /* Python wrapper */
6214 static PyObject *__pyx_pw_18BoundaryConditions_1__pyx_unpickle_BC_Base(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
6227  {
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)) {
6231  Py_ssize_t kw_args;
6232  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6233  switch (pos_args) {
6234  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6235  CYTHON_FALLTHROUGH;
6236  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6237  CYTHON_FALLTHROUGH;
6238  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6239  CYTHON_FALLTHROUGH;
6240  case 0: break;
6241  default: goto __pyx_L5_argtuple_error;
6242  }
6243  kw_args = PyDict_Size(__pyx_kwds);
6244  switch (pos_args) {
6245  case 0:
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;
6248  CYTHON_FALLTHROUGH;
6249  case 1:
6250  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
6251  else {
6252  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BC_Base", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
6253  }
6254  CYTHON_FALLTHROUGH;
6255  case 2:
6256  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
6257  else {
6258  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BC_Base", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
6259  }
6260  }
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)
6263  }
6264  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
6265  goto __pyx_L5_argtuple_error;
6266  } else {
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);
6270  }
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];
6274  }
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)
6278  __pyx_L3_error:;
6279  __Pyx_AddTraceback("BoundaryConditions.__pyx_unpickle_BC_Base", __pyx_clineno, __pyx_lineno, __pyx_filename);
6280  __Pyx_RefNannyFinishContext();
6281  return NULL;
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);
6284 
6285  /* function exit code */
6286  __Pyx_RefNannyFinishContext();
6287  return __pyx_r;
6288 }
6289 
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;
6297  int __pyx_t_2;
6298  int __pyx_t_3;
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));
6308 
6309  /* "(tree fragment)":4
6310  * cdef object __pyx_PickleError
6311  * cdef object __pyx_result
6312  * if __pyx_checksum not in (0x96e6a1f, 0x4d41573, 0x7d477a1): # <<<<<<<<<<<<<<
6313  * from pickle import PickleError as __pyx_PickleError
6314  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum)
6315  */
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);
6321  if (__pyx_t_3) {
6322 
6323  /* "(tree fragment)":5
6324  * cdef object __pyx_result
6325  * if __pyx_checksum not in (0x96e6a1f, 0x4d41573, 0x7d477a1):
6326  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
6327  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum)
6328  * __pyx_result = BC_Base.__new__(__pyx_type)
6329  */
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;
6344 
6345  /* "(tree fragment)":6
6346  * if __pyx_checksum not in (0x96e6a1f, 0x4d41573, 0x7d477a1):
6347  * from pickle import PickleError as __pyx_PickleError
6348  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum) # <<<<<<<<<<<<<<
6349  * __pyx_result = BC_Base.__new__(__pyx_type)
6350  * if __pyx_state is not None:
6351  */
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);
6366  }
6367  }
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)
6377 
6378  /* "(tree fragment)":4
6379  * cdef object __pyx_PickleError
6380  * cdef object __pyx_result
6381  * if __pyx_checksum not in (0x96e6a1f, 0x4d41573, 0x7d477a1): # <<<<<<<<<<<<<<
6382  * from pickle import PickleError as __pyx_PickleError
6383  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum)
6384  */
6385  }
6386 
6387  /* "(tree fragment)":7
6388  * from pickle import PickleError as __pyx_PickleError
6389  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum)
6390  * __pyx_result = BC_Base.__new__(__pyx_type) # <<<<<<<<<<<<<<
6391  * if __pyx_state is not None:
6392  * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
6393  */
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);
6396  __pyx_t_5 = NULL;
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);
6404  }
6405  }
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;
6412  __pyx_t_4 = 0;
6413 
6414  /* "(tree fragment)":8
6415  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum)
6416  * __pyx_result = BC_Base.__new__(__pyx_type)
6417  * if __pyx_state is not None: # <<<<<<<<<<<<<<
6418  * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
6419  * return __pyx_result
6420  */
6421  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
6422  __pyx_t_2 = (__pyx_t_3 != 0);
6423  if (__pyx_t_2) {
6424 
6425  /* "(tree fragment)":9
6426  * __pyx_result = BC_Base.__new__(__pyx_type)
6427  * if __pyx_state is not None:
6428  * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
6429  * return __pyx_result
6430  * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, tuple __pyx_state):
6431  */
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;
6436 
6437  /* "(tree fragment)":8
6438  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x96e6a1f, 0x4d41573, 0x7d477a1) = (BC_type, Shape, _b_or, ct, name, nd))" % __pyx_checksum)
6439  * __pyx_result = BC_Base.__new__(__pyx_type)
6440  * if __pyx_state is not None: # <<<<<<<<<<<<<<
6441  * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
6442  * return __pyx_result
6443  */
6444  }
6445 
6446  /* "(tree fragment)":10
6447  * if __pyx_state is not None:
6448  * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
6449  * return __pyx_result # <<<<<<<<<<<<<<
6450  * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, tuple __pyx_state):
6451  * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
6452  */
6453  __Pyx_XDECREF(__pyx_r);
6454  __Pyx_INCREF(__pyx_v___pyx_result);
6455  __pyx_r = __pyx_v___pyx_result;
6456  goto __pyx_L0;
6457 
6458  /* "(tree fragment)":1
6459  * def __pyx_unpickle_BC_Base(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
6460  * cdef object __pyx_PickleError
6461  * cdef object __pyx_result
6462  */
6463 
6464  /* function exit code */
6465  __pyx_L1_error:;
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);
6471  __pyx_r = NULL;
6472  __pyx_L0:;
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();
6478  return __pyx_r;
6479 }
6480 
6481 /* "(tree fragment)":11
6482  * __pyx_unpickle_BC_Base__set_state(<BC_Base> __pyx_result, __pyx_state)
6483  * return __pyx_result
6484  * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
6485  * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
6486  * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
6487  */
6488 
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 } };
6495  int __pyx_t_3;
6496  int __pyx_t_4;
6497  Py_ssize_t __pyx_t_5;
6498  int __pyx_t_6;
6499  int __pyx_t_7;
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));
6507 
6508  /* "(tree fragment)":12
6509  * return __pyx_result
6510  * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, tuple __pyx_state):
6511  * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5] # <<<<<<<<<<<<<<
6512  * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
6513  * __pyx_result.__dict__.update(__pyx_state[6])
6514  */
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)
6518  }
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);
6526  __pyx_t_1 = 0;
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)
6530  }
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;
6537  __pyx_t_1 = 0;
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)
6541  }
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)
6550  }
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;
6557  __pyx_t_1 = 0;
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)
6561  }
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);
6569  __pyx_t_1 = 0;
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)
6573  }
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;
6576 
6577  /* "(tree fragment)":13
6578  * cdef __pyx_unpickle_BC_Base__set_state(BC_Base __pyx_result, tuple __pyx_state):
6579  * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
6580  * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
6581  * __pyx_result.__dict__.update(__pyx_state[6])
6582  */
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)
6586  }
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);
6589  if (__pyx_t_6) {
6590  } else {
6591  __pyx_t_4 = __pyx_t_6;
6592  goto __pyx_L4_bool_binop_done;
6593  }
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:;
6598  if (__pyx_t_4) {
6599 
6600  /* "(tree fragment)":14
6601  * __pyx_result.BC_type = __pyx_state[0]; __pyx_result.Shape = __pyx_state[1]; __pyx_result._b_or = __pyx_state[2]; __pyx_result.ct = __pyx_state[3]; __pyx_result.name = __pyx_state[4]; __pyx_result.nd = __pyx_state[5]
6602  * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'):
6603  * __pyx_result.__dict__.update(__pyx_state[6]) # <<<<<<<<<<<<<<
6604  */
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,