proteus  1.8.1
C/C++/Fortran libraries
cmeshTools.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__cmeshTools
708 #define __PYX_HAVE_API__cmeshTools
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 "mesh.h"
721 #include "pythread.h"
722 #include <stdlib.h>
723 #include "pystate.h"
724 #ifdef _OPENMP
725 #include <omp.h>
726 #endif /* _OPENMP */
727 
728 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
729 #define CYTHON_WITHOUT_ASSERTIONS
730 #endif
731 
732 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
733  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
734 
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
736 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
737 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
738 #define __PYX_DEFAULT_STRING_ENCODING ""
739 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
740 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
741 #define __Pyx_uchar_cast(c) ((unsigned char)c)
742 #define __Pyx_long_cast(x) ((long)x)
743 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
744  (sizeof(type) < sizeof(Py_ssize_t)) ||\
745  (sizeof(type) > sizeof(Py_ssize_t) &&\
746  likely(v < (type)PY_SSIZE_T_MAX ||\
747  v == (type)PY_SSIZE_T_MAX) &&\
748  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
749  v == (type)PY_SSIZE_T_MIN))) ||\
750  (sizeof(type) == sizeof(Py_ssize_t) &&\
751  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
752  v == (type)PY_SSIZE_T_MAX))) )
753 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
754  return (size_t) i < (size_t) limit;
755 }
756 #if defined (__cplusplus) && __cplusplus >= 201103L
757  #include <cstdlib>
758  #define __Pyx_sst_abs(value) std::abs(value)
759 #elif SIZEOF_INT >= SIZEOF_SIZE_T
760  #define __Pyx_sst_abs(value) abs(value)
761 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
762  #define __Pyx_sst_abs(value) labs(value)
763 #elif defined (_MSC_VER)
764  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
765 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
766  #define __Pyx_sst_abs(value) llabs(value)
767 #elif defined (__GNUC__)
768  #define __Pyx_sst_abs(value) __builtin_llabs(value)
769 #else
770  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
771 #endif
772 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
773 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
774 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
775 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
776 #define __Pyx_PyBytes_FromString PyBytes_FromString
777 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
778 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
779 #if PY_MAJOR_VERSION < 3
780  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
781  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
782 #else
783  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
784  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
785 #endif
786 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
792 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
797 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
798 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
799 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
800 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
801 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
802 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
803  const Py_UNICODE *u_end = u;
804  while (*u_end++) ;
805  return (size_t)(u_end - u - 1);
806 }
807 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
808 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
809 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
810 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
811 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
812 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
813 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
814 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
815 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
816 #define __Pyx_PySequence_Tuple(obj)\
817  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
818 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
819 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
820 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
821 #if CYTHON_ASSUME_SAFE_MACROS
822 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
823 #else
824 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
825 #endif
826 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
827 #if PY_MAJOR_VERSION >= 3
828 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
829 #else
830 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
831 #endif
832 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
833 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
834 static int __Pyx_sys_getdefaultencoding_not_ascii;
835 static int __Pyx_init_sys_getdefaultencoding_params(void) {
836  PyObject* sys;
837  PyObject* default_encoding = NULL;
838  PyObject* ascii_chars_u = NULL;
839  PyObject* ascii_chars_b = NULL;
840  const char* default_encoding_c;
841  sys = PyImport_ImportModule("sys");
842  if (!sys) goto bad;
843  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
844  Py_DECREF(sys);
845  if (!default_encoding) goto bad;
846  default_encoding_c = PyBytes_AsString(default_encoding);
847  if (!default_encoding_c) goto bad;
848  if (strcmp(default_encoding_c, "ascii") == 0) {
849  __Pyx_sys_getdefaultencoding_not_ascii = 0;
850  } else {
851  char ascii_chars[128];
852  int c;
853  for (c = 0; c < 128; c++) {
854  ascii_chars[c] = c;
855  }
856  __Pyx_sys_getdefaultencoding_not_ascii = 1;
857  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
858  if (!ascii_chars_u) goto bad;
859  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
860  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
861  PyErr_Format(
862  PyExc_ValueError,
863  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
864  default_encoding_c);
865  goto bad;
866  }
867  Py_DECREF(ascii_chars_u);
868  Py_DECREF(ascii_chars_b);
869  }
870  Py_DECREF(default_encoding);
871  return 0;
872 bad:
873  Py_XDECREF(default_encoding);
874  Py_XDECREF(ascii_chars_u);
875  Py_XDECREF(ascii_chars_b);
876  return -1;
877 }
878 #endif
879 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
880 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
881 #else
882 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
883 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
884 static char* __PYX_DEFAULT_STRING_ENCODING;
885 static int __Pyx_init_sys_getdefaultencoding_params(void) {
886  PyObject* sys;
887  PyObject* default_encoding = NULL;
888  char* default_encoding_c;
889  sys = PyImport_ImportModule("sys");
890  if (!sys) goto bad;
891  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
892  Py_DECREF(sys);
893  if (!default_encoding) goto bad;
894  default_encoding_c = PyBytes_AsString(default_encoding);
895  if (!default_encoding_c) goto bad;
896  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
897  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
898  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
899  Py_DECREF(default_encoding);
900  return 0;
901 bad:
902  Py_XDECREF(default_encoding);
903  return -1;
904 }
905 #endif
906 #endif
907 
908 
909 /* Test for GCC > 2.95 */
910 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
911  #define likely(x) __builtin_expect(!!(x), 1)
912  #define unlikely(x) __builtin_expect(!!(x), 0)
913 #else /* !__GNUC__ or GCC < 2.95 */
914  #define likely(x) (x)
915  #define unlikely(x) (x)
916 #endif /* __GNUC__ */
917 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
918 
919 static PyObject *__pyx_m = NULL;
920 static PyObject *__pyx_d;
921 static PyObject *__pyx_b;
922 static PyObject *__pyx_cython_runtime = NULL;
923 static PyObject *__pyx_empty_tuple;
924 static PyObject *__pyx_empty_bytes;
925 static PyObject *__pyx_empty_unicode;
926 static int __pyx_lineno;
927 static int __pyx_clineno = 0;
928 static const char * __pyx_cfilenm= __FILE__;
929 static const char *__pyx_filename;
930 
931 /* Header.proto */
932 #if !defined(CYTHON_CCOMPLEX)
933  #if defined(__cplusplus)
934  #define CYTHON_CCOMPLEX 1
935  #elif defined(_Complex_I)
936  #define CYTHON_CCOMPLEX 1
937  #else
938  #define CYTHON_CCOMPLEX 0
939  #endif
940 #endif
941 #if CYTHON_CCOMPLEX
942  #ifdef __cplusplus
943  #include <complex>
944  #else
945  #include <complex.h>
946  #endif
947 #endif
948 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
949  #undef _Complex_I
950  #define _Complex_I 1.0fj
951 #endif
952 
953 
954 static const char *__pyx_f[] = {
955  "stringsource",
956  "proteus/cmeshTools.pyx",
957  "proteus/cmeshTools.pxd",
958  "__init__.pxd",
959  "type.pxd",
960 };
961 /* ForceInitThreads.proto */
962 #ifndef __PYX_FORCE_INIT_THREADS
963  #define __PYX_FORCE_INIT_THREADS 0
964 #endif
965 
966 /* NoFastGil.proto */
967 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
968 #define __Pyx_PyGILState_Release PyGILState_Release
969 #define __Pyx_FastGIL_Remember()
970 #define __Pyx_FastGIL_Forget()
971 #define __Pyx_FastGilFuncInit()
972 
973 /* BufferFormatStructs.proto */
974 #define IS_UNSIGNED(type) (((type) -1) > 0)
975 struct __Pyx_StructField_;
976 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
977 typedef struct {
978  const char* name;
979  struct __Pyx_StructField_* fields;
980  size_t size;
981  size_t arraysize[8];
982  int ndim;
983  char typegroup;
984  char is_unsigned;
985  int flags;
986 } __Pyx_TypeInfo;
987 typedef struct __Pyx_StructField_ {
988  __Pyx_TypeInfo* type;
989  const char* name;
990  size_t offset;
991 } __Pyx_StructField;
992 typedef struct {
993  __Pyx_StructField* field;
994  size_t parent_offset;
995 } __Pyx_BufFmt_StackElem;
996 typedef struct {
997  __Pyx_StructField root;
998  __Pyx_BufFmt_StackElem* head;
999  size_t fmt_offset;
1000  size_t new_count, enc_count;
1001  size_t struct_alignment;
1002  int is_complex;
1003  char enc_type;
1004  char new_packmode;
1005  char enc_packmode;
1006  char is_valid_array;
1007 } __Pyx_BufFmt_Context;
1008 
1009 /* Atomics.proto */
1010 #include <pythread.h>
1011 #ifndef CYTHON_ATOMICS
1012  #define CYTHON_ATOMICS 1
1013 #endif
1014 #define __pyx_atomic_int_type int
1015 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
1016  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
1017  !defined(__i386__)
1018  #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
1019  #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
1020  #ifdef __PYX_DEBUG_ATOMICS
1021  #warning "Using GNU atomics"
1022  #endif
1023 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
1024  #include <Windows.h>
1025  #undef __pyx_atomic_int_type
1026  #define __pyx_atomic_int_type LONG
1027  #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
1028  #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
1029  #ifdef __PYX_DEBUG_ATOMICS
1030  #pragma message ("Using MSVC atomics")
1031  #endif
1032 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
1033  #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
1034  #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
1035  #ifdef __PYX_DEBUG_ATOMICS
1036  #warning "Using Intel atomics"
1037  #endif
1038 #else
1039  #undef CYTHON_ATOMICS
1040  #define CYTHON_ATOMICS 0
1041  #ifdef __PYX_DEBUG_ATOMICS
1042  #warning "Not using atomics"
1043  #endif
1044 #endif
1045 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1046 #if CYTHON_ATOMICS
1047  #define __pyx_add_acquisition_count(memview)\
1048  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1049  #define __pyx_sub_acquisition_count(memview)\
1050  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1051 #else
1052  #define __pyx_add_acquisition_count(memview)\
1053  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1054  #define __pyx_sub_acquisition_count(memview)\
1055  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1056 #endif
1057 
1058 /* MemviewSliceStruct.proto */
1059 struct __pyx_memoryview_obj;
1060 typedef struct {
1061  struct __pyx_memoryview_obj *memview;
1062  char *data;
1063  Py_ssize_t shape[8];
1064  Py_ssize_t strides[8];
1065  Py_ssize_t suboffsets[8];
1066 } __Pyx_memviewslice;
1067 #define __Pyx_MemoryView_Len(m) (m.shape[0])
1068 
1069 
1070 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1071  * # in Cython to enable them only on the right systems.
1072  *
1073  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1074  * ctypedef npy_int16 int16_t
1075  * ctypedef npy_int32 int32_t
1076  */
1077 typedef npy_int8 __pyx_t_5numpy_int8_t;
1078 
1079 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1080  *
1081  * ctypedef npy_int8 int8_t
1082  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1083  * ctypedef npy_int32 int32_t
1084  * ctypedef npy_int64 int64_t
1085  */
1086 typedef npy_int16 __pyx_t_5numpy_int16_t;
1087 
1088 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1089  * ctypedef npy_int8 int8_t
1090  * ctypedef npy_int16 int16_t
1091  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1092  * ctypedef npy_int64 int64_t
1093  * #ctypedef npy_int96 int96_t
1094  */
1095 typedef npy_int32 __pyx_t_5numpy_int32_t;
1096 
1097 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1098  * ctypedef npy_int16 int16_t
1099  * ctypedef npy_int32 int32_t
1100  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1101  * #ctypedef npy_int96 int96_t
1102  * #ctypedef npy_int128 int128_t
1103  */
1104 typedef npy_int64 __pyx_t_5numpy_int64_t;
1105 
1106 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1107  * #ctypedef npy_int128 int128_t
1108  *
1109  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1110  * ctypedef npy_uint16 uint16_t
1111  * ctypedef npy_uint32 uint32_t
1112  */
1113 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1114 
1115 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1116  *
1117  * ctypedef npy_uint8 uint8_t
1118  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1119  * ctypedef npy_uint32 uint32_t
1120  * ctypedef npy_uint64 uint64_t
1121  */
1122 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1123 
1124 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1125  * ctypedef npy_uint8 uint8_t
1126  * ctypedef npy_uint16 uint16_t
1127  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1128  * ctypedef npy_uint64 uint64_t
1129  * #ctypedef npy_uint96 uint96_t
1130  */
1131 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1132 
1133 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1134  * ctypedef npy_uint16 uint16_t
1135  * ctypedef npy_uint32 uint32_t
1136  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1137  * #ctypedef npy_uint96 uint96_t
1138  * #ctypedef npy_uint128 uint128_t
1139  */
1140 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1141 
1142 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1143  * #ctypedef npy_uint128 uint128_t
1144  *
1145  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1146  * ctypedef npy_float64 float64_t
1147  * #ctypedef npy_float80 float80_t
1148  */
1149 typedef npy_float32 __pyx_t_5numpy_float32_t;
1150 
1151 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1152  *
1153  * ctypedef npy_float32 float32_t
1154  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1155  * #ctypedef npy_float80 float80_t
1156  * #ctypedef npy_float128 float128_t
1157  */
1158 typedef npy_float64 __pyx_t_5numpy_float64_t;
1159 
1160 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1161  * # The int types are mapped a bit surprising --
1162  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1163  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1164  * ctypedef npy_longlong long_t
1165  * ctypedef npy_longlong longlong_t
1166  */
1167 typedef npy_long __pyx_t_5numpy_int_t;
1168 
1169 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1170  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1171  * ctypedef npy_long int_t
1172  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1173  * ctypedef npy_longlong longlong_t
1174  *
1175  */
1176 typedef npy_longlong __pyx_t_5numpy_long_t;
1177 
1178 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1179  * ctypedef npy_long int_t
1180  * ctypedef npy_longlong long_t
1181  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1182  *
1183  * ctypedef npy_ulong uint_t
1184  */
1185 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1186 
1187 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1188  * ctypedef npy_longlong longlong_t
1189  *
1190  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1191  * ctypedef npy_ulonglong ulong_t
1192  * ctypedef npy_ulonglong ulonglong_t
1193  */
1194 typedef npy_ulong __pyx_t_5numpy_uint_t;
1195 
1196 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1197  *
1198  * ctypedef npy_ulong uint_t
1199  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1200  * ctypedef npy_ulonglong ulonglong_t
1201  *
1202  */
1203 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1204 
1205 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1206  * ctypedef npy_ulong uint_t
1207  * ctypedef npy_ulonglong ulong_t
1208  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1209  *
1210  * ctypedef npy_intp intp_t
1211  */
1212 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1213 
1214 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1215  * ctypedef npy_ulonglong ulonglong_t
1216  *
1217  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1218  * ctypedef npy_uintp uintp_t
1219  *
1220  */
1221 typedef npy_intp __pyx_t_5numpy_intp_t;
1222 
1223 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1224  *
1225  * ctypedef npy_intp intp_t
1226  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1227  *
1228  * ctypedef npy_double float_t
1229  */
1230 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1231 
1232 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1233  * ctypedef npy_uintp uintp_t
1234  *
1235  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1236  * ctypedef npy_double double_t
1237  * ctypedef npy_longdouble longdouble_t
1238  */
1239 typedef npy_double __pyx_t_5numpy_float_t;
1240 
1241 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1242  *
1243  * ctypedef npy_double float_t
1244  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1245  * ctypedef npy_longdouble longdouble_t
1246  *
1247  */
1248 typedef npy_double __pyx_t_5numpy_double_t;
1249 
1250 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1251  * ctypedef npy_double float_t
1252  * ctypedef npy_double double_t
1253  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1254  *
1255  * ctypedef npy_cfloat cfloat_t
1256  */
1257 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1258 /* Declarations.proto */
1259 #if CYTHON_CCOMPLEX
1260  #ifdef __cplusplus
1261  typedef ::std::complex< float > __pyx_t_float_complex;
1262  #else
1263  typedef float _Complex __pyx_t_float_complex;
1264  #endif
1265 #else
1266  typedef struct { float real, imag; } __pyx_t_float_complex;
1267 #endif
1268 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1269 
1270 /* Declarations.proto */
1271 #if CYTHON_CCOMPLEX
1272  #ifdef __cplusplus
1273  typedef ::std::complex< double > __pyx_t_double_complex;
1274  #else
1275  typedef double _Complex __pyx_t_double_complex;
1276  #endif
1277 #else
1278  typedef struct { double real, imag; } __pyx_t_double_complex;
1279 #endif
1280 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1281 
1282 
1283 /*--- Type declarations ---*/
1284 struct __pyx_obj_10cmeshTools_CMesh;
1285 struct __pyx_obj_10cmeshTools_CMultilevelMesh;
1286 struct __pyx_array_obj;
1287 struct __pyx_MemviewEnum_obj;
1288 struct __pyx_memoryview_obj;
1289 struct __pyx_memoryviewslice_obj;
1290 
1291 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1292  * ctypedef npy_longdouble longdouble_t
1293  *
1294  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1295  * ctypedef npy_cdouble cdouble_t
1296  * ctypedef npy_clongdouble clongdouble_t
1297  */
1298 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1299 
1300 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1301  *
1302  * ctypedef npy_cfloat cfloat_t
1303  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1304  * ctypedef npy_clongdouble clongdouble_t
1305  *
1306  */
1307 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1308 
1309 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1310  * ctypedef npy_cfloat cfloat_t
1311  * ctypedef npy_cdouble cdouble_t
1312  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1313  *
1314  * ctypedef npy_cdouble complex_t
1315  */
1316 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1317 
1318 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1319  * ctypedef npy_clongdouble clongdouble_t
1320  *
1321  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1322  *
1323  * cdef inline object PyArray_MultiIterNew1(a):
1324  */
1325 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1326 
1327 /* "cmeshTools.pxd":5
1328  * cimport mesh as cppm
1329  *
1330  * cdef class CMesh: # <<<<<<<<<<<<<<
1331  * cdef cppm.Mesh mesh
1332  * cdef public:
1333  */
1334 struct __pyx_obj_10cmeshTools_CMesh {
1335  PyObject_HEAD
1336  struct Mesh mesh;
1337  int nElements_global;
1338  int nNodes_global;
1339  int nNodes_element;
1345  int max_nElements_node;
1346  int nEdges_global;
1348  PyArrayObject *elementNodesArray;
1349  PyArrayObject *nodeElementsArray;
1350  PyArrayObject *nodeElementOffsets;
1351  PyArrayObject *elementNeighborsArray;
1352  PyArrayObject *elementBoundariesArray;
1353  PyArrayObject *elementBoundaryNodesArray;
1354  PyArrayObject *elementBoundaryElementsArray;
1356  PyArrayObject *interiorElementBoundariesArray;
1357  PyArrayObject *exteriorElementBoundariesArray;
1358  PyArrayObject *edgeNodesArray;
1359  PyArrayObject *nodeStarArray;
1360  PyArrayObject *nodeStarOffsets;
1361  PyArrayObject *elementMaterialTypes;
1362  PyArrayObject *elementBoundaryMaterialTypes;
1363  PyArrayObject *nodeMaterialTypes;
1364  PyArrayObject *nodeArray;
1365  int nx;
1366  int ny;
1367  int nz;
1368  int px;
1369  int py;
1370  int pz;
1371  PyArrayObject *elementIJK;
1372  PyArrayObject *weights;
1373  PyArrayObject *U_KNOT;
1374  PyArrayObject *V_KNOT;
1375  PyArrayObject *W_KNOT;
1376  PyArrayObject *elementDiametersArray;
1377  PyArrayObject *elementInnerDiametersArray;
1378  PyArrayObject *elementBoundaryDiametersArray;
1379  PyArrayObject *elementBarycentersArray;
1380  PyArrayObject *elementBoundaryBarycentersArray;
1381  PyArrayObject *nodeDiametersArray;
1382  PyArrayObject *nodeSupportArray;
1383  double h;
1384  double hMin;
1385  double sigmaMax;
1386  double volume;
1387 };
1388 
1389 
1390 /* "cmeshTools.pyx":202
1391  * return CMeshnew
1392  *
1393  * cdef class CMultilevelMesh: # <<<<<<<<<<<<<<
1394  * cdef cppm.MultilevelMesh multilevelMesh
1395  * cdef public:
1396  */
1397 struct __pyx_obj_10cmeshTools_CMultilevelMesh {
1398  PyObject_HEAD
1399  struct MultilevelMesh multilevelMesh;
1400  int nLevels;
1401  PyObject *cmeshList;
1402  PyObject *elementParentsArrayList;
1403  PyObject *elementChildrenArrayList;
1404  PyObject *elementChildrenOffsetsList;
1405 };
1406 
1407 
1408 /* "View.MemoryView":105
1409  *
1410  * @cname("__pyx_array")
1411  * cdef class array: # <<<<<<<<<<<<<<
1412  *
1413  * cdef:
1414  */
1415 struct __pyx_array_obj {
1416  PyObject_HEAD
1417  struct __pyx_vtabstruct_array *__pyx_vtab;
1418  char *data;
1419  Py_ssize_t len;
1420  char *format;
1421  int ndim;
1422  Py_ssize_t *_shape;
1423  Py_ssize_t *_strides;
1424  Py_ssize_t itemsize;
1425  PyObject *mode;
1426  PyObject *_format;
1427  void (*callback_free_data)(void *);
1428  int free_data;
1429  int dtype_is_object;
1430 };
1431 
1432 
1433 /* "View.MemoryView":279
1434  *
1435  * @cname('__pyx_MemviewEnum')
1436  * cdef class Enum(object): # <<<<<<<<<<<<<<
1437  * cdef object name
1438  * def __init__(self, name):
1439  */
1440 struct __pyx_MemviewEnum_obj {
1441  PyObject_HEAD
1442  PyObject *name;
1443 };
1444 
1445 
1446 /* "View.MemoryView":330
1447  *
1448  * @cname('__pyx_memoryview')
1449  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1450  *
1451  * cdef object obj
1452  */
1453 struct __pyx_memoryview_obj {
1454  PyObject_HEAD
1455  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1456  PyObject *obj;
1457  PyObject *_size;
1458  PyObject *_array_interface;
1459  PyThread_type_lock lock;
1460  __pyx_atomic_int acquisition_count[2];
1461  __pyx_atomic_int *acquisition_count_aligned_p;
1462  Py_buffer view;
1463  int flags;
1464  int dtype_is_object;
1465  __Pyx_TypeInfo *typeinfo;
1466 };
1467 
1468 
1469 /* "View.MemoryView":965
1470  *
1471  * @cname('__pyx_memoryviewslice')
1472  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1473  * "Internal class for passing memoryview slices to Python"
1474  *
1475  */
1476 struct __pyx_memoryviewslice_obj {
1477  struct __pyx_memoryview_obj __pyx_base;
1478  __Pyx_memviewslice from_slice;
1479  PyObject *from_object;
1480  PyObject *(*to_object_func)(char *);
1481  int (*to_dtype_func)(char *, PyObject *);
1482 };
1483 
1484 
1485 
1486 /* "View.MemoryView":105
1487  *
1488  * @cname("__pyx_array")
1489  * cdef class array: # <<<<<<<<<<<<<<
1490  *
1491  * cdef:
1492  */
1493 
1494 struct __pyx_vtabstruct_array {
1495  PyObject *(*get_memview)(struct __pyx_array_obj *);
1496 };
1497 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1498 
1499 
1500 /* "View.MemoryView":330
1501  *
1502  * @cname('__pyx_memoryview')
1503  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1504  *
1505  * cdef object obj
1506  */
1507 
1508 struct __pyx_vtabstruct_memoryview {
1509  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1510  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1511  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1512  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1513  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1514  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1515  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1516 };
1517 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1518 
1519 
1520 /* "View.MemoryView":965
1521  *
1522  * @cname('__pyx_memoryviewslice')
1523  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1524  * "Internal class for passing memoryview slices to Python"
1525  *
1526  */
1527 
1528 struct __pyx_vtabstruct__memoryviewslice {
1529  struct __pyx_vtabstruct_memoryview __pyx_base;
1530 };
1531 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1532 
1533 /* --- Runtime support code (head) --- */
1534 /* Refnanny.proto */
1535 #ifndef CYTHON_REFNANNY
1536  #define CYTHON_REFNANNY 0
1537 #endif
1538 #if CYTHON_REFNANNY
1539  typedef struct {
1540  void (*INCREF)(void*, PyObject*, int);
1541  void (*DECREF)(void*, PyObject*, int);
1542  void (*GOTREF)(void*, PyObject*, int);
1543  void (*GIVEREF)(void*, PyObject*, int);
1544  void* (*SetupContext)(const char*, int, const char*);
1545  void (*FinishContext)(void**);
1546  } __Pyx_RefNannyAPIStruct;
1547  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1548  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1549  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1550 #ifdef WITH_THREAD
1551  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1552  if (acquire_gil) {\
1553  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1554  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1555  PyGILState_Release(__pyx_gilstate_save);\
1556  } else {\
1557  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1558  }
1559 #else
1560  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1561  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1562 #endif
1563  #define __Pyx_RefNannyFinishContext()\
1564  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1565  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1566  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1567  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1568  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1569  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1570  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1571  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1572  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1573 #else
1574  #define __Pyx_RefNannyDeclarations
1575  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1576  #define __Pyx_RefNannyFinishContext()
1577  #define __Pyx_INCREF(r) Py_INCREF(r)
1578  #define __Pyx_DECREF(r) Py_DECREF(r)
1579  #define __Pyx_GOTREF(r)
1580  #define __Pyx_GIVEREF(r)
1581  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1582  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1583  #define __Pyx_XGOTREF(r)
1584  #define __Pyx_XGIVEREF(r)
1585 #endif
1586 #define __Pyx_XDECREF_SET(r, v) do {\
1587  PyObject *tmp = (PyObject *) r;\
1588  r = v; __Pyx_XDECREF(tmp);\
1589  } while (0)
1590 #define __Pyx_DECREF_SET(r, v) do {\
1591  PyObject *tmp = (PyObject *) r;\
1592  r = v; __Pyx_DECREF(tmp);\
1593  } while (0)
1594 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1595 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1596 
1597 /* PyObjectGetAttrStr.proto */
1598 #if CYTHON_USE_TYPE_SLOTS
1599 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1600 #else
1601 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1602 #endif
1603 
1604 /* GetBuiltinName.proto */
1605 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1606 
1607 /* RaiseArgTupleInvalid.proto */
1608 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1609  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1610 
1611 /* KeywordStringCheck.proto */
1612 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1613 
1614 /* PyDictVersioning.proto */
1615 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1616 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1617 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1618 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1619  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1620  (cache_var) = (value);
1621 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1622  static PY_UINT64_T __pyx_dict_version = 0;\
1623  static PyObject *__pyx_dict_cached_value = NULL;\
1624  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1625  (VAR) = __pyx_dict_cached_value;\
1626  } else {\
1627  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1628  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1629  }\
1630 }
1631 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1632 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1633 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1634 #else
1635 #define __PYX_GET_DICT_VERSION(dict) (0)
1636 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1637 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1638 #endif
1639 
1640 /* GetModuleGlobalName.proto */
1641 #if CYTHON_USE_DICT_VERSIONS
1642 #define __Pyx_GetModuleGlobalName(var, name) {\
1643  static PY_UINT64_T __pyx_dict_version = 0;\
1644  static PyObject *__pyx_dict_cached_value = NULL;\
1645  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1646  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1647  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1648 }
1649 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1650  PY_UINT64_T __pyx_dict_version;\
1651  PyObject *__pyx_dict_cached_value;\
1652  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1653 }
1654 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1655 #else
1656 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1657 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1658 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1659 #endif
1660 
1661 /* PyCFunctionFastCall.proto */
1662 #if CYTHON_FAST_PYCCALL
1663 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1664 #else
1665 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1666 #endif
1667 
1668 /* PyFunctionFastCall.proto */
1669 #if CYTHON_FAST_PYCALL
1670 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1671  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1672 #if 1 || PY_VERSION_HEX < 0x030600B1
1673 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1674 #else
1675 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1676 #endif
1677 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1678  (sizeof(char [1 - 2*!(cond)]) - 1)
1679 #ifndef Py_MEMBER_SIZE
1680 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1681 #endif
1682 #if CYTHON_FAST_PYCALL
1683  static size_t __pyx_pyframe_localsplus_offset = 0;
1684  #include "frameobject.h"
1685 #if PY_VERSION_HEX >= 0x030b00a6
1686  #ifndef Py_BUILD_CORE
1687  #define Py_BUILD_CORE 1
1688  #endif
1689  #include "internal/pycore_frame.h"
1690 #endif
1691  #define __Pxy_PyFrame_Initialize_Offsets()\
1692  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1693  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1694  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1695  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1696 #endif // CYTHON_FAST_PYCALL
1697 #endif
1698 
1699 /* PyObjectCall.proto */
1700 #if CYTHON_COMPILING_IN_CPYTHON
1701 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1702 #else
1703 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1704 #endif
1705 
1706 /* PyObjectCall2Args.proto */
1707 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1708 
1709 /* PyObjectCallMethO.proto */
1710 #if CYTHON_COMPILING_IN_CPYTHON
1711 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1712 #endif
1713 
1714 /* PyObjectCallOneArg.proto */
1715 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1716 
1717 /* ExtTypeTest.proto */
1718 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1719 
1720 /* PyThreadStateGet.proto */
1721 #if CYTHON_FAST_THREAD_STATE
1722 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1723 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1724 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1725 #else
1726 #define __Pyx_PyThreadState_declare
1727 #define __Pyx_PyThreadState_assign
1728 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1729 #endif
1730 
1731 /* PyErrFetchRestore.proto */
1732 #if CYTHON_FAST_THREAD_STATE
1733 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1734 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1735 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1736 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1737 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1738 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1739 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1740 #if CYTHON_COMPILING_IN_CPYTHON
1741 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1742 #else
1743 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1744 #endif
1745 #else
1746 #define __Pyx_PyErr_Clear() PyErr_Clear()
1747 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1748 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1749 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1750 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1751 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1752 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1753 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1754 #endif
1755 
1756 /* RaiseException.proto */
1757 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1758 
1759 /* PyObjectCallNoArg.proto */
1760 #if CYTHON_COMPILING_IN_CPYTHON
1761 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1762 #else
1763 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1764 #endif
1765 
1766 /* RaiseDoubleKeywords.proto */
1767 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1768 
1769 /* ParseKeywords.proto */
1770 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1771  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1772  const char* function_name);
1773 
1774 /* ArgTypeTest.proto */
1775 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1776  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1777  __Pyx__ArgTypeTest(obj, type, name, exact))
1778 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1779 
1780 /* PyIntBinop.proto */
1781 #if !CYTHON_COMPILING_IN_PYPY
1782 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1783 #else
1784 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
1785  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1786 #endif
1787 
1788 /* PyIntCompare.proto */
1789 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1790 
1791 /* WriteUnraisableException.proto */
1792 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1793  int lineno, const char *filename,
1794  int full_traceback, int nogil);
1795 
1796 /* GetTopmostException.proto */
1797 #if CYTHON_USE_EXC_INFO_STACK
1798 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1799 #endif
1800 
1801 /* SaveResetException.proto */
1802 #if CYTHON_FAST_THREAD_STATE
1803 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1804 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1805 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1806 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1807 #else
1808 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1809 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1810 #endif
1811 
1812 /* PyErrExceptionMatches.proto */
1813 #if CYTHON_FAST_THREAD_STATE
1814 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1815 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1816 #else
1817 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1818 #endif
1819 
1820 /* GetException.proto */
1821 #if CYTHON_FAST_THREAD_STATE
1822 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1823 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1824 #else
1825 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1826 #endif
1827 
1828 /* IncludeStringH.proto */
1829 #include <string.h>
1830 
1831 /* BytesEquals.proto */
1832 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1833 
1834 /* UnicodeEquals.proto */
1835 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1836 
1837 /* StrEquals.proto */
1838 #if PY_MAJOR_VERSION >= 3
1839 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1840 #else
1841 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1842 #endif
1843 
1844 /* DivInt[Py_ssize_t].proto */
1845 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1846 
1847 /* UnaryNegOverflows.proto */
1848 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1849  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1850 
1851 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1852 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1853 /* GetAttr.proto */
1854 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1855 
1856 /* GetItemInt.proto */
1857 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1858  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1859  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1860  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1861  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1862 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1863  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1864  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1865  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1866 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1867  int wraparound, int boundscheck);
1868 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1869  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1870  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1871  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1872 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1873  int wraparound, int boundscheck);
1874 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1875 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1876  int is_list, int wraparound, int boundscheck);
1877 
1878 /* ObjectGetItem.proto */
1879 #if CYTHON_USE_TYPE_SLOTS
1880 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1881 #else
1882 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1883 #endif
1884 
1885 /* decode_c_string_utf16.proto */
1886 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1887  int byteorder = 0;
1888  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1889 }
1890 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1891  int byteorder = -1;
1892  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1893 }
1894 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1895  int byteorder = 1;
1896  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1897 }
1898 
1899 /* decode_c_string.proto */
1900 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1901  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1902  const char* encoding, const char* errors,
1903  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1904 
1905 /* GetAttr3.proto */
1906 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1907 
1908 /* RaiseTooManyValuesToUnpack.proto */
1909 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1910 
1911 /* RaiseNeedMoreValuesToUnpack.proto */
1912 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1913 
1914 /* RaiseNoneIterError.proto */
1915 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1916 
1917 /* SwapException.proto */
1918 #if CYTHON_FAST_THREAD_STATE
1919 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1920 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1921 #else
1922 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1923 #endif
1924 
1925 /* Import.proto */
1926 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1927 
1928 /* FastTypeChecks.proto */
1929 #if CYTHON_COMPILING_IN_CPYTHON
1930 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1931 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1932 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1933 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1934 #else
1935 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1936 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1937 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1938 #endif
1939 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1940 
1941 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1942 /* ListCompAppend.proto */
1943 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1944 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1945  PyListObject* L = (PyListObject*) list;
1946  Py_ssize_t len = Py_SIZE(list);
1947  if (likely(L->allocated > len)) {
1948  Py_INCREF(x);
1949  PyList_SET_ITEM(list, len, x);
1950  __Pyx_SET_SIZE(list, len + 1);
1951  return 0;
1952  }
1953  return PyList_Append(list, x);
1954 }
1955 #else
1956 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1957 #endif
1958 
1959 /* PyIntBinop.proto */
1960 #if !CYTHON_COMPILING_IN_PYPY
1961 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1962 #else
1963 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1964  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1965 #endif
1966 
1967 /* ListExtend.proto */
1968 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
1969 #if CYTHON_COMPILING_IN_CPYTHON
1970  PyObject* none = _PyList_Extend((PyListObject*)L, v);
1971  if (unlikely(!none))
1972  return -1;
1973  Py_DECREF(none);
1974  return 0;
1975 #else
1976  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
1977 #endif
1978 }
1979 
1980 /* ListAppend.proto */
1981 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1982 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1983  PyListObject* L = (PyListObject*) list;
1984  Py_ssize_t len = Py_SIZE(list);
1985  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1986  Py_INCREF(x);
1987  PyList_SET_ITEM(list, len, x);
1988  __Pyx_SET_SIZE(list, len + 1);
1989  return 0;
1990  }
1991  return PyList_Append(list, x);
1992 }
1993 #else
1994 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1995 #endif
1996 
1997 /* None.proto */
1998 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1999 
2000 /* DivInt[long].proto */
2001 static CYTHON_INLINE long __Pyx_div_long(long, long);
2002 
2003 /* PySequenceContains.proto */
2004 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2005  int result = PySequence_Contains(seq, item);
2006  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2007 }
2008 
2009 /* ImportFrom.proto */
2010 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2011 
2012 /* HasAttr.proto */
2013 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2014 
2015 /* StringJoin.proto */
2016 #if PY_MAJOR_VERSION < 3
2017 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
2018 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
2019 #else
2020 #define __Pyx_PyString_Join PyUnicode_Join
2021 #define __Pyx_PyBaseString_Join PyUnicode_Join
2022 #endif
2023 #if CYTHON_COMPILING_IN_CPYTHON
2024  #if PY_MAJOR_VERSION < 3
2025  #define __Pyx_PyBytes_Join _PyString_Join
2026  #else
2027  #define __Pyx_PyBytes_Join _PyBytes_Join
2028  #endif
2029 #else
2030 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
2031 #endif
2032 
2033 /* PyObject_Unicode.proto */
2034 #if PY_MAJOR_VERSION >= 3
2035 #define __Pyx_PyObject_Unicode(obj)\
2036  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
2037 #else
2038 #define __Pyx_PyObject_Unicode(obj)\
2039  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
2040 #endif
2041 
2042 /* PyObject_GenericGetAttrNoDict.proto */
2043 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2044 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2045 #else
2046 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2047 #endif
2048 
2049 /* PyObject_GenericGetAttr.proto */
2050 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2051 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2052 #else
2053 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2054 #endif
2055 
2056 /* PyObjectGetAttrStrNoError.proto */
2057 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2058 
2059 /* SetupReduce.proto */
2060 static int __Pyx_setup_reduce(PyObject* type_obj);
2061 
2062 /* SetVTable.proto */
2063 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2064 
2065 /* TypeImport.proto */
2066 #ifndef __PYX_HAVE_RT_ImportType_proto
2067 #define __PYX_HAVE_RT_ImportType_proto
2068 enum __Pyx_ImportType_CheckSize {
2069  __Pyx_ImportType_CheckSize_Error = 0,
2070  __Pyx_ImportType_CheckSize_Warn = 1,
2071  __Pyx_ImportType_CheckSize_Ignore = 2
2072 };
2073 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2074 #endif
2075 
2076 /* CLineInTraceback.proto */
2077 #ifdef CYTHON_CLINE_IN_TRACEBACK
2078 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2079 #else
2080 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2081 #endif
2082 
2083 /* CodeObjectCache.proto */
2084 typedef struct {
2085  PyCodeObject* code_object;
2086  int code_line;
2087 } __Pyx_CodeObjectCacheEntry;
2088 struct __Pyx_CodeObjectCache {
2089  int count;
2090  int max_count;
2091  __Pyx_CodeObjectCacheEntry* entries;
2092 };
2093 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2094 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2095 static PyCodeObject *__pyx_find_code_object(int code_line);
2096 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2097 
2098 /* AddTraceback.proto */
2099 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2100  int py_line, const char *filename);
2101 
2102 /* GCCDiagnostics.proto */
2103 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2104 #define __Pyx_HAS_GCC_DIAGNOSTIC
2105 #endif
2106 
2107 /* MemviewDtypeToObject.proto */
2108 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
2109 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
2110 
2111 /* MemviewDtypeToObject.proto */
2112 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
2113 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
2114 
2115 /* Print.proto */
2116 static int __Pyx_Print(PyObject*, PyObject *, int);
2117 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
2118 static PyObject* __pyx_print = 0;
2119 static PyObject* __pyx_print_kwargs = 0;
2120 #endif
2121 
2122 /* RealImag.proto */
2123 #if CYTHON_CCOMPLEX
2124  #ifdef __cplusplus
2125  #define __Pyx_CREAL(z) ((z).real())
2126  #define __Pyx_CIMAG(z) ((z).imag())
2127  #else
2128  #define __Pyx_CREAL(z) (__real__(z))
2129  #define __Pyx_CIMAG(z) (__imag__(z))
2130  #endif
2131 #else
2132  #define __Pyx_CREAL(z) ((z).real)
2133  #define __Pyx_CIMAG(z) ((z).imag)
2134 #endif
2135 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2136  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2137  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2138  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2139 #else
2140  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2141  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2142 #endif
2143 
2144 /* Arithmetic.proto */
2145 #if CYTHON_CCOMPLEX
2146  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2147  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2148  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2149  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2150  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2151  #define __Pyx_c_neg_float(a) (-(a))
2152  #ifdef __cplusplus
2153  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2154  #define __Pyx_c_conj_float(z) (::std::conj(z))
2155  #if 1
2156  #define __Pyx_c_abs_float(z) (::std::abs(z))
2157  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2158  #endif
2159  #else
2160  #define __Pyx_c_is_zero_float(z) ((z)==0)
2161  #define __Pyx_c_conj_float(z) (conjf(z))
2162  #if 1
2163  #define __Pyx_c_abs_float(z) (cabsf(z))
2164  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2165  #endif
2166  #endif
2167 #else
2168  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2169  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2170  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2171  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2172  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2173  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2174  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2175  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2176  #if 1
2177  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2178  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2179  #endif
2180 #endif
2181 
2182 /* Arithmetic.proto */
2183 #if CYTHON_CCOMPLEX
2184  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2185  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2186  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2187  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2188  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2189  #define __Pyx_c_neg_double(a) (-(a))
2190  #ifdef __cplusplus
2191  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2192  #define __Pyx_c_conj_double(z) (::std::conj(z))
2193  #if 1
2194  #define __Pyx_c_abs_double(z) (::std::abs(z))
2195  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2196  #endif
2197  #else
2198  #define __Pyx_c_is_zero_double(z) ((z)==0)
2199  #define __Pyx_c_conj_double(z) (conj(z))
2200  #if 1
2201  #define __Pyx_c_abs_double(z) (cabs(z))
2202  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2203  #endif
2204  #endif
2205 #else
2206  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2207  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2208  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2209  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2210  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2211  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2212  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2213  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2214  #if 1
2215  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2216  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2217  #endif
2218 #endif
2219 
2220 #if PY_MAJOR_VERSION < 3
2221  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2222  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2223 #else
2224  #define __Pyx_GetBuffer PyObject_GetBuffer
2225  #define __Pyx_ReleaseBuffer PyBuffer_Release
2226 #endif
2227 
2228 
2229 /* BufferStructDeclare.proto */
2230 typedef struct {
2231  Py_ssize_t shape, strides, suboffsets;
2232 } __Pyx_Buf_DimInfo;
2233 typedef struct {
2234  size_t refcount;
2235  Py_buffer pybuffer;
2236 } __Pyx_Buffer;
2237 typedef struct {
2238  __Pyx_Buffer *rcbuffer;
2239  char *data;
2240  __Pyx_Buf_DimInfo diminfo[8];
2241 } __Pyx_LocalBuf_ND;
2242 
2243 /* MemviewSliceIsContig.proto */
2244 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2245 
2246 /* OverlappingSlices.proto */
2247 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2248  __Pyx_memviewslice *slice2,
2249  int ndim, size_t itemsize);
2250 
2251 /* Capsule.proto */
2252 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2253 
2254 /* CIntFromPy.proto */
2255 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2256 
2257 /* CIntToPy.proto */
2258 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2259 
2260 /* TypeInfoToFormat.proto */
2261 struct __pyx_typeinfo_string {
2262  char string[3];
2263 };
2264 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2265 
2266 /* PrintOne.proto */
2267 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
2268 
2269 /* MemviewSliceCopyTemplate.proto */
2270 static __Pyx_memviewslice
2271 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2272  const char *mode, int ndim,
2273  size_t sizeof_dtype, int contig_flag,
2274  int dtype_is_object);
2275 
2276 /* MemviewSliceInit.proto */
2277 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2278 #define __Pyx_MEMVIEW_DIRECT 1
2279 #define __Pyx_MEMVIEW_PTR 2
2280 #define __Pyx_MEMVIEW_FULL 4
2281 #define __Pyx_MEMVIEW_CONTIG 8
2282 #define __Pyx_MEMVIEW_STRIDED 16
2283 #define __Pyx_MEMVIEW_FOLLOW 32
2284 #define __Pyx_IS_C_CONTIG 1
2285 #define __Pyx_IS_F_CONTIG 2
2286 static int __Pyx_init_memviewslice(
2287  struct __pyx_memoryview_obj *memview,
2288  int ndim,
2289  __Pyx_memviewslice *memviewslice,
2290  int memview_is_new_reference);
2291 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2292  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2293 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2294  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2295 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2296 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2297 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2298 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2299 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2300 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2301 
2302 /* CIntFromPy.proto */
2303 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2304 
2305 /* CIntToPy.proto */
2306 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2307 
2308 /* CIntFromPy.proto */
2309 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2310 
2311 /* CheckBinaryVersion.proto */
2312 static int __Pyx_check_binary_version(void);
2313 
2314 /* InitStrings.proto */
2315 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2316 
2317 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2318 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2319 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2320 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2321 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*/
2322 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2323 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2324 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2325 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2326 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2327 
2328 /* Module declarations from 'cpython.buffer' */
2329 
2330 /* Module declarations from 'libc.string' */
2331 
2332 /* Module declarations from 'libc.stdio' */
2333 
2334 /* Module declarations from '__builtin__' */
2335 
2336 /* Module declarations from 'cpython.type' */
2337 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2338 
2339 /* Module declarations from 'cpython' */
2340 
2341 /* Module declarations from 'cpython.object' */
2342 
2343 /* Module declarations from 'cpython.ref' */
2344 
2345 /* Module declarations from 'cpython.mem' */
2346 
2347 /* Module declarations from 'numpy' */
2348 
2349 /* Module declarations from 'numpy' */
2350 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2351 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2352 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2353 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2354 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2355 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2356 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2357 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2358 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2359 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2360 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2361 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2362 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2363 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2364 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2365 
2366 /* Module declarations from 'libcpp' */
2367 
2368 /* Module declarations from 'mesh' */
2369 
2370 /* Module declarations from 'cython.view' */
2371 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2372 
2373 /* Module declarations from 'cython' */
2374 
2375 /* Module declarations from 'cmeshTools' */
2376 static PyTypeObject *__pyx_ptype_10cmeshTools_CMesh = 0;
2377 static PyTypeObject *__pyx_ptype_10cmeshTools_CMultilevelMesh = 0;
2378 static PyTypeObject *__pyx_array_type = 0;
2379 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2380 static PyTypeObject *__pyx_memoryview_type = 0;
2381 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2382 static PyObject *generic = 0;
2383 static PyObject *strided = 0;
2384 static PyObject *indirect = 0;
2385 static PyObject *contiguous = 0;
2386 static PyObject *indirect_contiguous = 0;
2387 static int __pyx_memoryview_thread_locks_used;
2388 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2389 static struct __pyx_obj_10cmeshTools_CMesh *__pyx_f_10cmeshTools_CMesh_FromMesh(struct Mesh); /*proto*/
2390 static void __pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(int, int, int, double, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2391 static void __pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2392 static void __pyx_f_10cmeshTools_generateFromTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2393 static void __pyx_f_10cmeshTools_writeTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2394 static void __pyx_f_10cmeshTools_generateFromTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2395 static void __pyx_f_10cmeshTools_generateFromTetgenFilesParallel(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2396 static void __pyx_f_10cmeshTools_writeTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2397 static void __pyx_f_10cmeshTools_write3dmFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2398 static void __pyx_f_10cmeshTools_write2dmFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2399 static void __pyx_f_10cmeshTools_generateFromHexFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2400 static void __pyx_f_10cmeshTools_generateFrom3DMFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2401 static void __pyx_f_10cmeshTools_generateFrom2DMFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2402 static void __pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2403 static void __pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2404 static void __pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(struct __pyx_obj_10cmeshTools_CMesh *, int, int, int, int __pyx_skip_dispatch); /*proto*/
2405 static void __pyx_f_10cmeshTools_constructElementBoundaryElementsArray(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2406 static void __pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(int, int, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int, int __pyx_skip_dispatch); /*proto*/
2407 static void __pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(int, int, int, int, int, int, double, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2408 static void __pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(int, int, int, int, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2409 static void __pyx_f_10cmeshTools_computeGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2410 static void __pyx_f_10cmeshTools_allocateGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2411 static void __pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(int, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2412 static void __pyx_f_10cmeshTools_computeGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2413 static void __pyx_f_10cmeshTools_allocateGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2414 static void __pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2415 static void __pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2416 static void __pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2417 static void __pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2418 static void __pyx_f_10cmeshTools_computeGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2419 static void __pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2420 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2421 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2422 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2423 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2424 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2425 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2426 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2427 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*/
2428 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2429 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2430 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2431 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2432 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2433 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2434 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2435 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2436 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2437 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2438 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2439 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2440 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2441 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2442 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2443 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2444 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2445 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2446 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2447 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2448 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2449 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2450 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2451 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2452 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2453 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
2454 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
2455 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2456 #define __Pyx_MODULE_NAME "cmeshTools"
2457 extern int __pyx_module_is_main_cmeshTools;
2458 int __pyx_module_is_main_cmeshTools = 0;
2459 
2460 /* Implementation of 'cmeshTools' */
2461 static PyObject *__pyx_builtin_TypeError;
2462 static PyObject *__pyx_builtin_range;
2463 static PyObject *__pyx_builtin_ImportError;
2464 static PyObject *__pyx_builtin_ValueError;
2465 static PyObject *__pyx_builtin_MemoryError;
2466 static PyObject *__pyx_builtin_enumerate;
2467 static PyObject *__pyx_builtin_Ellipsis;
2468 static PyObject *__pyx_builtin_id;
2469 static PyObject *__pyx_builtin_IndexError;
2470 static const char __pyx_k_O[] = "O";
2471 static const char __pyx_k_T[] = "T{";
2472  static const char __pyx_k_c[] = "c";
2473  static const char __pyx_k_h[] = "h";
2474  static const char __pyx_k_s[] = "(%s)";
2475  static const char __pyx_k_Lx[] = "Lx";
2476  static const char __pyx_k_Ly[] = "Ly";
2477  static const char __pyx_k_Lz[] = "Lz";
2478  static const char __pyx_k_id[] = "id";
2479  static const char __pyx_k_np[] = "np";
2480  static const char __pyx_k_nx[] = "nx";
2481  static const char __pyx_k_ny[] = "ny";
2482  static const char __pyx_k_nz[] = "nz";
2483  static const char __pyx_k_px[] = "px";
2484  static const char __pyx_k_py[] = "py";
2485  static const char __pyx_k_pz[] = "pz";
2486  static const char __pyx_k_MPI[] = "MPI";
2487  static const char __pyx_k__27[] = "^";
2488  static const char __pyx_k__28[] = "";
2489  static const char __pyx_k__29[] = ":";
2490 static const char __pyx_k__30[] = "}";
2491 static const char __pyx_k__31[] = ",";
2492 static const char __pyx_k_end[] = "end";
2493 static const char __pyx_k_new[] = "__new__";
2494 static const char __pyx_k_obj[] = "obj";
2495 static const char __pyx_k_Comm[] = "Comm";
2496 static const char __pyx_k_base[] = "base";
2497 static const char __pyx_k_dict[] = "__dict__";
2498 static const char __pyx_k_file[] = "file";
2499 static const char __pyx_k_hMin[] = "hMin";
2500 static const char __pyx_k_join[] = "join";
2501 static const char __pyx_k_main[] = "__main__";
2502 static const char __pyx_k_mode[] = "mode";
2503 static const char __pyx_k_name[] = "name";
2504 static const char __pyx_k_ndim[] = "ndim";
2505 static const char __pyx_k_pack[] = "pack";
2506 static const char __pyx_k_size[] = "size";
2507 static const char __pyx_k_step[] = "step";
2508 static const char __pyx_k_stop[] = "stop";
2509 static const char __pyx_k_test[] = "__test__";
2510 static const char __pyx_k_ASCII[] = "ASCII";
2511 static const char __pyx_k_CMesh[] = "CMesh";
2512 static const char __pyx_k_class[] = "__class__";
2513 static const char __pyx_k_cmesh[] = "cmesh";
2514 static const char __pyx_k_dtype[] = "dtype";
2515 static const char __pyx_k_empty[] = "empty";
2516 static const char __pyx_k_error[] = "error";
2517 static const char __pyx_k_flags[] = "flags";
2518 static const char __pyx_k_int32[] = "int32";
2519 static const char __pyx_k_numpy[] = "numpy";
2520 static const char __pyx_k_print[] = "print";
2521 static const char __pyx_k_range[] = "range";
2522 static const char __pyx_k_shape[] = "shape";
2523 static const char __pyx_k_start[] = "start";
2524 static const char __pyx_k_zeros[] = "zeros";
2525 static const char __pyx_k_U_KNOT[] = "U_KNOT";
2526 static const char __pyx_k_V_KNOT[] = "V_KNOT";
2527 static const char __pyx_k_W_KNOT[] = "W_KNOT";
2528 static const char __pyx_k_encode[] = "encode";
2529 static const char __pyx_k_failed[] = "failed";
2530 static const char __pyx_k_format[] = "format";
2531 static const char __pyx_k_import[] = "__import__";
2532 static const char __pyx_k_mpi4py[] = "mpi4py";
2533 static const char __pyx_k_nSpace[] = "nSpace";
2534 static const char __pyx_k_name_2[] = "__name__";
2535 static const char __pyx_k_pickle[] = "pickle";
2536 static const char __pyx_k_reduce[] = "__reduce__";
2537 static const char __pyx_k_struct[] = "struct";
2538 static const char __pyx_k_unpack[] = "unpack";
2539 static const char __pyx_k_update[] = "update";
2540 static const char __pyx_k_volume[] = "volume";
2541 static const char __pyx_k_asarray[] = "asarray";
2542 static const char __pyx_k_fortran[] = "fortran";
2543 static const char __pyx_k_memview[] = "memview";
2544 static const char __pyx_k_nLevels[] = "nLevels";
2545 static const char __pyx_k_proteus[] = "proteus";
2546 static const char __pyx_k_weights[] = "weights";
2547 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2548 static const char __pyx_k_filebase[] = "filebase";
2549 static const char __pyx_k_getstate[] = "__getstate__";
2550 static const char __pyx_k_itemsize[] = "itemsize";
2551 static const char __pyx_k_pyx_type[] = "__pyx_type";
2552 static const char __pyx_k_setstate[] = "__setstate__";
2553 static const char __pyx_k_sigmaMax[] = "sigmaMax";
2554 static const char __pyx_k_TypeError[] = "TypeError";
2555 static const char __pyx_k_cmeshList[] = "cmeshList";
2556 static const char __pyx_k_enumerate[] = "enumerate";
2557 static const char __pyx_k_nodeArray[] = "nodeArray";
2558 static const char __pyx_k_pyx_state[] = "__pyx_state";
2559 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2560 static const char __pyx_k_IndexError[] = "IndexError";
2561 static const char __pyx_k_ValueError[] = "ValueError";
2562 static const char __pyx_k_cmeshTools[] = "cmeshTools";
2563 static const char __pyx_k_elementIJK[] = "elementIJK";
2564 static const char __pyx_k_pyx_result[] = "__pyx_result";
2565 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2566 static const char __pyx_k_ImportError[] = "ImportError";
2567 static const char __pyx_k_MemoryError[] = "MemoryError";
2568 static const char __pyx_k_PickleError[] = "PickleError";
2569 static const char __pyx_k_finestLevel[] = "finestLevel";
2570 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2571 static const char __pyx_k_stringsource[] = "stringsource";
2572 static const char __pyx_k_triangleFlag[] = "triangleFlag";
2573 static const char __pyx_k_nEdges_global[] = "nEdges_global";
2574 static const char __pyx_k_nNodes_global[] = "nNodes_global";
2575 static const char __pyx_k_nodeStarArray[] = "nodeStarArray";
2576 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2577 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2578 static const char __pyx_k_wrong_nLevels[] = "wrong nLevels";
2579 static const char __pyx_k_edgeNodesArray[] = "edgeNodesArray";
2580 static const char __pyx_k_nNodes_element[] = "nNodes_element";
2581 static const char __pyx_k_refineTypeFlag[] = "refineTypeFlag";
2582 static const char __pyx_k_CMultilevelMesh[] = "CMultilevelMesh";
2583 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2584 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2585 static const char __pyx_k_cmultilevelMesh[] = "cmultilevelMesh";
2586 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2587 static const char __pyx_k_elementTagArray[] = "elementTagArray";
2588 static const char __pyx_k_nodeStarOffsets[] = "nodeStarOffsets";
2589 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2590 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2591 static const char __pyx_k_nElements_global[] = "nElements_global";
2592 static const char __pyx_k_nodeSupportArray[] = "nodeSupportArray";
2593 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
2594 static const char __pyx_k_nodeElementsArray[] = "nodeElementsArray";
2595 static const char __pyx_k_nodeMaterialTypes[] = "nodeMaterialTypes";
2596 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2597 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2598 static const char __pyx_k_max_nElements_node[] = "max_nElements_node";
2599 static const char __pyx_k_nodeDiametersArray[] = "nodeDiametersArray";
2600 static const char __pyx_k_nodeElementOffsets[] = "nodeElementOffsets";
2601 static const char __pyx_k_setNewestNodeBases[] = "setNewestNodeBases";
2602 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2603 static const char __pyx_k_elementMaterialTypes[] = "elementMaterialTypes";
2604 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2605 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2606 static const char __pyx_k_elementDiametersArray[] = "elementDiametersArray";
2607 static const char __pyx_k_elementNeighborsArray[] = "elementNeighborsArray";
2608 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2609 static const char __pyx_k_elementBoundariesArray[] = "elementBoundariesArray";
2610 static const char __pyx_k_nNodes_elementBoundary[] = "nNodes_elementBoundary";
2611 static const char __pyx_k_proteus_cmeshTools_pyx[] = "proteus/cmeshTools.pyx";
2612 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2613 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2614 static const char __pyx_k_elementBarycentersArray[] = "elementBarycentersArray";
2615 static const char __pyx_k_elementParentsArrayList[] = "elementParentsArrayList";
2616 static const char __pyx_k_max_nNodeNeighbors_node[] = "max_nNodeNeighbors_node";
2617 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2618 static const char __pyx_k_buildPythonMeshInterface[] = "buildPythonMeshInterface";
2619 static const char __pyx_k_elementChildrenArrayList[] = "elementChildrenArrayList";
2620 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2621 static const char __pyx_k_elementBoundaryNodesArray[] = "elementBoundaryNodesArray";
2622 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
2623 static const char __pyx_k_elementChildrenOffsetsList[] = "elementChildrenOffsetsList";
2624 static const char __pyx_k_elementInnerDiametersArray[] = "elementInnerDiametersArray";
2625 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
2626 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2627 static const char __pyx_k_locallyRefineMultilevelMesh[] = "locallyRefineMultilevelMesh";
2628 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
2629 static const char __pyx_k_elementBoundaryMaterialTypes[] = "elementBoundaryMaterialTypes";
2630 static const char __pyx_k_elementBoundaryDiametersArray[] = "elementBoundaryDiametersArray";
2631 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2632 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
2633 static const char __pyx_k_interiorElementBoundariesArray[] = "interiorElementBoundariesArray";
2634 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2635 static const char __pyx_k_elementBoundaryBarycentersArray[] = "elementBoundaryBarycentersArray";
2636 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2637 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2638 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2639 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2640 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2641 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2642 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2643 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2644 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2645 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2646 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2647 static const char __pyx_k_buildPythonMeshInterfaceNoArrays[] = "buildPythonMeshInterfaceNoArrays";
2648 static const char __pyx_k_buildPythonMultilevelMeshInterfa[] = "buildPythonMultilevelMeshInterface";
2649 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundariesArray";
2650 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2651 static const char __pyx_k_locallyRefine_nSpace_0_d_not_imp[] = "locallyRefine nSpace= {0:d} not implemented! Returning.";
2652 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2653 static const char __pyx_k_nInteriorElementBoundaries_globa[] = "nInteriorElementBoundaries_global";
2654 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2655 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2656 static const char __pyx_k_self_mesh_cannot_be_converted_to[] = "self.mesh cannot be converted to a Python object for pickling";
2657 static const char __pyx_k_self_multilevelMesh_cannot_be_co[] = "self.multilevelMesh cannot be converted to a Python object for pickling";
2658 static const char __pyx_k_setNewestNodeBases_0_d_not_imple[] = "setNewestNodeBases= {0:d} not implemented! Returning";
2659 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2660 static PyObject *__pyx_n_s_ASCII;
2661 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2662 static PyObject *__pyx_n_s_CMesh;
2663 static PyObject *__pyx_n_s_CMultilevelMesh;
2664 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2665 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2666 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2667 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2668 static PyObject *__pyx_n_s_Comm;
2669 static PyObject *__pyx_n_s_Ellipsis;
2670 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2671 static PyObject *__pyx_n_s_ImportError;
2672 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2673 static PyObject *__pyx_n_s_IndexError;
2674 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2675 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2676 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2677 static PyObject *__pyx_n_s_Lx;
2678 static PyObject *__pyx_n_s_Ly;
2679 static PyObject *__pyx_n_s_Lz;
2680 static PyObject *__pyx_n_s_MPI;
2681 static PyObject *__pyx_n_s_MemoryError;
2682 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2683 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2684 static PyObject *__pyx_n_b_O;
2685 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2686 static PyObject *__pyx_n_s_PickleError;
2687 static PyObject *__pyx_kp_b_T;
2688 static PyObject *__pyx_n_s_TypeError;
2689 static PyObject *__pyx_n_s_U_KNOT;
2690 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2691 static PyObject *__pyx_n_s_V_KNOT;
2692 static PyObject *__pyx_n_s_ValueError;
2693 static PyObject *__pyx_n_s_View_MemoryView;
2694 static PyObject *__pyx_n_s_W_KNOT;
2695 static PyObject *__pyx_kp_b__27;
2696 static PyObject *__pyx_kp_b__28;
2697 static PyObject *__pyx_kp_b__29;
2698 static PyObject *__pyx_kp_b__30;
2699 static PyObject *__pyx_kp_u__31;
2700 static PyObject *__pyx_n_s_allocate_buffer;
2701 static PyObject *__pyx_n_s_asarray;
2702 static PyObject *__pyx_n_s_base;
2703 static PyObject *__pyx_n_s_buildPythonMeshInterface;
2704 static PyObject *__pyx_n_s_buildPythonMeshInterfaceNoArrays;
2705 static PyObject *__pyx_n_s_buildPythonMultilevelMeshInterfa;
2706 static PyObject *__pyx_n_s_c;
2707 static PyObject *__pyx_n_u_c;
2708 static PyObject *__pyx_n_s_class;
2709 static PyObject *__pyx_n_s_cline_in_traceback;
2710 static PyObject *__pyx_n_s_cmesh;
2711 static PyObject *__pyx_n_s_cmeshList;
2712 static PyObject *__pyx_n_s_cmeshTools;
2713 static PyObject *__pyx_n_s_cmultilevelMesh;
2714 static PyObject *__pyx_kp_s_contiguous_and_direct;
2715 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2716 static PyObject *__pyx_n_s_dict;
2717 static PyObject *__pyx_n_s_dtype;
2718 static PyObject *__pyx_n_s_dtype_is_object;
2719 static PyObject *__pyx_n_s_edgeNodesArray;
2720 static PyObject *__pyx_n_s_elementBarycentersArray;
2721 static PyObject *__pyx_n_s_elementBoundariesArray;
2722 static PyObject *__pyx_n_s_elementBoundaryBarycentersArray;
2723 static PyObject *__pyx_n_s_elementBoundaryDiametersArray;
2724 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2725 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2726 static PyObject *__pyx_n_s_elementBoundaryMaterialTypes;
2727 static PyObject *__pyx_n_s_elementBoundaryNodesArray;
2728 static PyObject *__pyx_n_s_elementChildrenArrayList;
2729 static PyObject *__pyx_n_s_elementChildrenOffsetsList;
2730 static PyObject *__pyx_n_s_elementDiametersArray;
2731 static PyObject *__pyx_n_s_elementIJK;
2732 static PyObject *__pyx_n_s_elementInnerDiametersArray;
2733 static PyObject *__pyx_n_s_elementMaterialTypes;
2734 static PyObject *__pyx_n_s_elementNeighborsArray;
2735 static PyObject *__pyx_n_s_elementNodesArray;
2736 static PyObject *__pyx_n_s_elementParentsArrayList;
2737 static PyObject *__pyx_n_s_elementTagArray;
2738 static PyObject *__pyx_n_s_empty;
2739 static PyObject *__pyx_n_s_encode;
2740 static PyObject *__pyx_n_s_end;
2741 static PyObject *__pyx_n_s_enumerate;
2742 static PyObject *__pyx_n_s_error;
2743 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2744 static PyObject *__pyx_n_s_failed;
2745 static PyObject *__pyx_n_s_file;
2746 static PyObject *__pyx_n_s_filebase;
2747 static PyObject *__pyx_n_s_finestLevel;
2748 static PyObject *__pyx_n_s_flags;
2749 static PyObject *__pyx_n_s_format;
2750 static PyObject *__pyx_n_s_fortran;
2751 static PyObject *__pyx_n_u_fortran;
2752 static PyObject *__pyx_n_s_getstate;
2753 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2754 static PyObject *__pyx_n_s_h;
2755 static PyObject *__pyx_n_s_hMin;
2756 static PyObject *__pyx_n_s_id;
2757 static PyObject *__pyx_n_s_import;
2758 static PyObject *__pyx_n_s_int32;
2759 static PyObject *__pyx_n_s_interiorElementBoundariesArray;
2760 static PyObject *__pyx_n_s_itemsize;
2761 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2762 static PyObject *__pyx_n_s_join;
2763 static PyObject *__pyx_n_s_locallyRefineMultilevelMesh;
2764 static PyObject *__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp;
2765 static PyObject *__pyx_n_s_main;
2766 static PyObject *__pyx_n_s_max_nElements_node;
2767 static PyObject *__pyx_n_s_max_nNodeNeighbors_node;
2768 static PyObject *__pyx_n_s_memview;
2769 static PyObject *__pyx_n_s_mode;
2770 static PyObject *__pyx_n_s_mpi4py;
2771 static PyObject *__pyx_n_s_nEdges_global;
2772 static PyObject *__pyx_n_s_nElementBoundaries_element;
2773 static PyObject *__pyx_n_s_nElementBoundaries_global;
2774 static PyObject *__pyx_n_s_nElements_global;
2775 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2776 static PyObject *__pyx_n_s_nInteriorElementBoundaries_globa;
2777 static PyObject *__pyx_n_s_nLevels;
2778 static PyObject *__pyx_n_s_nNodes_element;
2779 static PyObject *__pyx_n_s_nNodes_elementBoundary;
2780 static PyObject *__pyx_n_s_nNodes_global;
2781 static PyObject *__pyx_n_s_nSpace;
2782 static PyObject *__pyx_n_s_name;
2783 static PyObject *__pyx_n_s_name_2;
2784 static PyObject *__pyx_n_s_ndim;
2785 static PyObject *__pyx_n_s_new;
2786 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2787 static PyObject *__pyx_n_s_nodeArray;
2788 static PyObject *__pyx_n_s_nodeDiametersArray;
2789 static PyObject *__pyx_n_s_nodeElementOffsets;
2790 static PyObject *__pyx_n_s_nodeElementsArray;
2791 static PyObject *__pyx_n_s_nodeMaterialTypes;
2792 static PyObject *__pyx_n_s_nodeStarArray;
2793 static PyObject *__pyx_n_s_nodeStarOffsets;
2794 static PyObject *__pyx_n_s_nodeSupportArray;
2795 static PyObject *__pyx_n_s_np;
2796 static PyObject *__pyx_n_s_numpy;
2797 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2798 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2799 static PyObject *__pyx_n_s_nx;
2800 static PyObject *__pyx_n_s_ny;
2801 static PyObject *__pyx_n_s_nz;
2802 static PyObject *__pyx_n_s_obj;
2803 static PyObject *__pyx_n_s_pack;
2804 static PyObject *__pyx_n_s_pickle;
2805 static PyObject *__pyx_n_s_print;
2806 static PyObject *__pyx_n_s_proteus;
2807 static PyObject *__pyx_kp_s_proteus_cmeshTools_pyx;
2808 static PyObject *__pyx_n_s_px;
2809 static PyObject *__pyx_n_s_py;
2810 static PyObject *__pyx_n_s_pyx_PickleError;
2811 static PyObject *__pyx_n_s_pyx_checksum;
2812 static PyObject *__pyx_n_s_pyx_getbuffer;
2813 static PyObject *__pyx_n_s_pyx_result;
2814 static PyObject *__pyx_n_s_pyx_state;
2815 static PyObject *__pyx_n_s_pyx_type;
2816 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2817 static PyObject *__pyx_n_s_pyx_vtable;
2818 static PyObject *__pyx_n_s_pz;
2819 static PyObject *__pyx_n_s_range;
2820 static PyObject *__pyx_n_s_reduce;
2821 static PyObject *__pyx_n_s_reduce_cython;
2822 static PyObject *__pyx_n_s_reduce_ex;
2823 static PyObject *__pyx_n_s_refineTypeFlag;
2824 static PyObject *__pyx_kp_u_s;
2825 static PyObject *__pyx_kp_s_self_mesh_cannot_be_converted_to;
2826 static PyObject *__pyx_kp_s_self_multilevelMesh_cannot_be_co;
2827 static PyObject *__pyx_n_s_setNewestNodeBases;
2828 static PyObject *__pyx_kp_s_setNewestNodeBases_0_d_not_imple;
2829 static PyObject *__pyx_n_s_setstate;
2830 static PyObject *__pyx_n_s_setstate_cython;
2831 static PyObject *__pyx_n_s_shape;
2832 static PyObject *__pyx_n_s_sigmaMax;
2833 static PyObject *__pyx_n_s_size;
2834 static PyObject *__pyx_n_s_start;
2835 static PyObject *__pyx_n_s_step;
2836 static PyObject *__pyx_n_s_stop;
2837 static PyObject *__pyx_kp_s_strided_and_direct;
2838 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2839 static PyObject *__pyx_kp_s_strided_and_indirect;
2840 static PyObject *__pyx_kp_s_stringsource;
2841 static PyObject *__pyx_n_s_struct;
2842 static PyObject *__pyx_n_s_test;
2843 static PyObject *__pyx_n_s_triangleFlag;
2844 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2845 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2846 static PyObject *__pyx_n_s_unpack;
2847 static PyObject *__pyx_n_s_update;
2848 static PyObject *__pyx_n_s_volume;
2849 static PyObject *__pyx_n_s_weights;
2850 static PyObject *__pyx_kp_s_wrong_nLevels;
2851 static PyObject *__pyx_n_s_zeros;
2852 static int __pyx_pf_10cmeshTools_5CMesh___init__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2853 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2deleteCMesh(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2854 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterface(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2855 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6buildPythonMeshInterfaceNoArrays(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2856 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2857 static int __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2858 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2859 static int __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2860 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2861 static int __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2862 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2863 static int __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2864 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2865 static int __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2866 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2867 static int __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2868 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2869 static int __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2870 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2871 static int __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2872 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2873 static int __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2874 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2875 static int __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2876 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2877 static int __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2878 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2879 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2880 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2881 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2882 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2883 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2884 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2885 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2886 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2887 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2888 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2889 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2890 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2891 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2892 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2893 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2894 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2895 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2896 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2897 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2898 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2899 static PyObject *__pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2900 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2901 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2902 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2903 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2904 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2905 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2906 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2907 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2908 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2909 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2910 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2911 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2912 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2913 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2914 static PyObject *__pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2915 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2916 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2917 static PyObject *__pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2918 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2919 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2920 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2921 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2922 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2923 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2924 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2925 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2926 static PyObject *__pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2927 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2928 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2929 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nx___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2930 static int __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2931 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2ny___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2932 static int __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2933 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2934 static int __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2935 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2px___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2936 static int __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2937 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2py___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2938 static int __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2939 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2pz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2940 static int __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2941 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2942 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2943 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2944 static PyObject *__pyx_pf_10cmeshTools_5CMesh_7weights___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2945 static int __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2946 static int __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2947 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2948 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2949 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2950 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2951 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2952 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2953 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2954 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2955 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2956 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2957 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2958 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2959 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2960 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2961 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2962 static PyObject *__pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2963 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2964 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2965 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2966 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2967 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2968 static PyObject *__pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2969 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2970 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2971 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2972 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2973 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2974 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2975 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2976 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2977 static PyObject *__pyx_pf_10cmeshTools_5CMesh_1h___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2978 static int __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2979 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4hMin___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2980 static int __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2981 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2982 static int __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2983 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6volume___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2984 static int __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2985 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2986 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2987 static PyObject *__pyx_pf_10cmeshTools_buildPythonMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /* proto */
2988 static PyObject *__pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /* proto */
2989 static int __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_nLevels); /* proto */
2990 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2991 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2992 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2993 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2994 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2995 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2996 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2997 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2998 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2999 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
3000 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3001 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
3002 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
3003 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3004 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
3005 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
3006 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3007 static PyObject *__pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh); /* proto */
3008 static PyObject *__pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3009 static PyObject *__pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3010 static PyObject *__pyx_pf_10cmeshTools_10generateFromTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3011 static PyObject *__pyx_pf_10cmeshTools_12writeTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3012 static PyObject *__pyx_pf_10cmeshTools_14generateFromTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3013 static PyObject *__pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3014 static PyObject *__pyx_pf_10cmeshTools_18writeTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3015 static PyObject *__pyx_pf_10cmeshTools_20write3dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3016 static PyObject *__pyx_pf_10cmeshTools_22write2dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3017 static PyObject *__pyx_pf_10cmeshTools_24generateFromHexFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3018 static PyObject *__pyx_pf_10cmeshTools_26generateFrom3DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3019 static PyObject *__pyx_pf_10cmeshTools_28generateFrom2DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
3020 static PyObject *__pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3021 static PyObject *__pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3022 static PyObject *__pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element); /* proto */
3023 static PyObject *__pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3024 static PyObject *__pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag); /* proto */
3025 static PyObject *__pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3026 static PyObject *__pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_px, int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3027 static PyObject *__pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3028 static PyObject *__pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3029 static PyObject *__pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3030 static PyObject *__pyx_pf_10cmeshTools_50computeGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3031 static PyObject *__pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3032 static PyObject *__pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3033 static PyObject *__pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3034 static PyObject *__pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3035 static PyObject *__pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3036 static PyObject *__pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3037 static PyObject *__pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
3038 static PyObject *__pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh, PyArrayObject *__pyx_v_elementTagArray, int __pyx_v_refineTypeFlag); /* proto */
3039 static PyObject *__pyx_pf_10cmeshTools_68setNewestNodeBases(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh); /* proto */
3040 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 */
3041 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 */
3042 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3043 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3044 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3045 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
3046 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
3047 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 */
3048 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
3049 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 */
3050 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3051 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3052 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3053 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3054 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 */
3055 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3056 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
3057 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 */
3058 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 */
3059 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3060 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3061 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3062 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3063 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3064 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3065 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3066 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3067 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3068 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3069 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3070 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3071 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3072 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3073 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3074 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3075 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3076 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 */
3077 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3078 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3079 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3080 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 */
3081 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 */
3082 static PyObject *__pyx_tp_new_10cmeshTools_CMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3083 static PyObject *__pyx_tp_new_10cmeshTools_CMultilevelMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3084 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3085 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3086 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3087 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3088 static PyObject *__pyx_int_0;
3089 static PyObject *__pyx_int_1;
3090 static PyObject *__pyx_int_112105877;
3091 static PyObject *__pyx_int_136983863;
3092 static PyObject *__pyx_int_184977713;
3093 static PyObject *__pyx_int_neg_1;
3094 static PyObject *__pyx_tuple_;
3095 static PyObject *__pyx_tuple__2;
3096 static PyObject *__pyx_tuple__3;
3097 static PyObject *__pyx_tuple__4;
3098 static PyObject *__pyx_tuple__5;
3099 static PyObject *__pyx_tuple__6;
3100 static PyObject *__pyx_tuple__7;
3101 static PyObject *__pyx_tuple__8;
3102 static PyObject *__pyx_tuple__9;
3103 static PyObject *__pyx_slice__22;
3104 static PyObject *__pyx_tuple__10;
3105 static PyObject *__pyx_tuple__11;
3106 static PyObject *__pyx_tuple__12;
3107 static PyObject *__pyx_tuple__13;
3108 static PyObject *__pyx_tuple__14;
3109 static PyObject *__pyx_tuple__15;
3110 static PyObject *__pyx_tuple__16;
3111 static PyObject *__pyx_tuple__17;
3112 static PyObject *__pyx_tuple__18;
3113 static PyObject *__pyx_tuple__19;
3114 static PyObject *__pyx_tuple__20;
3115 static PyObject *__pyx_tuple__21;
3116 static PyObject *__pyx_tuple__23;
3117 static PyObject *__pyx_tuple__24;
3118 static PyObject *__pyx_tuple__25;
3119 static PyObject *__pyx_tuple__26;
3120 static PyObject *__pyx_tuple__32;
3121 static PyObject *__pyx_tuple__34;
3122 static PyObject *__pyx_tuple__36;
3123 static PyObject *__pyx_tuple__38;
3124 static PyObject *__pyx_tuple__40;
3125 static PyObject *__pyx_tuple__42;
3126 static PyObject *__pyx_tuple__43;
3127 static PyObject *__pyx_tuple__44;
3128 static PyObject *__pyx_tuple__45;
3129 static PyObject *__pyx_tuple__46;
3130 static PyObject *__pyx_tuple__47;
3131 static PyObject *__pyx_codeobj__33;
3132 static PyObject *__pyx_codeobj__35;
3133 static PyObject *__pyx_codeobj__37;
3134 static PyObject *__pyx_codeobj__39;
3135 static PyObject *__pyx_codeobj__41;
3136 static PyObject *__pyx_codeobj__48;
3137 /* Late includes */
3138 
3139 /* "cmeshTools.pyx":12
3140  *
3141  * cdef class CMesh:
3142  * def __init__(self): # <<<<<<<<<<<<<<
3143  * self.mesh = cppm.Mesh()
3144  * cppm.initializeMesh(self.mesh)
3145  */
3146 
3147 /* Python wrapper */
3148 static int __pyx_pw_10cmeshTools_5CMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3149 static int __pyx_pw_10cmeshTools_5CMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3150  int __pyx_r;
3151  __Pyx_RefNannyDeclarations
3152  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3153  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
3154  __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
3155  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
3156  __pyx_r = __pyx_pf_10cmeshTools_5CMesh___init__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3157 
3158  /* function exit code */
3159  __Pyx_RefNannyFinishContext();
3160  return __pyx_r;
3161 }
3162 
3163 static int __pyx_pf_10cmeshTools_5CMesh___init__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3164  int __pyx_r;
3165  __Pyx_RefNannyDeclarations
3166  struct Mesh __pyx_t_1;
3167  __Pyx_RefNannySetupContext("__init__", 0);
3168 
3169  /* "cmeshTools.pyx":13
3170  * cdef class CMesh:
3171  * def __init__(self):
3172  * self.mesh = cppm.Mesh() # <<<<<<<<<<<<<<
3173  * cppm.initializeMesh(self.mesh)
3174  *
3175  */
3176  __pyx_v_self->mesh = __pyx_t_1;
3177 
3178  /* "cmeshTools.pyx":14
3179  * def __init__(self):
3180  * self.mesh = cppm.Mesh()
3181  * cppm.initializeMesh(self.mesh) # <<<<<<<<<<<<<<
3182  *
3183  * def deleteCMesh(self):
3184  */
3185  initializeMesh(__pyx_v_self->mesh);
3186 
3187  /* "cmeshTools.pyx":12
3188  *
3189  * cdef class CMesh:
3190  * def __init__(self): # <<<<<<<<<<<<<<
3191  * self.mesh = cppm.Mesh()
3192  * cppm.initializeMesh(self.mesh)
3193  */
3194 
3195  /* function exit code */
3196  __pyx_r = 0;
3197  __Pyx_RefNannyFinishContext();
3198  return __pyx_r;
3199 }
3200 
3201 /* "cmeshTools.pyx":16
3202  * cppm.initializeMesh(self.mesh)
3203  *
3204  * def deleteCMesh(self): # <<<<<<<<<<<<<<
3205  * cppm.deleteMesh(self.mesh)
3206  *
3207  */
3208 
3209 /* Python wrapper */
3210 static PyObject *__pyx_pw_10cmeshTools_5CMesh_3deleteCMesh(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3211 static PyObject *__pyx_pw_10cmeshTools_5CMesh_3deleteCMesh(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3212  PyObject *__pyx_r = 0;
3213  __Pyx_RefNannyDeclarations
3214  __Pyx_RefNannySetupContext("deleteCMesh (wrapper)", 0);
3215  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2deleteCMesh(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3216 
3217  /* function exit code */
3218  __Pyx_RefNannyFinishContext();
3219  return __pyx_r;
3220 }
3221 
3222 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2deleteCMesh(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3223  PyObject *__pyx_r = NULL;
3224  __Pyx_RefNannyDeclarations
3225  __Pyx_RefNannySetupContext("deleteCMesh", 0);
3226 
3227  /* "cmeshTools.pyx":17
3228  *
3229  * def deleteCMesh(self):
3230  * cppm.deleteMesh(self.mesh) # <<<<<<<<<<<<<<
3231  *
3232  * def buildPythonMeshInterface(self):
3233  */
3234  deleteMesh(__pyx_v_self->mesh);
3235 
3236  /* "cmeshTools.pyx":16
3237  * cppm.initializeMesh(self.mesh)
3238  *
3239  * def deleteCMesh(self): # <<<<<<<<<<<<<<
3240  * cppm.deleteMesh(self.mesh)
3241  *
3242  */
3243 
3244  /* function exit code */
3245  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3246  __Pyx_XGIVEREF(__pyx_r);
3247  __Pyx_RefNannyFinishContext();
3248  return __pyx_r;
3249 }
3250 
3251 /* "cmeshTools.pyx":19
3252  * cppm.deleteMesh(self.mesh)
3253  *
3254  * def buildPythonMeshInterface(self): # <<<<<<<<<<<<<<
3255  * cdef int dim1
3256  * self.nElements_global = self.mesh.nElements_global
3257  */
3258 
3259 /* Python wrapper */
3260 static PyObject *__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3261 static PyObject *__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3262  PyObject *__pyx_r = 0;
3263  __Pyx_RefNannyDeclarations
3264  __Pyx_RefNannySetupContext("buildPythonMeshInterface (wrapper)", 0);
3265  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterface(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3266 
3267  /* function exit code */
3268  __Pyx_RefNannyFinishContext();
3269  return __pyx_r;
3270 }
3271 
3272 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterface(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3273  PyObject *__pyx_r = NULL;
3274  __Pyx_RefNannyDeclarations
3275  int __pyx_t_1;
3276  PyObject *__pyx_t_2 = NULL;
3277  PyObject *__pyx_t_3 = NULL;
3278  PyObject *__pyx_t_4 = NULL;
3279  int *__pyx_t_5;
3280  struct __pyx_array_obj *__pyx_t_6 = NULL;
3281  PyObject *__pyx_t_7 = NULL;
3282  int __pyx_t_8;
3283  double *__pyx_t_9;
3284  double __pyx_t_10;
3285  int __pyx_lineno = 0;
3286  const char *__pyx_filename = NULL;
3287  int __pyx_clineno = 0;
3288  __Pyx_RefNannySetupContext("buildPythonMeshInterface", 0);
3289 
3290  /* "cmeshTools.pyx":21
3291  * def buildPythonMeshInterface(self):
3292  * cdef int dim1
3293  * self.nElements_global = self.mesh.nElements_global # <<<<<<<<<<<<<<
3294  * self.nNodes_global = self.mesh.nNodes_global
3295  * self.nNodes_element = self.mesh.nNodes_element
3296  */
3297  __pyx_t_1 = __pyx_v_self->mesh.nElements_global;
3298  __pyx_v_self->nElements_global = __pyx_t_1;
3299 
3300  /* "cmeshTools.pyx":22
3301  * cdef int dim1
3302  * self.nElements_global = self.mesh.nElements_global
3303  * self.nNodes_global = self.mesh.nNodes_global # <<<<<<<<<<<<<<
3304  * self.nNodes_element = self.mesh.nNodes_element
3305  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3306  */
3307  __pyx_t_1 = __pyx_v_self->mesh.nNodes_global;
3308  __pyx_v_self->nNodes_global = __pyx_t_1;
3309 
3310  /* "cmeshTools.pyx":23
3311  * self.nElements_global = self.mesh.nElements_global
3312  * self.nNodes_global = self.mesh.nNodes_global
3313  * self.nNodes_element = self.mesh.nNodes_element # <<<<<<<<<<<<<<
3314  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3315  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3316  */
3317  __pyx_t_1 = __pyx_v_self->mesh.nNodes_element;
3318  __pyx_v_self->nNodes_element = __pyx_t_1;
3319 
3320  /* "cmeshTools.pyx":24
3321  * self.nNodes_global = self.mesh.nNodes_global
3322  * self.nNodes_element = self.mesh.nNodes_element
3323  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
3324  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3325  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3326  */
3327  __pyx_t_1 = __pyx_v_self->mesh.nNodes_elementBoundary;
3328  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
3329 
3330  /* "cmeshTools.pyx":25
3331  * self.nNodes_element = self.mesh.nNodes_element
3332  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3333  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element # <<<<<<<<<<<<<<
3334  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3335  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3336  */
3337  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_element;
3338  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
3339 
3340  /* "cmeshTools.pyx":26
3341  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3342  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3343  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
3344  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3345  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3346  */
3347  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_global;
3348  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
3349 
3350  /* "cmeshTools.pyx":27
3351  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3352  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3353  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global # <<<<<<<<<<<<<<
3354  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3355  * self.max_nElements_node = self.mesh.max_nElements_node
3356  */
3357  __pyx_t_1 = __pyx_v_self->mesh.nInteriorElementBoundaries_global;
3358  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
3359 
3360  /* "cmeshTools.pyx":28
3361  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3362  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3363  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global # <<<<<<<<<<<<<<
3364  * self.max_nElements_node = self.mesh.max_nElements_node
3365  * self.nEdges_global = self.mesh.nEdges_global
3366  */
3367  __pyx_t_1 = __pyx_v_self->mesh.nExteriorElementBoundaries_global;
3368  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
3369 
3370  /* "cmeshTools.pyx":29
3371  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3372  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3373  * self.max_nElements_node = self.mesh.max_nElements_node # <<<<<<<<<<<<<<
3374  * self.nEdges_global = self.mesh.nEdges_global
3375  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3376  */
3377  __pyx_t_1 = __pyx_v_self->mesh.max_nElements_node;
3378  __pyx_v_self->max_nElements_node = __pyx_t_1;
3379 
3380  /* "cmeshTools.pyx":30
3381  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3382  * self.max_nElements_node = self.mesh.max_nElements_node
3383  * self.nEdges_global = self.mesh.nEdges_global # <<<<<<<<<<<<<<
3384  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3385  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3386  */
3387  __pyx_t_1 = __pyx_v_self->mesh.nEdges_global;
3388  __pyx_v_self->nEdges_global = __pyx_t_1;
3389 
3390  /* "cmeshTools.pyx":31
3391  * self.max_nElements_node = self.mesh.max_nElements_node
3392  * self.nEdges_global = self.mesh.nEdges_global
3393  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node # <<<<<<<<<<<<<<
3394  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3395  * if self.mesh.nodeElementOffsets != NULL:
3396  */
3397  __pyx_t_1 = __pyx_v_self->mesh.max_nNodeNeighbors_node;
3398  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
3399 
3400  /* "cmeshTools.pyx":32
3401  * self.nEdges_global = self.mesh.nEdges_global
3402  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3403  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray) # <<<<<<<<<<<<<<
3404  * if self.mesh.nodeElementOffsets != NULL:
3405  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3406  */
3407  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 32, __pyx_L1_error)
3408  __Pyx_GOTREF(__pyx_t_3);
3409  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 32, __pyx_L1_error)
3410  __Pyx_GOTREF(__pyx_t_4);
3411  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3412  __pyx_t_5 = __pyx_v_self->mesh.elementNodesArray;
3413  if (!__pyx_t_5) {
3414  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3415  __PYX_ERR(1, 32, __pyx_L1_error)
3416  }
3417  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 32, __pyx_L1_error)
3418  __Pyx_GOTREF(__pyx_t_7);
3419  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nNodes_element)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 32, __pyx_L1_error)
3420  __Pyx_GOTREF(__pyx_t_3);
3421  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3422  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 32, __pyx_L1_error)
3423  __Pyx_GOTREF(__pyx_t_6);
3424  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3425  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3426  __pyx_t_7 = NULL;
3427  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3428  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
3429  if (likely(__pyx_t_7)) {
3430  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3431  __Pyx_INCREF(__pyx_t_7);
3432  __Pyx_INCREF(function);
3433  __Pyx_DECREF_SET(__pyx_t_4, function);
3434  }
3435  }
3436  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
3437  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3438  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3439  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 32, __pyx_L1_error)
3440  __Pyx_GOTREF(__pyx_t_2);
3441  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3442  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 32, __pyx_L1_error)
3443  __Pyx_GIVEREF(__pyx_t_2);
3444  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
3445  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
3446  __pyx_v_self->elementNodesArray = ((PyArrayObject *)__pyx_t_2);
3447  __pyx_t_2 = 0;
3448 
3449  /* "cmeshTools.pyx":33
3450  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3451  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3452  * if self.mesh.nodeElementOffsets != NULL: # <<<<<<<<<<<<<<
3453  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3454  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3455  */
3456  __pyx_t_8 = ((__pyx_v_self->mesh.nodeElementOffsets != NULL) != 0);
3457  if (__pyx_t_8) {
3458 
3459  /* "cmeshTools.pyx":34
3460  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3461  * if self.mesh.nodeElementOffsets != NULL:
3462  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray) # <<<<<<<<<<<<<<
3463  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3464  * else:
3465  */
3466  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
3467  __Pyx_GOTREF(__pyx_t_4);
3468  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 34, __pyx_L1_error)
3469  __Pyx_GOTREF(__pyx_t_7);
3470  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3471  __pyx_t_5 = __pyx_v_self->mesh.nodeElementsArray;
3472  if (!__pyx_t_5) {
3473  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3474  __PYX_ERR(1, 34, __pyx_L1_error)
3475  }
3476  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 34, __pyx_L1_error)
3477  __Pyx_GOTREF(__pyx_t_3);
3478  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nodeElementOffsets[__pyx_v_self->mesh.nNodes_global]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
3479  __Pyx_GOTREF(__pyx_t_4);
3480  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3481  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 34, __pyx_L1_error)
3482  __Pyx_GOTREF(__pyx_t_6);
3483  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3484  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3485  __pyx_t_3 = NULL;
3486  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3487  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
3488  if (likely(__pyx_t_3)) {
3489  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3490  __Pyx_INCREF(__pyx_t_3);
3491  __Pyx_INCREF(function);
3492  __Pyx_DECREF_SET(__pyx_t_7, function);
3493  }
3494  }
3495  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3496  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3497  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3498  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error)
3499  __Pyx_GOTREF(__pyx_t_2);
3500  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3501  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 34, __pyx_L1_error)
3502  __Pyx_GIVEREF(__pyx_t_2);
3503  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
3504  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
3505  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_2);
3506  __pyx_t_2 = 0;
3507 
3508  /* "cmeshTools.pyx":35
3509  * if self.mesh.nodeElementOffsets != NULL:
3510  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3511  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets) # <<<<<<<<<<<<<<
3512  * else:
3513  * self.nodeElementsArray = np.empty(0, dtype=np.int32)
3514  */
3515  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 35, __pyx_L1_error)
3516  __Pyx_GOTREF(__pyx_t_7);
3517  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 35, __pyx_L1_error)
3518  __Pyx_GOTREF(__pyx_t_3);
3519  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3520  __pyx_t_5 = __pyx_v_self->mesh.nodeElementOffsets;
3521  if (!__pyx_t_5) {
3522  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3523  __PYX_ERR(1, 35, __pyx_L1_error)
3524  }
3525  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 35, __pyx_L1_error)
3526  __Pyx_GOTREF(__pyx_t_4);
3527  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nNodes_global + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 35, __pyx_L1_error)
3528  __Pyx_GOTREF(__pyx_t_7);
3529  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
3530  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 35, __pyx_L1_error)
3531  __Pyx_GOTREF(__pyx_t_6);
3532  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3533  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3534  __pyx_t_4 = NULL;
3535  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3536  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3537  if (likely(__pyx_t_4)) {
3538  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3539  __Pyx_INCREF(__pyx_t_4);
3540  __Pyx_INCREF(function);
3541  __Pyx_DECREF_SET(__pyx_t_3, function);
3542  }
3543  }
3544  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3545  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3546  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3547  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error)
3548  __Pyx_GOTREF(__pyx_t_2);
3549  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3550  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 35, __pyx_L1_error)
3551  __Pyx_GIVEREF(__pyx_t_2);
3552  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
3553  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
3554  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_2);
3555  __pyx_t_2 = 0;
3556 
3557  /* "cmeshTools.pyx":33
3558  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3559  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3560  * if self.mesh.nodeElementOffsets != NULL: # <<<<<<<<<<<<<<
3561  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3562  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3563  */
3564  goto __pyx_L3;
3565  }
3566 
3567  /* "cmeshTools.pyx":37
3568  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3569  * else:
3570  * self.nodeElementsArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3571  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
3572  *
3573  */
3574  /*else*/ {
3575  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
3576  __Pyx_GOTREF(__pyx_t_2);
3577  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 37, __pyx_L1_error)
3578  __Pyx_GOTREF(__pyx_t_3);
3579  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3580  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
3581  __Pyx_GOTREF(__pyx_t_2);
3582  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
3583  __Pyx_GOTREF(__pyx_t_4);
3584  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 37, __pyx_L1_error)
3585  __Pyx_GOTREF(__pyx_t_7);
3586  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3587  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(1, 37, __pyx_L1_error)
3588  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3589  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 37, __pyx_L1_error)
3590  __Pyx_GOTREF(__pyx_t_7);
3591  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3592  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3593  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 37, __pyx_L1_error)
3594  __Pyx_GIVEREF(__pyx_t_7);
3595  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
3596  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
3597  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_7);
3598  __pyx_t_7 = 0;
3599 
3600  /* "cmeshTools.pyx":38
3601  * else:
3602  * self.nodeElementsArray = np.empty(0, dtype=np.int32)
3603  * self.nodeElementOffsets = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3604  *
3605  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3606  */
3607  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 38, __pyx_L1_error)
3608  __Pyx_GOTREF(__pyx_t_7);
3609  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 38, __pyx_L1_error)
3610  __Pyx_GOTREF(__pyx_t_2);
3611  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3612  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 38, __pyx_L1_error)
3613  __Pyx_GOTREF(__pyx_t_7);
3614  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 38, __pyx_L1_error)
3615  __Pyx_GOTREF(__pyx_t_3);
3616  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 38, __pyx_L1_error)
3617  __Pyx_GOTREF(__pyx_t_4);
3618  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3619  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(1, 38, __pyx_L1_error)
3620  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3621  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 38, __pyx_L1_error)
3622  __Pyx_GOTREF(__pyx_t_4);
3623  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3624  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3625  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 38, __pyx_L1_error)
3626  __Pyx_GIVEREF(__pyx_t_4);
3627  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
3628  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
3629  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_4);
3630  __pyx_t_4 = 0;
3631  }
3632  __pyx_L3:;
3633 
3634  /* "cmeshTools.pyx":40
3635  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
3636  *
3637  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray) # <<<<<<<<<<<<<<
3638  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3639  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3640  */
3641  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 40, __pyx_L1_error)
3642  __Pyx_GOTREF(__pyx_t_7);
3643  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 40, __pyx_L1_error)
3644  __Pyx_GOTREF(__pyx_t_2);
3645  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3646  __pyx_t_5 = __pyx_v_self->mesh.elementNeighborsArray;
3647  if (!__pyx_t_5) {
3648  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3649  __PYX_ERR(1, 40, __pyx_L1_error)
3650  }
3651  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 40, __pyx_L1_error)
3652  __Pyx_GOTREF(__pyx_t_3);
3653  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_element)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 40, __pyx_L1_error)
3654  __Pyx_GOTREF(__pyx_t_7);
3655  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3656  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 40, __pyx_L1_error)
3657  __Pyx_GOTREF(__pyx_t_6);
3658  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3659  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3660  __pyx_t_3 = NULL;
3661  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3662  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3663  if (likely(__pyx_t_3)) {
3664  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3665  __Pyx_INCREF(__pyx_t_3);
3666  __Pyx_INCREF(function);
3667  __Pyx_DECREF_SET(__pyx_t_2, function);
3668  }
3669  }
3670  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3671  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3672  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3673  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
3674  __Pyx_GOTREF(__pyx_t_4);
3675  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3676  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 40, __pyx_L1_error)
3677  __Pyx_GIVEREF(__pyx_t_4);
3678  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
3679  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
3680  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)__pyx_t_4);
3681  __pyx_t_4 = 0;
3682 
3683  /* "cmeshTools.pyx":41
3684  *
3685  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3686  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray) # <<<<<<<<<<<<<<
3687  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3688  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3689  */
3690  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error)
3691  __Pyx_GOTREF(__pyx_t_2);
3692  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 41, __pyx_L1_error)
3693  __Pyx_GOTREF(__pyx_t_3);
3694  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3695  __pyx_t_5 = __pyx_v_self->mesh.elementBoundariesArray;
3696  if (!__pyx_t_5) {
3697  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3698  __PYX_ERR(1, 41, __pyx_L1_error)
3699  }
3700  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 41, __pyx_L1_error)
3701  __Pyx_GOTREF(__pyx_t_7);
3702  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_element)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error)
3703  __Pyx_GOTREF(__pyx_t_2);
3704  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3705  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 41, __pyx_L1_error)
3706  __Pyx_GOTREF(__pyx_t_6);
3707  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3708  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3709  __pyx_t_7 = NULL;
3710  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3711  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3712  if (likely(__pyx_t_7)) {
3713  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3714  __Pyx_INCREF(__pyx_t_7);
3715  __Pyx_INCREF(function);
3716  __Pyx_DECREF_SET(__pyx_t_3, function);
3717  }
3718  }
3719  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3720  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3721  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3722  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 41, __pyx_L1_error)
3723  __Pyx_GOTREF(__pyx_t_4);
3724  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3725  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 41, __pyx_L1_error)
3726  __Pyx_GIVEREF(__pyx_t_4);
3727  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
3728  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
3729  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3730  __pyx_t_4 = 0;
3731 
3732  /* "cmeshTools.pyx":42
3733  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3734  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3735  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray) # <<<<<<<<<<<<<<
3736  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3737  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3738  */
3739  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 42, __pyx_L1_error)
3740  __Pyx_GOTREF(__pyx_t_3);
3741  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 42, __pyx_L1_error)
3742  __Pyx_GOTREF(__pyx_t_7);
3743  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3744  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryNodesArray;
3745  if (!__pyx_t_5) {
3746  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3747  __PYX_ERR(1, 42, __pyx_L1_error)
3748  }
3749  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 42, __pyx_L1_error)
3750  __Pyx_GOTREF(__pyx_t_2);
3751  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)__pyx_v_self->mesh.nNodes_elementBoundary)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 42, __pyx_L1_error)
3752  __Pyx_GOTREF(__pyx_t_3);
3753  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3754  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 42, __pyx_L1_error)
3755  __Pyx_GOTREF(__pyx_t_6);
3756  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3757  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3758  __pyx_t_2 = NULL;
3759  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3760  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3761  if (likely(__pyx_t_2)) {
3762  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3763  __Pyx_INCREF(__pyx_t_2);
3764  __Pyx_INCREF(function);
3765  __Pyx_DECREF_SET(__pyx_t_7, function);
3766  }
3767  }
3768  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3769  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3770  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3771  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 42, __pyx_L1_error)
3772  __Pyx_GOTREF(__pyx_t_4);
3773  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3774  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 42, __pyx_L1_error)
3775  __Pyx_GIVEREF(__pyx_t_4);
3776  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
3777  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
3778  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)__pyx_t_4);
3779  __pyx_t_4 = 0;
3780 
3781  /* "cmeshTools.pyx":43
3782  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3783  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3784  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray) # <<<<<<<<<<<<<<
3785  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3786  * if self.mesh.nInteriorElementBoundaries_global:
3787  */
3788  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 43, __pyx_L1_error)
3789  __Pyx_GOTREF(__pyx_t_7);
3790  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 43, __pyx_L1_error)
3791  __Pyx_GOTREF(__pyx_t_2);
3792  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3793  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryElementsArray;
3794  if (!__pyx_t_5) {
3795  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3796  __PYX_ERR(1, 43, __pyx_L1_error)
3797  }
3798  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 43, __pyx_L1_error)
3799  __Pyx_GOTREF(__pyx_t_3);
3800  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 43, __pyx_L1_error)
3801  __Pyx_GOTREF(__pyx_t_7);
3802  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3803  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 43, __pyx_L1_error)
3804  __Pyx_GOTREF(__pyx_t_6);
3805  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3806  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3807  __pyx_t_3 = NULL;
3808  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3809  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3810  if (likely(__pyx_t_3)) {
3811  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3812  __Pyx_INCREF(__pyx_t_3);
3813  __Pyx_INCREF(function);
3814  __Pyx_DECREF_SET(__pyx_t_2, function);
3815  }
3816  }
3817  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3818  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3819  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3820  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 43, __pyx_L1_error)
3821  __Pyx_GOTREF(__pyx_t_4);
3822  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3823  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 43, __pyx_L1_error)
3824  __Pyx_GIVEREF(__pyx_t_4);
3825  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
3826  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
3827  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)__pyx_t_4);
3828  __pyx_t_4 = 0;
3829 
3830  /* "cmeshTools.pyx":44
3831  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3832  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3833  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray) # <<<<<<<<<<<<<<
3834  * if self.mesh.nInteriorElementBoundaries_global:
3835  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3836  */
3837  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 44, __pyx_L1_error)
3838  __Pyx_GOTREF(__pyx_t_2);
3839  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 44, __pyx_L1_error)
3840  __Pyx_GOTREF(__pyx_t_3);
3841  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3842  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryLocalElementBoundariesArray;
3843  if (!__pyx_t_5) {
3844  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3845  __PYX_ERR(1, 44, __pyx_L1_error)
3846  }
3847  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 44, __pyx_L1_error)
3848  __Pyx_GOTREF(__pyx_t_7);
3849  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 44, __pyx_L1_error)
3850  __Pyx_GOTREF(__pyx_t_2);
3851  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3852  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 44, __pyx_L1_error)
3853  __Pyx_GOTREF(__pyx_t_6);
3854  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3855  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3856  __pyx_t_7 = NULL;
3857  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3858  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3859  if (likely(__pyx_t_7)) {
3860  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3861  __Pyx_INCREF(__pyx_t_7);
3862  __Pyx_INCREF(function);
3863  __Pyx_DECREF_SET(__pyx_t_3, function);
3864  }
3865  }
3866  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3867  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3868  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3869  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 44, __pyx_L1_error)
3870  __Pyx_GOTREF(__pyx_t_4);
3871  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3872  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 44, __pyx_L1_error)
3873  __Pyx_GIVEREF(__pyx_t_4);
3874  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
3875  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
3876  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3877  __pyx_t_4 = 0;
3878 
3879  /* "cmeshTools.pyx":45
3880  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3881  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3882  * if self.mesh.nInteriorElementBoundaries_global: # <<<<<<<<<<<<<<
3883  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3884  * else:
3885  */
3886  __pyx_t_8 = (__pyx_v_self->mesh.nInteriorElementBoundaries_global != 0);
3887  if (__pyx_t_8) {
3888 
3889  /* "cmeshTools.pyx":46
3890  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3891  * if self.mesh.nInteriorElementBoundaries_global:
3892  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray) # <<<<<<<<<<<<<<
3893  * else:
3894  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3895  */
3896  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 46, __pyx_L1_error)
3897  __Pyx_GOTREF(__pyx_t_3);
3898  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 46, __pyx_L1_error)
3899  __Pyx_GOTREF(__pyx_t_7);
3900  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3901  __pyx_t_5 = __pyx_v_self->mesh.interiorElementBoundariesArray;
3902  if (!__pyx_t_5) {
3903  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3904  __PYX_ERR(1, 46, __pyx_L1_error)
3905  }
3906  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 46, __pyx_L1_error)
3907  __Pyx_GOTREF(__pyx_t_2);
3908  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nInteriorElementBoundaries_global)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 46, __pyx_L1_error)
3909  __Pyx_GOTREF(__pyx_t_3);
3910  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3911  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 46, __pyx_L1_error)
3912  __Pyx_GOTREF(__pyx_t_6);
3913  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3914  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3915  __pyx_t_2 = NULL;
3916  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3917  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3918  if (likely(__pyx_t_2)) {
3919  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3920  __Pyx_INCREF(__pyx_t_2);
3921  __Pyx_INCREF(function);
3922  __Pyx_DECREF_SET(__pyx_t_7, function);
3923  }
3924  }
3925  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3926  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3927  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3928  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 46, __pyx_L1_error)
3929  __Pyx_GOTREF(__pyx_t_4);
3930  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3931  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 46, __pyx_L1_error)
3932  __Pyx_GIVEREF(__pyx_t_4);
3933  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
3934  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
3935  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3936  __pyx_t_4 = 0;
3937 
3938  /* "cmeshTools.pyx":45
3939  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3940  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3941  * if self.mesh.nInteriorElementBoundaries_global: # <<<<<<<<<<<<<<
3942  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3943  * else:
3944  */
3945  goto __pyx_L4;
3946  }
3947 
3948  /* "cmeshTools.pyx":48
3949  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3950  * else:
3951  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3952  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3953  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3954  */
3955  /*else*/ {
3956  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 48, __pyx_L1_error)
3957  __Pyx_GOTREF(__pyx_t_4);
3958  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 48, __pyx_L1_error)
3959  __Pyx_GOTREF(__pyx_t_7);
3960  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3961  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 48, __pyx_L1_error)
3962  __Pyx_GOTREF(__pyx_t_4);
3963  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 48, __pyx_L1_error)
3964  __Pyx_GOTREF(__pyx_t_2);
3965  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 48, __pyx_L1_error)
3966  __Pyx_GOTREF(__pyx_t_3);
3967  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3968  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(1, 48, __pyx_L1_error)
3969  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3970  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple_, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 48, __pyx_L1_error)
3971  __Pyx_GOTREF(__pyx_t_3);
3972  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3973  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3974  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 48, __pyx_L1_error)
3975  __Pyx_GIVEREF(__pyx_t_3);
3976  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
3977  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
3978  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_3);
3979  __pyx_t_3 = 0;
3980  }
3981  __pyx_L4:;
3982 
3983  /* "cmeshTools.pyx":49
3984  * else:
3985  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3986  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray) # <<<<<<<<<<<<<<
3987  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3988  * if self.mesh.nodeStarOffsets != NULL:
3989  */
3990  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 49, __pyx_L1_error)
3991  __Pyx_GOTREF(__pyx_t_4);
3992  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 49, __pyx_L1_error)
3993  __Pyx_GOTREF(__pyx_t_7);
3994  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3995  __pyx_t_5 = __pyx_v_self->mesh.exteriorElementBoundariesArray;
3996  if (!__pyx_t_5) {
3997  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3998  __PYX_ERR(1, 49, __pyx_L1_error)
3999  }
4000  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 49, __pyx_L1_error)
4001  __Pyx_GOTREF(__pyx_t_2);
4002  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nExteriorElementBoundaries_global)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 49, __pyx_L1_error)
4003  __Pyx_GOTREF(__pyx_t_4);
4004  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
4005  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 49, __pyx_L1_error)
4006  __Pyx_GOTREF(__pyx_t_6);
4007  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4008  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4009  __pyx_t_2 = NULL;
4010  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4011  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
4012  if (likely(__pyx_t_2)) {
4013  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4014  __Pyx_INCREF(__pyx_t_2);
4015  __Pyx_INCREF(function);
4016  __Pyx_DECREF_SET(__pyx_t_7, function);
4017  }
4018  }
4019  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4020  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4021  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4022  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 49, __pyx_L1_error)
4023  __Pyx_GOTREF(__pyx_t_3);
4024  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4025  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 49, __pyx_L1_error)
4026  __Pyx_GIVEREF(__pyx_t_3);
4027  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
4028  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
4029  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)__pyx_t_3);
4030  __pyx_t_3 = 0;
4031 
4032  /* "cmeshTools.pyx":50
4033  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
4034  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
4035  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray) # <<<<<<<<<<<<<<
4036  * if self.mesh.nodeStarOffsets != NULL:
4037  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
4038  */
4039  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 50, __pyx_L1_error)
4040  __Pyx_GOTREF(__pyx_t_7);
4041  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 50, __pyx_L1_error)
4042  __Pyx_GOTREF(__pyx_t_2);
4043  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4044  __pyx_t_5 = __pyx_v_self->mesh.edgeNodesArray;
4045  if (!__pyx_t_5) {
4046  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4047  __PYX_ERR(1, 50, __pyx_L1_error)
4048  }
4049  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 50, __pyx_L1_error)
4050  __Pyx_GOTREF(__pyx_t_4);
4051  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nEdges_global), ((Py_ssize_t)2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 50, __pyx_L1_error)
4052  __Pyx_GOTREF(__pyx_t_7);
4053  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4054  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 50, __pyx_L1_error)
4055  __Pyx_GOTREF(__pyx_t_6);
4056  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4057  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4058  __pyx_t_4 = NULL;
4059  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4060  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
4061  if (likely(__pyx_t_4)) {
4062  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4063  __Pyx_INCREF(__pyx_t_4);
4064  __Pyx_INCREF(function);
4065  __Pyx_DECREF_SET(__pyx_t_2, function);
4066  }
4067  }
4068  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
4069  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4070  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4071  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 50, __pyx_L1_error)
4072  __Pyx_GOTREF(__pyx_t_3);
4073  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4074  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 50, __pyx_L1_error)
4075  __Pyx_GIVEREF(__pyx_t_3);
4076  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
4077  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
4078  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)__pyx_t_3);
4079  __pyx_t_3 = 0;
4080 
4081  /* "cmeshTools.pyx":51
4082  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
4083  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
4084  * if self.mesh.nodeStarOffsets != NULL: # <<<<<<<<<<<<<<
4085  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
4086  * else:
4087  */
4088  __pyx_t_8 = ((__pyx_v_self->mesh.nodeStarOffsets != NULL) != 0);
4089  if (__pyx_t_8) {
4090 
4091  /* "cmeshTools.pyx":52
4092  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
4093  * if self.mesh.nodeStarOffsets != NULL:
4094  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray) # <<<<<<<<<<<<<<
4095  * else:
4096  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4097  */
4098  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
4099  __Pyx_GOTREF(__pyx_t_2);
4100  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 52, __pyx_L1_error)
4101  __Pyx_GOTREF(__pyx_t_4);
4102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4103  __pyx_t_5 = __pyx_v_self->mesh.nodeStarArray;
4104  if (!__pyx_t_5) {
4105  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4106  __PYX_ERR(1, 52, __pyx_L1_error)
4107  }
4108  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 52, __pyx_L1_error)
4109  __Pyx_GOTREF(__pyx_t_7);
4110  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nodeStarOffsets[__pyx_v_self->mesh.nNodes_global]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
4111  __Pyx_GOTREF(__pyx_t_2);
4112  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4113  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 52, __pyx_L1_error)
4114  __Pyx_GOTREF(__pyx_t_6);
4115  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4116  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4117  __pyx_t_7 = NULL;
4118  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4119  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4120  if (likely(__pyx_t_7)) {
4121  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4122  __Pyx_INCREF(__pyx_t_7);
4123  __Pyx_INCREF(function);
4124  __Pyx_DECREF_SET(__pyx_t_4, function);
4125  }
4126  }
4127  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4128  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4129  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4130  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
4131  __Pyx_GOTREF(__pyx_t_3);
4132  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4133  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 52, __pyx_L1_error)
4134  __Pyx_GIVEREF(__pyx_t_3);
4135  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
4136  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
4137  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_3);
4138  __pyx_t_3 = 0;
4139 
4140  /* "cmeshTools.pyx":51
4141  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
4142  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
4143  * if self.mesh.nodeStarOffsets != NULL: # <<<<<<<<<<<<<<
4144  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
4145  * else:
4146  */
4147  goto __pyx_L5;
4148  }
4149 
4150  /* "cmeshTools.pyx":54
4151  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
4152  * else:
4153  * self.nodeStarArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
4154  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4155  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4156  */
4157  /*else*/ {
4158  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error)
4159  __Pyx_GOTREF(__pyx_t_3);
4160  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 54, __pyx_L1_error)
4161  __Pyx_GOTREF(__pyx_t_4);
4162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4163  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error)
4164  __Pyx_GOTREF(__pyx_t_3);
4165  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 54, __pyx_L1_error)
4166  __Pyx_GOTREF(__pyx_t_7);
4167  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error)
4168  __Pyx_GOTREF(__pyx_t_2);
4169  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4170  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(1, 54, __pyx_L1_error)
4171  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4172  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error)
4173  __Pyx_GOTREF(__pyx_t_2);
4174  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4175  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4176  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 54, __pyx_L1_error)
4177  __Pyx_GIVEREF(__pyx_t_2);
4178  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
4179  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
4180  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_2);
4181  __pyx_t_2 = 0;
4182  }
4183  __pyx_L5:;
4184 
4185  /* "cmeshTools.pyx":55
4186  * else:
4187  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4188  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets) # <<<<<<<<<<<<<<
4189  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4190  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4191  */
4192  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 55, __pyx_L1_error)
4193  __Pyx_GOTREF(__pyx_t_3);
4194  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error)
4195  __Pyx_GOTREF(__pyx_t_4);
4196  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4197  __pyx_t_5 = __pyx_v_self->mesh.nodeStarOffsets;
4198  if (!__pyx_t_5) {
4199  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4200  __PYX_ERR(1, 55, __pyx_L1_error)
4201  }
4202  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 55, __pyx_L1_error)
4203  __Pyx_GOTREF(__pyx_t_7);
4204  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nNodes_global + 1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 55, __pyx_L1_error)
4205  __Pyx_GOTREF(__pyx_t_3);
4206  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4207  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 55, __pyx_L1_error)
4208  __Pyx_GOTREF(__pyx_t_6);
4209  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4210  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4211  __pyx_t_7 = NULL;
4212  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4213  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4214  if (likely(__pyx_t_7)) {
4215  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4216  __Pyx_INCREF(__pyx_t_7);
4217  __Pyx_INCREF(function);
4218  __Pyx_DECREF_SET(__pyx_t_4, function);
4219  }
4220  }
4221  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4222  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4223  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4224  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error)
4225  __Pyx_GOTREF(__pyx_t_2);
4226  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4227  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 55, __pyx_L1_error)
4228  __Pyx_GIVEREF(__pyx_t_2);
4229  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
4230  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
4231  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)__pyx_t_2);
4232  __pyx_t_2 = 0;
4233 
4234  /* "cmeshTools.pyx":56
4235  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4236  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4237  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes) # <<<<<<<<<<<<<<
4238  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4239  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4240  */
4241  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error)
4242  __Pyx_GOTREF(__pyx_t_4);
4243  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 56, __pyx_L1_error)
4244  __Pyx_GOTREF(__pyx_t_7);
4245  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4246  __pyx_t_5 = __pyx_v_self->mesh.elementMaterialTypes;
4247  if (!__pyx_t_5) {
4248  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4249  __PYX_ERR(1, 56, __pyx_L1_error)
4250  }
4251  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 56, __pyx_L1_error)
4252  __Pyx_GOTREF(__pyx_t_3);
4253  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error)
4254  __Pyx_GOTREF(__pyx_t_4);
4255  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
4256  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 56, __pyx_L1_error)
4257  __Pyx_GOTREF(__pyx_t_6);
4258  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4259  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4260  __pyx_t_3 = NULL;
4261  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4262  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4263  if (likely(__pyx_t_3)) {
4264  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4265  __Pyx_INCREF(__pyx_t_3);
4266  __Pyx_INCREF(function);
4267  __Pyx_DECREF_SET(__pyx_t_7, function);
4268  }
4269  }
4270  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4271  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4272  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4273  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error)
4274  __Pyx_GOTREF(__pyx_t_2);
4275  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4276  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 56, __pyx_L1_error)
4277  __Pyx_GIVEREF(__pyx_t_2);
4278  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
4279  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
4280  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4281  __pyx_t_2 = 0;
4282 
4283  /* "cmeshTools.pyx":57
4284  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4285  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4286  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes) # <<<<<<<<<<<<<<
4287  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4288  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4289  */
4290  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 57, __pyx_L1_error)
4291  __Pyx_GOTREF(__pyx_t_7);
4292  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 57, __pyx_L1_error)
4293  __Pyx_GOTREF(__pyx_t_3);
4294  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4295  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryMaterialTypes;
4296  if (!__pyx_t_5) {
4297  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4298  __PYX_ERR(1, 57, __pyx_L1_error)
4299  }
4300  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 57, __pyx_L1_error)
4301  __Pyx_GOTREF(__pyx_t_4);
4302  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 57, __pyx_L1_error)
4303  __Pyx_GOTREF(__pyx_t_7);
4304  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4305  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 57, __pyx_L1_error)
4306  __Pyx_GOTREF(__pyx_t_6);
4307  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4308  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4309  __pyx_t_4 = NULL;
4310  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4311  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4312  if (likely(__pyx_t_4)) {
4313  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4314  __Pyx_INCREF(__pyx_t_4);
4315  __Pyx_INCREF(function);
4316  __Pyx_DECREF_SET(__pyx_t_3, function);
4317  }
4318  }
4319  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4320  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4321  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4322  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 57, __pyx_L1_error)
4323  __Pyx_GOTREF(__pyx_t_2);
4324  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4325  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 57, __pyx_L1_error)
4326  __Pyx_GIVEREF(__pyx_t_2);
4327  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
4328  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
4329  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4330  __pyx_t_2 = 0;
4331 
4332  /* "cmeshTools.pyx":58
4333  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4334  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4335  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes) # <<<<<<<<<<<<<<
4336  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4337  * self.nx = self.mesh.nx
4338  */
4339  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 58, __pyx_L1_error)
4340  __Pyx_GOTREF(__pyx_t_3);
4341  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error)
4342  __Pyx_GOTREF(__pyx_t_4);
4343  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4344  __pyx_t_5 = __pyx_v_self->mesh.nodeMaterialTypes;
4345  if (!__pyx_t_5) {
4346  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4347  __PYX_ERR(1, 58, __pyx_L1_error)
4348  }
4349  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 58, __pyx_L1_error)
4350  __Pyx_GOTREF(__pyx_t_7);
4351  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 58, __pyx_L1_error)
4352  __Pyx_GOTREF(__pyx_t_3);
4353  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4354  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 58, __pyx_L1_error)
4355  __Pyx_GOTREF(__pyx_t_6);
4356  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4357  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4358  __pyx_t_7 = NULL;
4359  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4360  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4361  if (likely(__pyx_t_7)) {
4362  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4363  __Pyx_INCREF(__pyx_t_7);
4364  __Pyx_INCREF(function);
4365  __Pyx_DECREF_SET(__pyx_t_4, function);
4366  }
4367  }
4368  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4369  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4370  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4371  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error)
4372  __Pyx_GOTREF(__pyx_t_2);
4373  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4374  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 58, __pyx_L1_error)
4375  __Pyx_GIVEREF(__pyx_t_2);
4376  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
4377  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
4378  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4379  __pyx_t_2 = 0;
4380 
4381  /* "cmeshTools.pyx":59
4382  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4383  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4384  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray) # <<<<<<<<<<<<<<
4385  * self.nx = self.mesh.nx
4386  * self.ny = self.mesh.ny
4387  */
4388  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 59, __pyx_L1_error)
4389  __Pyx_GOTREF(__pyx_t_4);
4390  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 59, __pyx_L1_error)
4391  __Pyx_GOTREF(__pyx_t_7);
4392  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4393  __pyx_t_9 = __pyx_v_self->mesh.nodeArray;
4394  if (!__pyx_t_9) {
4395  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4396  __PYX_ERR(1, 59, __pyx_L1_error)
4397  }
4398  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 59, __pyx_L1_error)
4399  __Pyx_GOTREF(__pyx_t_3);
4400  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global), ((Py_ssize_t)3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 59, __pyx_L1_error)
4401  __Pyx_GOTREF(__pyx_t_4);
4402  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
4403  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 59, __pyx_L1_error)
4404  __Pyx_GOTREF(__pyx_t_6);
4405  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4406  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4407  __pyx_t_3 = NULL;
4408  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4409  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4410  if (likely(__pyx_t_3)) {
4411  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4412  __Pyx_INCREF(__pyx_t_3);
4413  __Pyx_INCREF(function);
4414  __Pyx_DECREF_SET(__pyx_t_7, function);
4415  }
4416  }
4417  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4418  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4419  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4420  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 59, __pyx_L1_error)
4421  __Pyx_GOTREF(__pyx_t_2);
4422  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4423  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 59, __pyx_L1_error)
4424  __Pyx_GIVEREF(__pyx_t_2);
4425  __Pyx_GOTREF(__pyx_v_self->nodeArray);
4426  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
4427  __pyx_v_self->nodeArray = ((PyArrayObject *)__pyx_t_2);
4428  __pyx_t_2 = 0;
4429 
4430  /* "cmeshTools.pyx":60
4431  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4432  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4433  * self.nx = self.mesh.nx # <<<<<<<<<<<<<<
4434  * self.ny = self.mesh.ny
4435  * self.nz = self.mesh.nz
4436  */
4437  __pyx_t_1 = __pyx_v_self->mesh.nx;
4438  __pyx_v_self->nx = __pyx_t_1;
4439 
4440  /* "cmeshTools.pyx":61
4441  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4442  * self.nx = self.mesh.nx
4443  * self.ny = self.mesh.ny # <<<<<<<<<<<<<<
4444  * self.nz = self.mesh.nz
4445  * self.px = self.mesh.px
4446  */
4447  __pyx_t_1 = __pyx_v_self->mesh.ny;
4448  __pyx_v_self->ny = __pyx_t_1;
4449 
4450  /* "cmeshTools.pyx":62
4451  * self.nx = self.mesh.nx
4452  * self.ny = self.mesh.ny
4453  * self.nz = self.mesh.nz # <<<<<<<<<<<<<<
4454  * self.px = self.mesh.px
4455  * self.py = self.mesh.py
4456  */
4457  __pyx_t_1 = __pyx_v_self->mesh.nz;
4458  __pyx_v_self->nz = __pyx_t_1;
4459 
4460  /* "cmeshTools.pyx":63
4461  * self.ny = self.mesh.ny
4462  * self.nz = self.mesh.nz
4463  * self.px = self.mesh.px # <<<<<<<<<<<<<<
4464  * self.py = self.mesh.py
4465  * self.pz = self.mesh.pz
4466  */
4467  __pyx_t_1 = __pyx_v_self->mesh.px;
4468  __pyx_v_self->px = __pyx_t_1;
4469 
4470  /* "cmeshTools.pyx":64
4471  * self.nz = self.mesh.nz
4472  * self.px = self.mesh.px
4473  * self.py = self.mesh.py # <<<<<<<<<<<<<<
4474  * self.pz = self.mesh.pz
4475  * if self.mesh.elementIJK != NULL:
4476  */
4477  __pyx_t_1 = __pyx_v_self->mesh.py;
4478  __pyx_v_self->py = __pyx_t_1;
4479 
4480  /* "cmeshTools.pyx":65
4481  * self.px = self.mesh.px
4482  * self.py = self.mesh.py
4483  * self.pz = self.mesh.pz # <<<<<<<<<<<<<<
4484  * if self.mesh.elementIJK != NULL:
4485  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4486  */
4487  __pyx_t_1 = __pyx_v_self->mesh.pz;
4488  __pyx_v_self->pz = __pyx_t_1;
4489 
4490  /* "cmeshTools.pyx":66
4491  * self.py = self.mesh.py
4492  * self.pz = self.mesh.pz
4493  * if self.mesh.elementIJK != NULL: # <<<<<<<<<<<<<<
4494  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4495  * else:
4496  */
4497  __pyx_t_8 = ((__pyx_v_self->mesh.elementIJK != NULL) != 0);
4498  if (__pyx_t_8) {
4499 
4500  /* "cmeshTools.pyx":67
4501  * self.pz = self.mesh.pz
4502  * if self.mesh.elementIJK != NULL:
4503  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK) # <<<<<<<<<<<<<<
4504  * else:
4505  * self.elementIJK = np.empty(0, dtype=np.int32)
4506  */
4507  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 67, __pyx_L1_error)
4508  __Pyx_GOTREF(__pyx_t_7);
4509  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 67, __pyx_L1_error)
4510  __Pyx_GOTREF(__pyx_t_3);
4511  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4512  __pyx_t_5 = __pyx_v_self->mesh.elementIJK;
4513  if (!__pyx_t_5) {
4514  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4515  __PYX_ERR(1, 67, __pyx_L1_error)
4516  }
4517  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 67, __pyx_L1_error)
4518  __Pyx_GOTREF(__pyx_t_4);
4519  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nElements_global * 3))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 67, __pyx_L1_error)
4520  __Pyx_GOTREF(__pyx_t_7);
4521  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4522  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 67, __pyx_L1_error)
4523  __Pyx_GOTREF(__pyx_t_6);
4524  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4525  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4526  __pyx_t_4 = NULL;
4527  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4528  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4529  if (likely(__pyx_t_4)) {
4530  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4531  __Pyx_INCREF(__pyx_t_4);
4532  __Pyx_INCREF(function);
4533  __Pyx_DECREF_SET(__pyx_t_3, function);
4534  }
4535  }
4536  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4537  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4538  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4539  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 67, __pyx_L1_error)
4540  __Pyx_GOTREF(__pyx_t_2);
4541  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4542  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 67, __pyx_L1_error)
4543  __Pyx_GIVEREF(__pyx_t_2);
4544  __Pyx_GOTREF(__pyx_v_self->elementIJK);
4545  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
4546  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_2);
4547  __pyx_t_2 = 0;
4548 
4549  /* "cmeshTools.pyx":66
4550  * self.py = self.mesh.py
4551  * self.pz = self.mesh.pz
4552  * if self.mesh.elementIJK != NULL: # <<<<<<<<<<<<<<
4553  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4554  * else:
4555  */
4556  goto __pyx_L6;
4557  }
4558 
4559  /* "cmeshTools.pyx":69
4560  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4561  * else:
4562  * self.elementIJK = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
4563  * if self.mesh.weights != NULL:
4564  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4565  */
4566  /*else*/ {
4567  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 69, __pyx_L1_error)
4568  __Pyx_GOTREF(__pyx_t_2);
4569  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 69, __pyx_L1_error)
4570  __Pyx_GOTREF(__pyx_t_3);
4571  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4572  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 69, __pyx_L1_error)
4573  __Pyx_GOTREF(__pyx_t_2);
4574  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 69, __pyx_L1_error)
4575  __Pyx_GOTREF(__pyx_t_4);
4576  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 69, __pyx_L1_error)
4577  __Pyx_GOTREF(__pyx_t_7);
4578  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4579  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(1, 69, __pyx_L1_error)
4580  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4581  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 69, __pyx_L1_error)
4582  __Pyx_GOTREF(__pyx_t_7);
4583  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4584  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4585  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 69, __pyx_L1_error)
4586  __Pyx_GIVEREF(__pyx_t_7);
4587  __Pyx_GOTREF(__pyx_v_self->elementIJK);
4588  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
4589  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_7);
4590  __pyx_t_7 = 0;
4591  }
4592  __pyx_L6:;
4593 
4594  /* "cmeshTools.pyx":70
4595  * else:
4596  * self.elementIJK = np.empty(0, dtype=np.int32)
4597  * if self.mesh.weights != NULL: # <<<<<<<<<<<<<<
4598  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4599  * else:
4600  */
4601  __pyx_t_8 = ((__pyx_v_self->mesh.weights != NULL) != 0);
4602  if (__pyx_t_8) {
4603 
4604  /* "cmeshTools.pyx":71
4605  * self.elementIJK = np.empty(0, dtype=np.int32)
4606  * if self.mesh.weights != NULL:
4607  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights) # <<<<<<<<<<<<<<
4608  * else:
4609  * self.weights = np.empty(0)
4610  */
4611  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 71, __pyx_L1_error)
4612  __Pyx_GOTREF(__pyx_t_2);
4613  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 71, __pyx_L1_error)
4614  __Pyx_GOTREF(__pyx_t_3);
4615  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4616  __pyx_t_9 = __pyx_v_self->mesh.weights;
4617  if (!__pyx_t_9) {
4618  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4619  __PYX_ERR(1, 71, __pyx_L1_error)
4620  }
4621  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 71, __pyx_L1_error)
4622  __Pyx_GOTREF(__pyx_t_4);
4623  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 71, __pyx_L1_error)
4624  __Pyx_GOTREF(__pyx_t_2);
4625  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4626  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 71, __pyx_L1_error)
4627  __Pyx_GOTREF(__pyx_t_6);
4628  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4629  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4630  __pyx_t_4 = NULL;
4631  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4632  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4633  if (likely(__pyx_t_4)) {
4634  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4635  __Pyx_INCREF(__pyx_t_4);
4636  __Pyx_INCREF(function);
4637  __Pyx_DECREF_SET(__pyx_t_3, function);
4638  }
4639  }
4640  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4641  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4642  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4643  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 71, __pyx_L1_error)
4644  __Pyx_GOTREF(__pyx_t_7);
4645  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4646  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 71, __pyx_L1_error)
4647  __Pyx_GIVEREF(__pyx_t_7);
4648  __Pyx_GOTREF(__pyx_v_self->weights);
4649  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
4650  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_7);
4651  __pyx_t_7 = 0;
4652 
4653  /* "cmeshTools.pyx":70
4654  * else:
4655  * self.elementIJK = np.empty(0, dtype=np.int32)
4656  * if self.mesh.weights != NULL: # <<<<<<<<<<<<<<
4657  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4658  * else:
4659  */
4660  goto __pyx_L7;
4661  }
4662 
4663  /* "cmeshTools.pyx":73
4664  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4665  * else:
4666  * self.weights = np.empty(0) # <<<<<<<<<<<<<<
4667  * if self.mesh.U_KNOT != NULL:
4668  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4669  */
4670  /*else*/ {
4671  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 73, __pyx_L1_error)
4672  __Pyx_GOTREF(__pyx_t_3);
4673  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 73, __pyx_L1_error)
4674  __Pyx_GOTREF(__pyx_t_4);
4675  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4676  __pyx_t_3 = NULL;
4677  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4678  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
4679  if (likely(__pyx_t_3)) {
4680  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4681  __Pyx_INCREF(__pyx_t_3);
4682  __Pyx_INCREF(function);
4683  __Pyx_DECREF_SET(__pyx_t_4, function);
4684  }
4685  }
4686  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
4687  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4688  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 73, __pyx_L1_error)
4689  __Pyx_GOTREF(__pyx_t_7);
4690  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4691  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 73, __pyx_L1_error)
4692  __Pyx_GIVEREF(__pyx_t_7);
4693  __Pyx_GOTREF(__pyx_v_self->weights);
4694  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
4695  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_7);
4696  __pyx_t_7 = 0;
4697  }
4698  __pyx_L7:;
4699 
4700  /* "cmeshTools.pyx":74
4701  * else:
4702  * self.weights = np.empty(0)
4703  * if self.mesh.U_KNOT != NULL: # <<<<<<<<<<<<<<
4704  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4705  * else:
4706  */
4707  __pyx_t_8 = ((__pyx_v_self->mesh.U_KNOT != NULL) != 0);
4708  if (__pyx_t_8) {
4709 
4710  /* "cmeshTools.pyx":75
4711  * self.weights = np.empty(0)
4712  * if self.mesh.U_KNOT != NULL:
4713  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT) # <<<<<<<<<<<<<<
4714  * else:
4715  * self.U_KNOT = np.empty(0)
4716  */
4717  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 75, __pyx_L1_error)
4718  __Pyx_GOTREF(__pyx_t_4);
4719  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 75, __pyx_L1_error)
4720  __Pyx_GOTREF(__pyx_t_3);
4721  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4722  __pyx_t_9 = __pyx_v_self->mesh.U_KNOT;
4723  if (!__pyx_t_9) {
4724  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4725  __PYX_ERR(1, 75, __pyx_L1_error)
4726  }
4727  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 75, __pyx_L1_error)
4728  __Pyx_GOTREF(__pyx_t_2);
4729  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.nx + __pyx_v_self->mesh.px) + 1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 75, __pyx_L1_error)
4730  __Pyx_GOTREF(__pyx_t_4);
4731  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4732  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 75, __pyx_L1_error)
4733  __Pyx_GOTREF(__pyx_t_6);
4734  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4735  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4736  __pyx_t_2 = NULL;
4737  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4738  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4739  if (likely(__pyx_t_2)) {
4740  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4741  __Pyx_INCREF(__pyx_t_2);
4742  __Pyx_INCREF(function);
4743  __Pyx_DECREF_SET(__pyx_t_3, function);
4744  }
4745  }
4746  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4747  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4748  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4749  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 75, __pyx_L1_error)
4750  __Pyx_GOTREF(__pyx_t_7);
4751  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4752  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 75, __pyx_L1_error)
4753  __Pyx_GIVEREF(__pyx_t_7);
4754  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
4755  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
4756  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_7);
4757  __pyx_t_7 = 0;
4758 
4759  /* "cmeshTools.pyx":74
4760  * else:
4761  * self.weights = np.empty(0)
4762  * if self.mesh.U_KNOT != NULL: # <<<<<<<<<<<<<<
4763  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4764  * else:
4765  */
4766  goto __pyx_L8;
4767  }
4768 
4769  /* "cmeshTools.pyx":77
4770  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4771  * else:
4772  * self.U_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4773  * if self.mesh.V_KNOT != NULL:
4774  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4775  */
4776  /*else*/ {
4777  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 77, __pyx_L1_error)
4778  __Pyx_GOTREF(__pyx_t_3);
4779  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 77, __pyx_L1_error)
4780  __Pyx_GOTREF(__pyx_t_2);
4781  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4782  __pyx_t_3 = NULL;
4783  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4784  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4785  if (likely(__pyx_t_3)) {
4786  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4787  __Pyx_INCREF(__pyx_t_3);
4788  __Pyx_INCREF(function);
4789  __Pyx_DECREF_SET(__pyx_t_2, function);
4790  }
4791  }
4792  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
4793  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4794  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 77, __pyx_L1_error)
4795  __Pyx_GOTREF(__pyx_t_7);
4796  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4797  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 77, __pyx_L1_error)
4798  __Pyx_GIVEREF(__pyx_t_7);
4799  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
4800  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
4801  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_7);
4802  __pyx_t_7 = 0;
4803  }
4804  __pyx_L8:;
4805 
4806  /* "cmeshTools.pyx":78
4807  * else:
4808  * self.U_KNOT = np.empty(0)
4809  * if self.mesh.V_KNOT != NULL: # <<<<<<<<<<<<<<
4810  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4811  * else:
4812  */
4813  __pyx_t_8 = ((__pyx_v_self->mesh.V_KNOT != NULL) != 0);
4814  if (__pyx_t_8) {
4815 
4816  /* "cmeshTools.pyx":79
4817  * self.U_KNOT = np.empty(0)
4818  * if self.mesh.V_KNOT != NULL:
4819  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT) # <<<<<<<<<<<<<<
4820  * else:
4821  * self.V_KNOT = np.empty(0)
4822  */
4823  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 79, __pyx_L1_error)
4824  __Pyx_GOTREF(__pyx_t_2);
4825  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 79, __pyx_L1_error)
4826  __Pyx_GOTREF(__pyx_t_3);
4827  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4828  __pyx_t_9 = __pyx_v_self->mesh.V_KNOT;
4829  if (!__pyx_t_9) {
4830  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4831  __PYX_ERR(1, 79, __pyx_L1_error)
4832  }
4833  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 79, __pyx_L1_error)
4834  __Pyx_GOTREF(__pyx_t_4);
4835  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.ny + __pyx_v_self->mesh.py) + 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 79, __pyx_L1_error)
4836  __Pyx_GOTREF(__pyx_t_2);
4837  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4838  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 79, __pyx_L1_error)
4839  __Pyx_GOTREF(__pyx_t_6);
4840  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4841  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4842  __pyx_t_4 = NULL;
4843  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4844  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4845  if (likely(__pyx_t_4)) {
4846  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4847  __Pyx_INCREF(__pyx_t_4);
4848  __Pyx_INCREF(function);
4849  __Pyx_DECREF_SET(__pyx_t_3, function);
4850  }
4851  }
4852  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4853  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4854  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4855  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 79, __pyx_L1_error)
4856  __Pyx_GOTREF(__pyx_t_7);
4857  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4858  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 79, __pyx_L1_error)
4859  __Pyx_GIVEREF(__pyx_t_7);
4860  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
4861  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
4862  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_7);
4863  __pyx_t_7 = 0;
4864 
4865  /* "cmeshTools.pyx":78
4866  * else:
4867  * self.U_KNOT = np.empty(0)
4868  * if self.mesh.V_KNOT != NULL: # <<<<<<<<<<<<<<
4869  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4870  * else:
4871  */
4872  goto __pyx_L9;
4873  }
4874 
4875  /* "cmeshTools.pyx":81
4876  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4877  * else:
4878  * self.V_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4879  * if self.mesh.W_KNOT != NULL:
4880  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4881  */
4882  /*else*/ {
4883  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 81, __pyx_L1_error)
4884  __Pyx_GOTREF(__pyx_t_3);
4885  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 81, __pyx_L1_error)
4886  __Pyx_GOTREF(__pyx_t_4);
4887  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4888  __pyx_t_3 = NULL;
4889  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4890  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
4891  if (likely(__pyx_t_3)) {
4892  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4893  __Pyx_INCREF(__pyx_t_3);
4894  __Pyx_INCREF(function);
4895  __Pyx_DECREF_SET(__pyx_t_4, function);
4896  }
4897  }
4898  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
4899  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4900  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 81, __pyx_L1_error)
4901  __Pyx_GOTREF(__pyx_t_7);
4902  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4903  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 81, __pyx_L1_error)
4904  __Pyx_GIVEREF(__pyx_t_7);
4905  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
4906  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
4907  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_7);
4908  __pyx_t_7 = 0;
4909  }
4910  __pyx_L9:;
4911 
4912  /* "cmeshTools.pyx":82
4913  * else:
4914  * self.V_KNOT = np.empty(0)
4915  * if self.mesh.W_KNOT != NULL: # <<<<<<<<<<<<<<
4916  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4917  * else:
4918  */
4919  __pyx_t_8 = ((__pyx_v_self->mesh.W_KNOT != NULL) != 0);
4920  if (__pyx_t_8) {
4921 
4922  /* "cmeshTools.pyx":83
4923  * self.V_KNOT = np.empty(0)
4924  * if self.mesh.W_KNOT != NULL:
4925  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT) # <<<<<<<<<<<<<<
4926  * else:
4927  * self.W_KNOT = np.empty(0)
4928  */
4929  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 83, __pyx_L1_error)
4930  __Pyx_GOTREF(__pyx_t_4);
4931  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 83, __pyx_L1_error)
4932  __Pyx_GOTREF(__pyx_t_3);
4933  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4934  __pyx_t_9 = __pyx_v_self->mesh.W_KNOT;
4935  if (!__pyx_t_9) {
4936  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4937  __PYX_ERR(1, 83, __pyx_L1_error)
4938  }
4939  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 83, __pyx_L1_error)
4940  __Pyx_GOTREF(__pyx_t_2);
4941  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.nz + __pyx_v_self->mesh.pz) + 1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 83, __pyx_L1_error)
4942  __Pyx_GOTREF(__pyx_t_4);
4943  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4944  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 83, __pyx_L1_error)
4945  __Pyx_GOTREF(__pyx_t_6);
4946  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4947  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4948  __pyx_t_2 = NULL;
4949  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4950  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4951  if (likely(__pyx_t_2)) {
4952  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4953  __Pyx_INCREF(__pyx_t_2);
4954  __Pyx_INCREF(function);
4955  __Pyx_DECREF_SET(__pyx_t_3, function);
4956  }
4957  }
4958  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4959  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4960  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4961  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 83, __pyx_L1_error)
4962  __Pyx_GOTREF(__pyx_t_7);
4963  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4964  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 83, __pyx_L1_error)
4965  __Pyx_GIVEREF(__pyx_t_7);
4966  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
4967  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
4968  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_7);
4969  __pyx_t_7 = 0;
4970 
4971  /* "cmeshTools.pyx":82
4972  * else:
4973  * self.V_KNOT = np.empty(0)
4974  * if self.mesh.W_KNOT != NULL: # <<<<<<<<<<<<<<
4975  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4976  * else:
4977  */
4978  goto __pyx_L10;
4979  }
4980 
4981  /* "cmeshTools.pyx":85
4982  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4983  * else:
4984  * self.W_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4985  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4986  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4987  */
4988  /*else*/ {
4989  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 85, __pyx_L1_error)
4990  __Pyx_GOTREF(__pyx_t_3);
4991  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
4992  __Pyx_GOTREF(__pyx_t_2);
4993  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4994  __pyx_t_3 = NULL;
4995  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4996  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4997  if (likely(__pyx_t_3)) {
4998  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4999  __Pyx_INCREF(__pyx_t_3);
5000  __Pyx_INCREF(function);
5001  __Pyx_DECREF_SET(__pyx_t_2, function);
5002  }
5003  }
5004  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
5005  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5006  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 85, __pyx_L1_error)
5007  __Pyx_GOTREF(__pyx_t_7);
5008  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5009  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 85, __pyx_L1_error)
5010  __Pyx_GIVEREF(__pyx_t_7);
5011  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
5012  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
5013  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_7);
5014  __pyx_t_7 = 0;
5015  }
5016  __pyx_L10:;
5017 
5018  /* "cmeshTools.pyx":86
5019  * else:
5020  * self.W_KNOT = np.empty(0)
5021  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray) # <<<<<<<<<<<<<<
5022  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5023  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5024  */
5025  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 86, __pyx_L1_error)
5026  __Pyx_GOTREF(__pyx_t_2);
5027  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 86, __pyx_L1_error)
5028  __Pyx_GOTREF(__pyx_t_3);
5029  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5030  __pyx_t_9 = __pyx_v_self->mesh.elementDiametersArray;
5031  if (!__pyx_t_9) {
5032  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5033  __PYX_ERR(1, 86, __pyx_L1_error)
5034  }
5035  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 86, __pyx_L1_error)
5036  __Pyx_GOTREF(__pyx_t_4);
5037  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 86, __pyx_L1_error)
5038  __Pyx_GOTREF(__pyx_t_2);
5039  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5040  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 86, __pyx_L1_error)
5041  __Pyx_GOTREF(__pyx_t_6);
5042  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5043  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5044  __pyx_t_4 = NULL;
5045  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5046  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5047  if (likely(__pyx_t_4)) {
5048  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5049  __Pyx_INCREF(__pyx_t_4);
5050  __Pyx_INCREF(function);
5051  __Pyx_DECREF_SET(__pyx_t_3, function);
5052  }
5053  }
5054  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5055  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5056  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5057  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 86, __pyx_L1_error)
5058  __Pyx_GOTREF(__pyx_t_7);
5059  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5060  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 86, __pyx_L1_error)
5061  __Pyx_GIVEREF(__pyx_t_7);
5062  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
5063  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
5064  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)__pyx_t_7);
5065  __pyx_t_7 = 0;
5066 
5067  /* "cmeshTools.pyx":87
5068  * self.W_KNOT = np.empty(0)
5069  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
5070  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray) # <<<<<<<<<<<<<<
5071  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5072  * if self.mesh.elementBarycentersArray:
5073  */
5074  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 87, __pyx_L1_error)
5075  __Pyx_GOTREF(__pyx_t_3);
5076  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 87, __pyx_L1_error)
5077  __Pyx_GOTREF(__pyx_t_4);
5078  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5079  __pyx_t_9 = __pyx_v_self->mesh.elementInnerDiametersArray;
5080  if (!__pyx_t_9) {
5081  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5082  __PYX_ERR(1, 87, __pyx_L1_error)
5083  }
5084  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 87, __pyx_L1_error)
5085  __Pyx_GOTREF(__pyx_t_2);
5086  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 87, __pyx_L1_error)
5087  __Pyx_GOTREF(__pyx_t_3);
5088  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
5089  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 87, __pyx_L1_error)
5090  __Pyx_GOTREF(__pyx_t_6);
5091  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5092  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5093  __pyx_t_2 = NULL;
5094  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5095  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
5096  if (likely(__pyx_t_2)) {
5097  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5098  __Pyx_INCREF(__pyx_t_2);
5099  __Pyx_INCREF(function);
5100  __Pyx_DECREF_SET(__pyx_t_4, function);
5101  }
5102  }
5103  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
5104  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5105  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5106  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 87, __pyx_L1_error)
5107  __Pyx_GOTREF(__pyx_t_7);
5108  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5109  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 87, __pyx_L1_error)
5110  __Pyx_GIVEREF(__pyx_t_7);
5111  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
5112  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
5113  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)__pyx_t_7);
5114  __pyx_t_7 = 0;
5115 
5116  /* "cmeshTools.pyx":88
5117  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
5118  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5119  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray) # <<<<<<<<<<<<<<
5120  * if self.mesh.elementBarycentersArray:
5121  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5122  */
5123  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 88, __pyx_L1_error)
5124  __Pyx_GOTREF(__pyx_t_4);
5125  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 88, __pyx_L1_error)
5126  __Pyx_GOTREF(__pyx_t_2);
5127  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5128  __pyx_t_9 = __pyx_v_self->mesh.elementBoundaryDiametersArray;
5129  if (!__pyx_t_9) {
5130  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5131  __PYX_ERR(1, 88, __pyx_L1_error)
5132  }
5133  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 88, __pyx_L1_error)
5134  __Pyx_GOTREF(__pyx_t_3);
5135  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 88, __pyx_L1_error)
5136  __Pyx_GOTREF(__pyx_t_4);
5137  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
5138  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 88, __pyx_L1_error)
5139  __Pyx_GOTREF(__pyx_t_6);
5140  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5141  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5142  __pyx_t_3 = NULL;
5143  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5144  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5145  if (likely(__pyx_t_3)) {
5146  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5147  __Pyx_INCREF(__pyx_t_3);
5148  __Pyx_INCREF(function);
5149  __Pyx_DECREF_SET(__pyx_t_2, function);
5150  }
5151  }
5152  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
5153  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5154  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5155  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 88, __pyx_L1_error)
5156  __Pyx_GOTREF(__pyx_t_7);
5157  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5158  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 88, __pyx_L1_error)
5159  __Pyx_GIVEREF(__pyx_t_7);
5160  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
5161  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
5162  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)__pyx_t_7);
5163  __pyx_t_7 = 0;
5164 
5165  /* "cmeshTools.pyx":89
5166  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5167  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5168  * if self.mesh.elementBarycentersArray: # <<<<<<<<<<<<<<
5169  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5170  * if self.mesh.elementBoundaryBarycentersArray:
5171  */
5172  __pyx_t_8 = (__pyx_v_self->mesh.elementBarycentersArray != 0);
5173  if (__pyx_t_8) {
5174 
5175  /* "cmeshTools.pyx":90
5176  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5177  * if self.mesh.elementBarycentersArray:
5178  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray) # <<<<<<<<<<<<<<
5179  * if self.mesh.elementBoundaryBarycentersArray:
5180  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5181  */
5182  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 90, __pyx_L1_error)
5183  __Pyx_GOTREF(__pyx_t_2);
5184  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 90, __pyx_L1_error)
5185  __Pyx_GOTREF(__pyx_t_3);
5186  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5187  __pyx_t_9 = __pyx_v_self->mesh.elementBarycentersArray;
5188  if (!__pyx_t_9) {
5189  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5190  __PYX_ERR(1, 90, __pyx_L1_error)
5191  }
5192  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 90, __pyx_L1_error)
5193  __Pyx_GOTREF(__pyx_t_4);
5194  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 90, __pyx_L1_error)
5195  __Pyx_GOTREF(__pyx_t_2);
5196  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5197  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 90, __pyx_L1_error)
5198  __Pyx_GOTREF(__pyx_t_6);
5199  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5200  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5201  __pyx_t_4 = NULL;
5202  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5203  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5204  if (likely(__pyx_t_4)) {
5205  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5206  __Pyx_INCREF(__pyx_t_4);
5207  __Pyx_INCREF(function);
5208  __Pyx_DECREF_SET(__pyx_t_3, function);
5209  }
5210  }
5211  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5212  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5213  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5214  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 90, __pyx_L1_error)
5215  __Pyx_GOTREF(__pyx_t_7);
5216  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5217  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 90, __pyx_L1_error)
5218  __Pyx_GIVEREF(__pyx_t_7);
5219  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
5220  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
5221  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)__pyx_t_7);
5222  __pyx_t_7 = 0;
5223 
5224  /* "cmeshTools.pyx":89
5225  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5226  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5227  * if self.mesh.elementBarycentersArray: # <<<<<<<<<<<<<<
5228  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5229  * if self.mesh.elementBoundaryBarycentersArray:
5230  */
5231  }
5232 
5233  /* "cmeshTools.pyx":91
5234  * if self.mesh.elementBarycentersArray:
5235  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5236  * if self.mesh.elementBoundaryBarycentersArray: # <<<<<<<<<<<<<<
5237  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5238  * if self.mesh.nodeDiametersArray:
5239  */
5240  __pyx_t_8 = (__pyx_v_self->mesh.elementBoundaryBarycentersArray != 0);
5241  if (__pyx_t_8) {
5242 
5243  /* "cmeshTools.pyx":92
5244  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5245  * if self.mesh.elementBoundaryBarycentersArray:
5246  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray) # <<<<<<<<<<<<<<
5247  * if self.mesh.nodeDiametersArray:
5248  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5249  */
5250  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 92, __pyx_L1_error)
5251  __Pyx_GOTREF(__pyx_t_3);
5252  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 92, __pyx_L1_error)
5253  __Pyx_GOTREF(__pyx_t_4);
5254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5255  __pyx_t_9 = __pyx_v_self->mesh.elementBoundaryBarycentersArray;
5256  if (!__pyx_t_9) {
5257  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5258  __PYX_ERR(1, 92, __pyx_L1_error)
5259  }
5260  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 92, __pyx_L1_error)
5261  __Pyx_GOTREF(__pyx_t_2);
5262  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 92, __pyx_L1_error)
5263  __Pyx_GOTREF(__pyx_t_3);
5264  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
5265  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 92, __pyx_L1_error)
5266  __Pyx_GOTREF(__pyx_t_6);
5267  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5269  __pyx_t_2 = NULL;
5270  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5271  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
5272  if (likely(__pyx_t_2)) {
5273  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5274  __Pyx_INCREF(__pyx_t_2);
5275  __Pyx_INCREF(function);
5276  __Pyx_DECREF_SET(__pyx_t_4, function);
5277  }
5278  }
5279  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
5280  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5281  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5282  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 92, __pyx_L1_error)
5283  __Pyx_GOTREF(__pyx_t_7);
5284  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5285  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 92, __pyx_L1_error)
5286  __Pyx_GIVEREF(__pyx_t_7);
5287  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
5288  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
5289  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)__pyx_t_7);
5290  __pyx_t_7 = 0;
5291 
5292  /* "cmeshTools.pyx":91
5293  * if self.mesh.elementBarycentersArray:
5294  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5295  * if self.mesh.elementBoundaryBarycentersArray: # <<<<<<<<<<<<<<
5296  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5297  * if self.mesh.nodeDiametersArray:
5298  */
5299  }
5300 
5301  /* "cmeshTools.pyx":93
5302  * if self.mesh.elementBoundaryBarycentersArray:
5303  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5304  * if self.mesh.nodeDiametersArray: # <<<<<<<<<<<<<<
5305  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5306  * if self.mesh.nodeSupportArray:
5307  */
5308  __pyx_t_8 = (__pyx_v_self->mesh.nodeDiametersArray != 0);
5309  if (__pyx_t_8) {
5310 
5311  /* "cmeshTools.pyx":94
5312  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5313  * if self.mesh.nodeDiametersArray:
5314  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray) # <<<<<<<<<<<<<<
5315  * if self.mesh.nodeSupportArray:
5316  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5317  */
5318  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 94, __pyx_L1_error)
5319  __Pyx_GOTREF(__pyx_t_4);
5320  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 94, __pyx_L1_error)
5321  __Pyx_GOTREF(__pyx_t_2);
5322  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5323  __pyx_t_9 = __pyx_v_self->mesh.nodeDiametersArray;
5324  if (!__pyx_t_9) {
5325  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5326  __PYX_ERR(1, 94, __pyx_L1_error)
5327  }
5328  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 94, __pyx_L1_error)
5329  __Pyx_GOTREF(__pyx_t_3);
5330  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 94, __pyx_L1_error)
5331  __Pyx_GOTREF(__pyx_t_4);
5332  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
5333  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 94, __pyx_L1_error)
5334  __Pyx_GOTREF(__pyx_t_6);
5335  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5336  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5337  __pyx_t_3 = NULL;
5338  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5339  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5340  if (likely(__pyx_t_3)) {
5341  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5342  __Pyx_INCREF(__pyx_t_3);
5343  __Pyx_INCREF(function);
5344  __Pyx_DECREF_SET(__pyx_t_2, function);
5345  }
5346  }
5347  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
5348  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5349  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5350  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 94, __pyx_L1_error)
5351  __Pyx_GOTREF(__pyx_t_7);
5352  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5353  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 94, __pyx_L1_error)
5354  __Pyx_GIVEREF(__pyx_t_7);
5355  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
5356  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
5357  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)__pyx_t_7);
5358  __pyx_t_7 = 0;
5359 
5360  /* "cmeshTools.pyx":93
5361  * if self.mesh.elementBoundaryBarycentersArray:
5362  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5363  * if self.mesh.nodeDiametersArray: # <<<<<<<<<<<<<<
5364  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5365  * if self.mesh.nodeSupportArray:
5366  */
5367  }
5368 
5369  /* "cmeshTools.pyx":95
5370  * if self.mesh.nodeDiametersArray:
5371  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5372  * if self.mesh.nodeSupportArray: # <<<<<<<<<<<<<<
5373  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5374  * self.h = self.mesh.h
5375  */
5376  __pyx_t_8 = (__pyx_v_self->mesh.nodeSupportArray != 0);
5377  if (__pyx_t_8) {
5378 
5379  /* "cmeshTools.pyx":96
5380  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5381  * if self.mesh.nodeSupportArray:
5382  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray) # <<<<<<<<<<<<<<
5383  * self.h = self.mesh.h
5384  * self.hMin = self.mesh.hMin
5385  */
5386  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 96, __pyx_L1_error)
5387  __Pyx_GOTREF(__pyx_t_2);
5388  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 96, __pyx_L1_error)
5389  __Pyx_GOTREF(__pyx_t_3);
5390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5391  __pyx_t_9 = __pyx_v_self->mesh.nodeSupportArray;
5392  if (!__pyx_t_9) {
5393  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5394  __PYX_ERR(1, 96, __pyx_L1_error)
5395  }
5396  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 96, __pyx_L1_error)
5397  __Pyx_GOTREF(__pyx_t_4);
5398  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 96, __pyx_L1_error)
5399  __Pyx_GOTREF(__pyx_t_2);
5400  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5401  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 96, __pyx_L1_error)
5402  __Pyx_GOTREF(__pyx_t_6);
5403  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5404  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5405  __pyx_t_4 = NULL;
5406  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5407  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5408  if (likely(__pyx_t_4)) {
5409  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5410  __Pyx_INCREF(__pyx_t_4);
5411  __Pyx_INCREF(function);
5412  __Pyx_DECREF_SET(__pyx_t_3, function);
5413  }
5414  }
5415  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5416  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5417  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5418  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 96, __pyx_L1_error)
5419  __Pyx_GOTREF(__pyx_t_7);
5420  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5421  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 96, __pyx_L1_error)
5422  __Pyx_GIVEREF(__pyx_t_7);
5423  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
5424  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
5425  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)__pyx_t_7);
5426  __pyx_t_7 = 0;
5427 
5428  /* "cmeshTools.pyx":95
5429  * if self.mesh.nodeDiametersArray:
5430  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5431  * if self.mesh.nodeSupportArray: # <<<<<<<<<<<<<<
5432  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5433  * self.h = self.mesh.h
5434  */
5435  }
5436 
5437  /* "cmeshTools.pyx":97
5438  * if self.mesh.nodeSupportArray:
5439  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5440  * self.h = self.mesh.h # <<<<<<<<<<<<<<
5441  * self.hMin = self.mesh.hMin
5442  * self.sigmaMax = self.mesh.sigmaMax
5443  */
5444  __pyx_t_10 = __pyx_v_self->mesh.h;
5445  __pyx_v_self->h = __pyx_t_10;
5446 
5447  /* "cmeshTools.pyx":98
5448  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5449  * self.h = self.mesh.h
5450  * self.hMin = self.mesh.hMin # <<<<<<<<<<<<<<
5451  * self.sigmaMax = self.mesh.sigmaMax
5452  * self.volume = self.mesh.volume
5453  */
5454  __pyx_t_10 = __pyx_v_self->mesh.hMin;
5455  __pyx_v_self->hMin = __pyx_t_10;
5456 
5457  /* "cmeshTools.pyx":99
5458  * self.h = self.mesh.h
5459  * self.hMin = self.mesh.hMin
5460  * self.sigmaMax = self.mesh.sigmaMax # <<<<<<<<<<<<<<
5461  * self.volume = self.mesh.volume
5462  *
5463  */
5464  __pyx_t_10 = __pyx_v_self->mesh.sigmaMax;
5465  __pyx_v_self->sigmaMax = __pyx_t_10;
5466 
5467  /* "cmeshTools.pyx":100
5468  * self.hMin = self.mesh.hMin
5469  * self.sigmaMax = self.mesh.sigmaMax
5470  * self.volume = self.mesh.volume # <<<<<<<<<<<<<<
5471  *
5472  * def buildPythonMeshInterfaceNoArrays(self):
5473  */
5474  __pyx_t_10 = __pyx_v_self->mesh.volume;
5475  __pyx_v_self->volume = __pyx_t_10;
5476 
5477  /* "cmeshTools.pyx":19
5478  * cppm.deleteMesh(self.mesh)
5479  *
5480  * def buildPythonMeshInterface(self): # <<<<<<<<<<<<<<
5481  * cdef int dim1
5482  * self.nElements_global = self.mesh.nElements_global
5483  */
5484 
5485  /* function exit code */
5486  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5487  goto __pyx_L0;
5488  __pyx_L1_error:;
5489  __Pyx_XDECREF(__pyx_t_2);
5490  __Pyx_XDECREF(__pyx_t_3);
5491  __Pyx_XDECREF(__pyx_t_4);
5492  __Pyx_XDECREF(((PyObject *)__pyx_t_6));
5493  __Pyx_XDECREF(__pyx_t_7);
5494  __Pyx_AddTraceback("cmeshTools.CMesh.buildPythonMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
5495  __pyx_r = NULL;
5496  __pyx_L0:;
5497  __Pyx_XGIVEREF(__pyx_r);
5498  __Pyx_RefNannyFinishContext();
5499  return __pyx_r;
5500 }
5501 
5502 /* "cmeshTools.pyx":102
5503  * self.volume = self.mesh.volume
5504  *
5505  * def buildPythonMeshInterfaceNoArrays(self): # <<<<<<<<<<<<<<
5506  * cdef int dim1
5507  * self.nElements_global = self.mesh.nElements_global
5508  */
5509 
5510 /* Python wrapper */
5511 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7buildPythonMeshInterfaceNoArrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5512 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7buildPythonMeshInterfaceNoArrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5513  PyObject *__pyx_r = 0;
5514  __Pyx_RefNannyDeclarations
5515  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays (wrapper)", 0);
5516  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6buildPythonMeshInterfaceNoArrays(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5517 
5518  /* function exit code */
5519  __Pyx_RefNannyFinishContext();
5520  return __pyx_r;
5521 }
5522 
5523 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6buildPythonMeshInterfaceNoArrays(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5524  PyObject *__pyx_r = NULL;
5525  __Pyx_RefNannyDeclarations
5526  int __pyx_t_1;
5527  double __pyx_t_2;
5528  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays", 0);
5529 
5530  /* "cmeshTools.pyx":104
5531  * def buildPythonMeshInterfaceNoArrays(self):
5532  * cdef int dim1
5533  * self.nElements_global = self.mesh.nElements_global # <<<<<<<<<<<<<<
5534  * self.nNodes_global = self.mesh.nNodes_global
5535  * self.nNodes_element = self.mesh.nNodes_element
5536  */
5537  __pyx_t_1 = __pyx_v_self->mesh.nElements_global;
5538  __pyx_v_self->nElements_global = __pyx_t_1;
5539 
5540  /* "cmeshTools.pyx":105
5541  * cdef int dim1
5542  * self.nElements_global = self.mesh.nElements_global
5543  * self.nNodes_global = self.mesh.nNodes_global # <<<<<<<<<<<<<<
5544  * self.nNodes_element = self.mesh.nNodes_element
5545  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5546  */
5547  __pyx_t_1 = __pyx_v_self->mesh.nNodes_global;
5548  __pyx_v_self->nNodes_global = __pyx_t_1;
5549 
5550  /* "cmeshTools.pyx":106
5551  * self.nElements_global = self.mesh.nElements_global
5552  * self.nNodes_global = self.mesh.nNodes_global
5553  * self.nNodes_element = self.mesh.nNodes_element # <<<<<<<<<<<<<<
5554  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5555  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5556  */
5557  __pyx_t_1 = __pyx_v_self->mesh.nNodes_element;
5558  __pyx_v_self->nNodes_element = __pyx_t_1;
5559 
5560  /* "cmeshTools.pyx":107
5561  * self.nNodes_global = self.mesh.nNodes_global
5562  * self.nNodes_element = self.mesh.nNodes_element
5563  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
5564  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5565  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5566  */
5567  __pyx_t_1 = __pyx_v_self->mesh.nNodes_elementBoundary;
5568  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
5569 
5570  /* "cmeshTools.pyx":108
5571  * self.nNodes_element = self.mesh.nNodes_element
5572  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5573  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element # <<<<<<<<<<<<<<
5574  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5575  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5576  */
5577  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_element;
5578  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
5579 
5580  /* "cmeshTools.pyx":109
5581  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5582  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5583  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
5584  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5585  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5586  */
5587  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_global;
5588  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
5589 
5590  /* "cmeshTools.pyx":110
5591  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5592  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5593  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global # <<<<<<<<<<<<<<
5594  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5595  * self.max_nElements_node = self.mesh.max_nElements_node
5596  */
5597  __pyx_t_1 = __pyx_v_self->mesh.nInteriorElementBoundaries_global;
5598  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
5599 
5600  /* "cmeshTools.pyx":111
5601  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5602  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5603  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global # <<<<<<<<<<<<<<
5604  * self.max_nElements_node = self.mesh.max_nElements_node
5605  * self.nEdges_global = self.mesh.nEdges_global
5606  */
5607  __pyx_t_1 = __pyx_v_self->mesh.nExteriorElementBoundaries_global;
5608  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
5609 
5610  /* "cmeshTools.pyx":112
5611  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5612  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5613  * self.max_nElements_node = self.mesh.max_nElements_node # <<<<<<<<<<<<<<
5614  * self.nEdges_global = self.mesh.nEdges_global
5615  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5616  */
5617  __pyx_t_1 = __pyx_v_self->mesh.max_nElements_node;
5618  __pyx_v_self->max_nElements_node = __pyx_t_1;
5619 
5620  /* "cmeshTools.pyx":113
5621  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5622  * self.max_nElements_node = self.mesh.max_nElements_node
5623  * self.nEdges_global = self.mesh.nEdges_global # <<<<<<<<<<<<<<
5624  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5625  * self.h = self.mesh.h
5626  */
5627  __pyx_t_1 = __pyx_v_self->mesh.nEdges_global;
5628  __pyx_v_self->nEdges_global = __pyx_t_1;
5629 
5630  /* "cmeshTools.pyx":114
5631  * self.max_nElements_node = self.mesh.max_nElements_node
5632  * self.nEdges_global = self.mesh.nEdges_global
5633  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node # <<<<<<<<<<<<<<
5634  * self.h = self.mesh.h
5635  * self.hMin = self.mesh.hMin
5636  */
5637  __pyx_t_1 = __pyx_v_self->mesh.max_nNodeNeighbors_node;
5638  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
5639 
5640  /* "cmeshTools.pyx":115
5641  * self.nEdges_global = self.mesh.nEdges_global
5642  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5643  * self.h = self.mesh.h # <<<<<<<<<<<<<<
5644  * self.hMin = self.mesh.hMin
5645  * self.sigmaMax = self.mesh.sigmaMax
5646  */
5647  __pyx_t_2 = __pyx_v_self->mesh.h;
5648  __pyx_v_self->h = __pyx_t_2;
5649 
5650  /* "cmeshTools.pyx":116
5651  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5652  * self.h = self.mesh.h
5653  * self.hMin = self.mesh.hMin # <<<<<<<<<<<<<<
5654  * self.sigmaMax = self.mesh.sigmaMax
5655  * self.volume = self.mesh.volume
5656  */
5657  __pyx_t_2 = __pyx_v_self->mesh.hMin;
5658  __pyx_v_self->hMin = __pyx_t_2;
5659 
5660  /* "cmeshTools.pyx":117
5661  * self.h = self.mesh.h
5662  * self.hMin = self.mesh.hMin
5663  * self.sigmaMax = self.mesh.sigmaMax # <<<<<<<<<<<<<<
5664  * self.volume = self.mesh.volume
5665  *
5666  */
5667  __pyx_t_2 = __pyx_v_self->mesh.sigmaMax;
5668  __pyx_v_self->sigmaMax = __pyx_t_2;
5669 
5670  /* "cmeshTools.pyx":118
5671  * self.hMin = self.mesh.hMin
5672  * self.sigmaMax = self.mesh.sigmaMax
5673  * self.volume = self.mesh.volume # <<<<<<<<<<<<<<
5674  *
5675  * def buildPythonMeshInterface(cmesh):
5676  */
5677  __pyx_t_2 = __pyx_v_self->mesh.volume;
5678  __pyx_v_self->volume = __pyx_t_2;
5679 
5680  /* "cmeshTools.pyx":102
5681  * self.volume = self.mesh.volume
5682  *
5683  * def buildPythonMeshInterfaceNoArrays(self): # <<<<<<<<<<<<<<
5684  * cdef int dim1
5685  * self.nElements_global = self.mesh.nElements_global
5686  */
5687 
5688  /* function exit code */
5689  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5690  __Pyx_XGIVEREF(__pyx_r);
5691  __Pyx_RefNannyFinishContext();
5692  return __pyx_r;
5693 }
5694 
5695 /* "cmeshTools.pxd":8
5696  * cdef cppm.Mesh mesh
5697  * cdef public:
5698  * cdef int nElements_global # <<<<<<<<<<<<<<
5699  * cdef int nNodes_global
5700  * cdef int nNodes_element
5701  */
5702 
5703 /* Python wrapper */
5704 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5705 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(PyObject *__pyx_v_self) {
5706  PyObject *__pyx_r = 0;
5707  __Pyx_RefNannyDeclarations
5708  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5709  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5710 
5711  /* function exit code */
5712  __Pyx_RefNannyFinishContext();
5713  return __pyx_r;
5714 }
5715 
5716 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5717  PyObject *__pyx_r = NULL;
5718  __Pyx_RefNannyDeclarations
5719  PyObject *__pyx_t_1 = NULL;
5720  int __pyx_lineno = 0;
5721  const char *__pyx_filename = NULL;
5722  int __pyx_clineno = 0;
5723  __Pyx_RefNannySetupContext("__get__", 0);
5724  __Pyx_XDECREF(__pyx_r);
5725  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
5726  __Pyx_GOTREF(__pyx_t_1);
5727  __pyx_r = __pyx_t_1;
5728  __pyx_t_1 = 0;
5729  goto __pyx_L0;
5730 
5731  /* function exit code */
5732  __pyx_L1_error:;
5733  __Pyx_XDECREF(__pyx_t_1);
5734  __Pyx_AddTraceback("cmeshTools.CMesh.nElements_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5735  __pyx_r = NULL;
5736  __pyx_L0:;
5737  __Pyx_XGIVEREF(__pyx_r);
5738  __Pyx_RefNannyFinishContext();
5739  return __pyx_r;
5740 }
5741 
5742 /* Python wrapper */
5743 static int __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5744 static int __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5745  int __pyx_r;
5746  __Pyx_RefNannyDeclarations
5747  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5748  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5749 
5750  /* function exit code */
5751  __Pyx_RefNannyFinishContext();
5752  return __pyx_r;
5753 }
5754 
5755 static int __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5756  int __pyx_r;
5757  __Pyx_RefNannyDeclarations
5758  int __pyx_t_1;
5759  int __pyx_lineno = 0;
5760  const char *__pyx_filename = NULL;
5761  int __pyx_clineno = 0;
5762  __Pyx_RefNannySetupContext("__set__", 0);
5763  __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)
5764  __pyx_v_self->nElements_global = __pyx_t_1;
5765 
5766  /* function exit code */
5767  __pyx_r = 0;
5768  goto __pyx_L0;
5769  __pyx_L1_error:;
5770  __Pyx_AddTraceback("cmeshTools.CMesh.nElements_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5771  __pyx_r = -1;
5772  __pyx_L0:;
5773  __Pyx_RefNannyFinishContext();
5774  return __pyx_r;
5775 }
5776 
5777 /* "cmeshTools.pxd":9
5778  * cdef public:
5779  * cdef int nElements_global
5780  * cdef int nNodes_global # <<<<<<<<<<<<<<
5781  * cdef int nNodes_element
5782  * cdef int nNodes_elementBoundary
5783  */
5784 
5785 /* Python wrapper */
5786 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5787 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(PyObject *__pyx_v_self) {
5788  PyObject *__pyx_r = 0;
5789  __Pyx_RefNannyDeclarations
5790  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5791  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5792 
5793  /* function exit code */
5794  __Pyx_RefNannyFinishContext();
5795  return __pyx_r;
5796 }
5797 
5798 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5799  PyObject *__pyx_r = NULL;
5800  __Pyx_RefNannyDeclarations
5801  PyObject *__pyx_t_1 = NULL;
5802  int __pyx_lineno = 0;
5803  const char *__pyx_filename = NULL;
5804  int __pyx_clineno = 0;
5805  __Pyx_RefNannySetupContext("__get__", 0);
5806  __Pyx_XDECREF(__pyx_r);
5807  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
5808  __Pyx_GOTREF(__pyx_t_1);
5809  __pyx_r = __pyx_t_1;
5810  __pyx_t_1 = 0;
5811  goto __pyx_L0;
5812 
5813  /* function exit code */
5814  __pyx_L1_error:;
5815  __Pyx_XDECREF(__pyx_t_1);
5816  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5817  __pyx_r = NULL;
5818  __pyx_L0:;
5819  __Pyx_XGIVEREF(__pyx_r);
5820  __Pyx_RefNannyFinishContext();
5821  return __pyx_r;
5822 }
5823 
5824 /* Python wrapper */
5825 static int __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5826 static int __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5827  int __pyx_r;
5828  __Pyx_RefNannyDeclarations
5829  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5830  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5831 
5832  /* function exit code */
5833  __Pyx_RefNannyFinishContext();
5834  return __pyx_r;
5835 }
5836 
5837 static int __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5838  int __pyx_r;
5839  __Pyx_RefNannyDeclarations
5840  int __pyx_t_1;
5841  int __pyx_lineno = 0;
5842  const char *__pyx_filename = NULL;
5843  int __pyx_clineno = 0;
5844  __Pyx_RefNannySetupContext("__set__", 0);
5845  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 9, __pyx_L1_error)
5846  __pyx_v_self->nNodes_global = __pyx_t_1;
5847 
5848  /* function exit code */
5849  __pyx_r = 0;
5850  goto __pyx_L0;
5851  __pyx_L1_error:;
5852  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5853  __pyx_r = -1;
5854  __pyx_L0:;
5855  __Pyx_RefNannyFinishContext();
5856  return __pyx_r;
5857 }
5858 
5859 /* "cmeshTools.pxd":10
5860  * cdef int nElements_global
5861  * cdef int nNodes_global
5862  * cdef int nNodes_element # <<<<<<<<<<<<<<
5863  * cdef int nNodes_elementBoundary
5864  * cdef int nElementBoundaries_element,
5865  */
5866 
5867 /* Python wrapper */
5868 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(PyObject *__pyx_v_self); /*proto*/
5869 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(PyObject *__pyx_v_self) {
5870  PyObject *__pyx_r = 0;
5871  __Pyx_RefNannyDeclarations
5872  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5873  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5874 
5875  /* function exit code */
5876  __Pyx_RefNannyFinishContext();
5877  return __pyx_r;
5878 }
5879 
5880 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5881  PyObject *__pyx_r = NULL;
5882  __Pyx_RefNannyDeclarations
5883  PyObject *__pyx_t_1 = NULL;
5884  int __pyx_lineno = 0;
5885  const char *__pyx_filename = NULL;
5886  int __pyx_clineno = 0;
5887  __Pyx_RefNannySetupContext("__get__", 0);
5888  __Pyx_XDECREF(__pyx_r);
5889  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
5890  __Pyx_GOTREF(__pyx_t_1);
5891  __pyx_r = __pyx_t_1;
5892  __pyx_t_1 = 0;
5893  goto __pyx_L0;
5894 
5895  /* function exit code */
5896  __pyx_L1_error:;
5897  __Pyx_XDECREF(__pyx_t_1);
5898  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5899  __pyx_r = NULL;
5900  __pyx_L0:;
5901  __Pyx_XGIVEREF(__pyx_r);
5902  __Pyx_RefNannyFinishContext();
5903  return __pyx_r;
5904 }
5905 
5906 /* Python wrapper */
5907 static int __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5908 static int __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5909  int __pyx_r;
5910  __Pyx_RefNannyDeclarations
5911  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5912  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5913 
5914  /* function exit code */
5915  __Pyx_RefNannyFinishContext();
5916  return __pyx_r;
5917 }
5918 
5919 static int __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5920  int __pyx_r;
5921  __Pyx_RefNannyDeclarations
5922  int __pyx_t_1;
5923  int __pyx_lineno = 0;
5924  const char *__pyx_filename = NULL;
5925  int __pyx_clineno = 0;
5926  __Pyx_RefNannySetupContext("__set__", 0);
5927  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
5928  __pyx_v_self->nNodes_element = __pyx_t_1;
5929 
5930  /* function exit code */
5931  __pyx_r = 0;
5932  goto __pyx_L0;
5933  __pyx_L1_error:;
5934  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_element.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5935  __pyx_r = -1;
5936  __pyx_L0:;
5937  __Pyx_RefNannyFinishContext();
5938  return __pyx_r;
5939 }
5940 
5941 /* "cmeshTools.pxd":11
5942  * cdef int nNodes_global
5943  * cdef int nNodes_element
5944  * cdef int nNodes_elementBoundary # <<<<<<<<<<<<<<
5945  * cdef int nElementBoundaries_element,
5946  * cdef int nElementBoundaries_global,
5947  */
5948 
5949 /* Python wrapper */
5950 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(PyObject *__pyx_v_self); /*proto*/
5951 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(PyObject *__pyx_v_self) {
5952  PyObject *__pyx_r = 0;
5953  __Pyx_RefNannyDeclarations
5954  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5955  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5956 
5957  /* function exit code */
5958  __Pyx_RefNannyFinishContext();
5959  return __pyx_r;
5960 }
5961 
5962 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5963  PyObject *__pyx_r = NULL;
5964  __Pyx_RefNannyDeclarations
5965  PyObject *__pyx_t_1 = NULL;
5966  int __pyx_lineno = 0;
5967  const char *__pyx_filename = NULL;
5968  int __pyx_clineno = 0;
5969  __Pyx_RefNannySetupContext("__get__", 0);
5970  __Pyx_XDECREF(__pyx_r);
5971  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_elementBoundary); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
5972  __Pyx_GOTREF(__pyx_t_1);
5973  __pyx_r = __pyx_t_1;
5974  __pyx_t_1 = 0;
5975  goto __pyx_L0;
5976 
5977  /* function exit code */
5978  __pyx_L1_error:;
5979  __Pyx_XDECREF(__pyx_t_1);
5980  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_elementBoundary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5981  __pyx_r = NULL;
5982  __pyx_L0:;
5983  __Pyx_XGIVEREF(__pyx_r);
5984  __Pyx_RefNannyFinishContext();
5985  return __pyx_r;
5986 }
5987 
5988 /* Python wrapper */
5989 static int __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5990 static int __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5991  int __pyx_r;
5992  __Pyx_RefNannyDeclarations
5993  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5994  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5995 
5996  /* function exit code */
5997  __Pyx_RefNannyFinishContext();
5998  return __pyx_r;
5999 }
6000 
6001 static int __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6002  int __pyx_r;
6003  __Pyx_RefNannyDeclarations
6004  int __pyx_t_1;
6005  int __pyx_lineno = 0;
6006  const char *__pyx_filename = NULL;
6007  int __pyx_clineno = 0;
6008  __Pyx_RefNannySetupContext("__set__", 0);
6009  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 11, __pyx_L1_error)
6010  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
6011 
6012  /* function exit code */
6013  __pyx_r = 0;
6014  goto __pyx_L0;
6015  __pyx_L1_error:;
6016  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_elementBoundary.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6017  __pyx_r = -1;
6018  __pyx_L0:;
6019  __Pyx_RefNannyFinishContext();
6020  return __pyx_r;
6021 }
6022 
6023 /* "cmeshTools.pxd":12
6024  * cdef int nNodes_element
6025  * cdef int nNodes_elementBoundary
6026  * cdef int nElementBoundaries_element, # <<<<<<<<<<<<<<
6027  * cdef int nElementBoundaries_global,
6028  * cdef int nInteriorElementBoundaries_global,
6029  */
6030 
6031 /* Python wrapper */
6032 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(PyObject *__pyx_v_self); /*proto*/
6033 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(PyObject *__pyx_v_self) {
6034  PyObject *__pyx_r = 0;
6035  __Pyx_RefNannyDeclarations
6036  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6037  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6038 
6039  /* function exit code */
6040  __Pyx_RefNannyFinishContext();
6041  return __pyx_r;
6042 }
6043 
6044 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6045  PyObject *__pyx_r = NULL;
6046  __Pyx_RefNannyDeclarations
6047  PyObject *__pyx_t_1 = NULL;
6048  int __pyx_lineno = 0;
6049  const char *__pyx_filename = NULL;
6050  int __pyx_clineno = 0;
6051  __Pyx_RefNannySetupContext("__get__", 0);
6052  __Pyx_XDECREF(__pyx_r);
6053  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElementBoundaries_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
6054  __Pyx_GOTREF(__pyx_t_1);
6055  __pyx_r = __pyx_t_1;
6056  __pyx_t_1 = 0;
6057  goto __pyx_L0;
6058 
6059  /* function exit code */
6060  __pyx_L1_error:;
6061  __Pyx_XDECREF(__pyx_t_1);
6062  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6063  __pyx_r = NULL;
6064  __pyx_L0:;
6065  __Pyx_XGIVEREF(__pyx_r);
6066  __Pyx_RefNannyFinishContext();
6067  return __pyx_r;
6068 }
6069 
6070 /* Python wrapper */
6071 static int __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6072 static int __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6073  int __pyx_r;
6074  __Pyx_RefNannyDeclarations
6075  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6076  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6077 
6078  /* function exit code */
6079  __Pyx_RefNannyFinishContext();
6080  return __pyx_r;
6081 }
6082 
6083 static int __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6084  int __pyx_r;
6085  __Pyx_RefNannyDeclarations
6086  int __pyx_t_1;
6087  int __pyx_lineno = 0;
6088  const char *__pyx_filename = NULL;
6089  int __pyx_clineno = 0;
6090  __Pyx_RefNannySetupContext("__set__", 0);
6091  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
6092  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
6093 
6094  /* function exit code */
6095  __pyx_r = 0;
6096  goto __pyx_L0;
6097  __pyx_L1_error:;
6098  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_element.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6099  __pyx_r = -1;
6100  __pyx_L0:;
6101  __Pyx_RefNannyFinishContext();
6102  return __pyx_r;
6103 }
6104 
6105 /* "cmeshTools.pxd":13
6106  * cdef int nNodes_elementBoundary
6107  * cdef int nElementBoundaries_element,
6108  * cdef int nElementBoundaries_global, # <<<<<<<<<<<<<<
6109  * cdef int nInteriorElementBoundaries_global,
6110  * cdef int nExteriorElementBoundaries_global,
6111  */
6112 
6113 /* Python wrapper */
6114 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6115 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6116  PyObject *__pyx_r = 0;
6117  __Pyx_RefNannyDeclarations
6118  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6119  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6120 
6121  /* function exit code */
6122  __Pyx_RefNannyFinishContext();
6123  return __pyx_r;
6124 }
6125 
6126 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6127  PyObject *__pyx_r = NULL;
6128  __Pyx_RefNannyDeclarations
6129  PyObject *__pyx_t_1 = NULL;
6130  int __pyx_lineno = 0;
6131  const char *__pyx_filename = NULL;
6132  int __pyx_clineno = 0;
6133  __Pyx_RefNannySetupContext("__get__", 0);
6134  __Pyx_XDECREF(__pyx_r);
6135  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
6136  __Pyx_GOTREF(__pyx_t_1);
6137  __pyx_r = __pyx_t_1;
6138  __pyx_t_1 = 0;
6139  goto __pyx_L0;
6140 
6141  /* function exit code */
6142  __pyx_L1_error:;
6143  __Pyx_XDECREF(__pyx_t_1);
6144  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6145  __pyx_r = NULL;
6146  __pyx_L0:;
6147  __Pyx_XGIVEREF(__pyx_r);
6148  __Pyx_RefNannyFinishContext();
6149  return __pyx_r;
6150 }
6151 
6152 /* Python wrapper */
6153 static int __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6154 static int __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6155  int __pyx_r;
6156  __Pyx_RefNannyDeclarations
6157  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6158  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6159 
6160  /* function exit code */
6161  __Pyx_RefNannyFinishContext();
6162  return __pyx_r;
6163 }
6164 
6165 static int __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6166  int __pyx_r;
6167  __Pyx_RefNannyDeclarations
6168  int __pyx_t_1;
6169  int __pyx_lineno = 0;
6170  const char *__pyx_filename = NULL;
6171  int __pyx_clineno = 0;
6172  __Pyx_RefNannySetupContext("__set__", 0);
6173  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 13, __pyx_L1_error)
6174  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
6175 
6176  /* function exit code */
6177  __pyx_r = 0;
6178  goto __pyx_L0;
6179  __pyx_L1_error:;
6180  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6181  __pyx_r = -1;
6182  __pyx_L0:;
6183  __Pyx_RefNannyFinishContext();
6184  return __pyx_r;
6185 }
6186 
6187 /* "cmeshTools.pxd":14
6188  * cdef int nElementBoundaries_element,
6189  * cdef int nElementBoundaries_global,
6190  * cdef int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6191  * cdef int nExteriorElementBoundaries_global,
6192  * cdef int max_nElements_node,
6193  */
6194 
6195 /* Python wrapper */
6196 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6197 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6198  PyObject *__pyx_r = 0;
6199  __Pyx_RefNannyDeclarations
6200  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6201  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6202 
6203  /* function exit code */
6204  __Pyx_RefNannyFinishContext();
6205  return __pyx_r;
6206 }
6207 
6208 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6209  PyObject *__pyx_r = NULL;
6210  __Pyx_RefNannyDeclarations
6211  PyObject *__pyx_t_1 = NULL;
6212  int __pyx_lineno = 0;
6213  const char *__pyx_filename = NULL;
6214  int __pyx_clineno = 0;
6215  __Pyx_RefNannySetupContext("__get__", 0);
6216  __Pyx_XDECREF(__pyx_r);
6217  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nInteriorElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
6218  __Pyx_GOTREF(__pyx_t_1);
6219  __pyx_r = __pyx_t_1;
6220  __pyx_t_1 = 0;
6221  goto __pyx_L0;
6222 
6223  /* function exit code */
6224  __pyx_L1_error:;
6225  __Pyx_XDECREF(__pyx_t_1);
6226  __Pyx_AddTraceback("cmeshTools.CMesh.nInteriorElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6227  __pyx_r = NULL;
6228  __pyx_L0:;
6229  __Pyx_XGIVEREF(__pyx_r);
6230  __Pyx_RefNannyFinishContext();
6231  return __pyx_r;
6232 }
6233 
6234 /* Python wrapper */
6235 static int __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6236 static int __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6237  int __pyx_r;
6238  __Pyx_RefNannyDeclarations
6239  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6240  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6241 
6242  /* function exit code */
6243  __Pyx_RefNannyFinishContext();
6244  return __pyx_r;
6245 }
6246 
6247 static int __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6248  int __pyx_r;
6249  __Pyx_RefNannyDeclarations
6250  int __pyx_t_1;
6251  int __pyx_lineno = 0;
6252  const char *__pyx_filename = NULL;
6253  int __pyx_clineno = 0;
6254  __Pyx_RefNannySetupContext("__set__", 0);
6255  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 14, __pyx_L1_error)
6256  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
6257 
6258  /* function exit code */
6259  __pyx_r = 0;
6260  goto __pyx_L0;
6261  __pyx_L1_error:;
6262  __Pyx_AddTraceback("cmeshTools.CMesh.nInteriorElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6263  __pyx_r = -1;
6264  __pyx_L0:;
6265  __Pyx_RefNannyFinishContext();
6266  return __pyx_r;
6267 }
6268 
6269 /* "cmeshTools.pxd":15
6270  * cdef int nElementBoundaries_global,
6271  * cdef int nInteriorElementBoundaries_global,
6272  * cdef int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6273  * cdef int max_nElements_node,
6274  * cdef int nEdges_global,
6275  */
6276 
6277 /* Python wrapper */
6278 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6279 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6280  PyObject *__pyx_r = 0;
6281  __Pyx_RefNannyDeclarations
6282  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6283  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6284 
6285  /* function exit code */
6286  __Pyx_RefNannyFinishContext();
6287  return __pyx_r;
6288 }
6289 
6290 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6291  PyObject *__pyx_r = NULL;
6292  __Pyx_RefNannyDeclarations
6293  PyObject *__pyx_t_1 = NULL;
6294  int __pyx_lineno = 0;
6295  const char *__pyx_filename = NULL;
6296  int __pyx_clineno = 0;
6297  __Pyx_RefNannySetupContext("__get__", 0);
6298  __Pyx_XDECREF(__pyx_r);
6299  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nExteriorElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
6300  __Pyx_GOTREF(__pyx_t_1);
6301  __pyx_r = __pyx_t_1;
6302  __pyx_t_1 = 0;
6303  goto __pyx_L0;
6304 
6305  /* function exit code */
6306  __pyx_L1_error:;
6307  __Pyx_XDECREF(__pyx_t_1);
6308  __Pyx_AddTraceback("cmeshTools.CMesh.nExteriorElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6309  __pyx_r = NULL;
6310  __pyx_L0:;
6311  __Pyx_XGIVEREF(__pyx_r);
6312  __Pyx_RefNannyFinishContext();
6313  return __pyx_r;
6314 }
6315 
6316 /* Python wrapper */
6317 static int __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6318 static int __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6319  int __pyx_r;
6320  __Pyx_RefNannyDeclarations
6321  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6322  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6323 
6324  /* function exit code */
6325  __Pyx_RefNannyFinishContext();
6326  return __pyx_r;
6327 }
6328 
6329 static int __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6330  int __pyx_r;
6331  __Pyx_RefNannyDeclarations
6332  int __pyx_t_1;
6333  int __pyx_lineno = 0;
6334  const char *__pyx_filename = NULL;
6335  int __pyx_clineno = 0;
6336  __Pyx_RefNannySetupContext("__set__", 0);
6337  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 15, __pyx_L1_error)
6338  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
6339 
6340  /* function exit code */
6341  __pyx_r = 0;
6342  goto __pyx_L0;
6343  __pyx_L1_error:;
6344  __Pyx_AddTraceback("cmeshTools.CMesh.nExteriorElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6345  __pyx_r = -1;
6346  __pyx_L0:;
6347  __Pyx_RefNannyFinishContext();
6348  return __pyx_r;
6349 }
6350 
6351 /* "cmeshTools.pxd":16
6352  * cdef int nInteriorElementBoundaries_global,
6353  * cdef int nExteriorElementBoundaries_global,
6354  * cdef int max_nElements_node, # <<<<<<<<<<<<<<
6355  * cdef int nEdges_global,
6356  * cdef int max_nNodeNeighbors_node,
6357  */
6358 
6359 /* Python wrapper */
6360 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(PyObject *__pyx_v_self); /*proto*/
6361 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(PyObject *__pyx_v_self) {
6362  PyObject *__pyx_r = 0;
6363  __Pyx_RefNannyDeclarations
6364  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6365  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6366 
6367  /* function exit code */
6368  __Pyx_RefNannyFinishContext();
6369  return __pyx_r;
6370 }
6371 
6372 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6373  PyObject *__pyx_r = NULL;
6374  __Pyx_RefNannyDeclarations
6375  PyObject *__pyx_t_1 = NULL;
6376  int __pyx_lineno = 0;
6377  const char *__pyx_filename = NULL;
6378  int __pyx_clineno = 0;
6379  __Pyx_RefNannySetupContext("__get__", 0);
6380  __Pyx_XDECREF(__pyx_r);
6381  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_nElements_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 16, __pyx_L1_error)
6382  __Pyx_GOTREF(__pyx_t_1);
6383  __pyx_r = __pyx_t_1;
6384  __pyx_t_1 = 0;
6385  goto __pyx_L0;
6386 
6387  /* function exit code */
6388  __pyx_L1_error:;
6389  __Pyx_XDECREF(__pyx_t_1);
6390  __Pyx_AddTraceback("cmeshTools.CMesh.max_nElements_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6391  __pyx_r = NULL;
6392  __pyx_L0:;
6393  __Pyx_XGIVEREF(__pyx_r);
6394  __Pyx_RefNannyFinishContext();
6395  return __pyx_r;
6396 }
6397 
6398 /* Python wrapper */
6399 static int __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6400 static int __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6401  int __pyx_r;
6402  __Pyx_RefNannyDeclarations
6403  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6404  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6405 
6406  /* function exit code */
6407  __Pyx_RefNannyFinishContext();
6408  return __pyx_r;
6409 }
6410 
6411 static int __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6412  int __pyx_r;
6413  __Pyx_RefNannyDeclarations
6414  int __pyx_t_1;
6415  int __pyx_lineno = 0;
6416  const char *__pyx_filename = NULL;
6417  int __pyx_clineno = 0;
6418  __Pyx_RefNannySetupContext("__set__", 0);
6419  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L1_error)
6420  __pyx_v_self->max_nElements_node = __pyx_t_1;
6421 
6422  /* function exit code */
6423  __pyx_r = 0;
6424  goto __pyx_L0;
6425  __pyx_L1_error:;
6426  __Pyx_AddTraceback("cmeshTools.CMesh.max_nElements_node.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6427  __pyx_r = -1;
6428  __pyx_L0:;
6429  __Pyx_RefNannyFinishContext();
6430  return __pyx_r;
6431 }
6432 
6433 /* "cmeshTools.pxd":17
6434  * cdef int nExteriorElementBoundaries_global,
6435  * cdef int max_nElements_node,
6436  * cdef int nEdges_global, # <<<<<<<<<<<<<<
6437  * cdef int max_nNodeNeighbors_node,
6438  * # cdef int[:,:] elementNodesArray,
6439  */
6440 
6441 /* Python wrapper */
6442 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6443 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(PyObject *__pyx_v_self) {
6444  PyObject *__pyx_r = 0;
6445  __Pyx_RefNannyDeclarations
6446  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6447  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6448 
6449  /* function exit code */
6450  __Pyx_RefNannyFinishContext();
6451  return __pyx_r;
6452 }
6453 
6454 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6455  PyObject *__pyx_r = NULL;
6456  __Pyx_RefNannyDeclarations
6457  PyObject *__pyx_t_1 = NULL;
6458  int __pyx_lineno = 0;
6459  const char *__pyx_filename = NULL;
6460  int __pyx_clineno = 0;
6461  __Pyx_RefNannySetupContext("__get__", 0);
6462  __Pyx_XDECREF(__pyx_r);
6463  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nEdges_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
6464  __Pyx_GOTREF(__pyx_t_1);
6465  __pyx_r = __pyx_t_1;
6466  __pyx_t_1 = 0;
6467  goto __pyx_L0;
6468 
6469  /* function exit code */
6470  __pyx_L1_error:;
6471  __Pyx_XDECREF(__pyx_t_1);
6472  __Pyx_AddTraceback("cmeshTools.CMesh.nEdges_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6473  __pyx_r = NULL;
6474  __pyx_L0:;
6475  __Pyx_XGIVEREF(__pyx_r);
6476  __Pyx_RefNannyFinishContext();
6477  return __pyx_r;
6478 }
6479 
6480 /* Python wrapper */
6481 static int __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6482 static int __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6483  int __pyx_r;
6484  __Pyx_RefNannyDeclarations
6485  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6486  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6487 
6488  /* function exit code */
6489  __Pyx_RefNannyFinishContext();
6490  return __pyx_r;
6491 }
6492 
6493 static int __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6494  int __pyx_r;
6495  __Pyx_RefNannyDeclarations
6496  int __pyx_t_1;
6497  int __pyx_lineno = 0;
6498  const char *__pyx_filename = NULL;
6499  int __pyx_clineno = 0;
6500  __Pyx_RefNannySetupContext("__set__", 0);
6501  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 17, __pyx_L1_error)
6502  __pyx_v_self->nEdges_global = __pyx_t_1;
6503 
6504  /* function exit code */
6505  __pyx_r = 0;
6506  goto __pyx_L0;
6507  __pyx_L1_error:;
6508  __Pyx_AddTraceback("cmeshTools.CMesh.nEdges_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6509  __pyx_r = -1;
6510  __pyx_L0:;
6511  __Pyx_RefNannyFinishContext();
6512  return __pyx_r;
6513 }
6514 
6515 /* "cmeshTools.pxd":18
6516  * cdef int max_nElements_node,
6517  * cdef int nEdges_global,
6518  * cdef int max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
6519  * # cdef int[:,:] elementNodesArray,
6520  * # cdef int[:] nodeElementsArray,
6521  */
6522 
6523 /* Python wrapper */
6524 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(PyObject *__pyx_v_self); /*proto*/
6525 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(PyObject *__pyx_v_self) {
6526  PyObject *__pyx_r = 0;
6527  __Pyx_RefNannyDeclarations
6528  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6529  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6530 
6531  /* function exit code */
6532  __Pyx_RefNannyFinishContext();
6533  return __pyx_r;
6534 }
6535 
6536 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6537  PyObject *__pyx_r = NULL;
6538  __Pyx_RefNannyDeclarations
6539  PyObject *__pyx_t_1 = NULL;
6540  int __pyx_lineno = 0;
6541  const char *__pyx_filename = NULL;
6542  int __pyx_clineno = 0;
6543  __Pyx_RefNannySetupContext("__get__", 0);
6544  __Pyx_XDECREF(__pyx_r);
6545  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_nNodeNeighbors_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 18, __pyx_L1_error)
6546  __Pyx_GOTREF(__pyx_t_1);
6547  __pyx_r = __pyx_t_1;
6548  __pyx_t_1 = 0;
6549  goto __pyx_L0;
6550 
6551  /* function exit code */
6552  __pyx_L1_error:;
6553  __Pyx_XDECREF(__pyx_t_1);
6554  __Pyx_AddTraceback("cmeshTools.CMesh.max_nNodeNeighbors_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6555  __pyx_r = NULL;
6556  __pyx_L0:;
6557  __Pyx_XGIVEREF(__pyx_r);
6558  __Pyx_RefNannyFinishContext();
6559  return __pyx_r;
6560 }
6561 
6562 /* Python wrapper */
6563 static int __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6564 static int __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6565  int __pyx_r;
6566  __Pyx_RefNannyDeclarations
6567  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6568  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6569 
6570  /* function exit code */
6571  __Pyx_RefNannyFinishContext();
6572  return __pyx_r;
6573 }
6574 
6575 static int __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6576  int __pyx_r;
6577  __Pyx_RefNannyDeclarations
6578  int __pyx_t_1;
6579  int __pyx_lineno = 0;
6580  const char *__pyx_filename = NULL;
6581  int __pyx_clineno = 0;
6582  __Pyx_RefNannySetupContext("__set__", 0);
6583  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 18, __pyx_L1_error)
6584  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
6585 
6586  /* function exit code */
6587  __pyx_r = 0;
6588  goto __pyx_L0;
6589  __pyx_L1_error:;
6590  __Pyx_AddTraceback("cmeshTools.CMesh.max_nNodeNeighbors_node.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6591  __pyx_r = -1;
6592  __pyx_L0:;
6593  __Pyx_RefNannyFinishContext();
6594  return __pyx_r;
6595 }
6596 
6597 /* "cmeshTools.pxd":37
6598  * # cdef double[:,:] nodeArray,
6599  *
6600  * cdef np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
6601  * cdef np.ndarray nodeElementsArray,
6602  * cdef np.ndarray nodeElementOffsets,
6603  */
6604 
6605 /* Python wrapper */
6606 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6607 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(PyObject *__pyx_v_self) {
6608  PyObject *__pyx_r = 0;
6609  __Pyx_RefNannyDeclarations
6610  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6611  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6612 
6613  /* function exit code */
6614  __Pyx_RefNannyFinishContext();
6615  return __pyx_r;
6616 }
6617 
6618 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6619  PyObject *__pyx_r = NULL;
6620  __Pyx_RefNannyDeclarations
6621  __Pyx_RefNannySetupContext("__get__", 0);
6622  __Pyx_XDECREF(__pyx_r);
6623  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementNodesArray));
6624  __pyx_r = ((PyObject *)__pyx_v_self->elementNodesArray);
6625  goto __pyx_L0;
6626 
6627  /* function exit code */
6628  __pyx_L0:;
6629  __Pyx_XGIVEREF(__pyx_r);
6630  __Pyx_RefNannyFinishContext();
6631  return __pyx_r;
6632 }
6633 
6634 /* Python wrapper */
6635 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6636 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6637  int __pyx_r;
6638  __Pyx_RefNannyDeclarations
6639  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6640  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6641 
6642  /* function exit code */
6643  __Pyx_RefNannyFinishContext();
6644  return __pyx_r;
6645 }
6646 
6647 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6648  int __pyx_r;
6649  __Pyx_RefNannyDeclarations
6650  PyObject *__pyx_t_1 = NULL;
6651  int __pyx_lineno = 0;
6652  const char *__pyx_filename = NULL;
6653  int __pyx_clineno = 0;
6654  __Pyx_RefNannySetupContext("__set__", 0);
6655  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 37, __pyx_L1_error)
6656  __pyx_t_1 = __pyx_v_value;
6657  __Pyx_INCREF(__pyx_t_1);
6658  __Pyx_GIVEREF(__pyx_t_1);
6659  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
6660  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
6661  __pyx_v_self->elementNodesArray = ((PyArrayObject *)__pyx_t_1);
6662  __pyx_t_1 = 0;
6663 
6664  /* function exit code */
6665  __pyx_r = 0;
6666  goto __pyx_L0;
6667  __pyx_L1_error:;
6668  __Pyx_XDECREF(__pyx_t_1);
6669  __Pyx_AddTraceback("cmeshTools.CMesh.elementNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6670  __pyx_r = -1;
6671  __pyx_L0:;
6672  __Pyx_RefNannyFinishContext();
6673  return __pyx_r;
6674 }
6675 
6676 /* Python wrapper */
6677 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6678 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(PyObject *__pyx_v_self) {
6679  int __pyx_r;
6680  __Pyx_RefNannyDeclarations
6681  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6682  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6683 
6684  /* function exit code */
6685  __Pyx_RefNannyFinishContext();
6686  return __pyx_r;
6687 }
6688 
6689 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6690  int __pyx_r;
6691  __Pyx_RefNannyDeclarations
6692  __Pyx_RefNannySetupContext("__del__", 0);
6693  __Pyx_INCREF(Py_None);
6694  __Pyx_GIVEREF(Py_None);
6695  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
6696  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
6697  __pyx_v_self->elementNodesArray = ((PyArrayObject *)Py_None);
6698 
6699  /* function exit code */
6700  __pyx_r = 0;
6701  __Pyx_RefNannyFinishContext();
6702  return __pyx_r;
6703 }
6704 
6705 /* "cmeshTools.pxd":38
6706  *
6707  * cdef np.ndarray elementNodesArray,
6708  * cdef np.ndarray nodeElementsArray, # <<<<<<<<<<<<<<
6709  * cdef np.ndarray nodeElementOffsets,
6710  * cdef np.ndarray elementNeighborsArray,
6711  */
6712 
6713 /* Python wrapper */
6714 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6715 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(PyObject *__pyx_v_self) {
6716  PyObject *__pyx_r = 0;
6717  __Pyx_RefNannyDeclarations
6718  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6719  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6720 
6721  /* function exit code */
6722  __Pyx_RefNannyFinishContext();
6723  return __pyx_r;
6724 }
6725 
6726 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6727  PyObject *__pyx_r = NULL;
6728  __Pyx_RefNannyDeclarations
6729  __Pyx_RefNannySetupContext("__get__", 0);
6730  __Pyx_XDECREF(__pyx_r);
6731  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6732  __pyx_r = ((PyObject *)__pyx_v_self->nodeElementsArray);
6733  goto __pyx_L0;
6734 
6735  /* function exit code */
6736  __pyx_L0:;
6737  __Pyx_XGIVEREF(__pyx_r);
6738  __Pyx_RefNannyFinishContext();
6739  return __pyx_r;
6740 }
6741 
6742 /* Python wrapper */
6743 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6744 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6745  int __pyx_r;
6746  __Pyx_RefNannyDeclarations
6747  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6748  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6749 
6750  /* function exit code */
6751  __Pyx_RefNannyFinishContext();
6752  return __pyx_r;
6753 }
6754 
6755 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6756  int __pyx_r;
6757  __Pyx_RefNannyDeclarations
6758  PyObject *__pyx_t_1 = NULL;
6759  int __pyx_lineno = 0;
6760  const char *__pyx_filename = NULL;
6761  int __pyx_clineno = 0;
6762  __Pyx_RefNannySetupContext("__set__", 0);
6763  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 38, __pyx_L1_error)
6764  __pyx_t_1 = __pyx_v_value;
6765  __Pyx_INCREF(__pyx_t_1);
6766  __Pyx_GIVEREF(__pyx_t_1);
6767  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
6768  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6769  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_1);
6770  __pyx_t_1 = 0;
6771 
6772  /* function exit code */
6773  __pyx_r = 0;
6774  goto __pyx_L0;
6775  __pyx_L1_error:;
6776  __Pyx_XDECREF(__pyx_t_1);
6777  __Pyx_AddTraceback("cmeshTools.CMesh.nodeElementsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6778  __pyx_r = -1;
6779  __pyx_L0:;
6780  __Pyx_RefNannyFinishContext();
6781  return __pyx_r;
6782 }
6783 
6784 /* Python wrapper */
6785 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6786 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(PyObject *__pyx_v_self) {
6787  int __pyx_r;
6788  __Pyx_RefNannyDeclarations
6789  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6790  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6791 
6792  /* function exit code */
6793  __Pyx_RefNannyFinishContext();
6794  return __pyx_r;
6795 }
6796 
6797 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6798  int __pyx_r;
6799  __Pyx_RefNannyDeclarations
6800  __Pyx_RefNannySetupContext("__del__", 0);
6801  __Pyx_INCREF(Py_None);
6802  __Pyx_GIVEREF(Py_None);
6803  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
6804  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6805  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)Py_None);
6806 
6807  /* function exit code */
6808  __pyx_r = 0;
6809  __Pyx_RefNannyFinishContext();
6810  return __pyx_r;
6811 }
6812 
6813 /* "cmeshTools.pxd":39
6814  * cdef np.ndarray elementNodesArray,
6815  * cdef np.ndarray nodeElementsArray,
6816  * cdef np.ndarray nodeElementOffsets, # <<<<<<<<<<<<<<
6817  * cdef np.ndarray elementNeighborsArray,
6818  * cdef np.ndarray elementBoundariesArray,
6819  */
6820 
6821 /* Python wrapper */
6822 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
6823 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(PyObject *__pyx_v_self) {
6824  PyObject *__pyx_r = 0;
6825  __Pyx_RefNannyDeclarations
6826  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6827  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6828 
6829  /* function exit code */
6830  __Pyx_RefNannyFinishContext();
6831  return __pyx_r;
6832 }
6833 
6834 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6835  PyObject *__pyx_r = NULL;
6836  __Pyx_RefNannyDeclarations
6837  __Pyx_RefNannySetupContext("__get__", 0);
6838  __Pyx_XDECREF(__pyx_r);
6839  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6840  __pyx_r = ((PyObject *)__pyx_v_self->nodeElementOffsets);
6841  goto __pyx_L0;
6842 
6843  /* function exit code */
6844  __pyx_L0:;
6845  __Pyx_XGIVEREF(__pyx_r);
6846  __Pyx_RefNannyFinishContext();
6847  return __pyx_r;
6848 }
6849 
6850 /* Python wrapper */
6851 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6852 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6853  int __pyx_r;
6854  __Pyx_RefNannyDeclarations
6855  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6856  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6857 
6858  /* function exit code */
6859  __Pyx_RefNannyFinishContext();
6860  return __pyx_r;
6861 }
6862 
6863 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6864  int __pyx_r;
6865  __Pyx_RefNannyDeclarations
6866  PyObject *__pyx_t_1 = NULL;
6867  int __pyx_lineno = 0;
6868  const char *__pyx_filename = NULL;
6869  int __pyx_clineno = 0;
6870  __Pyx_RefNannySetupContext("__set__", 0);
6871  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 39, __pyx_L1_error)
6872  __pyx_t_1 = __pyx_v_value;
6873  __Pyx_INCREF(__pyx_t_1);
6874  __Pyx_GIVEREF(__pyx_t_1);
6875  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
6876  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6877  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_1);
6878  __pyx_t_1 = 0;
6879 
6880  /* function exit code */
6881  __pyx_r = 0;
6882  goto __pyx_L0;
6883  __pyx_L1_error:;
6884  __Pyx_XDECREF(__pyx_t_1);
6885  __Pyx_AddTraceback("cmeshTools.CMesh.nodeElementOffsets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6886  __pyx_r = -1;
6887  __pyx_L0:;
6888  __Pyx_RefNannyFinishContext();
6889  return __pyx_r;
6890 }
6891 
6892 /* Python wrapper */
6893 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(PyObject *__pyx_v_self); /*proto*/
6894 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(PyObject *__pyx_v_self) {
6895  int __pyx_r;
6896  __Pyx_RefNannyDeclarations
6897  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6898  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6899 
6900  /* function exit code */
6901  __Pyx_RefNannyFinishContext();
6902  return __pyx_r;
6903 }
6904 
6905 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6906  int __pyx_r;
6907  __Pyx_RefNannyDeclarations
6908  __Pyx_RefNannySetupContext("__del__", 0);
6909  __Pyx_INCREF(Py_None);
6910  __Pyx_GIVEREF(Py_None);
6911  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
6912  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6913  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)Py_None);
6914 
6915  /* function exit code */
6916  __pyx_r = 0;
6917  __Pyx_RefNannyFinishContext();
6918  return __pyx_r;
6919 }
6920 
6921 /* "cmeshTools.pxd":40
6922  * cdef np.ndarray nodeElementsArray,
6923  * cdef np.ndarray nodeElementOffsets,
6924  * cdef np.ndarray elementNeighborsArray, # <<<<<<<<<<<<<<
6925  * cdef np.ndarray elementBoundariesArray,
6926  * cdef np.ndarray elementBoundaryNodesArray,
6927  */
6928 
6929 /* Python wrapper */
6930 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6931 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(PyObject *__pyx_v_self) {
6932  PyObject *__pyx_r = 0;
6933  __Pyx_RefNannyDeclarations
6934  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6935  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6936 
6937  /* function exit code */
6938  __Pyx_RefNannyFinishContext();
6939  return __pyx_r;
6940 }
6941 
6942 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6943  PyObject *__pyx_r = NULL;
6944  __Pyx_RefNannyDeclarations
6945  __Pyx_RefNannySetupContext("__get__", 0);
6946  __Pyx_XDECREF(__pyx_r);
6947  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6948  __pyx_r = ((PyObject *)__pyx_v_self->elementNeighborsArray);
6949  goto __pyx_L0;
6950 
6951  /* function exit code */
6952  __pyx_L0:;
6953  __Pyx_XGIVEREF(__pyx_r);
6954  __Pyx_RefNannyFinishContext();
6955  return __pyx_r;
6956 }
6957 
6958 /* Python wrapper */
6959 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6960 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6961  int __pyx_r;
6962  __Pyx_RefNannyDeclarations
6963  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6964  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6965 
6966  /* function exit code */
6967  __Pyx_RefNannyFinishContext();
6968  return __pyx_r;
6969 }
6970 
6971 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6972  int __pyx_r;
6973  __Pyx_RefNannyDeclarations
6974  PyObject *__pyx_t_1 = NULL;
6975  int __pyx_lineno = 0;
6976  const char *__pyx_filename = NULL;
6977  int __pyx_clineno = 0;
6978  __Pyx_RefNannySetupContext("__set__", 0);
6979  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 40, __pyx_L1_error)
6980  __pyx_t_1 = __pyx_v_value;
6981  __Pyx_INCREF(__pyx_t_1);
6982  __Pyx_GIVEREF(__pyx_t_1);
6983  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
6984  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6985  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)__pyx_t_1);
6986  __pyx_t_1 = 0;
6987 
6988  /* function exit code */
6989  __pyx_r = 0;
6990  goto __pyx_L0;
6991  __pyx_L1_error:;
6992  __Pyx_XDECREF(__pyx_t_1);
6993  __Pyx_AddTraceback("cmeshTools.CMesh.elementNeighborsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6994  __pyx_r = -1;
6995  __pyx_L0:;
6996  __Pyx_RefNannyFinishContext();
6997  return __pyx_r;
6998 }
6999 
7000 /* Python wrapper */
7001 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7002 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(PyObject *__pyx_v_self) {
7003  int __pyx_r;
7004  __Pyx_RefNannyDeclarations
7005  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7006  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7007 
7008  /* function exit code */
7009  __Pyx_RefNannyFinishContext();
7010  return __pyx_r;
7011 }
7012 
7013 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7014  int __pyx_r;
7015  __Pyx_RefNannyDeclarations
7016  __Pyx_RefNannySetupContext("__del__", 0);
7017  __Pyx_INCREF(Py_None);
7018  __Pyx_GIVEREF(Py_None);
7019  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
7020  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
7021  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)Py_None);
7022 
7023  /* function exit code */
7024  __pyx_r = 0;
7025  __Pyx_RefNannyFinishContext();
7026  return __pyx_r;
7027 }
7028 
7029 /* "cmeshTools.pxd":41
7030  * cdef np.ndarray nodeElementOffsets,
7031  * cdef np.ndarray elementNeighborsArray,
7032  * cdef np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
7033  * cdef np.ndarray elementBoundaryNodesArray,
7034  * cdef np.ndarray elementBoundaryElementsArray,
7035  */
7036 
7037 /* Python wrapper */
7038 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7039 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7040  PyObject *__pyx_r = 0;
7041  __Pyx_RefNannyDeclarations
7042  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7043  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7044 
7045  /* function exit code */
7046  __Pyx_RefNannyFinishContext();
7047  return __pyx_r;
7048 }
7049 
7050 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7051  PyObject *__pyx_r = NULL;
7052  __Pyx_RefNannyDeclarations
7053  __Pyx_RefNannySetupContext("__get__", 0);
7054  __Pyx_XDECREF(__pyx_r);
7055  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
7056  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundariesArray);
7057  goto __pyx_L0;
7058 
7059  /* function exit code */
7060  __pyx_L0:;
7061  __Pyx_XGIVEREF(__pyx_r);
7062  __Pyx_RefNannyFinishContext();
7063  return __pyx_r;
7064 }
7065 
7066 /* Python wrapper */
7067 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7068 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7069  int __pyx_r;
7070  __Pyx_RefNannyDeclarations
7071  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7072  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7073 
7074  /* function exit code */
7075  __Pyx_RefNannyFinishContext();
7076  return __pyx_r;
7077 }
7078 
7079 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7080  int __pyx_r;
7081  __Pyx_RefNannyDeclarations
7082  PyObject *__pyx_t_1 = NULL;
7083  int __pyx_lineno = 0;
7084  const char *__pyx_filename = NULL;
7085  int __pyx_clineno = 0;
7086  __Pyx_RefNannySetupContext("__set__", 0);
7087  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 41, __pyx_L1_error)
7088  __pyx_t_1 = __pyx_v_value;
7089  __Pyx_INCREF(__pyx_t_1);
7090  __Pyx_GIVEREF(__pyx_t_1);
7091  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
7092  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
7093  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7094  __pyx_t_1 = 0;
7095 
7096  /* function exit code */
7097  __pyx_r = 0;
7098  goto __pyx_L0;
7099  __pyx_L1_error:;
7100  __Pyx_XDECREF(__pyx_t_1);
7101  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7102  __pyx_r = -1;
7103  __pyx_L0:;
7104  __Pyx_RefNannyFinishContext();
7105  return __pyx_r;
7106 }
7107 
7108 /* Python wrapper */
7109 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7110 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7111  int __pyx_r;
7112  __Pyx_RefNannyDeclarations
7113  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7114  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7115 
7116  /* function exit code */
7117  __Pyx_RefNannyFinishContext();
7118  return __pyx_r;
7119 }
7120 
7121 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7122  int __pyx_r;
7123  __Pyx_RefNannyDeclarations
7124  __Pyx_RefNannySetupContext("__del__", 0);
7125  __Pyx_INCREF(Py_None);
7126  __Pyx_GIVEREF(Py_None);
7127  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
7128  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
7129  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)Py_None);
7130 
7131  /* function exit code */
7132  __pyx_r = 0;
7133  __Pyx_RefNannyFinishContext();
7134  return __pyx_r;
7135 }
7136 
7137 /* "cmeshTools.pxd":42
7138  * cdef np.ndarray elementNeighborsArray,
7139  * cdef np.ndarray elementBoundariesArray,
7140  * cdef np.ndarray elementBoundaryNodesArray, # <<<<<<<<<<<<<<
7141  * cdef np.ndarray elementBoundaryElementsArray,
7142  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7143  */
7144 
7145 /* Python wrapper */
7146 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7147 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(PyObject *__pyx_v_self) {
7148  PyObject *__pyx_r = 0;
7149  __Pyx_RefNannyDeclarations
7150  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7151  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7152 
7153  /* function exit code */
7154  __Pyx_RefNannyFinishContext();
7155  return __pyx_r;
7156 }
7157 
7158 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7159  PyObject *__pyx_r = NULL;
7160  __Pyx_RefNannyDeclarations
7161  __Pyx_RefNannySetupContext("__get__", 0);
7162  __Pyx_XDECREF(__pyx_r);
7163  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
7164  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryNodesArray);
7165  goto __pyx_L0;
7166 
7167  /* function exit code */
7168  __pyx_L0:;
7169  __Pyx_XGIVEREF(__pyx_r);
7170  __Pyx_RefNannyFinishContext();
7171  return __pyx_r;
7172 }
7173 
7174 /* Python wrapper */
7175 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7176 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7177  int __pyx_r;
7178  __Pyx_RefNannyDeclarations
7179  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7180  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7181 
7182  /* function exit code */
7183  __Pyx_RefNannyFinishContext();
7184  return __pyx_r;
7185 }
7186 
7187 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7188  int __pyx_r;
7189  __Pyx_RefNannyDeclarations
7190  PyObject *__pyx_t_1 = NULL;
7191  int __pyx_lineno = 0;
7192  const char *__pyx_filename = NULL;
7193  int __pyx_clineno = 0;
7194  __Pyx_RefNannySetupContext("__set__", 0);
7195  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 42, __pyx_L1_error)
7196  __pyx_t_1 = __pyx_v_value;
7197  __Pyx_INCREF(__pyx_t_1);
7198  __Pyx_GIVEREF(__pyx_t_1);
7199  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
7200  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
7201  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)__pyx_t_1);
7202  __pyx_t_1 = 0;
7203 
7204  /* function exit code */
7205  __pyx_r = 0;
7206  goto __pyx_L0;
7207  __pyx_L1_error:;
7208  __Pyx_XDECREF(__pyx_t_1);
7209  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7210  __pyx_r = -1;
7211  __pyx_L0:;
7212  __Pyx_RefNannyFinishContext();
7213  return __pyx_r;
7214 }
7215 
7216 /* Python wrapper */
7217 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7218 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(PyObject *__pyx_v_self) {
7219  int __pyx_r;
7220  __Pyx_RefNannyDeclarations
7221  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7222  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7223 
7224  /* function exit code */
7225  __Pyx_RefNannyFinishContext();
7226  return __pyx_r;
7227 }
7228 
7229 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7230  int __pyx_r;
7231  __Pyx_RefNannyDeclarations
7232  __Pyx_RefNannySetupContext("__del__", 0);
7233  __Pyx_INCREF(Py_None);
7234  __Pyx_GIVEREF(Py_None);
7235  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
7236  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
7237  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)Py_None);
7238 
7239  /* function exit code */
7240  __pyx_r = 0;
7241  __Pyx_RefNannyFinishContext();
7242  return __pyx_r;
7243 }
7244 
7245 /* "cmeshTools.pxd":43
7246  * cdef np.ndarray elementBoundariesArray,
7247  * cdef np.ndarray elementBoundaryNodesArray,
7248  * cdef np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
7249  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7250  * cdef np.ndarray interiorElementBoundariesArray,
7251  */
7252 
7253 /* Python wrapper */
7254 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7255 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(PyObject *__pyx_v_self) {
7256  PyObject *__pyx_r = 0;
7257  __Pyx_RefNannyDeclarations
7258  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7259  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7260 
7261  /* function exit code */
7262  __Pyx_RefNannyFinishContext();
7263  return __pyx_r;
7264 }
7265 
7266 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7267  PyObject *__pyx_r = NULL;
7268  __Pyx_RefNannyDeclarations
7269  __Pyx_RefNannySetupContext("__get__", 0);
7270  __Pyx_XDECREF(__pyx_r);
7271  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7272  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryElementsArray);
7273  goto __pyx_L0;
7274 
7275  /* function exit code */
7276  __pyx_L0:;
7277  __Pyx_XGIVEREF(__pyx_r);
7278  __Pyx_RefNannyFinishContext();
7279  return __pyx_r;
7280 }
7281 
7282 /* Python wrapper */
7283 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7284 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7285  int __pyx_r;
7286  __Pyx_RefNannyDeclarations
7287  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7288  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7289 
7290  /* function exit code */
7291  __Pyx_RefNannyFinishContext();
7292  return __pyx_r;
7293 }
7294 
7295 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7296  int __pyx_r;
7297  __Pyx_RefNannyDeclarations
7298  PyObject *__pyx_t_1 = NULL;
7299  int __pyx_lineno = 0;
7300  const char *__pyx_filename = NULL;
7301  int __pyx_clineno = 0;
7302  __Pyx_RefNannySetupContext("__set__", 0);
7303  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 43, __pyx_L1_error)
7304  __pyx_t_1 = __pyx_v_value;
7305  __Pyx_INCREF(__pyx_t_1);
7306  __Pyx_GIVEREF(__pyx_t_1);
7307  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
7308  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7309  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)__pyx_t_1);
7310  __pyx_t_1 = 0;
7311 
7312  /* function exit code */
7313  __pyx_r = 0;
7314  goto __pyx_L0;
7315  __pyx_L1_error:;
7316  __Pyx_XDECREF(__pyx_t_1);
7317  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryElementsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7318  __pyx_r = -1;
7319  __pyx_L0:;
7320  __Pyx_RefNannyFinishContext();
7321  return __pyx_r;
7322 }
7323 
7324 /* Python wrapper */
7325 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7326 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(PyObject *__pyx_v_self) {
7327  int __pyx_r;
7328  __Pyx_RefNannyDeclarations
7329  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7330  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7331 
7332  /* function exit code */
7333  __Pyx_RefNannyFinishContext();
7334  return __pyx_r;
7335 }
7336 
7337 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7338  int __pyx_r;
7339  __Pyx_RefNannyDeclarations
7340  __Pyx_RefNannySetupContext("__del__", 0);
7341  __Pyx_INCREF(Py_None);
7342  __Pyx_GIVEREF(Py_None);
7343  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
7344  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7345  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)Py_None);
7346 
7347  /* function exit code */
7348  __pyx_r = 0;
7349  __Pyx_RefNannyFinishContext();
7350  return __pyx_r;
7351 }
7352 
7353 /* "cmeshTools.pxd":44
7354  * cdef np.ndarray elementBoundaryNodesArray,
7355  * cdef np.ndarray elementBoundaryElementsArray,
7356  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
7357  * cdef np.ndarray interiorElementBoundariesArray,
7358  * cdef np.ndarray exteriorElementBoundariesArray,
7359  */
7360 
7361 /* Python wrapper */
7362 static PyObject *__pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7363 static PyObject *__pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7364  PyObject *__pyx_r = 0;
7365  __Pyx_RefNannyDeclarations
7366  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7367  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7368 
7369  /* function exit code */
7370  __Pyx_RefNannyFinishContext();
7371  return __pyx_r;
7372 }
7373 
7374 static PyObject *__pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7375  PyObject *__pyx_r = NULL;
7376  __Pyx_RefNannyDeclarations
7377  __Pyx_RefNannySetupContext("__get__", 0);
7378  __Pyx_XDECREF(__pyx_r);
7379  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7380  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7381  goto __pyx_L0;
7382 
7383  /* function exit code */
7384  __pyx_L0:;
7385  __Pyx_XGIVEREF(__pyx_r);
7386  __Pyx_RefNannyFinishContext();
7387  return __pyx_r;
7388 }
7389 
7390 /* Python wrapper */
7391 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7392 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7393  int __pyx_r;
7394  __Pyx_RefNannyDeclarations
7395  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7396  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7397 
7398  /* function exit code */
7399  __Pyx_RefNannyFinishContext();
7400  return __pyx_r;
7401 }
7402 
7403 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7404  int __pyx_r;
7405  __Pyx_RefNannyDeclarations
7406  PyObject *__pyx_t_1 = NULL;
7407  int __pyx_lineno = 0;
7408  const char *__pyx_filename = NULL;
7409  int __pyx_clineno = 0;
7410  __Pyx_RefNannySetupContext("__set__", 0);
7411  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 44, __pyx_L1_error)
7412  __pyx_t_1 = __pyx_v_value;
7413  __Pyx_INCREF(__pyx_t_1);
7414  __Pyx_GIVEREF(__pyx_t_1);
7415  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7416  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7417  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7418  __pyx_t_1 = 0;
7419 
7420  /* function exit code */
7421  __pyx_r = 0;
7422  goto __pyx_L0;
7423  __pyx_L1_error:;
7424  __Pyx_XDECREF(__pyx_t_1);
7425  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryLocalElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7426  __pyx_r = -1;
7427  __pyx_L0:;
7428  __Pyx_RefNannyFinishContext();
7429  return __pyx_r;
7430 }
7431 
7432 /* Python wrapper */
7433 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7434 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7435  int __pyx_r;
7436  __Pyx_RefNannyDeclarations
7437  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7438  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7439 
7440  /* function exit code */
7441  __Pyx_RefNannyFinishContext();
7442  return __pyx_r;
7443 }
7444 
7445 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7446  int __pyx_r;
7447  __Pyx_RefNannyDeclarations
7448  __Pyx_RefNannySetupContext("__del__", 0);
7449  __Pyx_INCREF(Py_None);
7450  __Pyx_GIVEREF(Py_None);
7451  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7452  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7453  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None);
7454 
7455  /* function exit code */
7456  __pyx_r = 0;
7457  __Pyx_RefNannyFinishContext();
7458  return __pyx_r;
7459 }
7460 
7461 /* "cmeshTools.pxd":45
7462  * cdef np.ndarray elementBoundaryElementsArray,
7463  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7464  * cdef np.ndarray interiorElementBoundariesArray, # <<<<<<<<<<<<<<
7465  * cdef np.ndarray exteriorElementBoundariesArray,
7466  * cdef np.ndarray edgeNodesArray,
7467  */
7468 
7469 /* Python wrapper */
7470 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7471 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7472  PyObject *__pyx_r = 0;
7473  __Pyx_RefNannyDeclarations
7474  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7475  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7476 
7477  /* function exit code */
7478  __Pyx_RefNannyFinishContext();
7479  return __pyx_r;
7480 }
7481 
7482 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7483  PyObject *__pyx_r = NULL;
7484  __Pyx_RefNannyDeclarations
7485  __Pyx_RefNannySetupContext("__get__", 0);
7486  __Pyx_XDECREF(__pyx_r);
7487  __Pyx_INCREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7488  __pyx_r = ((PyObject *)__pyx_v_self->interiorElementBoundariesArray);
7489  goto __pyx_L0;
7490 
7491  /* function exit code */
7492  __pyx_L0:;
7493  __Pyx_XGIVEREF(__pyx_r);
7494  __Pyx_RefNannyFinishContext();
7495  return __pyx_r;
7496 }
7497 
7498 /* Python wrapper */
7499 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7500 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7501  int __pyx_r;
7502  __Pyx_RefNannyDeclarations
7503  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7504  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7505 
7506  /* function exit code */
7507  __Pyx_RefNannyFinishContext();
7508  return __pyx_r;
7509 }
7510 
7511 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7512  int __pyx_r;
7513  __Pyx_RefNannyDeclarations
7514  PyObject *__pyx_t_1 = NULL;
7515  int __pyx_lineno = 0;
7516  const char *__pyx_filename = NULL;
7517  int __pyx_clineno = 0;
7518  __Pyx_RefNannySetupContext("__set__", 0);
7519  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 45, __pyx_L1_error)
7520  __pyx_t_1 = __pyx_v_value;
7521  __Pyx_INCREF(__pyx_t_1);
7522  __Pyx_GIVEREF(__pyx_t_1);
7523  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
7524  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7525  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7526  __pyx_t_1 = 0;
7527 
7528  /* function exit code */
7529  __pyx_r = 0;
7530  goto __pyx_L0;
7531  __pyx_L1_error:;
7532  __Pyx_XDECREF(__pyx_t_1);
7533  __Pyx_AddTraceback("cmeshTools.CMesh.interiorElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7534  __pyx_r = -1;
7535  __pyx_L0:;
7536  __Pyx_RefNannyFinishContext();
7537  return __pyx_r;
7538 }
7539 
7540 /* Python wrapper */
7541 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7542 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7543  int __pyx_r;
7544  __Pyx_RefNannyDeclarations
7545  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7546  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7547 
7548  /* function exit code */
7549  __Pyx_RefNannyFinishContext();
7550  return __pyx_r;
7551 }
7552 
7553 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7554  int __pyx_r;
7555  __Pyx_RefNannyDeclarations
7556  __Pyx_RefNannySetupContext("__del__", 0);
7557  __Pyx_INCREF(Py_None);
7558  __Pyx_GIVEREF(Py_None);
7559  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
7560  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7561  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)Py_None);
7562 
7563  /* function exit code */
7564  __pyx_r = 0;
7565  __Pyx_RefNannyFinishContext();
7566  return __pyx_r;
7567 }
7568 
7569 /* "cmeshTools.pxd":46
7570  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7571  * cdef np.ndarray interiorElementBoundariesArray,
7572  * cdef np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
7573  * cdef np.ndarray edgeNodesArray,
7574  * cdef np.ndarray nodeStarArray,
7575  */
7576 
7577 /* Python wrapper */
7578 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7579 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7580  PyObject *__pyx_r = 0;
7581  __Pyx_RefNannyDeclarations
7582  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7583  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7584 
7585  /* function exit code */
7586  __Pyx_RefNannyFinishContext();
7587  return __pyx_r;
7588 }
7589 
7590 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7591  PyObject *__pyx_r = NULL;
7592  __Pyx_RefNannyDeclarations
7593  __Pyx_RefNannySetupContext("__get__", 0);
7594  __Pyx_XDECREF(__pyx_r);
7595  __Pyx_INCREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7596  __pyx_r = ((PyObject *)__pyx_v_self->exteriorElementBoundariesArray);
7597  goto __pyx_L0;
7598 
7599  /* function exit code */
7600  __pyx_L0:;
7601  __Pyx_XGIVEREF(__pyx_r);
7602  __Pyx_RefNannyFinishContext();
7603  return __pyx_r;
7604 }
7605 
7606 /* Python wrapper */
7607 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7608 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7609  int __pyx_r;
7610  __Pyx_RefNannyDeclarations
7611  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7612  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7613 
7614  /* function exit code */
7615  __Pyx_RefNannyFinishContext();
7616  return __pyx_r;
7617 }
7618 
7619 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7620  int __pyx_r;
7621  __Pyx_RefNannyDeclarations
7622  PyObject *__pyx_t_1 = NULL;
7623  int __pyx_lineno = 0;
7624  const char *__pyx_filename = NULL;
7625  int __pyx_clineno = 0;
7626  __Pyx_RefNannySetupContext("__set__", 0);
7627  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 46, __pyx_L1_error)
7628  __pyx_t_1 = __pyx_v_value;
7629  __Pyx_INCREF(__pyx_t_1);
7630  __Pyx_GIVEREF(__pyx_t_1);
7631  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
7632  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7633  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7634  __pyx_t_1 = 0;
7635 
7636  /* function exit code */
7637  __pyx_r = 0;
7638  goto __pyx_L0;
7639  __pyx_L1_error:;
7640  __Pyx_XDECREF(__pyx_t_1);
7641  __Pyx_AddTraceback("cmeshTools.CMesh.exteriorElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7642  __pyx_r = -1;
7643  __pyx_L0:;
7644  __Pyx_RefNannyFinishContext();
7645  return __pyx_r;
7646 }
7647 
7648 /* Python wrapper */
7649 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7650 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7651  int __pyx_r;
7652  __Pyx_RefNannyDeclarations
7653  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7654  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7655 
7656  /* function exit code */
7657  __Pyx_RefNannyFinishContext();
7658  return __pyx_r;
7659 }
7660 
7661 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7662  int __pyx_r;
7663  __Pyx_RefNannyDeclarations
7664  __Pyx_RefNannySetupContext("__del__", 0);
7665  __Pyx_INCREF(Py_None);
7666  __Pyx_GIVEREF(Py_None);
7667  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
7668  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7669  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None);
7670 
7671  /* function exit code */
7672  __pyx_r = 0;
7673  __Pyx_RefNannyFinishContext();
7674  return __pyx_r;
7675 }
7676 
7677 /* "cmeshTools.pxd":47
7678  * cdef np.ndarray interiorElementBoundariesArray,
7679  * cdef np.ndarray exteriorElementBoundariesArray,
7680  * cdef np.ndarray edgeNodesArray, # <<<<<<<<<<<<<<
7681  * cdef np.ndarray nodeStarArray,
7682  * cdef np.ndarray nodeStarOffsets,
7683  */
7684 
7685 /* Python wrapper */
7686 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7687 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(PyObject *__pyx_v_self) {
7688  PyObject *__pyx_r = 0;
7689  __Pyx_RefNannyDeclarations
7690  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7691  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7692 
7693  /* function exit code */
7694  __Pyx_RefNannyFinishContext();
7695  return __pyx_r;
7696 }
7697 
7698 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7699  PyObject *__pyx_r = NULL;
7700  __Pyx_RefNannyDeclarations
7701  __Pyx_RefNannySetupContext("__get__", 0);
7702  __Pyx_XDECREF(__pyx_r);
7703  __Pyx_INCREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7704  __pyx_r = ((PyObject *)__pyx_v_self->edgeNodesArray);
7705  goto __pyx_L0;
7706 
7707  /* function exit code */
7708  __pyx_L0:;
7709  __Pyx_XGIVEREF(__pyx_r);
7710  __Pyx_RefNannyFinishContext();
7711  return __pyx_r;
7712 }
7713 
7714 /* Python wrapper */
7715 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7716 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7717  int __pyx_r;
7718  __Pyx_RefNannyDeclarations
7719  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7720  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7721 
7722  /* function exit code */
7723  __Pyx_RefNannyFinishContext();
7724  return __pyx_r;
7725 }
7726 
7727 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7728  int __pyx_r;
7729  __Pyx_RefNannyDeclarations
7730  PyObject *__pyx_t_1 = NULL;
7731  int __pyx_lineno = 0;
7732  const char *__pyx_filename = NULL;
7733  int __pyx_clineno = 0;
7734  __Pyx_RefNannySetupContext("__set__", 0);
7735  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 47, __pyx_L1_error)
7736  __pyx_t_1 = __pyx_v_value;
7737  __Pyx_INCREF(__pyx_t_1);
7738  __Pyx_GIVEREF(__pyx_t_1);
7739  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
7740  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7741  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)__pyx_t_1);
7742  __pyx_t_1 = 0;
7743 
7744  /* function exit code */
7745  __pyx_r = 0;
7746  goto __pyx_L0;
7747  __pyx_L1_error:;
7748  __Pyx_XDECREF(__pyx_t_1);
7749  __Pyx_AddTraceback("cmeshTools.CMesh.edgeNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7750  __pyx_r = -1;
7751  __pyx_L0:;
7752  __Pyx_RefNannyFinishContext();
7753  return __pyx_r;
7754 }
7755 
7756 /* Python wrapper */
7757 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7758 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(PyObject *__pyx_v_self) {
7759  int __pyx_r;
7760  __Pyx_RefNannyDeclarations
7761  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7762  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7763 
7764  /* function exit code */
7765  __Pyx_RefNannyFinishContext();
7766  return __pyx_r;
7767 }
7768 
7769 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7770  int __pyx_r;
7771  __Pyx_RefNannyDeclarations
7772  __Pyx_RefNannySetupContext("__del__", 0);
7773  __Pyx_INCREF(Py_None);
7774  __Pyx_GIVEREF(Py_None);
7775  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
7776  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7777  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)Py_None);
7778 
7779  /* function exit code */
7780  __pyx_r = 0;
7781  __Pyx_RefNannyFinishContext();
7782  return __pyx_r;
7783 }
7784 
7785 /* "cmeshTools.pxd":48
7786  * cdef np.ndarray exteriorElementBoundariesArray,
7787  * cdef np.ndarray edgeNodesArray,
7788  * cdef np.ndarray nodeStarArray, # <<<<<<<<<<<<<<
7789  * cdef np.ndarray nodeStarOffsets,
7790  * cdef np.ndarray elementMaterialTypes,
7791  */
7792 
7793 /* Python wrapper */
7794 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7795 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(PyObject *__pyx_v_self) {
7796  PyObject *__pyx_r = 0;
7797  __Pyx_RefNannyDeclarations
7798  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7799  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7800 
7801  /* function exit code */
7802  __Pyx_RefNannyFinishContext();
7803  return __pyx_r;
7804 }
7805 
7806 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7807  PyObject *__pyx_r = NULL;
7808  __Pyx_RefNannyDeclarations
7809  __Pyx_RefNannySetupContext("__get__", 0);
7810  __Pyx_XDECREF(__pyx_r);
7811  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeStarArray));
7812  __pyx_r = ((PyObject *)__pyx_v_self->nodeStarArray);
7813  goto __pyx_L0;
7814 
7815  /* function exit code */
7816  __pyx_L0:;
7817  __Pyx_XGIVEREF(__pyx_r);
7818  __Pyx_RefNannyFinishContext();
7819  return __pyx_r;
7820 }
7821 
7822 /* Python wrapper */
7823 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7824 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7825  int __pyx_r;
7826  __Pyx_RefNannyDeclarations
7827  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7828  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7829 
7830  /* function exit code */
7831  __Pyx_RefNannyFinishContext();
7832  return __pyx_r;
7833 }
7834 
7835 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7836  int __pyx_r;
7837  __Pyx_RefNannyDeclarations
7838  PyObject *__pyx_t_1 = NULL;
7839  int __pyx_lineno = 0;
7840  const char *__pyx_filename = NULL;
7841  int __pyx_clineno = 0;
7842  __Pyx_RefNannySetupContext("__set__", 0);
7843  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 48, __pyx_L1_error)
7844  __pyx_t_1 = __pyx_v_value;
7845  __Pyx_INCREF(__pyx_t_1);
7846  __Pyx_GIVEREF(__pyx_t_1);
7847  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
7848  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
7849  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_1);
7850  __pyx_t_1 = 0;
7851 
7852  /* function exit code */
7853  __pyx_r = 0;
7854  goto __pyx_L0;
7855  __pyx_L1_error:;
7856  __Pyx_XDECREF(__pyx_t_1);
7857  __Pyx_AddTraceback("cmeshTools.CMesh.nodeStarArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7858  __pyx_r = -1;
7859  __pyx_L0:;
7860  __Pyx_RefNannyFinishContext();
7861  return __pyx_r;
7862 }
7863 
7864 /* Python wrapper */
7865 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7866 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(PyObject *__pyx_v_self) {
7867  int __pyx_r;
7868  __Pyx_RefNannyDeclarations
7869  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7870  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7871 
7872  /* function exit code */
7873  __Pyx_RefNannyFinishContext();
7874  return __pyx_r;
7875 }
7876 
7877 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7878  int __pyx_r;
7879  __Pyx_RefNannyDeclarations
7880  __Pyx_RefNannySetupContext("__del__", 0);
7881  __Pyx_INCREF(Py_None);
7882  __Pyx_GIVEREF(Py_None);
7883  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
7884  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
7885  __pyx_v_self->nodeStarArray = ((PyArrayObject *)Py_None);
7886 
7887  /* function exit code */
7888  __pyx_r = 0;
7889  __Pyx_RefNannyFinishContext();
7890  return __pyx_r;
7891 }
7892 
7893 /* "cmeshTools.pxd":49
7894  * cdef np.ndarray edgeNodesArray,
7895  * cdef np.ndarray nodeStarArray,
7896  * cdef np.ndarray nodeStarOffsets, # <<<<<<<<<<<<<<
7897  * cdef np.ndarray elementMaterialTypes,
7898  * cdef np.ndarray elementBoundaryMaterialTypes,
7899  */
7900 
7901 /* Python wrapper */
7902 static PyObject *__pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
7903 static PyObject *__pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(PyObject *__pyx_v_self) {
7904  PyObject *__pyx_r = 0;
7905  __Pyx_RefNannyDeclarations
7906  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7907  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7908 
7909  /* function exit code */
7910  __Pyx_RefNannyFinishContext();
7911  return __pyx_r;
7912 }
7913 
7914 static PyObject *__pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7915  PyObject *__pyx_r = NULL;
7916  __Pyx_RefNannyDeclarations
7917  __Pyx_RefNannySetupContext("__get__", 0);
7918  __Pyx_XDECREF(__pyx_r);
7919  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7920  __pyx_r = ((PyObject *)__pyx_v_self->nodeStarOffsets);
7921  goto __pyx_L0;
7922 
7923  /* function exit code */
7924  __pyx_L0:;
7925  __Pyx_XGIVEREF(__pyx_r);
7926  __Pyx_RefNannyFinishContext();
7927  return __pyx_r;
7928 }
7929 
7930 /* Python wrapper */
7931 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7932 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7933  int __pyx_r;
7934  __Pyx_RefNannyDeclarations
7935  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7936  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7937 
7938  /* function exit code */
7939  __Pyx_RefNannyFinishContext();
7940  return __pyx_r;
7941 }
7942 
7943 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7944  int __pyx_r;
7945  __Pyx_RefNannyDeclarations
7946  PyObject *__pyx_t_1 = NULL;
7947  int __pyx_lineno = 0;
7948  const char *__pyx_filename = NULL;
7949  int __pyx_clineno = 0;
7950  __Pyx_RefNannySetupContext("__set__", 0);
7951  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 49, __pyx_L1_error)
7952  __pyx_t_1 = __pyx_v_value;
7953  __Pyx_INCREF(__pyx_t_1);
7954  __Pyx_GIVEREF(__pyx_t_1);
7955  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
7956  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7957  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)__pyx_t_1);
7958  __pyx_t_1 = 0;
7959 
7960  /* function exit code */
7961  __pyx_r = 0;
7962  goto __pyx_L0;
7963  __pyx_L1_error:;
7964  __Pyx_XDECREF(__pyx_t_1);
7965  __Pyx_AddTraceback("cmeshTools.CMesh.nodeStarOffsets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7966  __pyx_r = -1;
7967  __pyx_L0:;
7968  __Pyx_RefNannyFinishContext();
7969  return __pyx_r;
7970 }
7971 
7972 /* Python wrapper */
7973 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(PyObject *__pyx_v_self); /*proto*/
7974 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(PyObject *__pyx_v_self) {
7975  int __pyx_r;
7976  __Pyx_RefNannyDeclarations
7977  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7978  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7979 
7980  /* function exit code */
7981  __Pyx_RefNannyFinishContext();
7982  return __pyx_r;
7983 }
7984 
7985 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7986  int __pyx_r;
7987  __Pyx_RefNannyDeclarations
7988  __Pyx_RefNannySetupContext("__del__", 0);
7989  __Pyx_INCREF(Py_None);
7990  __Pyx_GIVEREF(Py_None);
7991  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
7992  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7993  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)Py_None);
7994 
7995  /* function exit code */
7996  __pyx_r = 0;
7997  __Pyx_RefNannyFinishContext();
7998  return __pyx_r;
7999 }
8000 
8001 /* "cmeshTools.pxd":50
8002  * cdef np.ndarray nodeStarArray,
8003  * cdef np.ndarray nodeStarOffsets,
8004  * cdef np.ndarray elementMaterialTypes, # <<<<<<<<<<<<<<
8005  * cdef np.ndarray elementBoundaryMaterialTypes,
8006  * cdef np.ndarray nodeMaterialTypes,
8007  */
8008 
8009 /* Python wrapper */
8010 static PyObject *__pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
8011 static PyObject *__pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(PyObject *__pyx_v_self) {
8012  PyObject *__pyx_r = 0;
8013  __Pyx_RefNannyDeclarations
8014  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8015  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8016 
8017  /* function exit code */
8018  __Pyx_RefNannyFinishContext();
8019  return __pyx_r;
8020 }
8021 
8022 static PyObject *__pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8023  PyObject *__pyx_r = NULL;
8024  __Pyx_RefNannyDeclarations
8025  __Pyx_RefNannySetupContext("__get__", 0);
8026  __Pyx_XDECREF(__pyx_r);
8027  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
8028  __pyx_r = ((PyObject *)__pyx_v_self->elementMaterialTypes);
8029  goto __pyx_L0;
8030 
8031  /* function exit code */
8032  __pyx_L0:;
8033  __Pyx_XGIVEREF(__pyx_r);
8034  __Pyx_RefNannyFinishContext();
8035  return __pyx_r;
8036 }
8037 
8038 /* Python wrapper */
8039 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8040 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8041  int __pyx_r;
8042  __Pyx_RefNannyDeclarations
8043  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8044  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8045 
8046  /* function exit code */
8047  __Pyx_RefNannyFinishContext();
8048  return __pyx_r;
8049 }
8050 
8051 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8052  int __pyx_r;
8053  __Pyx_RefNannyDeclarations
8054  PyObject *__pyx_t_1 = NULL;
8055  int __pyx_lineno = 0;
8056  const char *__pyx_filename = NULL;
8057  int __pyx_clineno = 0;
8058  __Pyx_RefNannySetupContext("__set__", 0);
8059  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 50, __pyx_L1_error)
8060  __pyx_t_1 = __pyx_v_value;
8061  __Pyx_INCREF(__pyx_t_1);
8062  __Pyx_GIVEREF(__pyx_t_1);
8063  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
8064  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
8065  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)__pyx_t_1);
8066  __pyx_t_1 = 0;
8067 
8068  /* function exit code */
8069  __pyx_r = 0;
8070  goto __pyx_L0;
8071  __pyx_L1_error:;
8072  __Pyx_XDECREF(__pyx_t_1);
8073  __Pyx_AddTraceback("cmeshTools.CMesh.elementMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8074  __pyx_r = -1;
8075  __pyx_L0:;
8076  __Pyx_RefNannyFinishContext();
8077  return __pyx_r;
8078 }
8079 
8080 /* Python wrapper */
8081 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
8082 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(PyObject *__pyx_v_self) {
8083  int __pyx_r;
8084  __Pyx_RefNannyDeclarations
8085  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8086  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8087 
8088  /* function exit code */
8089  __Pyx_RefNannyFinishContext();
8090  return __pyx_r;
8091 }
8092 
8093 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8094  int __pyx_r;
8095  __Pyx_RefNannyDeclarations
8096  __Pyx_RefNannySetupContext("__del__", 0);
8097  __Pyx_INCREF(Py_None);
8098  __Pyx_GIVEREF(Py_None);
8099  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
8100  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
8101  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)Py_None);
8102 
8103  /* function exit code */
8104  __pyx_r = 0;
8105  __Pyx_RefNannyFinishContext();
8106  return __pyx_r;
8107 }
8108 
8109 /* "cmeshTools.pxd":51
8110  * cdef np.ndarray nodeStarOffsets,
8111  * cdef np.ndarray elementMaterialTypes,
8112  * cdef np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
8113  * cdef np.ndarray nodeMaterialTypes,
8114  * cdef np.ndarray nodeArray,
8115  */
8116 
8117 /* Python wrapper */
8118 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
8119 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(PyObject *__pyx_v_self) {
8120  PyObject *__pyx_r = 0;
8121  __Pyx_RefNannyDeclarations
8122  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8123  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8124 
8125  /* function exit code */
8126  __Pyx_RefNannyFinishContext();
8127  return __pyx_r;
8128 }
8129 
8130 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8131  PyObject *__pyx_r = NULL;
8132  __Pyx_RefNannyDeclarations
8133  __Pyx_RefNannySetupContext("__get__", 0);
8134  __Pyx_XDECREF(__pyx_r);
8135  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
8136  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes);
8137  goto __pyx_L0;
8138 
8139  /* function exit code */
8140  __pyx_L0:;
8141  __Pyx_XGIVEREF(__pyx_r);
8142  __Pyx_RefNannyFinishContext();
8143  return __pyx_r;
8144 }
8145 
8146 /* Python wrapper */
8147 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8148 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8149  int __pyx_r;
8150  __Pyx_RefNannyDeclarations
8151  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8152  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8153 
8154  /* function exit code */
8155  __Pyx_RefNannyFinishContext();
8156  return __pyx_r;
8157 }
8158 
8159 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8160  int __pyx_r;
8161  __Pyx_RefNannyDeclarations
8162  PyObject *__pyx_t_1 = NULL;
8163  int __pyx_lineno = 0;
8164  const char *__pyx_filename = NULL;
8165  int __pyx_clineno = 0;
8166  __Pyx_RefNannySetupContext("__set__", 0);
8167  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 51, __pyx_L1_error)
8168  __pyx_t_1 = __pyx_v_value;
8169  __Pyx_INCREF(__pyx_t_1);
8170  __Pyx_GIVEREF(__pyx_t_1);
8171  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
8172  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
8173  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)__pyx_t_1);
8174  __pyx_t_1 = 0;
8175 
8176  /* function exit code */
8177  __pyx_r = 0;
8178  goto __pyx_L0;
8179  __pyx_L1_error:;
8180  __Pyx_XDECREF(__pyx_t_1);
8181  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8182  __pyx_r = -1;
8183  __pyx_L0:;
8184  __Pyx_RefNannyFinishContext();
8185  return __pyx_r;
8186 }
8187 
8188 /* Python wrapper */
8189 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
8190 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(PyObject *__pyx_v_self) {
8191  int __pyx_r;
8192  __Pyx_RefNannyDeclarations
8193  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8194  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8195 
8196  /* function exit code */
8197  __Pyx_RefNannyFinishContext();
8198  return __pyx_r;
8199 }
8200 
8201 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8202  int __pyx_r;
8203  __Pyx_RefNannyDeclarations
8204  __Pyx_RefNannySetupContext("__del__", 0);
8205  __Pyx_INCREF(Py_None);
8206  __Pyx_GIVEREF(Py_None);
8207  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
8208  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
8209  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None);
8210 
8211  /* function exit code */
8212  __pyx_r = 0;
8213  __Pyx_RefNannyFinishContext();
8214  return __pyx_r;
8215 }
8216 
8217 /* "cmeshTools.pxd":52
8218  * cdef np.ndarray elementMaterialTypes,
8219  * cdef np.ndarray elementBoundaryMaterialTypes,
8220  * cdef np.ndarray nodeMaterialTypes, # <<<<<<<<<<<<<<
8221  * cdef np.ndarray nodeArray,
8222  *
8223  */
8224 
8225 /* Python wrapper */
8226 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
8227 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(PyObject *__pyx_v_self) {
8228  PyObject *__pyx_r = 0;
8229  __Pyx_RefNannyDeclarations
8230  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8231  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8232 
8233  /* function exit code */
8234  __Pyx_RefNannyFinishContext();
8235  return __pyx_r;
8236 }
8237 
8238 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8239  PyObject *__pyx_r = NULL;
8240  __Pyx_RefNannyDeclarations
8241  __Pyx_RefNannySetupContext("__get__", 0);
8242  __Pyx_XDECREF(__pyx_r);
8243  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8244  __pyx_r = ((PyObject *)__pyx_v_self->nodeMaterialTypes);
8245  goto __pyx_L0;
8246 
8247  /* function exit code */
8248  __pyx_L0:;
8249  __Pyx_XGIVEREF(__pyx_r);
8250  __Pyx_RefNannyFinishContext();
8251  return __pyx_r;
8252 }
8253 
8254 /* Python wrapper */
8255 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8256 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8257  int __pyx_r;
8258  __Pyx_RefNannyDeclarations
8259  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8260  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8261 
8262  /* function exit code */
8263  __Pyx_RefNannyFinishContext();
8264  return __pyx_r;
8265 }
8266 
8267 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8268  int __pyx_r;
8269  __Pyx_RefNannyDeclarations
8270  PyObject *__pyx_t_1 = NULL;
8271  int __pyx_lineno = 0;
8272  const char *__pyx_filename = NULL;
8273  int __pyx_clineno = 0;
8274  __Pyx_RefNannySetupContext("__set__", 0);
8275  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 52, __pyx_L1_error)
8276  __pyx_t_1 = __pyx_v_value;
8277  __Pyx_INCREF(__pyx_t_1);
8278  __Pyx_GIVEREF(__pyx_t_1);
8279  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
8280  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8281  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)__pyx_t_1);
8282  __pyx_t_1 = 0;
8283 
8284  /* function exit code */
8285  __pyx_r = 0;
8286  goto __pyx_L0;
8287  __pyx_L1_error:;
8288  __Pyx_XDECREF(__pyx_t_1);
8289  __Pyx_AddTraceback("cmeshTools.CMesh.nodeMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8290  __pyx_r = -1;
8291  __pyx_L0:;
8292  __Pyx_RefNannyFinishContext();
8293  return __pyx_r;
8294 }
8295 
8296 /* Python wrapper */
8297 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
8298 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(PyObject *__pyx_v_self) {
8299  int __pyx_r;
8300  __Pyx_RefNannyDeclarations
8301  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8302  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8303 
8304  /* function exit code */
8305  __Pyx_RefNannyFinishContext();
8306  return __pyx_r;
8307 }
8308 
8309 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8310  int __pyx_r;
8311  __Pyx_RefNannyDeclarations
8312  __Pyx_RefNannySetupContext("__del__", 0);
8313  __Pyx_INCREF(Py_None);
8314  __Pyx_GIVEREF(Py_None);
8315  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
8316  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8317  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)Py_None);
8318 
8319  /* function exit code */
8320  __pyx_r = 0;
8321  __Pyx_RefNannyFinishContext();
8322  return __pyx_r;
8323 }
8324 
8325 /* "cmeshTools.pxd":53
8326  * cdef np.ndarray elementBoundaryMaterialTypes,
8327  * cdef np.ndarray nodeMaterialTypes,
8328  * cdef np.ndarray nodeArray, # <<<<<<<<<<<<<<
8329  *
8330  * cdef int nx
8331  */
8332 
8333 /* Python wrapper */
8334 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(PyObject *__pyx_v_self); /*proto*/
8335 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(PyObject *__pyx_v_self) {
8336  PyObject *__pyx_r = 0;
8337  __Pyx_RefNannyDeclarations
8338  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8339  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8340 
8341  /* function exit code */
8342  __Pyx_RefNannyFinishContext();
8343  return __pyx_r;
8344 }
8345 
8346 static PyObject *__pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8347  PyObject *__pyx_r = NULL;
8348  __Pyx_RefNannyDeclarations
8349  __Pyx_RefNannySetupContext("__get__", 0);
8350  __Pyx_XDECREF(__pyx_r);
8351  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeArray));
8352  __pyx_r = ((PyObject *)__pyx_v_self->nodeArray);
8353  goto __pyx_L0;
8354 
8355  /* function exit code */
8356  __pyx_L0:;
8357  __Pyx_XGIVEREF(__pyx_r);
8358  __Pyx_RefNannyFinishContext();
8359  return __pyx_r;
8360 }
8361 
8362 /* Python wrapper */
8363 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8364 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8365  int __pyx_r;
8366  __Pyx_RefNannyDeclarations
8367  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8368  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8369 
8370  /* function exit code */
8371  __Pyx_RefNannyFinishContext();
8372  return __pyx_r;
8373 }
8374 
8375 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8376  int __pyx_r;
8377  __Pyx_RefNannyDeclarations
8378  PyObject *__pyx_t_1 = NULL;
8379  int __pyx_lineno = 0;
8380  const char *__pyx_filename = NULL;
8381  int __pyx_clineno = 0;
8382  __Pyx_RefNannySetupContext("__set__", 0);
8383  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 53, __pyx_L1_error)
8384  __pyx_t_1 = __pyx_v_value;
8385  __Pyx_INCREF(__pyx_t_1);
8386  __Pyx_GIVEREF(__pyx_t_1);
8387  __Pyx_GOTREF(__pyx_v_self->nodeArray);
8388  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
8389  __pyx_v_self->nodeArray = ((PyArrayObject *)__pyx_t_1);
8390  __pyx_t_1 = 0;
8391 
8392  /* function exit code */
8393  __pyx_r = 0;
8394  goto __pyx_L0;
8395  __pyx_L1_error:;
8396  __Pyx_XDECREF(__pyx_t_1);
8397  __Pyx_AddTraceback("cmeshTools.CMesh.nodeArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8398  __pyx_r = -1;
8399  __pyx_L0:;
8400  __Pyx_RefNannyFinishContext();
8401  return __pyx_r;
8402 }
8403 
8404 /* Python wrapper */
8405 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(PyObject *__pyx_v_self); /*proto*/
8406 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(PyObject *__pyx_v_self) {
8407  int __pyx_r;
8408  __Pyx_RefNannyDeclarations
8409  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8410  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8411 
8412  /* function exit code */
8413  __Pyx_RefNannyFinishContext();
8414  return __pyx_r;
8415 }
8416 
8417 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8418  int __pyx_r;
8419  __Pyx_RefNannyDeclarations
8420  __Pyx_RefNannySetupContext("__del__", 0);
8421  __Pyx_INCREF(Py_None);
8422  __Pyx_GIVEREF(Py_None);
8423  __Pyx_GOTREF(__pyx_v_self->nodeArray);
8424  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
8425  __pyx_v_self->nodeArray = ((PyArrayObject *)Py_None);
8426 
8427  /* function exit code */
8428  __pyx_r = 0;
8429  __Pyx_RefNannyFinishContext();
8430  return __pyx_r;
8431 }
8432 
8433 /* "cmeshTools.pxd":55
8434  * cdef np.ndarray nodeArray,
8435  *
8436  * cdef int nx # <<<<<<<<<<<<<<
8437  * cdef int ny
8438  * cdef int nz #NURBS
8439  */
8440 
8441 /* Python wrapper */
8442 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(PyObject *__pyx_v_self); /*proto*/
8443 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(PyObject *__pyx_v_self) {
8444  PyObject *__pyx_r = 0;
8445  __Pyx_RefNannyDeclarations
8446  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8447  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nx___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8448 
8449  /* function exit code */
8450  __Pyx_RefNannyFinishContext();
8451  return __pyx_r;
8452 }
8453 
8454 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nx___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8455  PyObject *__pyx_r = NULL;
8456  __Pyx_RefNannyDeclarations
8457  PyObject *__pyx_t_1 = NULL;
8458  int __pyx_lineno = 0;
8459  const char *__pyx_filename = NULL;
8460  int __pyx_clineno = 0;
8461  __Pyx_RefNannySetupContext("__get__", 0);
8462  __Pyx_XDECREF(__pyx_r);
8463  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nx); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 55, __pyx_L1_error)
8464  __Pyx_GOTREF(__pyx_t_1);
8465  __pyx_r = __pyx_t_1;
8466  __pyx_t_1 = 0;
8467  goto __pyx_L0;
8468 
8469  /* function exit code */
8470  __pyx_L1_error:;
8471  __Pyx_XDECREF(__pyx_t_1);
8472  __Pyx_AddTraceback("cmeshTools.CMesh.nx.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8473  __pyx_r = NULL;
8474  __pyx_L0:;
8475  __Pyx_XGIVEREF(__pyx_r);
8476  __Pyx_RefNannyFinishContext();
8477  return __pyx_r;
8478 }
8479 
8480 /* Python wrapper */
8481 static int __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8482 static int __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8483  int __pyx_r;
8484  __Pyx_RefNannyDeclarations
8485  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8486  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8487 
8488  /* function exit code */
8489  __Pyx_RefNannyFinishContext();
8490  return __pyx_r;
8491 }
8492 
8493 static int __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8494  int __pyx_r;
8495  __Pyx_RefNannyDeclarations
8496  int __pyx_t_1;
8497  int __pyx_lineno = 0;
8498  const char *__pyx_filename = NULL;
8499  int __pyx_clineno = 0;
8500  __Pyx_RefNannySetupContext("__set__", 0);
8501  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 55, __pyx_L1_error)
8502  __pyx_v_self->nx = __pyx_t_1;
8503 
8504  /* function exit code */
8505  __pyx_r = 0;
8506  goto __pyx_L0;
8507  __pyx_L1_error:;
8508  __Pyx_AddTraceback("cmeshTools.CMesh.nx.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8509  __pyx_r = -1;
8510  __pyx_L0:;
8511  __Pyx_RefNannyFinishContext();
8512  return __pyx_r;
8513 }
8514 
8515 /* "cmeshTools.pxd":56
8516  *
8517  * cdef int nx
8518  * cdef int ny # <<<<<<<<<<<<<<
8519  * cdef int nz #NURBS
8520  * cdef int px
8521  */
8522 
8523 /* Python wrapper */
8524 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(PyObject *__pyx_v_self); /*proto*/
8525 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(PyObject *__pyx_v_self) {
8526  PyObject *__pyx_r = 0;
8527  __Pyx_RefNannyDeclarations
8528  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8529  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2ny___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8530 
8531  /* function exit code */
8532  __Pyx_RefNannyFinishContext();
8533  return __pyx_r;
8534 }
8535 
8536 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2ny___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8537  PyObject *__pyx_r = NULL;
8538  __Pyx_RefNannyDeclarations
8539  PyObject *__pyx_t_1 = NULL;
8540  int __pyx_lineno = 0;
8541  const char *__pyx_filename = NULL;
8542  int __pyx_clineno = 0;
8543  __Pyx_RefNannySetupContext("__get__", 0);
8544  __Pyx_XDECREF(__pyx_r);
8545  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ny); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 56, __pyx_L1_error)
8546  __Pyx_GOTREF(__pyx_t_1);
8547  __pyx_r = __pyx_t_1;
8548  __pyx_t_1 = 0;
8549  goto __pyx_L0;
8550 
8551  /* function exit code */
8552  __pyx_L1_error:;
8553  __Pyx_XDECREF(__pyx_t_1);
8554  __Pyx_AddTraceback("cmeshTools.CMesh.ny.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8555  __pyx_r = NULL;
8556  __pyx_L0:;
8557  __Pyx_XGIVEREF(__pyx_r);
8558  __Pyx_RefNannyFinishContext();
8559  return __pyx_r;
8560 }
8561 
8562 /* Python wrapper */
8563 static int __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8564 static int __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8565  int __pyx_r;
8566  __Pyx_RefNannyDeclarations
8567  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8568  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8569 
8570  /* function exit code */
8571  __Pyx_RefNannyFinishContext();
8572  return __pyx_r;
8573 }
8574 
8575 static int __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8576  int __pyx_r;
8577  __Pyx_RefNannyDeclarations
8578  int __pyx_t_1;
8579  int __pyx_lineno = 0;
8580  const char *__pyx_filename = NULL;
8581  int __pyx_clineno = 0;
8582  __Pyx_RefNannySetupContext("__set__", 0);
8583  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 56, __pyx_L1_error)
8584  __pyx_v_self->ny = __pyx_t_1;
8585 
8586  /* function exit code */
8587  __pyx_r = 0;
8588  goto __pyx_L0;
8589  __pyx_L1_error:;
8590  __Pyx_AddTraceback("cmeshTools.CMesh.ny.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8591  __pyx_r = -1;
8592  __pyx_L0:;
8593  __Pyx_RefNannyFinishContext();
8594  return __pyx_r;
8595 }
8596 
8597 /* "cmeshTools.pxd":57
8598  * cdef int nx
8599  * cdef int ny
8600  * cdef int nz #NURBS # <<<<<<<<<<<<<<
8601  * cdef int px
8602  * cdef int py
8603  */
8604 
8605 /* Python wrapper */
8606 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(PyObject *__pyx_v_self); /*proto*/
8607 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(PyObject *__pyx_v_self) {
8608  PyObject *__pyx_r = 0;
8609  __Pyx_RefNannyDeclarations
8610  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8611  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nz___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8612 
8613  /* function exit code */
8614  __Pyx_RefNannyFinishContext();
8615  return __pyx_r;
8616 }
8617 
8618 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8619  PyObject *__pyx_r = NULL;
8620  __Pyx_RefNannyDeclarations
8621  PyObject *__pyx_t_1 = NULL;
8622  int __pyx_lineno = 0;
8623  const char *__pyx_filename = NULL;
8624  int __pyx_clineno = 0;
8625  __Pyx_RefNannySetupContext("__get__", 0);
8626  __Pyx_XDECREF(__pyx_r);
8627  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 57, __pyx_L1_error)
8628  __Pyx_GOTREF(__pyx_t_1);
8629  __pyx_r = __pyx_t_1;
8630  __pyx_t_1 = 0;
8631  goto __pyx_L0;
8632 
8633  /* function exit code */
8634  __pyx_L1_error:;
8635  __Pyx_XDECREF(__pyx_t_1);
8636  __Pyx_AddTraceback("cmeshTools.CMesh.nz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8637  __pyx_r = NULL;
8638  __pyx_L0:;
8639  __Pyx_XGIVEREF(__pyx_r);
8640  __Pyx_RefNannyFinishContext();
8641  return __pyx_r;
8642 }
8643 
8644 /* Python wrapper */
8645 static int __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8646 static int __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8647  int __pyx_r;
8648  __Pyx_RefNannyDeclarations
8649  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8650  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8651 
8652  /* function exit code */
8653  __Pyx_RefNannyFinishContext();
8654  return __pyx_r;
8655 }
8656 
8657 static int __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8658  int __pyx_r;
8659  __Pyx_RefNannyDeclarations
8660  int __pyx_t_1;
8661  int __pyx_lineno = 0;
8662  const char *__pyx_filename = NULL;
8663  int __pyx_clineno = 0;
8664  __Pyx_RefNannySetupContext("__set__", 0);
8665  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 57, __pyx_L1_error)
8666  __pyx_v_self->nz = __pyx_t_1;
8667 
8668  /* function exit code */
8669  __pyx_r = 0;
8670  goto __pyx_L0;
8671  __pyx_L1_error:;
8672  __Pyx_AddTraceback("cmeshTools.CMesh.nz.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8673  __pyx_r = -1;
8674  __pyx_L0:;
8675  __Pyx_RefNannyFinishContext();
8676  return __pyx_r;
8677 }
8678 
8679 /* "cmeshTools.pxd":58
8680  * cdef int ny
8681  * cdef int nz #NURBS
8682  * cdef int px # <<<<<<<<<<<<<<
8683  * cdef int py
8684  * cdef int pz, #NURBS
8685  */
8686 
8687 /* Python wrapper */
8688 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2px_1__get__(PyObject *__pyx_v_self); /*proto*/
8689 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2px_1__get__(PyObject *__pyx_v_self) {
8690  PyObject *__pyx_r = 0;
8691  __Pyx_RefNannyDeclarations
8692  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8693  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2px___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8694 
8695  /* function exit code */
8696  __Pyx_RefNannyFinishContext();
8697  return __pyx_r;
8698 }
8699 
8700 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2px___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8701  PyObject *__pyx_r = NULL;
8702  __Pyx_RefNannyDeclarations
8703  PyObject *__pyx_t_1 = NULL;
8704  int __pyx_lineno = 0;
8705  const char *__pyx_filename = NULL;
8706  int __pyx_clineno = 0;
8707  __Pyx_RefNannySetupContext("__get__", 0);
8708  __Pyx_XDECREF(__pyx_r);
8709  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->px); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 58, __pyx_L1_error)
8710  __Pyx_GOTREF(__pyx_t_1);
8711  __pyx_r = __pyx_t_1;
8712  __pyx_t_1 = 0;
8713  goto __pyx_L0;
8714 
8715  /* function exit code */
8716  __pyx_L1_error:;
8717  __Pyx_XDECREF(__pyx_t_1);
8718  __Pyx_AddTraceback("cmeshTools.CMesh.px.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8719  __pyx_r = NULL;
8720  __pyx_L0:;
8721  __Pyx_XGIVEREF(__pyx_r);
8722  __Pyx_RefNannyFinishContext();
8723  return __pyx_r;
8724 }
8725 
8726 /* Python wrapper */
8727 static int __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8728 static int __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8729  int __pyx_r;
8730  __Pyx_RefNannyDeclarations
8731  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8732  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8733 
8734  /* function exit code */
8735  __Pyx_RefNannyFinishContext();
8736  return __pyx_r;
8737 }
8738 
8739 static int __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8740  int __pyx_r;
8741  __Pyx_RefNannyDeclarations
8742  int __pyx_t_1;
8743  int __pyx_lineno = 0;
8744  const char *__pyx_filename = NULL;
8745  int __pyx_clineno = 0;
8746  __Pyx_RefNannySetupContext("__set__", 0);
8747  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 58, __pyx_L1_error)
8748  __pyx_v_self->px = __pyx_t_1;
8749 
8750  /* function exit code */
8751  __pyx_r = 0;
8752  goto __pyx_L0;
8753  __pyx_L1_error:;
8754  __Pyx_AddTraceback("cmeshTools.CMesh.px.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8755  __pyx_r = -1;
8756  __pyx_L0:;
8757  __Pyx_RefNannyFinishContext();
8758  return __pyx_r;
8759 }
8760 
8761 /* "cmeshTools.pxd":59
8762  * cdef int nz #NURBS
8763  * cdef int px
8764  * cdef int py # <<<<<<<<<<<<<<
8765  * cdef int pz, #NURBS
8766  * # cdef int[:] elementIJK, #NURBS
8767  */
8768 
8769 /* Python wrapper */
8770 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2py_1__get__(PyObject *__pyx_v_self); /*proto*/
8771 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2py_1__get__(PyObject *__pyx_v_self) {
8772  PyObject *__pyx_r = 0;
8773  __Pyx_RefNannyDeclarations
8774  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8775  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2py___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8776 
8777  /* function exit code */
8778  __Pyx_RefNannyFinishContext();
8779  return __pyx_r;
8780 }
8781 
8782 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2py___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8783  PyObject *__pyx_r = NULL;
8784  __Pyx_RefNannyDeclarations
8785  PyObject *__pyx_t_1 = NULL;
8786  int __pyx_lineno = 0;
8787  const char *__pyx_filename = NULL;
8788  int __pyx_clineno = 0;
8789  __Pyx_RefNannySetupContext("__get__", 0);
8790  __Pyx_XDECREF(__pyx_r);
8791  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->py); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 59, __pyx_L1_error)
8792  __Pyx_GOTREF(__pyx_t_1);
8793  __pyx_r = __pyx_t_1;
8794  __pyx_t_1 = 0;
8795  goto __pyx_L0;
8796 
8797  /* function exit code */
8798  __pyx_L1_error:;
8799  __Pyx_XDECREF(__pyx_t_1);
8800  __Pyx_AddTraceback("cmeshTools.CMesh.py.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8801  __pyx_r = NULL;
8802  __pyx_L0:;
8803  __Pyx_XGIVEREF(__pyx_r);
8804  __Pyx_RefNannyFinishContext();
8805  return __pyx_r;
8806 }
8807 
8808 /* Python wrapper */
8809 static int __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8810 static int __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8811  int __pyx_r;
8812  __Pyx_RefNannyDeclarations
8813  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8814  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8815 
8816  /* function exit code */
8817  __Pyx_RefNannyFinishContext();
8818  return __pyx_r;
8819 }
8820 
8821 static int __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8822  int __pyx_r;
8823  __Pyx_RefNannyDeclarations
8824  int __pyx_t_1;
8825  int __pyx_lineno = 0;
8826  const char *__pyx_filename = NULL;
8827  int __pyx_clineno = 0;
8828  __Pyx_RefNannySetupContext("__set__", 0);
8829  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 59, __pyx_L1_error)
8830  __pyx_v_self->py = __pyx_t_1;
8831 
8832  /* function exit code */
8833  __pyx_r = 0;
8834  goto __pyx_L0;
8835  __pyx_L1_error:;
8836  __Pyx_AddTraceback("cmeshTools.CMesh.py.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8837  __pyx_r = -1;
8838  __pyx_L0:;
8839  __Pyx_RefNannyFinishContext();
8840  return __pyx_r;
8841 }
8842 
8843 /* "cmeshTools.pxd":60
8844  * cdef int px
8845  * cdef int py
8846  * cdef int pz, #NURBS # <<<<<<<<<<<<<<
8847  * # cdef int[:] elementIJK, #NURBS
8848  * # cdef double[:] weights, #NURBS
8849  */
8850 
8851 /* Python wrapper */
8852 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(PyObject *__pyx_v_self); /*proto*/
8853 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(PyObject *__pyx_v_self) {
8854  PyObject *__pyx_r = 0;
8855  __Pyx_RefNannyDeclarations
8856  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8857  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2pz___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8858 
8859  /* function exit code */
8860  __Pyx_RefNannyFinishContext();
8861  return __pyx_r;
8862 }
8863 
8864 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2pz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8865  PyObject *__pyx_r = NULL;
8866  __Pyx_RefNannyDeclarations
8867  PyObject *__pyx_t_1 = NULL;
8868  int __pyx_lineno = 0;
8869  const char *__pyx_filename = NULL;
8870  int __pyx_clineno = 0;
8871  __Pyx_RefNannySetupContext("__get__", 0);
8872  __Pyx_XDECREF(__pyx_r);
8873  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 60, __pyx_L1_error)
8874  __Pyx_GOTREF(__pyx_t_1);
8875  __pyx_r = __pyx_t_1;
8876  __pyx_t_1 = 0;
8877  goto __pyx_L0;
8878 
8879  /* function exit code */
8880  __pyx_L1_error:;
8881  __Pyx_XDECREF(__pyx_t_1);
8882  __Pyx_AddTraceback("cmeshTools.CMesh.pz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8883  __pyx_r = NULL;
8884  __pyx_L0:;
8885  __Pyx_XGIVEREF(__pyx_r);
8886  __Pyx_RefNannyFinishContext();
8887  return __pyx_r;
8888 }
8889 
8890 /* Python wrapper */
8891 static int __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8892 static int __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8893  int __pyx_r;
8894  __Pyx_RefNannyDeclarations
8895  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8896  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8897 
8898  /* function exit code */
8899  __Pyx_RefNannyFinishContext();
8900  return __pyx_r;
8901 }
8902 
8903 static int __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8904  int __pyx_r;
8905  __Pyx_RefNannyDeclarations
8906  int __pyx_t_1;
8907  int __pyx_lineno = 0;
8908  const char *__pyx_filename = NULL;
8909  int __pyx_clineno = 0;
8910  __Pyx_RefNannySetupContext("__set__", 0);
8911  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 60, __pyx_L1_error)
8912  __pyx_v_self->pz = __pyx_t_1;
8913 
8914  /* function exit code */
8915  __pyx_r = 0;
8916  goto __pyx_L0;
8917  __pyx_L1_error:;
8918  __Pyx_AddTraceback("cmeshTools.CMesh.pz.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8919  __pyx_r = -1;
8920  __pyx_L0:;
8921  __Pyx_RefNannyFinishContext();
8922  return __pyx_r;
8923 }
8924 
8925 /* "cmeshTools.pxd":74
8926  * # cdef double[:] nodeSupportArray,
8927  *
8928  * cdef np.ndarray elementIJK, #NURBS # <<<<<<<<<<<<<<
8929  * cdef np.ndarray weights, #NURBS
8930  * cdef np.ndarray U_KNOT, #NURBS
8931  */
8932 
8933 /* Python wrapper */
8934 static PyObject *__pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(PyObject *__pyx_v_self); /*proto*/
8935 static PyObject *__pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(PyObject *__pyx_v_self) {
8936  PyObject *__pyx_r = 0;
8937  __Pyx_RefNannyDeclarations
8938  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8939  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8940 
8941  /* function exit code */
8942  __Pyx_RefNannyFinishContext();
8943  return __pyx_r;
8944 }
8945 
8946 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8947  PyObject *__pyx_r = NULL;
8948  __Pyx_RefNannyDeclarations
8949  __Pyx_RefNannySetupContext("__get__", 0);
8950  __Pyx_XDECREF(__pyx_r);
8951  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementIJK));
8952  __pyx_r = ((PyObject *)__pyx_v_self->elementIJK);
8953  goto __pyx_L0;
8954 
8955  /* function exit code */
8956  __pyx_L0:;
8957  __Pyx_XGIVEREF(__pyx_r);
8958  __Pyx_RefNannyFinishContext();
8959  return __pyx_r;
8960 }
8961 
8962 /* Python wrapper */
8963 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8964 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8965  int __pyx_r;
8966  __Pyx_RefNannyDeclarations
8967  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8968  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8969 
8970  /* function exit code */
8971  __Pyx_RefNannyFinishContext();
8972  return __pyx_r;
8973 }
8974 
8975 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8976  int __pyx_r;
8977  __Pyx_RefNannyDeclarations
8978  PyObject *__pyx_t_1 = NULL;
8979  int __pyx_lineno = 0;
8980  const char *__pyx_filename = NULL;
8981  int __pyx_clineno = 0;
8982  __Pyx_RefNannySetupContext("__set__", 0);
8983  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 74, __pyx_L1_error)
8984  __pyx_t_1 = __pyx_v_value;
8985  __Pyx_INCREF(__pyx_t_1);
8986  __Pyx_GIVEREF(__pyx_t_1);
8987  __Pyx_GOTREF(__pyx_v_self->elementIJK);
8988  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
8989  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_1);
8990  __pyx_t_1 = 0;
8991 
8992  /* function exit code */
8993  __pyx_r = 0;
8994  goto __pyx_L0;
8995  __pyx_L1_error:;
8996  __Pyx_XDECREF(__pyx_t_1);
8997  __Pyx_AddTraceback("cmeshTools.CMesh.elementIJK.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8998  __pyx_r = -1;
8999  __pyx_L0:;
9000  __Pyx_RefNannyFinishContext();
9001  return __pyx_r;
9002 }
9003 
9004 /* Python wrapper */
9005 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(PyObject *__pyx_v_self); /*proto*/
9006 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(PyObject *__pyx_v_self) {
9007  int __pyx_r;
9008  __Pyx_RefNannyDeclarations
9009  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9010  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9011 
9012  /* function exit code */
9013  __Pyx_RefNannyFinishContext();
9014  return __pyx_r;
9015 }
9016 
9017 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9018  int __pyx_r;
9019  __Pyx_RefNannyDeclarations
9020  __Pyx_RefNannySetupContext("__del__", 0);
9021  __Pyx_INCREF(Py_None);
9022  __Pyx_GIVEREF(Py_None);
9023  __Pyx_GOTREF(__pyx_v_self->elementIJK);
9024  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
9025  __pyx_v_self->elementIJK = ((PyArrayObject *)Py_None);
9026 
9027  /* function exit code */
9028  __pyx_r = 0;
9029  __Pyx_RefNannyFinishContext();
9030  return __pyx_r;
9031 }
9032 
9033 /* "cmeshTools.pxd":75
9034  *
9035  * cdef np.ndarray elementIJK, #NURBS
9036  * cdef np.ndarray weights, #NURBS # <<<<<<<<<<<<<<
9037  * cdef np.ndarray U_KNOT, #NURBS
9038  * cdef np.ndarray V_KNOT, #NURBS
9039  */
9040 
9041 /* Python wrapper */
9042 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/
9043 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(PyObject *__pyx_v_self) {
9044  PyObject *__pyx_r = 0;
9045  __Pyx_RefNannyDeclarations
9046  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9047  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9048 
9049  /* function exit code */
9050  __Pyx_RefNannyFinishContext();
9051  return __pyx_r;
9052 }
9053 
9054 static PyObject *__pyx_pf_10cmeshTools_5CMesh_7weights___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9055  PyObject *__pyx_r = NULL;
9056  __Pyx_RefNannyDeclarations
9057  __Pyx_RefNannySetupContext("__get__", 0);
9058  __Pyx_XDECREF(__pyx_r);
9059  __Pyx_INCREF(((PyObject *)__pyx_v_self->weights));
9060  __pyx_r = ((PyObject *)__pyx_v_self->weights);
9061  goto __pyx_L0;
9062 
9063  /* function exit code */
9064  __pyx_L0:;
9065  __Pyx_XGIVEREF(__pyx_r);
9066  __Pyx_RefNannyFinishContext();
9067  return __pyx_r;
9068 }
9069 
9070 /* Python wrapper */
9071 static int __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9072 static int __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9073  int __pyx_r;
9074  __Pyx_RefNannyDeclarations
9075  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9076  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9077 
9078  /* function exit code */
9079  __Pyx_RefNannyFinishContext();
9080  return __pyx_r;
9081 }
9082 
9083 static int __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9084  int __pyx_r;
9085  __Pyx_RefNannyDeclarations
9086  PyObject *__pyx_t_1 = NULL;
9087  int __pyx_lineno = 0;
9088  const char *__pyx_filename = NULL;
9089  int __pyx_clineno = 0;
9090  __Pyx_RefNannySetupContext("__set__", 0);
9091  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 75, __pyx_L1_error)
9092  __pyx_t_1 = __pyx_v_value;
9093  __Pyx_INCREF(__pyx_t_1);
9094  __Pyx_GIVEREF(__pyx_t_1);
9095  __Pyx_GOTREF(__pyx_v_self->weights);
9096  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
9097  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_1);
9098  __pyx_t_1 = 0;
9099 
9100  /* function exit code */
9101  __pyx_r = 0;
9102  goto __pyx_L0;
9103  __pyx_L1_error:;
9104  __Pyx_XDECREF(__pyx_t_1);
9105  __Pyx_AddTraceback("cmeshTools.CMesh.weights.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9106  __pyx_r = -1;
9107  __pyx_L0:;
9108  __Pyx_RefNannyFinishContext();
9109  return __pyx_r;
9110 }
9111 
9112 /* Python wrapper */
9113 static int __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(PyObject *__pyx_v_self); /*proto*/
9114 static int __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(PyObject *__pyx_v_self) {
9115  int __pyx_r;
9116  __Pyx_RefNannyDeclarations
9117  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9118  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9119 
9120  /* function exit code */
9121  __Pyx_RefNannyFinishContext();
9122  return __pyx_r;
9123 }
9124 
9125 static int __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9126  int __pyx_r;
9127  __Pyx_RefNannyDeclarations
9128  __Pyx_RefNannySetupContext("__del__", 0);
9129  __Pyx_INCREF(Py_None);
9130  __Pyx_GIVEREF(Py_None);
9131  __Pyx_GOTREF(__pyx_v_self->weights);
9132  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
9133  __pyx_v_self->weights = ((PyArrayObject *)Py_None);
9134 
9135  /* function exit code */
9136  __pyx_r = 0;
9137  __Pyx_RefNannyFinishContext();
9138  return __pyx_r;
9139 }
9140 
9141 /* "cmeshTools.pxd":76
9142  * cdef np.ndarray elementIJK, #NURBS
9143  * cdef np.ndarray weights, #NURBS
9144  * cdef np.ndarray U_KNOT, #NURBS # <<<<<<<<<<<<<<
9145  * cdef np.ndarray V_KNOT, #NURBS
9146  * cdef np.ndarray W_KNOT, #NURBS
9147  */
9148 
9149 /* Python wrapper */
9150 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
9151 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(PyObject *__pyx_v_self) {
9152  PyObject *__pyx_r = 0;
9153  __Pyx_RefNannyDeclarations
9154  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9155  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9156 
9157  /* function exit code */
9158  __Pyx_RefNannyFinishContext();
9159  return __pyx_r;
9160 }
9161 
9162 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9163  PyObject *__pyx_r = NULL;
9164  __Pyx_RefNannyDeclarations
9165  __Pyx_RefNannySetupContext("__get__", 0);
9166  __Pyx_XDECREF(__pyx_r);
9167  __Pyx_INCREF(((PyObject *)__pyx_v_self->U_KNOT));
9168  __pyx_r = ((PyObject *)__pyx_v_self->U_KNOT);
9169  goto __pyx_L0;
9170 
9171  /* function exit code */
9172  __pyx_L0:;
9173  __Pyx_XGIVEREF(__pyx_r);
9174  __Pyx_RefNannyFinishContext();
9175  return __pyx_r;
9176 }
9177 
9178 /* Python wrapper */
9179 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9180 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9181  int __pyx_r;
9182  __Pyx_RefNannyDeclarations
9183  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9184  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9185 
9186  /* function exit code */
9187  __Pyx_RefNannyFinishContext();
9188  return __pyx_r;
9189 }
9190 
9191 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9192  int __pyx_r;
9193  __Pyx_RefNannyDeclarations
9194  PyObject *__pyx_t_1 = NULL;
9195  int __pyx_lineno = 0;
9196  const char *__pyx_filename = NULL;
9197  int __pyx_clineno = 0;
9198  __Pyx_RefNannySetupContext("__set__", 0);
9199  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 76, __pyx_L1_error)
9200  __pyx_t_1 = __pyx_v_value;
9201  __Pyx_INCREF(__pyx_t_1);
9202  __Pyx_GIVEREF(__pyx_t_1);
9203  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
9204  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
9205  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_1);
9206  __pyx_t_1 = 0;
9207 
9208  /* function exit code */
9209  __pyx_r = 0;
9210  goto __pyx_L0;
9211  __pyx_L1_error:;
9212  __Pyx_XDECREF(__pyx_t_1);
9213  __Pyx_AddTraceback("cmeshTools.CMesh.U_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9214  __pyx_r = -1;
9215  __pyx_L0:;
9216  __Pyx_RefNannyFinishContext();
9217  return __pyx_r;
9218 }
9219 
9220 /* Python wrapper */
9221 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9222 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(PyObject *__pyx_v_self) {
9223  int __pyx_r;
9224  __Pyx_RefNannyDeclarations
9225  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9226  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9227 
9228  /* function exit code */
9229  __Pyx_RefNannyFinishContext();
9230  return __pyx_r;
9231 }
9232 
9233 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9234  int __pyx_r;
9235  __Pyx_RefNannyDeclarations
9236  __Pyx_RefNannySetupContext("__del__", 0);
9237  __Pyx_INCREF(Py_None);
9238  __Pyx_GIVEREF(Py_None);
9239  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
9240  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
9241  __pyx_v_self->U_KNOT = ((PyArrayObject *)Py_None);
9242 
9243  /* function exit code */
9244  __pyx_r = 0;
9245  __Pyx_RefNannyFinishContext();
9246  return __pyx_r;
9247 }
9248 
9249 /* "cmeshTools.pxd":77
9250  * cdef np.ndarray weights, #NURBS
9251  * cdef np.ndarray U_KNOT, #NURBS
9252  * cdef np.ndarray V_KNOT, #NURBS # <<<<<<<<<<<<<<
9253  * cdef np.ndarray W_KNOT, #NURBS
9254  * cdef np.ndarray elementDiametersArray,
9255  */
9256 
9257 /* Python wrapper */
9258 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
9259 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(PyObject *__pyx_v_self) {
9260  PyObject *__pyx_r = 0;
9261  __Pyx_RefNannyDeclarations
9262  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9263  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9264 
9265  /* function exit code */
9266  __Pyx_RefNannyFinishContext();
9267  return __pyx_r;
9268 }
9269 
9270 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9271  PyObject *__pyx_r = NULL;
9272  __Pyx_RefNannyDeclarations
9273  __Pyx_RefNannySetupContext("__get__", 0);
9274  __Pyx_XDECREF(__pyx_r);
9275  __Pyx_INCREF(((PyObject *)__pyx_v_self->V_KNOT));
9276  __pyx_r = ((PyObject *)__pyx_v_self->V_KNOT);
9277  goto __pyx_L0;
9278 
9279  /* function exit code */
9280  __pyx_L0:;
9281  __Pyx_XGIVEREF(__pyx_r);
9282  __Pyx_RefNannyFinishContext();
9283  return __pyx_r;
9284 }
9285 
9286 /* Python wrapper */
9287 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9288 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9289  int __pyx_r;
9290  __Pyx_RefNannyDeclarations
9291  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9292  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9293 
9294  /* function exit code */
9295  __Pyx_RefNannyFinishContext();
9296  return __pyx_r;
9297 }
9298 
9299 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9300  int __pyx_r;
9301  __Pyx_RefNannyDeclarations
9302  PyObject *__pyx_t_1 = NULL;
9303  int __pyx_lineno = 0;
9304  const char *__pyx_filename = NULL;
9305  int __pyx_clineno = 0;
9306  __Pyx_RefNannySetupContext("__set__", 0);
9307  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 77, __pyx_L1_error)
9308  __pyx_t_1 = __pyx_v_value;
9309  __Pyx_INCREF(__pyx_t_1);
9310  __Pyx_GIVEREF(__pyx_t_1);
9311  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
9312  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
9313  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_1);
9314  __pyx_t_1 = 0;
9315 
9316  /* function exit code */
9317  __pyx_r = 0;
9318  goto __pyx_L0;
9319  __pyx_L1_error:;
9320  __Pyx_XDECREF(__pyx_t_1);
9321  __Pyx_AddTraceback("cmeshTools.CMesh.V_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9322  __pyx_r = -1;
9323  __pyx_L0:;
9324  __Pyx_RefNannyFinishContext();
9325  return __pyx_r;
9326 }
9327 
9328 /* Python wrapper */
9329 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9330 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(PyObject *__pyx_v_self) {
9331  int __pyx_r;
9332  __Pyx_RefNannyDeclarations
9333  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9334  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9335 
9336  /* function exit code */
9337  __Pyx_RefNannyFinishContext();
9338  return __pyx_r;
9339 }
9340 
9341 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9342  int __pyx_r;
9343  __Pyx_RefNannyDeclarations
9344  __Pyx_RefNannySetupContext("__del__", 0);
9345  __Pyx_INCREF(Py_None);
9346  __Pyx_GIVEREF(Py_None);
9347  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
9348  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
9349  __pyx_v_self->V_KNOT = ((PyArrayObject *)Py_None);
9350 
9351  /* function exit code */
9352  __pyx_r = 0;
9353  __Pyx_RefNannyFinishContext();
9354  return __pyx_r;
9355 }
9356 
9357 /* "cmeshTools.pxd":78
9358  * cdef np.ndarray U_KNOT, #NURBS
9359  * cdef np.ndarray V_KNOT, #NURBS
9360  * cdef np.ndarray W_KNOT, #NURBS # <<<<<<<<<<<<<<
9361  * cdef np.ndarray elementDiametersArray,
9362  * cdef np.ndarray elementInnerDiametersArray,
9363  */
9364 
9365 /* Python wrapper */
9366 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
9367 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(PyObject *__pyx_v_self) {
9368  PyObject *__pyx_r = 0;
9369  __Pyx_RefNannyDeclarations
9370  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9371  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9372 
9373  /* function exit code */
9374  __Pyx_RefNannyFinishContext();
9375  return __pyx_r;
9376 }
9377 
9378 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9379  PyObject *__pyx_r = NULL;
9380  __Pyx_RefNannyDeclarations
9381  __Pyx_RefNannySetupContext("__get__", 0);
9382  __Pyx_XDECREF(__pyx_r);
9383  __Pyx_INCREF(((PyObject *)__pyx_v_self->W_KNOT));
9384  __pyx_r = ((PyObject *)__pyx_v_self->W_KNOT);
9385  goto __pyx_L0;
9386 
9387  /* function exit code */
9388  __pyx_L0:;
9389  __Pyx_XGIVEREF(__pyx_r);
9390  __Pyx_RefNannyFinishContext();
9391  return __pyx_r;
9392 }
9393 
9394 /* Python wrapper */
9395 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9396 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9397  int __pyx_r;
9398  __Pyx_RefNannyDeclarations
9399  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9400  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9401 
9402  /* function exit code */
9403  __Pyx_RefNannyFinishContext();
9404  return __pyx_r;
9405 }
9406 
9407 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9408  int __pyx_r;
9409  __Pyx_RefNannyDeclarations
9410  PyObject *__pyx_t_1 = NULL;
9411  int __pyx_lineno = 0;
9412  const char *__pyx_filename = NULL;
9413  int __pyx_clineno = 0;
9414  __Pyx_RefNannySetupContext("__set__", 0);
9415  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 78, __pyx_L1_error)
9416  __pyx_t_1 = __pyx_v_value;
9417  __Pyx_INCREF(__pyx_t_1);
9418  __Pyx_GIVEREF(__pyx_t_1);
9419  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
9420  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
9421  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_1);
9422  __pyx_t_1 = 0;
9423 
9424  /* function exit code */
9425  __pyx_r = 0;
9426  goto __pyx_L0;
9427  __pyx_L1_error:;
9428  __Pyx_XDECREF(__pyx_t_1);
9429  __Pyx_AddTraceback("cmeshTools.CMesh.W_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9430  __pyx_r = -1;
9431  __pyx_L0:;
9432  __Pyx_RefNannyFinishContext();
9433  return __pyx_r;
9434 }
9435 
9436 /* Python wrapper */
9437 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9438 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(PyObject *__pyx_v_self) {
9439  int __pyx_r;
9440  __Pyx_RefNannyDeclarations
9441  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9442  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9443 
9444  /* function exit code */
9445  __Pyx_RefNannyFinishContext();
9446  return __pyx_r;
9447 }
9448 
9449 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9450  int __pyx_r;
9451  __Pyx_RefNannyDeclarations
9452  __Pyx_RefNannySetupContext("__del__", 0);
9453  __Pyx_INCREF(Py_None);
9454  __Pyx_GIVEREF(Py_None);
9455  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
9456  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
9457  __pyx_v_self->W_KNOT = ((PyArrayObject *)Py_None);
9458 
9459  /* function exit code */
9460  __pyx_r = 0;
9461  __Pyx_RefNannyFinishContext();
9462  return __pyx_r;
9463 }
9464 
9465 /* "cmeshTools.pxd":79
9466  * cdef np.ndarray V_KNOT, #NURBS
9467  * cdef np.ndarray W_KNOT, #NURBS
9468  * cdef np.ndarray elementDiametersArray, # <<<<<<<<<<<<<<
9469  * cdef np.ndarray elementInnerDiametersArray,
9470  * cdef np.ndarray elementBoundaryDiametersArray,
9471  */
9472 
9473 /* Python wrapper */
9474 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9475 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(PyObject *__pyx_v_self) {
9476  PyObject *__pyx_r = 0;
9477  __Pyx_RefNannyDeclarations
9478  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9479  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9480 
9481  /* function exit code */
9482  __Pyx_RefNannyFinishContext();
9483  return __pyx_r;
9484 }
9485 
9486 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9487  PyObject *__pyx_r = NULL;
9488  __Pyx_RefNannyDeclarations
9489  __Pyx_RefNannySetupContext("__get__", 0);
9490  __Pyx_XDECREF(__pyx_r);
9491  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9492  __pyx_r = ((PyObject *)__pyx_v_self->elementDiametersArray);
9493  goto __pyx_L0;
9494 
9495  /* function exit code */
9496  __pyx_L0:;
9497  __Pyx_XGIVEREF(__pyx_r);
9498  __Pyx_RefNannyFinishContext();
9499  return __pyx_r;
9500 }
9501 
9502 /* Python wrapper */
9503 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9504 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9505  int __pyx_r;
9506  __Pyx_RefNannyDeclarations
9507  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9508  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9509 
9510  /* function exit code */
9511  __Pyx_RefNannyFinishContext();
9512  return __pyx_r;
9513 }
9514 
9515 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9516  int __pyx_r;
9517  __Pyx_RefNannyDeclarations
9518  PyObject *__pyx_t_1 = NULL;
9519  int __pyx_lineno = 0;
9520  const char *__pyx_filename = NULL;
9521  int __pyx_clineno = 0;
9522  __Pyx_RefNannySetupContext("__set__", 0);
9523  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 79, __pyx_L1_error)
9524  __pyx_t_1 = __pyx_v_value;
9525  __Pyx_INCREF(__pyx_t_1);
9526  __Pyx_GIVEREF(__pyx_t_1);
9527  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
9528  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9529  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)__pyx_t_1);
9530  __pyx_t_1 = 0;
9531 
9532  /* function exit code */
9533  __pyx_r = 0;
9534  goto __pyx_L0;
9535  __pyx_L1_error:;
9536  __Pyx_XDECREF(__pyx_t_1);
9537  __Pyx_AddTraceback("cmeshTools.CMesh.elementDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9538  __pyx_r = -1;
9539  __pyx_L0:;
9540  __Pyx_RefNannyFinishContext();
9541  return __pyx_r;
9542 }
9543 
9544 /* Python wrapper */
9545 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9546 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(PyObject *__pyx_v_self) {
9547  int __pyx_r;
9548  __Pyx_RefNannyDeclarations
9549  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9550  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9551 
9552  /* function exit code */
9553  __Pyx_RefNannyFinishContext();
9554  return __pyx_r;
9555 }
9556 
9557 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9558  int __pyx_r;
9559  __Pyx_RefNannyDeclarations
9560  __Pyx_RefNannySetupContext("__del__", 0);
9561  __Pyx_INCREF(Py_None);
9562  __Pyx_GIVEREF(Py_None);
9563  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
9564  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9565  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)Py_None);
9566 
9567  /* function exit code */
9568  __pyx_r = 0;
9569  __Pyx_RefNannyFinishContext();
9570  return __pyx_r;
9571 }
9572 
9573 /* "cmeshTools.pxd":80
9574  * cdef np.ndarray W_KNOT, #NURBS
9575  * cdef np.ndarray elementDiametersArray,
9576  * cdef np.ndarray elementInnerDiametersArray, # <<<<<<<<<<<<<<
9577  * cdef np.ndarray elementBoundaryDiametersArray,
9578  * cdef np.ndarray elementBarycentersArray,
9579  */
9580 
9581 /* Python wrapper */
9582 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9583 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(PyObject *__pyx_v_self) {
9584  PyObject *__pyx_r = 0;
9585  __Pyx_RefNannyDeclarations
9586  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9587  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9588 
9589  /* function exit code */
9590  __Pyx_RefNannyFinishContext();
9591  return __pyx_r;
9592 }
9593 
9594 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9595  PyObject *__pyx_r = NULL;
9596  __Pyx_RefNannyDeclarations
9597  __Pyx_RefNannySetupContext("__get__", 0);
9598  __Pyx_XDECREF(__pyx_r);
9599  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9600  __pyx_r = ((PyObject *)__pyx_v_self->elementInnerDiametersArray);
9601  goto __pyx_L0;
9602 
9603  /* function exit code */
9604  __pyx_L0:;
9605  __Pyx_XGIVEREF(__pyx_r);
9606  __Pyx_RefNannyFinishContext();
9607  return __pyx_r;
9608 }
9609 
9610 /* Python wrapper */
9611 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9612 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9613  int __pyx_r;
9614  __Pyx_RefNannyDeclarations
9615  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9616  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9617 
9618  /* function exit code */
9619  __Pyx_RefNannyFinishContext();
9620  return __pyx_r;
9621 }
9622 
9623 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9624  int __pyx_r;
9625  __Pyx_RefNannyDeclarations
9626  PyObject *__pyx_t_1 = NULL;
9627  int __pyx_lineno = 0;
9628  const char *__pyx_filename = NULL;
9629  int __pyx_clineno = 0;
9630  __Pyx_RefNannySetupContext("__set__", 0);
9631  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 80, __pyx_L1_error)
9632  __pyx_t_1 = __pyx_v_value;
9633  __Pyx_INCREF(__pyx_t_1);
9634  __Pyx_GIVEREF(__pyx_t_1);
9635  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
9636  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9637  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)__pyx_t_1);
9638  __pyx_t_1 = 0;
9639 
9640  /* function exit code */
9641  __pyx_r = 0;
9642  goto __pyx_L0;
9643  __pyx_L1_error:;
9644  __Pyx_XDECREF(__pyx_t_1);
9645  __Pyx_AddTraceback("cmeshTools.CMesh.elementInnerDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9646  __pyx_r = -1;
9647  __pyx_L0:;
9648  __Pyx_RefNannyFinishContext();
9649  return __pyx_r;
9650 }
9651 
9652 /* Python wrapper */
9653 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9654 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(PyObject *__pyx_v_self) {
9655  int __pyx_r;
9656  __Pyx_RefNannyDeclarations
9657  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9658  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9659 
9660  /* function exit code */
9661  __Pyx_RefNannyFinishContext();
9662  return __pyx_r;
9663 }
9664 
9665 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9666  int __pyx_r;
9667  __Pyx_RefNannyDeclarations
9668  __Pyx_RefNannySetupContext("__del__", 0);
9669  __Pyx_INCREF(Py_None);
9670  __Pyx_GIVEREF(Py_None);
9671  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
9672  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9673  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)Py_None);
9674 
9675  /* function exit code */
9676  __pyx_r = 0;
9677  __Pyx_RefNannyFinishContext();
9678  return __pyx_r;
9679 }
9680 
9681 /* "cmeshTools.pxd":81
9682  * cdef np.ndarray elementDiametersArray,
9683  * cdef np.ndarray elementInnerDiametersArray,
9684  * cdef np.ndarray elementBoundaryDiametersArray, # <<<<<<<<<<<<<<
9685  * cdef np.ndarray elementBarycentersArray,
9686  * cdef np.ndarray elementBoundaryBarycentersArray,
9687  */
9688 
9689 /* Python wrapper */
9690 static PyObject *__pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9691 static PyObject *__pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(PyObject *__pyx_v_self) {
9692  PyObject *__pyx_r = 0;
9693  __Pyx_RefNannyDeclarations
9694  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9695  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9696 
9697  /* function exit code */
9698  __Pyx_RefNannyFinishContext();
9699  return __pyx_r;
9700 }
9701 
9702 static PyObject *__pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9703  PyObject *__pyx_r = NULL;
9704  __Pyx_RefNannyDeclarations
9705  __Pyx_RefNannySetupContext("__get__", 0);
9706  __Pyx_XDECREF(__pyx_r);
9707  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9708  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryDiametersArray);
9709  goto __pyx_L0;
9710 
9711  /* function exit code */
9712  __pyx_L0:;
9713  __Pyx_XGIVEREF(__pyx_r);
9714  __Pyx_RefNannyFinishContext();
9715  return __pyx_r;
9716 }
9717 
9718 /* Python wrapper */
9719 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9720 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9721  int __pyx_r;
9722  __Pyx_RefNannyDeclarations
9723  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9724  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9725 
9726  /* function exit code */
9727  __Pyx_RefNannyFinishContext();
9728  return __pyx_r;
9729 }
9730 
9731 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9732  int __pyx_r;
9733  __Pyx_RefNannyDeclarations
9734  PyObject *__pyx_t_1 = NULL;
9735  int __pyx_lineno = 0;
9736  const char *__pyx_filename = NULL;
9737  int __pyx_clineno = 0;
9738  __Pyx_RefNannySetupContext("__set__", 0);
9739  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 81, __pyx_L1_error)
9740  __pyx_t_1 = __pyx_v_value;
9741  __Pyx_INCREF(__pyx_t_1);
9742  __Pyx_GIVEREF(__pyx_t_1);
9743  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
9744  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9745  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)__pyx_t_1);
9746  __pyx_t_1 = 0;
9747 
9748  /* function exit code */
9749  __pyx_r = 0;
9750  goto __pyx_L0;
9751  __pyx_L1_error:;
9752  __Pyx_XDECREF(__pyx_t_1);
9753  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9754  __pyx_r = -1;
9755  __pyx_L0:;
9756  __Pyx_RefNannyFinishContext();
9757  return __pyx_r;
9758 }
9759 
9760 /* Python wrapper */
9761 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9762 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(PyObject *__pyx_v_self) {
9763  int __pyx_r;
9764  __Pyx_RefNannyDeclarations
9765  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9766  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9767 
9768  /* function exit code */
9769  __Pyx_RefNannyFinishContext();
9770  return __pyx_r;
9771 }
9772 
9773 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9774  int __pyx_r;
9775  __Pyx_RefNannyDeclarations
9776  __Pyx_RefNannySetupContext("__del__", 0);
9777  __Pyx_INCREF(Py_None);
9778  __Pyx_GIVEREF(Py_None);
9779  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
9780  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9781  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None);
9782 
9783  /* function exit code */
9784  __pyx_r = 0;
9785  __Pyx_RefNannyFinishContext();
9786  return __pyx_r;
9787 }
9788 
9789 /* "cmeshTools.pxd":82
9790  * cdef np.ndarray elementInnerDiametersArray,
9791  * cdef np.ndarray elementBoundaryDiametersArray,
9792  * cdef np.ndarray elementBarycentersArray, # <<<<<<<<<<<<<<
9793  * cdef np.ndarray elementBoundaryBarycentersArray,
9794  * cdef np.ndarray nodeDiametersArray,
9795  */
9796 
9797 /* Python wrapper */
9798 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9799 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(PyObject *__pyx_v_self) {
9800  PyObject *__pyx_r = 0;
9801  __Pyx_RefNannyDeclarations
9802  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9803  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9804 
9805  /* function exit code */
9806  __Pyx_RefNannyFinishContext();
9807  return __pyx_r;
9808 }
9809 
9810 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9811  PyObject *__pyx_r = NULL;
9812  __Pyx_RefNannyDeclarations
9813  __Pyx_RefNannySetupContext("__get__", 0);
9814  __Pyx_XDECREF(__pyx_r);
9815  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9816  __pyx_r = ((PyObject *)__pyx_v_self->elementBarycentersArray);
9817  goto __pyx_L0;
9818 
9819  /* function exit code */
9820  __pyx_L0:;
9821  __Pyx_XGIVEREF(__pyx_r);
9822  __Pyx_RefNannyFinishContext();
9823  return __pyx_r;
9824 }
9825 
9826 /* Python wrapper */
9827 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9828 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9829  int __pyx_r;
9830  __Pyx_RefNannyDeclarations
9831  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9832  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9833 
9834  /* function exit code */
9835  __Pyx_RefNannyFinishContext();
9836  return __pyx_r;
9837 }
9838 
9839 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9840  int __pyx_r;
9841  __Pyx_RefNannyDeclarations
9842  PyObject *__pyx_t_1 = NULL;
9843  int __pyx_lineno = 0;
9844  const char *__pyx_filename = NULL;
9845  int __pyx_clineno = 0;
9846  __Pyx_RefNannySetupContext("__set__", 0);
9847  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 82, __pyx_L1_error)
9848  __pyx_t_1 = __pyx_v_value;
9849  __Pyx_INCREF(__pyx_t_1);
9850  __Pyx_GIVEREF(__pyx_t_1);
9851  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
9852  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9853  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)__pyx_t_1);
9854  __pyx_t_1 = 0;
9855 
9856  /* function exit code */
9857  __pyx_r = 0;
9858  goto __pyx_L0;
9859  __pyx_L1_error:;
9860  __Pyx_XDECREF(__pyx_t_1);
9861  __Pyx_AddTraceback("cmeshTools.CMesh.elementBarycentersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9862  __pyx_r = -1;
9863  __pyx_L0:;
9864  __Pyx_RefNannyFinishContext();
9865  return __pyx_r;
9866 }
9867 
9868 /* Python wrapper */
9869 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9870 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(PyObject *__pyx_v_self) {
9871  int __pyx_r;
9872  __Pyx_RefNannyDeclarations
9873  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9874  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9875 
9876  /* function exit code */
9877  __Pyx_RefNannyFinishContext();
9878  return __pyx_r;
9879 }
9880 
9881 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9882  int __pyx_r;
9883  __Pyx_RefNannyDeclarations
9884  __Pyx_RefNannySetupContext("__del__", 0);
9885  __Pyx_INCREF(Py_None);
9886  __Pyx_GIVEREF(Py_None);
9887  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
9888  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9889  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)Py_None);
9890 
9891  /* function exit code */
9892  __pyx_r = 0;
9893  __Pyx_RefNannyFinishContext();
9894  return __pyx_r;
9895 }
9896 
9897 /* "cmeshTools.pxd":83
9898  * cdef np.ndarray elementBoundaryDiametersArray,
9899  * cdef np.ndarray elementBarycentersArray,
9900  * cdef np.ndarray elementBoundaryBarycentersArray, # <<<<<<<<<<<<<<
9901  * cdef np.ndarray nodeDiametersArray,
9902  * cdef np.ndarray nodeSupportArray,
9903  */
9904 
9905 /* Python wrapper */
9906 static PyObject *__pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9907 static PyObject *__pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(PyObject *__pyx_v_self) {
9908  PyObject *__pyx_r = 0;
9909  __Pyx_RefNannyDeclarations
9910  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9911  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9912 
9913  /* function exit code */
9914  __Pyx_RefNannyFinishContext();
9915  return __pyx_r;
9916 }
9917 
9918 static PyObject *__pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9919  PyObject *__pyx_r = NULL;
9920  __Pyx_RefNannyDeclarations
9921  __Pyx_RefNannySetupContext("__get__", 0);
9922  __Pyx_XDECREF(__pyx_r);
9923  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9924  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray);
9925  goto __pyx_L0;
9926 
9927  /* function exit code */
9928  __pyx_L0:;
9929  __Pyx_XGIVEREF(__pyx_r);
9930  __Pyx_RefNannyFinishContext();
9931  return __pyx_r;
9932 }
9933 
9934 /* Python wrapper */
9935 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9936 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9937  int __pyx_r;
9938  __Pyx_RefNannyDeclarations
9939  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9940  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9941 
9942  /* function exit code */
9943  __Pyx_RefNannyFinishContext();
9944  return __pyx_r;
9945 }
9946 
9947 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9948  int __pyx_r;
9949  __Pyx_RefNannyDeclarations
9950  PyObject *__pyx_t_1 = NULL;
9951  int __pyx_lineno = 0;
9952  const char *__pyx_filename = NULL;
9953  int __pyx_clineno = 0;
9954  __Pyx_RefNannySetupContext("__set__", 0);
9955  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 83, __pyx_L1_error)
9956  __pyx_t_1 = __pyx_v_value;
9957  __Pyx_INCREF(__pyx_t_1);
9958  __Pyx_GIVEREF(__pyx_t_1);
9959  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
9960  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9961  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)__pyx_t_1);
9962  __pyx_t_1 = 0;
9963 
9964  /* function exit code */
9965  __pyx_r = 0;
9966  goto __pyx_L0;
9967  __pyx_L1_error:;
9968  __Pyx_XDECREF(__pyx_t_1);
9969  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryBarycentersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9970  __pyx_r = -1;
9971  __pyx_L0:;
9972  __Pyx_RefNannyFinishContext();
9973  return __pyx_r;
9974 }
9975 
9976 /* Python wrapper */
9977 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9978 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(PyObject *__pyx_v_self) {
9979  int __pyx_r;
9980  __Pyx_RefNannyDeclarations
9981  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9982  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9983 
9984  /* function exit code */
9985  __Pyx_RefNannyFinishContext();
9986  return __pyx_r;
9987 }
9988 
9989 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9990  int __pyx_r;
9991  __Pyx_RefNannyDeclarations
9992  __Pyx_RefNannySetupContext("__del__", 0);
9993  __Pyx_INCREF(Py_None);
9994  __Pyx_GIVEREF(Py_None);
9995  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
9996  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9997  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None);
9998 
9999  /* function exit code */
10000  __pyx_r = 0;
10001  __Pyx_RefNannyFinishContext();
10002  return __pyx_r;
10003 }
10004 
10005 /* "cmeshTools.pxd":84
10006  * cdef np.ndarray elementBarycentersArray,
10007  * cdef np.ndarray elementBoundaryBarycentersArray,
10008  * cdef np.ndarray nodeDiametersArray, # <<<<<<<<<<<<<<
10009  * cdef np.ndarray nodeSupportArray,
10010  *
10011  */
10012 
10013 /* Python wrapper */
10014 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
10015 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(PyObject *__pyx_v_self) {
10016  PyObject *__pyx_r = 0;
10017  __Pyx_RefNannyDeclarations
10018  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10019  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10020 
10021  /* function exit code */
10022  __Pyx_RefNannyFinishContext();
10023  return __pyx_r;
10024 }
10025 
10026 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10027  PyObject *__pyx_r = NULL;
10028  __Pyx_RefNannyDeclarations
10029  __Pyx_RefNannySetupContext("__get__", 0);
10030  __Pyx_XDECREF(__pyx_r);
10031  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
10032  __pyx_r = ((PyObject *)__pyx_v_self->nodeDiametersArray);
10033  goto __pyx_L0;
10034 
10035  /* function exit code */
10036  __pyx_L0:;
10037  __Pyx_XGIVEREF(__pyx_r);
10038  __Pyx_RefNannyFinishContext();
10039  return __pyx_r;
10040 }
10041 
10042 /* Python wrapper */
10043 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10044 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10045  int __pyx_r;
10046  __Pyx_RefNannyDeclarations
10047  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10048  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10049 
10050  /* function exit code */
10051  __Pyx_RefNannyFinishContext();
10052  return __pyx_r;
10053 }
10054 
10055 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10056  int __pyx_r;
10057  __Pyx_RefNannyDeclarations
10058  PyObject *__pyx_t_1 = NULL;
10059  int __pyx_lineno = 0;
10060  const char *__pyx_filename = NULL;
10061  int __pyx_clineno = 0;
10062  __Pyx_RefNannySetupContext("__set__", 0);
10063  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 84, __pyx_L1_error)
10064  __pyx_t_1 = __pyx_v_value;
10065  __Pyx_INCREF(__pyx_t_1);
10066  __Pyx_GIVEREF(__pyx_t_1);
10067  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
10068  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
10069  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)__pyx_t_1);
10070  __pyx_t_1 = 0;
10071 
10072  /* function exit code */
10073  __pyx_r = 0;
10074  goto __pyx_L0;
10075  __pyx_L1_error:;
10076  __Pyx_XDECREF(__pyx_t_1);
10077  __Pyx_AddTraceback("cmeshTools.CMesh.nodeDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10078  __pyx_r = -1;
10079  __pyx_L0:;
10080  __Pyx_RefNannyFinishContext();
10081  return __pyx_r;
10082 }
10083 
10084 /* Python wrapper */
10085 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
10086 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(PyObject *__pyx_v_self) {
10087  int __pyx_r;
10088  __Pyx_RefNannyDeclarations
10089  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
10090  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10091 
10092  /* function exit code */
10093  __Pyx_RefNannyFinishContext();
10094  return __pyx_r;
10095 }
10096 
10097 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10098  int __pyx_r;
10099  __Pyx_RefNannyDeclarations
10100  __Pyx_RefNannySetupContext("__del__", 0);
10101  __Pyx_INCREF(Py_None);
10102  __Pyx_GIVEREF(Py_None);
10103  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
10104  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
10105  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)Py_None);
10106 
10107  /* function exit code */
10108  __pyx_r = 0;
10109  __Pyx_RefNannyFinishContext();
10110  return __pyx_r;
10111 }
10112 
10113 /* "cmeshTools.pxd":85
10114  * cdef np.ndarray elementBoundaryBarycentersArray,
10115  * cdef np.ndarray nodeDiametersArray,
10116  * cdef np.ndarray nodeSupportArray, # <<<<<<<<<<<<<<
10117  *
10118  * cdef double h,
10119  */
10120 
10121 /* Python wrapper */
10122 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(PyObject *__pyx_v_self); /*proto*/
10123 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(PyObject *__pyx_v_self) {
10124  PyObject *__pyx_r = 0;
10125  __Pyx_RefNannyDeclarations
10126  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10127  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10128 
10129  /* function exit code */
10130  __Pyx_RefNannyFinishContext();
10131  return __pyx_r;
10132 }
10133 
10134 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10135  PyObject *__pyx_r = NULL;
10136  __Pyx_RefNannyDeclarations
10137  __Pyx_RefNannySetupContext("__get__", 0);
10138  __Pyx_XDECREF(__pyx_r);
10139  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeSupportArray));
10140  __pyx_r = ((PyObject *)__pyx_v_self->nodeSupportArray);
10141  goto __pyx_L0;
10142 
10143  /* function exit code */
10144  __pyx_L0:;
10145  __Pyx_XGIVEREF(__pyx_r);
10146  __Pyx_RefNannyFinishContext();
10147  return __pyx_r;
10148 }
10149 
10150 /* Python wrapper */
10151 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10152 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10153  int __pyx_r;
10154  __Pyx_RefNannyDeclarations
10155  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10156  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10157 
10158  /* function exit code */
10159  __Pyx_RefNannyFinishContext();
10160  return __pyx_r;
10161 }
10162 
10163 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10164  int __pyx_r;
10165  __Pyx_RefNannyDeclarations
10166  PyObject *__pyx_t_1 = NULL;
10167  int __pyx_lineno = 0;
10168  const char *__pyx_filename = NULL;
10169  int __pyx_clineno = 0;
10170  __Pyx_RefNannySetupContext("__set__", 0);
10171  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 85, __pyx_L1_error)
10172  __pyx_t_1 = __pyx_v_value;
10173  __Pyx_INCREF(__pyx_t_1);
10174  __Pyx_GIVEREF(__pyx_t_1);
10175  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
10176  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
10177  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)__pyx_t_1);
10178  __pyx_t_1 = 0;
10179 
10180  /* function exit code */
10181  __pyx_r = 0;
10182  goto __pyx_L0;
10183  __pyx_L1_error:;
10184  __Pyx_XDECREF(__pyx_t_1);
10185  __Pyx_AddTraceback("cmeshTools.CMesh.nodeSupportArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10186  __pyx_r = -1;
10187  __pyx_L0:;
10188  __Pyx_RefNannyFinishContext();
10189  return __pyx_r;
10190 }
10191 
10192 /* Python wrapper */
10193 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(PyObject *__pyx_v_self); /*proto*/
10194 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(PyObject *__pyx_v_self) {
10195  int __pyx_r;
10196  __Pyx_RefNannyDeclarations
10197  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
10198  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10199 
10200  /* function exit code */
10201  __Pyx_RefNannyFinishContext();
10202  return __pyx_r;
10203 }
10204 
10205 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10206  int __pyx_r;
10207  __Pyx_RefNannyDeclarations
10208  __Pyx_RefNannySetupContext("__del__", 0);
10209  __Pyx_INCREF(Py_None);
10210  __Pyx_GIVEREF(Py_None);
10211  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
10212  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
10213  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)Py_None);
10214 
10215  /* function exit code */
10216  __pyx_r = 0;
10217  __Pyx_RefNannyFinishContext();
10218  return __pyx_r;
10219 }
10220 
10221 /* "cmeshTools.pxd":87
10222  * cdef np.ndarray nodeSupportArray,
10223  *
10224  * cdef double h, # <<<<<<<<<<<<<<
10225  * cdef double hMin,
10226  * cdef double sigmaMax,
10227  */
10228 
10229 /* Python wrapper */
10230 static PyObject *__pyx_pw_10cmeshTools_5CMesh_1h_1__get__(PyObject *__pyx_v_self); /*proto*/
10231 static PyObject *__pyx_pw_10cmeshTools_5CMesh_1h_1__get__(PyObject *__pyx_v_self) {
10232  PyObject *__pyx_r = 0;
10233  __Pyx_RefNannyDeclarations
10234  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10235  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_1h___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10236 
10237  /* function exit code */
10238  __Pyx_RefNannyFinishContext();
10239  return __pyx_r;
10240 }
10241 
10242 static PyObject *__pyx_pf_10cmeshTools_5CMesh_1h___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10243  PyObject *__pyx_r = NULL;
10244  __Pyx_RefNannyDeclarations
10245  PyObject *__pyx_t_1 = NULL;
10246  int __pyx_lineno = 0;
10247  const char *__pyx_filename = NULL;
10248  int __pyx_clineno = 0;
10249  __Pyx_RefNannySetupContext("__get__", 0);
10250  __Pyx_XDECREF(__pyx_r);
10251  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 87, __pyx_L1_error)
10252  __Pyx_GOTREF(__pyx_t_1);
10253  __pyx_r = __pyx_t_1;
10254  __pyx_t_1 = 0;
10255  goto __pyx_L0;
10256 
10257  /* function exit code */
10258  __pyx_L1_error:;
10259  __Pyx_XDECREF(__pyx_t_1);
10260  __Pyx_AddTraceback("cmeshTools.CMesh.h.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10261  __pyx_r = NULL;
10262  __pyx_L0:;
10263  __Pyx_XGIVEREF(__pyx_r);
10264  __Pyx_RefNannyFinishContext();
10265  return __pyx_r;
10266 }
10267 
10268 /* Python wrapper */
10269 static int __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10270 static int __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10271  int __pyx_r;
10272  __Pyx_RefNannyDeclarations
10273  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10274  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10275 
10276  /* function exit code */
10277  __Pyx_RefNannyFinishContext();
10278  return __pyx_r;
10279 }
10280 
10281 static int __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10282  int __pyx_r;
10283  __Pyx_RefNannyDeclarations
10284  double __pyx_t_1;
10285  int __pyx_lineno = 0;
10286  const char *__pyx_filename = NULL;
10287  int __pyx_clineno = 0;
10288  __Pyx_RefNannySetupContext("__set__", 0);
10289  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 87, __pyx_L1_error)
10290  __pyx_v_self->h = __pyx_t_1;
10291 
10292  /* function exit code */
10293  __pyx_r = 0;
10294  goto __pyx_L0;
10295  __pyx_L1_error:;
10296  __Pyx_AddTraceback("cmeshTools.CMesh.h.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10297  __pyx_r = -1;
10298  __pyx_L0:;
10299  __Pyx_RefNannyFinishContext();
10300  return __pyx_r;
10301 }
10302 
10303 /* "cmeshTools.pxd":88
10304  *
10305  * cdef double h,
10306  * cdef double hMin, # <<<<<<<<<<<<<<
10307  * cdef double sigmaMax,
10308  * cdef double volume
10309  */
10310 
10311 /* Python wrapper */
10312 static PyObject *__pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(PyObject *__pyx_v_self); /*proto*/
10313 static PyObject *__pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(PyObject *__pyx_v_self) {
10314  PyObject *__pyx_r = 0;
10315  __Pyx_RefNannyDeclarations
10316  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10317  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4hMin___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10318 
10319  /* function exit code */
10320  __Pyx_RefNannyFinishContext();
10321  return __pyx_r;
10322 }
10323 
10324 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4hMin___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10325  PyObject *__pyx_r = NULL;
10326  __Pyx_RefNannyDeclarations
10327  PyObject *__pyx_t_1 = NULL;
10328  int __pyx_lineno = 0;
10329  const char *__pyx_filename = NULL;
10330  int __pyx_clineno = 0;
10331  __Pyx_RefNannySetupContext("__get__", 0);
10332  __Pyx_XDECREF(__pyx_r);
10333  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->hMin); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 88, __pyx_L1_error)
10334  __Pyx_GOTREF(__pyx_t_1);
10335  __pyx_r = __pyx_t_1;
10336  __pyx_t_1 = 0;
10337  goto __pyx_L0;
10338 
10339  /* function exit code */
10340  __pyx_L1_error:;
10341  __Pyx_XDECREF(__pyx_t_1);
10342  __Pyx_AddTraceback("cmeshTools.CMesh.hMin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10343  __pyx_r = NULL;
10344  __pyx_L0:;
10345  __Pyx_XGIVEREF(__pyx_r);
10346  __Pyx_RefNannyFinishContext();
10347  return __pyx_r;
10348 }
10349 
10350 /* Python wrapper */
10351 static int __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10352 static int __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10353  int __pyx_r;
10354  __Pyx_RefNannyDeclarations
10355  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10356  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10357 
10358  /* function exit code */
10359  __Pyx_RefNannyFinishContext();
10360  return __pyx_r;
10361 }
10362 
10363 static int __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10364  int __pyx_r;
10365  __Pyx_RefNannyDeclarations
10366  double __pyx_t_1;
10367  int __pyx_lineno = 0;
10368  const char *__pyx_filename = NULL;
10369  int __pyx_clineno = 0;
10370  __Pyx_RefNannySetupContext("__set__", 0);
10371  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L1_error)
10372  __pyx_v_self->hMin = __pyx_t_1;
10373 
10374  /* function exit code */
10375  __pyx_r = 0;
10376  goto __pyx_L0;
10377  __pyx_L1_error:;
10378  __Pyx_AddTraceback("cmeshTools.CMesh.hMin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10379  __pyx_r = -1;
10380  __pyx_L0:;
10381  __Pyx_RefNannyFinishContext();
10382  return __pyx_r;
10383 }
10384 
10385 /* "cmeshTools.pxd":89
10386  * cdef double h,
10387  * cdef double hMin,
10388  * cdef double sigmaMax, # <<<<<<<<<<<<<<
10389  * cdef double volume
10390  */
10391 
10392 /* Python wrapper */
10393 static PyObject *__pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(PyObject *__pyx_v_self); /*proto*/
10394 static PyObject *__pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(PyObject *__pyx_v_self) {
10395  PyObject *__pyx_r = 0;
10396  __Pyx_RefNannyDeclarations
10397  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10398  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10399 
10400  /* function exit code */
10401  __Pyx_RefNannyFinishContext();
10402  return __pyx_r;
10403 }
10404 
10405 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10406  PyObject *__pyx_r = NULL;
10407  __Pyx_RefNannyDeclarations
10408  PyObject *__pyx_t_1 = NULL;
10409  int __pyx_lineno = 0;
10410  const char *__pyx_filename = NULL;
10411  int __pyx_clineno = 0;
10412  __Pyx_RefNannySetupContext("__get__", 0);
10413  __Pyx_XDECREF(__pyx_r);
10414  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sigmaMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 89, __pyx_L1_error)
10415  __Pyx_GOTREF(__pyx_t_1);
10416  __pyx_r = __pyx_t_1;
10417  __pyx_t_1 = 0;
10418  goto __pyx_L0;
10419 
10420  /* function exit code */
10421  __pyx_L1_error:;
10422  __Pyx_XDECREF(__pyx_t_1);
10423  __Pyx_AddTraceback("cmeshTools.CMesh.sigmaMax.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10424  __pyx_r = NULL;
10425  __pyx_L0:;
10426  __Pyx_XGIVEREF(__pyx_r);
10427  __Pyx_RefNannyFinishContext();
10428  return __pyx_r;
10429 }
10430 
10431 /* Python wrapper */
10432 static int __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10433 static int __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10434  int __pyx_r;
10435  __Pyx_RefNannyDeclarations
10436  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10437  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10438 
10439  /* function exit code */
10440  __Pyx_RefNannyFinishContext();
10441  return __pyx_r;
10442 }
10443 
10444 static int __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10445  int __pyx_r;
10446  __Pyx_RefNannyDeclarations
10447  double __pyx_t_1;
10448  int __pyx_lineno = 0;
10449  const char *__pyx_filename = NULL;
10450  int __pyx_clineno = 0;
10451  __Pyx_RefNannySetupContext("__set__", 0);
10452  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 89, __pyx_L1_error)
10453  __pyx_v_self->sigmaMax = __pyx_t_1;
10454 
10455  /* function exit code */
10456  __pyx_r = 0;
10457  goto __pyx_L0;
10458  __pyx_L1_error:;
10459  __Pyx_AddTraceback("cmeshTools.CMesh.sigmaMax.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10460  __pyx_r = -1;
10461  __pyx_L0:;
10462  __Pyx_RefNannyFinishContext();
10463  return __pyx_r;
10464 }
10465 
10466 /* "cmeshTools.pxd":90
10467  * cdef double hMin,
10468  * cdef double sigmaMax,
10469  * cdef double volume # <<<<<<<<<<<<<<
10470  */
10471 
10472 /* Python wrapper */
10473 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(PyObject *__pyx_v_self); /*proto*/
10474 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(PyObject *__pyx_v_self) {
10475  PyObject *__pyx_r = 0;
10476  __Pyx_RefNannyDeclarations
10477  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10478  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6volume___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10479 
10480  /* function exit code */
10481  __Pyx_RefNannyFinishContext();
10482  return __pyx_r;
10483 }
10484 
10485 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6volume___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10486  PyObject *__pyx_r = NULL;
10487  __Pyx_RefNannyDeclarations
10488  PyObject *__pyx_t_1 = NULL;
10489  int __pyx_lineno = 0;
10490  const char *__pyx_filename = NULL;
10491  int __pyx_clineno = 0;
10492  __Pyx_RefNannySetupContext("__get__", 0);
10493  __Pyx_XDECREF(__pyx_r);
10494  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->volume); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 90, __pyx_L1_error)
10495  __Pyx_GOTREF(__pyx_t_1);
10496  __pyx_r = __pyx_t_1;
10497  __pyx_t_1 = 0;
10498  goto __pyx_L0;
10499 
10500  /* function exit code */
10501  __pyx_L1_error:;
10502  __Pyx_XDECREF(__pyx_t_1);
10503  __Pyx_AddTraceback("cmeshTools.CMesh.volume.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10504  __pyx_r = NULL;
10505  __pyx_L0:;
10506  __Pyx_XGIVEREF(__pyx_r);
10507  __Pyx_RefNannyFinishContext();
10508  return __pyx_r;
10509 }
10510 
10511 /* Python wrapper */
10512 static int __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10513 static int __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10514  int __pyx_r;
10515  __Pyx_RefNannyDeclarations
10516  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10517  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10518 
10519  /* function exit code */
10520  __Pyx_RefNannyFinishContext();
10521  return __pyx_r;
10522 }
10523 
10524 static int __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10525  int __pyx_r;
10526  __Pyx_RefNannyDeclarations
10527  double __pyx_t_1;
10528  int __pyx_lineno = 0;
10529  const char *__pyx_filename = NULL;
10530  int __pyx_clineno = 0;
10531  __Pyx_RefNannySetupContext("__set__", 0);
10532  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 90, __pyx_L1_error)
10533  __pyx_v_self->volume = __pyx_t_1;
10534 
10535  /* function exit code */
10536  __pyx_r = 0;
10537  goto __pyx_L0;
10538  __pyx_L1_error:;
10539  __Pyx_AddTraceback("cmeshTools.CMesh.volume.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10540  __pyx_r = -1;
10541  __pyx_L0:;
10542  __Pyx_RefNannyFinishContext();
10543  return __pyx_r;
10544 }
10545 
10546 /* "(tree fragment)":1
10547  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10548  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10549  * def __setstate_cython__(self, __pyx_state):
10550  */
10551 
10552 /* Python wrapper */
10553 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10554 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10555  PyObject *__pyx_r = 0;
10556  __Pyx_RefNannyDeclarations
10557  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10558  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8__reduce_cython__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10559 
10560  /* function exit code */
10561  __Pyx_RefNannyFinishContext();
10562  return __pyx_r;
10563 }
10564 
10565 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10566  PyObject *__pyx_r = NULL;
10567  __Pyx_RefNannyDeclarations
10568  PyObject *__pyx_t_1 = NULL;
10569  int __pyx_lineno = 0;
10570  const char *__pyx_filename = NULL;
10571  int __pyx_clineno = 0;
10572  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10573 
10574  /* "(tree fragment)":2
10575  * def __reduce_cython__(self):
10576  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
10577  * def __setstate_cython__(self, __pyx_state):
10578  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10579  */
10580  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
10581  __Pyx_GOTREF(__pyx_t_1);
10582  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10583  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10584  __PYX_ERR(0, 2, __pyx_L1_error)
10585 
10586  /* "(tree fragment)":1
10587  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10588  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10589  * def __setstate_cython__(self, __pyx_state):
10590  */
10591 
10592  /* function exit code */
10593  __pyx_L1_error:;
10594  __Pyx_XDECREF(__pyx_t_1);
10595  __Pyx_AddTraceback("cmeshTools.CMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10596  __pyx_r = NULL;
10597  __Pyx_XGIVEREF(__pyx_r);
10598  __Pyx_RefNannyFinishContext();
10599  return __pyx_r;
10600 }
10601 
10602 /* "(tree fragment)":3
10603  * def __reduce_cython__(self):
10604  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10605  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10606  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10607  */
10608 
10609 /* Python wrapper */
10610 static PyObject *__pyx_pw_10cmeshTools_5CMesh_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
10611 static PyObject *__pyx_pw_10cmeshTools_5CMesh_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10612  PyObject *__pyx_r = 0;
10613  __Pyx_RefNannyDeclarations
10614  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10615  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10__setstate_cython__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10616 
10617  /* function exit code */
10618  __Pyx_RefNannyFinishContext();
10619  return __pyx_r;
10620 }
10621 
10622 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
10623  PyObject *__pyx_r = NULL;
10624  __Pyx_RefNannyDeclarations
10625  PyObject *__pyx_t_1 = NULL;
10626  int __pyx_lineno = 0;
10627  const char *__pyx_filename = NULL;
10628  int __pyx_clineno = 0;
10629  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10630 
10631  /* "(tree fragment)":4
10632  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10633  * def __setstate_cython__(self, __pyx_state):
10634  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
10635  */
10636  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
10637  __Pyx_GOTREF(__pyx_t_1);
10638  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10639  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10640  __PYX_ERR(0, 4, __pyx_L1_error)
10641 
10642  /* "(tree fragment)":3
10643  * def __reduce_cython__(self):
10644  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10645  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10646  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10647  */
10648 
10649  /* function exit code */
10650  __pyx_L1_error:;
10651  __Pyx_XDECREF(__pyx_t_1);
10652  __Pyx_AddTraceback("cmeshTools.CMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10653  __pyx_r = NULL;
10654  __Pyx_XGIVEREF(__pyx_r);
10655  __Pyx_RefNannyFinishContext();
10656  return __pyx_r;
10657 }
10658 
10659 /* "cmeshTools.pyx":120
10660  * self.volume = self.mesh.volume
10661  *
10662  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
10663  * """
10664  * function to be conform to old module, and to calls from MeshTools
10665  */
10666 
10667 /* Python wrapper */
10668 static PyObject *__pyx_pw_10cmeshTools_1buildPythonMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
10669 static char __pyx_doc_10cmeshTools_buildPythonMeshInterface[] = "\n function to be conform to old module, and to calls from MeshTools\n ";
10670 static PyMethodDef __pyx_mdef_10cmeshTools_1buildPythonMeshInterface = {"buildPythonMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_1buildPythonMeshInterface, METH_O, __pyx_doc_10cmeshTools_buildPythonMeshInterface};
10671 static PyObject *__pyx_pw_10cmeshTools_1buildPythonMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
10672  PyObject *__pyx_r = 0;
10673  __Pyx_RefNannyDeclarations
10674  __Pyx_RefNannySetupContext("buildPythonMeshInterface (wrapper)", 0);
10675  __pyx_r = __pyx_pf_10cmeshTools_buildPythonMeshInterface(__pyx_self, ((PyObject *)__pyx_v_cmesh));
10676 
10677  /* function exit code */
10678  __Pyx_RefNannyFinishContext();
10679  return __pyx_r;
10680 }
10681 
10682 static PyObject *__pyx_pf_10cmeshTools_buildPythonMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
10683  PyObject *__pyx_r = NULL;
10684  __Pyx_RefNannyDeclarations
10685  PyObject *__pyx_t_1 = NULL;
10686  PyObject *__pyx_t_2 = NULL;
10687  PyObject *__pyx_t_3 = NULL;
10688  PyObject *__pyx_t_4 = NULL;
10689  PyObject *__pyx_t_5 = NULL;
10690  PyObject *__pyx_t_6 = NULL;
10691  PyObject *__pyx_t_7 = NULL;
10692  PyObject *__pyx_t_8 = NULL;
10693  PyObject *__pyx_t_9 = NULL;
10694  PyObject *__pyx_t_10 = NULL;
10695  PyObject *__pyx_t_11 = NULL;
10696  PyObject *__pyx_t_12 = NULL;
10697  PyObject *__pyx_t_13 = NULL;
10698  PyObject *__pyx_t_14 = NULL;
10699  PyObject *__pyx_t_15 = NULL;
10700  PyObject *__pyx_t_16 = NULL;
10701  PyObject *__pyx_t_17 = NULL;
10702  PyObject *__pyx_t_18 = NULL;
10703  PyObject *__pyx_t_19 = NULL;
10704  PyObject *__pyx_t_20 = NULL;
10705  PyObject *__pyx_t_21 = NULL;
10706  PyObject *__pyx_t_22 = NULL;
10707  PyObject *__pyx_t_23 = NULL;
10708  PyObject *__pyx_t_24 = NULL;
10709  PyObject *__pyx_t_25 = NULL;
10710  PyObject *__pyx_t_26 = NULL;
10711  PyObject *__pyx_t_27 = NULL;
10712  PyObject *__pyx_t_28 = NULL;
10713  PyObject *__pyx_t_29 = NULL;
10714  PyObject *__pyx_t_30 = NULL;
10715  PyObject *__pyx_t_31 = NULL;
10716  PyObject *__pyx_t_32 = NULL;
10717  PyObject *__pyx_t_33 = NULL;
10718  PyObject *__pyx_t_34 = NULL;
10719  PyObject *__pyx_t_35 = NULL;
10720  PyObject *__pyx_t_36 = NULL;
10721  PyObject *__pyx_t_37 = NULL;
10722  PyObject *__pyx_t_38 = NULL;
10723  PyObject *__pyx_t_39 = NULL;
10724  PyObject *__pyx_t_40 = NULL;
10725  PyObject *__pyx_t_41 = NULL;
10726  PyObject *__pyx_t_42 = NULL;
10727  PyObject *__pyx_t_43 = NULL;
10728  PyObject *__pyx_t_44 = NULL;
10729  PyObject *__pyx_t_45 = NULL;
10730  PyObject *__pyx_t_46 = NULL;
10731  PyObject *__pyx_t_47 = NULL;
10732  PyObject *__pyx_t_48 = NULL;
10733  PyObject *__pyx_t_49 = NULL;
10734  PyObject *__pyx_t_50 = NULL;
10735  PyObject *__pyx_t_51 = NULL;
10736  int __pyx_lineno = 0;
10737  const char *__pyx_filename = NULL;
10738  int __pyx_clineno = 0;
10739  __Pyx_RefNannySetupContext("buildPythonMeshInterface", 0);
10740 
10741  /* "cmeshTools.pyx":124
10742  * function to be conform to old module, and to calls from MeshTools
10743  * """
10744  * cmesh.buildPythonMeshInterface() # <<<<<<<<<<<<<<
10745  * return (cmesh.nElements_global,
10746  * cmesh.nNodes_global,
10747  */
10748  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_buildPythonMeshInterface); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 124, __pyx_L1_error)
10749  __Pyx_GOTREF(__pyx_t_2);
10750  __pyx_t_3 = NULL;
10751  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10752  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10753  if (likely(__pyx_t_3)) {
10754  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10755  __Pyx_INCREF(__pyx_t_3);
10756  __Pyx_INCREF(function);
10757  __Pyx_DECREF_SET(__pyx_t_2, function);
10758  }
10759  }
10760  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
10761  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10762  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
10763  __Pyx_GOTREF(__pyx_t_1);
10764  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10765  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10766 
10767  /* "cmeshTools.pyx":125
10768  * """
10769  * cmesh.buildPythonMeshInterface()
10770  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
10771  * cmesh.nNodes_global,
10772  * cmesh.nNodes_element,
10773  */
10774  __Pyx_XDECREF(__pyx_r);
10775  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 125, __pyx_L1_error)
10776  __Pyx_GOTREF(__pyx_t_1);
10777 
10778  /* "cmeshTools.pyx":126
10779  * cmesh.buildPythonMeshInterface()
10780  * return (cmesh.nElements_global,
10781  * cmesh.nNodes_global, # <<<<<<<<<<<<<<
10782  * cmesh.nNodes_element,
10783  * cmesh.nNodes_elementBoundary,
10784  */
10785  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 126, __pyx_L1_error)
10786  __Pyx_GOTREF(__pyx_t_2);
10787 
10788  /* "cmeshTools.pyx":127
10789  * return (cmesh.nElements_global,
10790  * cmesh.nNodes_global,
10791  * cmesh.nNodes_element, # <<<<<<<<<<<<<<
10792  * cmesh.nNodes_elementBoundary,
10793  * cmesh.nElementBoundaries_element,
10794  */
10795  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 127, __pyx_L1_error)
10796  __Pyx_GOTREF(__pyx_t_3);
10797 
10798  /* "cmeshTools.pyx":128
10799  * cmesh.nNodes_global,
10800  * cmesh.nNodes_element,
10801  * cmesh.nNodes_elementBoundary, # <<<<<<<<<<<<<<
10802  * cmesh.nElementBoundaries_element,
10803  * cmesh.nElementBoundaries_global,
10804  */
10805  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 128, __pyx_L1_error)
10806  __Pyx_GOTREF(__pyx_t_4);
10807 
10808  /* "cmeshTools.pyx":129
10809  * cmesh.nNodes_element,
10810  * cmesh.nNodes_elementBoundary,
10811  * cmesh.nElementBoundaries_element, # <<<<<<<<<<<<<<
10812  * cmesh.nElementBoundaries_global,
10813  * cmesh.nInteriorElementBoundaries_global,
10814  */
10815  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 129, __pyx_L1_error)
10816  __Pyx_GOTREF(__pyx_t_5);
10817 
10818  /* "cmeshTools.pyx":130
10819  * cmesh.nNodes_elementBoundary,
10820  * cmesh.nElementBoundaries_element,
10821  * cmesh.nElementBoundaries_global, # <<<<<<<<<<<<<<
10822  * cmesh.nInteriorElementBoundaries_global,
10823  * cmesh.nExteriorElementBoundaries_global,
10824  */
10825  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 130, __pyx_L1_error)
10826  __Pyx_GOTREF(__pyx_t_6);
10827 
10828  /* "cmeshTools.pyx":131
10829  * cmesh.nElementBoundaries_element,
10830  * cmesh.nElementBoundaries_global,
10831  * cmesh.nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
10832  * cmesh.nExteriorElementBoundaries_global,
10833  * cmesh.max_nElements_node,
10834  */
10835  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 131, __pyx_L1_error)
10836  __Pyx_GOTREF(__pyx_t_7);
10837 
10838  /* "cmeshTools.pyx":132
10839  * cmesh.nElementBoundaries_global,
10840  * cmesh.nInteriorElementBoundaries_global,
10841  * cmesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
10842  * cmesh.max_nElements_node,
10843  * cmesh.nEdges_global,
10844  */
10845  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 132, __pyx_L1_error)
10846  __Pyx_GOTREF(__pyx_t_8);
10847 
10848  /* "cmeshTools.pyx":133
10849  * cmesh.nInteriorElementBoundaries_global,
10850  * cmesh.nExteriorElementBoundaries_global,
10851  * cmesh.max_nElements_node, # <<<<<<<<<<<<<<
10852  * cmesh.nEdges_global,
10853  * cmesh.max_nNodeNeighbors_node,
10854  */
10855  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nElements_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 133, __pyx_L1_error)
10856  __Pyx_GOTREF(__pyx_t_9);
10857 
10858  /* "cmeshTools.pyx":134
10859  * cmesh.nExteriorElementBoundaries_global,
10860  * cmesh.max_nElements_node,
10861  * cmesh.nEdges_global, # <<<<<<<<<<<<<<
10862  * cmesh.max_nNodeNeighbors_node,
10863  * cmesh.elementNodesArray,
10864  */
10865  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nEdges_global); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 134, __pyx_L1_error)
10866  __Pyx_GOTREF(__pyx_t_10);
10867 
10868  /* "cmeshTools.pyx":135
10869  * cmesh.max_nElements_node,
10870  * cmesh.nEdges_global,
10871  * cmesh.max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
10872  * cmesh.elementNodesArray,
10873  * cmesh.nodeElementsArray,
10874  */
10875  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nNodeNeighbors_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 135, __pyx_L1_error)
10876  __Pyx_GOTREF(__pyx_t_11);
10877 
10878  /* "cmeshTools.pyx":136
10879  * cmesh.nEdges_global,
10880  * cmesh.max_nNodeNeighbors_node,
10881  * cmesh.elementNodesArray, # <<<<<<<<<<<<<<
10882  * cmesh.nodeElementsArray,
10883  * cmesh.nodeElementOffsets,
10884  */
10885  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 136, __pyx_L1_error)
10886  __Pyx_GOTREF(__pyx_t_12);
10887 
10888  /* "cmeshTools.pyx":137
10889  * cmesh.max_nNodeNeighbors_node,
10890  * cmesh.elementNodesArray,
10891  * cmesh.nodeElementsArray, # <<<<<<<<<<<<<<
10892  * cmesh.nodeElementOffsets,
10893  * cmesh.elementNeighborsArray,
10894  */
10895  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeElementsArray); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 137, __pyx_L1_error)
10896  __Pyx_GOTREF(__pyx_t_13);
10897 
10898  /* "cmeshTools.pyx":138
10899  * cmesh.elementNodesArray,
10900  * cmesh.nodeElementsArray,
10901  * cmesh.nodeElementOffsets, # <<<<<<<<<<<<<<
10902  * cmesh.elementNeighborsArray,
10903  * cmesh.elementBoundariesArray,
10904  */
10905  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 138, __pyx_L1_error)
10906  __Pyx_GOTREF(__pyx_t_14);
10907 
10908  /* "cmeshTools.pyx":139
10909  * cmesh.nodeElementsArray,
10910  * cmesh.nodeElementOffsets,
10911  * cmesh.elementNeighborsArray, # <<<<<<<<<<<<<<
10912  * cmesh.elementBoundariesArray,
10913  * cmesh.elementBoundaryNodesArray,
10914  */
10915  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementNeighborsArray); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 139, __pyx_L1_error)
10916  __Pyx_GOTREF(__pyx_t_15);
10917 
10918  /* "cmeshTools.pyx":140
10919  * cmesh.nodeElementOffsets,
10920  * cmesh.elementNeighborsArray,
10921  * cmesh.elementBoundariesArray, # <<<<<<<<<<<<<<
10922  * cmesh.elementBoundaryNodesArray,
10923  * cmesh.elementBoundaryElementsArray,
10924  */
10925  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundariesArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 140, __pyx_L1_error)
10926  __Pyx_GOTREF(__pyx_t_16);
10927 
10928  /* "cmeshTools.pyx":141
10929  * cmesh.elementNeighborsArray,
10930  * cmesh.elementBoundariesArray,
10931  * cmesh.elementBoundaryNodesArray, # <<<<<<<<<<<<<<
10932  * cmesh.elementBoundaryElementsArray,
10933  * cmesh.elementBoundaryLocalElementBoundariesArray,
10934  */
10935  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryNodesArray); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 141, __pyx_L1_error)
10936  __Pyx_GOTREF(__pyx_t_17);
10937 
10938  /* "cmeshTools.pyx":142
10939  * cmesh.elementBoundariesArray,
10940  * cmesh.elementBoundaryNodesArray,
10941  * cmesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
10942  * cmesh.elementBoundaryLocalElementBoundariesArray,
10943  * cmesh.interiorElementBoundariesArray,
10944  */
10945  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 142, __pyx_L1_error)
10946  __Pyx_GOTREF(__pyx_t_18);
10947 
10948  /* "cmeshTools.pyx":143
10949  * cmesh.elementBoundaryNodesArray,
10950  * cmesh.elementBoundaryElementsArray,
10951  * cmesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
10952  * cmesh.interiorElementBoundariesArray,
10953  * cmesh.exteriorElementBoundariesArray,
10954  */
10955  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 143, __pyx_L1_error)
10956  __Pyx_GOTREF(__pyx_t_19);
10957 
10958  /* "cmeshTools.pyx":144
10959  * cmesh.elementBoundaryElementsArray,
10960  * cmesh.elementBoundaryLocalElementBoundariesArray,
10961  * cmesh.interiorElementBoundariesArray, # <<<<<<<<<<<<<<
10962  * cmesh.exteriorElementBoundariesArray,
10963  * cmesh.edgeNodesArray,
10964  */
10965  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_interiorElementBoundariesArray); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 144, __pyx_L1_error)
10966  __Pyx_GOTREF(__pyx_t_20);
10967 
10968  /* "cmeshTools.pyx":145
10969  * cmesh.elementBoundaryLocalElementBoundariesArray,
10970  * cmesh.interiorElementBoundariesArray,
10971  * cmesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
10972  * cmesh.edgeNodesArray,
10973  * cmesh.nodeStarArray,
10974  */
10975  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 145, __pyx_L1_error)
10976  __Pyx_GOTREF(__pyx_t_21);
10977 
10978  /* "cmeshTools.pyx":146
10979  * cmesh.interiorElementBoundariesArray,
10980  * cmesh.exteriorElementBoundariesArray,
10981  * cmesh.edgeNodesArray, # <<<<<<<<<<<<<<
10982  * cmesh.nodeStarArray,
10983  * cmesh.nodeStarOffsets,
10984  */
10985  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_edgeNodesArray); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 146, __pyx_L1_error)
10986  __Pyx_GOTREF(__pyx_t_22);
10987 
10988  /* "cmeshTools.pyx":147
10989  * cmesh.exteriorElementBoundariesArray,
10990  * cmesh.edgeNodesArray,
10991  * cmesh.nodeStarArray, # <<<<<<<<<<<<<<
10992  * cmesh.nodeStarOffsets,
10993  * cmesh.elementMaterialTypes,
10994  */
10995  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeStarArray); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 147, __pyx_L1_error)
10996  __Pyx_GOTREF(__pyx_t_23);
10997 
10998  /* "cmeshTools.pyx":148
10999  * cmesh.edgeNodesArray,
11000  * cmesh.nodeStarArray,
11001  * cmesh.nodeStarOffsets, # <<<<<<<<<<<<<<
11002  * cmesh.elementMaterialTypes,
11003  * cmesh.elementBoundaryMaterialTypes,
11004  */
11005  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeStarOffsets); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 148, __pyx_L1_error)
11006  __Pyx_GOTREF(__pyx_t_24);
11007 
11008  /* "cmeshTools.pyx":149
11009  * cmesh.nodeStarArray,
11010  * cmesh.nodeStarOffsets,
11011  * cmesh.elementMaterialTypes, # <<<<<<<<<<<<<<
11012  * cmesh.elementBoundaryMaterialTypes,
11013  * cmesh.nodeMaterialTypes,
11014  */
11015  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementMaterialTypes); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 149, __pyx_L1_error)
11016  __Pyx_GOTREF(__pyx_t_25);
11017 
11018  /* "cmeshTools.pyx":150
11019  * cmesh.nodeStarOffsets,
11020  * cmesh.elementMaterialTypes,
11021  * cmesh.elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
11022  * cmesh.nodeMaterialTypes,
11023  * cmesh.nodeArray,
11024  */
11025  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryMaterialTypes); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 150, __pyx_L1_error)
11026  __Pyx_GOTREF(__pyx_t_26);
11027 
11028  /* "cmeshTools.pyx":151
11029  * cmesh.elementMaterialTypes,
11030  * cmesh.elementBoundaryMaterialTypes,
11031  * cmesh.nodeMaterialTypes, # <<<<<<<<<<<<<<
11032  * cmesh.nodeArray,
11033  * cmesh.nx,
11034  */
11035  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeMaterialTypes); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 151, __pyx_L1_error)
11036  __Pyx_GOTREF(__pyx_t_27);
11037 
11038  /* "cmeshTools.pyx":152
11039  * cmesh.elementBoundaryMaterialTypes,
11040  * cmesh.nodeMaterialTypes,
11041  * cmesh.nodeArray, # <<<<<<<<<<<<<<
11042  * cmesh.nx,
11043  * cmesh.ny,
11044  */
11045  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 152, __pyx_L1_error)
11046  __Pyx_GOTREF(__pyx_t_28);
11047 
11048  /* "cmeshTools.pyx":153
11049  * cmesh.nodeMaterialTypes,
11050  * cmesh.nodeArray,
11051  * cmesh.nx, # <<<<<<<<<<<<<<
11052  * cmesh.ny,
11053  * cmesh.nz,
11054  */
11055  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nx); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 153, __pyx_L1_error)
11056  __Pyx_GOTREF(__pyx_t_29);
11057 
11058  /* "cmeshTools.pyx":154
11059  * cmesh.nodeArray,
11060  * cmesh.nx,
11061  * cmesh.ny, # <<<<<<<<<<<<<<
11062  * cmesh.nz,
11063  * cmesh.px,
11064  */
11065  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_ny); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 154, __pyx_L1_error)
11066  __Pyx_GOTREF(__pyx_t_30);
11067 
11068  /* "cmeshTools.pyx":155
11069  * cmesh.nx,
11070  * cmesh.ny,
11071  * cmesh.nz, # <<<<<<<<<<<<<<
11072  * cmesh.px,
11073  * cmesh.py,
11074  */
11075  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nz); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 155, __pyx_L1_error)
11076  __Pyx_GOTREF(__pyx_t_31);
11077 
11078  /* "cmeshTools.pyx":156
11079  * cmesh.ny,
11080  * cmesh.nz,
11081  * cmesh.px, # <<<<<<<<<<<<<<
11082  * cmesh.py,
11083  * cmesh.pz,
11084  */
11085  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_px); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 156, __pyx_L1_error)
11086  __Pyx_GOTREF(__pyx_t_32);
11087 
11088  /* "cmeshTools.pyx":157
11089  * cmesh.nz,
11090  * cmesh.px,
11091  * cmesh.py, # <<<<<<<<<<<<<<
11092  * cmesh.pz,
11093  * cmesh.elementIJK,
11094  */
11095  __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_py); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 157, __pyx_L1_error)
11096  __Pyx_GOTREF(__pyx_t_33);
11097 
11098  /* "cmeshTools.pyx":158
11099  * cmesh.px,
11100  * cmesh.py,
11101  * cmesh.pz, # <<<<<<<<<<<<<<
11102  * cmesh.elementIJK,
11103  * cmesh.weights,
11104  */
11105  __pyx_t_34 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_pz); if (unlikely(!__pyx_t_34)) __PYX_ERR(1, 158, __pyx_L1_error)
11106  __Pyx_GOTREF(__pyx_t_34);
11107 
11108  /* "cmeshTools.pyx":159
11109  * cmesh.py,
11110  * cmesh.pz,
11111  * cmesh.elementIJK, # <<<<<<<<<<<<<<
11112  * cmesh.weights,
11113  * cmesh.U_KNOT,
11114  */
11115  __pyx_t_35 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementIJK); if (unlikely(!__pyx_t_35)) __PYX_ERR(1, 159, __pyx_L1_error)
11116  __Pyx_GOTREF(__pyx_t_35);
11117 
11118  /* "cmeshTools.pyx":160
11119  * cmesh.pz,
11120  * cmesh.elementIJK,
11121  * cmesh.weights, # <<<<<<<<<<<<<<
11122  * cmesh.U_KNOT,
11123  * cmesh.V_KNOT,
11124  */
11125  __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_weights); if (unlikely(!__pyx_t_36)) __PYX_ERR(1, 160, __pyx_L1_error)
11126  __Pyx_GOTREF(__pyx_t_36);
11127 
11128  /* "cmeshTools.pyx":161
11129  * cmesh.elementIJK,
11130  * cmesh.weights,
11131  * cmesh.U_KNOT, # <<<<<<<<<<<<<<
11132  * cmesh.V_KNOT,
11133  * cmesh.W_KNOT,
11134  */
11135  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_U_KNOT); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 161, __pyx_L1_error)
11136  __Pyx_GOTREF(__pyx_t_37);
11137 
11138  /* "cmeshTools.pyx":162
11139  * cmesh.weights,
11140  * cmesh.U_KNOT,
11141  * cmesh.V_KNOT, # <<<<<<<<<<<<<<
11142  * cmesh.W_KNOT,
11143  * cmesh.elementDiametersArray,
11144  */
11145  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_V_KNOT); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 162, __pyx_L1_error)
11146  __Pyx_GOTREF(__pyx_t_38);
11147 
11148  /* "cmeshTools.pyx":163
11149  * cmesh.U_KNOT,
11150  * cmesh.V_KNOT,
11151  * cmesh.W_KNOT, # <<<<<<<<<<<<<<
11152  * cmesh.elementDiametersArray,
11153  * cmesh.elementInnerDiametersArray,
11154  */
11155  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_W_KNOT); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 163, __pyx_L1_error)
11156  __Pyx_GOTREF(__pyx_t_39);
11157 
11158  /* "cmeshTools.pyx":164
11159  * cmesh.V_KNOT,
11160  * cmesh.W_KNOT,
11161  * cmesh.elementDiametersArray, # <<<<<<<<<<<<<<
11162  * cmesh.elementInnerDiametersArray,
11163  * cmesh.elementBoundaryDiametersArray,
11164  */
11165  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 164, __pyx_L1_error)
11166  __Pyx_GOTREF(__pyx_t_40);
11167 
11168  /* "cmeshTools.pyx":165
11169  * cmesh.W_KNOT,
11170  * cmesh.elementDiametersArray,
11171  * cmesh.elementInnerDiametersArray, # <<<<<<<<<<<<<<
11172  * cmesh.elementBoundaryDiametersArray,
11173  * cmesh.elementBarycentersArray,
11174  */
11175  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementInnerDiametersArray); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 165, __pyx_L1_error)
11176  __Pyx_GOTREF(__pyx_t_41);
11177 
11178  /* "cmeshTools.pyx":166
11179  * cmesh.elementDiametersArray,
11180  * cmesh.elementInnerDiametersArray,
11181  * cmesh.elementBoundaryDiametersArray, # <<<<<<<<<<<<<<
11182  * cmesh.elementBarycentersArray,
11183  * cmesh.elementBoundaryBarycentersArray,
11184  */
11185  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 166, __pyx_L1_error)
11186  __Pyx_GOTREF(__pyx_t_42);
11187 
11188  /* "cmeshTools.pyx":167
11189  * cmesh.elementInnerDiametersArray,
11190  * cmesh.elementBoundaryDiametersArray,
11191  * cmesh.elementBarycentersArray, # <<<<<<<<<<<<<<
11192  * cmesh.elementBoundaryBarycentersArray,
11193  * cmesh.nodeDiametersArray,
11194  */
11195  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBarycentersArray); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 167, __pyx_L1_error)
11196  __Pyx_GOTREF(__pyx_t_43);
11197 
11198  /* "cmeshTools.pyx":168
11199  * cmesh.elementBoundaryDiametersArray,
11200  * cmesh.elementBarycentersArray,
11201  * cmesh.elementBoundaryBarycentersArray, # <<<<<<<<<<<<<<
11202  * cmesh.nodeDiametersArray,
11203  * cmesh.nodeSupportArray,
11204  */
11205  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryBarycentersArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(1, 168, __pyx_L1_error)
11206  __Pyx_GOTREF(__pyx_t_44);
11207 
11208  /* "cmeshTools.pyx":169
11209  * cmesh.elementBarycentersArray,
11210  * cmesh.elementBoundaryBarycentersArray,
11211  * cmesh.nodeDiametersArray, # <<<<<<<<<<<<<<
11212  * cmesh.nodeSupportArray,
11213  * cmesh.h,
11214  */
11215  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeDiametersArray); if (unlikely(!__pyx_t_45)) __PYX_ERR(1, 169, __pyx_L1_error)
11216  __Pyx_GOTREF(__pyx_t_45);
11217 
11218  /* "cmeshTools.pyx":170
11219  * cmesh.elementBoundaryBarycentersArray,
11220  * cmesh.nodeDiametersArray,
11221  * cmesh.nodeSupportArray, # <<<<<<<<<<<<<<
11222  * cmesh.h,
11223  * cmesh.hMin,
11224  */
11225  __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeSupportArray); if (unlikely(!__pyx_t_46)) __PYX_ERR(1, 170, __pyx_L1_error)
11226  __Pyx_GOTREF(__pyx_t_46);
11227 
11228  /* "cmeshTools.pyx":171
11229  * cmesh.nodeDiametersArray,
11230  * cmesh.nodeSupportArray,
11231  * cmesh.h, # <<<<<<<<<<<<<<
11232  * cmesh.hMin,
11233  * cmesh.sigmaMax,
11234  */
11235  __pyx_t_47 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_h); if (unlikely(!__pyx_t_47)) __PYX_ERR(1, 171, __pyx_L1_error)
11236  __Pyx_GOTREF(__pyx_t_47);
11237 
11238  /* "cmeshTools.pyx":172
11239  * cmesh.nodeSupportArray,
11240  * cmesh.h,
11241  * cmesh.hMin, # <<<<<<<<<<<<<<
11242  * cmesh.sigmaMax,
11243  * cmesh.volume)
11244  */
11245  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_hMin); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 172, __pyx_L1_error)
11246  __Pyx_GOTREF(__pyx_t_48);
11247 
11248  /* "cmeshTools.pyx":173
11249  * cmesh.h,
11250  * cmesh.hMin,
11251  * cmesh.sigmaMax, # <<<<<<<<<<<<<<
11252  * cmesh.volume)
11253  *
11254  */
11255  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_sigmaMax); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 173, __pyx_L1_error)
11256  __Pyx_GOTREF(__pyx_t_49);
11257 
11258  /* "cmeshTools.pyx":174
11259  * cmesh.hMin,
11260  * cmesh.sigmaMax,
11261  * cmesh.volume) # <<<<<<<<<<<<<<
11262  *
11263  * def buildPythonMeshInterfaceNoArrays(cmesh):
11264  */
11265  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_volume); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 174, __pyx_L1_error)
11266  __Pyx_GOTREF(__pyx_t_50);
11267 
11268  /* "cmeshTools.pyx":125
11269  * """
11270  * cmesh.buildPythonMeshInterface()
11271  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11272  * cmesh.nNodes_global,
11273  * cmesh.nNodes_element,
11274  */
11275  __pyx_t_51 = PyTuple_New(50); if (unlikely(!__pyx_t_51)) __PYX_ERR(1, 125, __pyx_L1_error)
11276  __Pyx_GOTREF(__pyx_t_51);
11277  __Pyx_GIVEREF(__pyx_t_1);
11278  PyTuple_SET_ITEM(__pyx_t_51, 0, __pyx_t_1);
11279  __Pyx_GIVEREF(__pyx_t_2);
11280  PyTuple_SET_ITEM(__pyx_t_51, 1, __pyx_t_2);
11281  __Pyx_GIVEREF(__pyx_t_3);
11282  PyTuple_SET_ITEM(__pyx_t_51, 2, __pyx_t_3);
11283  __Pyx_GIVEREF(__pyx_t_4);
11284  PyTuple_SET_ITEM(__pyx_t_51, 3, __pyx_t_4);
11285  __Pyx_GIVEREF(__pyx_t_5);
11286  PyTuple_SET_ITEM(__pyx_t_51, 4, __pyx_t_5);
11287  __Pyx_GIVEREF(__pyx_t_6);
11288  PyTuple_SET_ITEM(__pyx_t_51, 5, __pyx_t_6);
11289  __Pyx_GIVEREF(__pyx_t_7);
11290  PyTuple_SET_ITEM(__pyx_t_51, 6, __pyx_t_7);
11291  __Pyx_GIVEREF(__pyx_t_8);
11292  PyTuple_SET_ITEM(__pyx_t_51, 7, __pyx_t_8);
11293  __Pyx_GIVEREF(__pyx_t_9);
11294  PyTuple_SET_ITEM(__pyx_t_51, 8, __pyx_t_9);
11295  __Pyx_GIVEREF(__pyx_t_10);
11296  PyTuple_SET_ITEM(__pyx_t_51, 9, __pyx_t_10);
11297  __Pyx_GIVEREF(__pyx_t_11);
11298  PyTuple_SET_ITEM(__pyx_t_51, 10, __pyx_t_11);
11299  __Pyx_GIVEREF(__pyx_t_12);
11300  PyTuple_SET_ITEM(__pyx_t_51, 11, __pyx_t_12);
11301  __Pyx_GIVEREF(__pyx_t_13);
11302  PyTuple_SET_ITEM(__pyx_t_51, 12, __pyx_t_13);
11303  __Pyx_GIVEREF(__pyx_t_14);
11304  PyTuple_SET_ITEM(__pyx_t_51, 13, __pyx_t_14);
11305  __Pyx_GIVEREF(__pyx_t_15);
11306  PyTuple_SET_ITEM(__pyx_t_51, 14, __pyx_t_15);
11307  __Pyx_GIVEREF(__pyx_t_16);
11308  PyTuple_SET_ITEM(__pyx_t_51, 15, __pyx_t_16);
11309  __Pyx_GIVEREF(__pyx_t_17);
11310  PyTuple_SET_ITEM(__pyx_t_51, 16, __pyx_t_17);
11311  __Pyx_GIVEREF(__pyx_t_18);
11312  PyTuple_SET_ITEM(__pyx_t_51, 17, __pyx_t_18);
11313  __Pyx_GIVEREF(__pyx_t_19);
11314  PyTuple_SET_ITEM(__pyx_t_51, 18, __pyx_t_19);
11315  __Pyx_GIVEREF(__pyx_t_20);
11316  PyTuple_SET_ITEM(__pyx_t_51, 19, __pyx_t_20);
11317  __Pyx_GIVEREF(__pyx_t_21);
11318  PyTuple_SET_ITEM(__pyx_t_51, 20, __pyx_t_21);
11319  __Pyx_GIVEREF(__pyx_t_22);
11320  PyTuple_SET_ITEM(__pyx_t_51, 21, __pyx_t_22);
11321  __Pyx_GIVEREF(__pyx_t_23);
11322  PyTuple_SET_ITEM(__pyx_t_51, 22, __pyx_t_23);
11323  __Pyx_GIVEREF(__pyx_t_24);
11324  PyTuple_SET_ITEM(__pyx_t_51, 23, __pyx_t_24);
11325  __Pyx_GIVEREF(__pyx_t_25);
11326  PyTuple_SET_ITEM(__pyx_t_51, 24, __pyx_t_25);
11327  __Pyx_GIVEREF(__pyx_t_26);
11328  PyTuple_SET_ITEM(__pyx_t_51, 25, __pyx_t_26);
11329  __Pyx_GIVEREF(__pyx_t_27);
11330  PyTuple_SET_ITEM(__pyx_t_51, 26, __pyx_t_27);
11331  __Pyx_GIVEREF(__pyx_t_28);
11332  PyTuple_SET_ITEM(__pyx_t_51, 27, __pyx_t_28);
11333  __Pyx_GIVEREF(__pyx_t_29);
11334  PyTuple_SET_ITEM(__pyx_t_51, 28, __pyx_t_29);
11335  __Pyx_GIVEREF(__pyx_t_30);
11336  PyTuple_SET_ITEM(__pyx_t_51, 29, __pyx_t_30);
11337  __Pyx_GIVEREF(__pyx_t_31);
11338  PyTuple_SET_ITEM(__pyx_t_51, 30, __pyx_t_31);
11339  __Pyx_GIVEREF(__pyx_t_32);
11340  PyTuple_SET_ITEM(__pyx_t_51, 31, __pyx_t_32);
11341  __Pyx_GIVEREF(__pyx_t_33);
11342  PyTuple_SET_ITEM(__pyx_t_51, 32, __pyx_t_33);
11343  __Pyx_GIVEREF(__pyx_t_34);
11344  PyTuple_SET_ITEM(__pyx_t_51, 33, __pyx_t_34);
11345  __Pyx_GIVEREF(__pyx_t_35);
11346  PyTuple_SET_ITEM(__pyx_t_51, 34, __pyx_t_35);
11347  __Pyx_GIVEREF(__pyx_t_36);
11348  PyTuple_SET_ITEM(__pyx_t_51, 35, __pyx_t_36);
11349  __Pyx_GIVEREF(__pyx_t_37);
11350  PyTuple_SET_ITEM(__pyx_t_51, 36, __pyx_t_37);
11351  __Pyx_GIVEREF(__pyx_t_38);
11352  PyTuple_SET_ITEM(__pyx_t_51, 37, __pyx_t_38);
11353  __Pyx_GIVEREF(__pyx_t_39);
11354  PyTuple_SET_ITEM(__pyx_t_51, 38, __pyx_t_39);
11355  __Pyx_GIVEREF(__pyx_t_40);
11356  PyTuple_SET_ITEM(__pyx_t_51, 39, __pyx_t_40);
11357  __Pyx_GIVEREF(__pyx_t_41);
11358  PyTuple_SET_ITEM(__pyx_t_51, 40, __pyx_t_41);
11359  __Pyx_GIVEREF(__pyx_t_42);
11360  PyTuple_SET_ITEM(__pyx_t_51, 41, __pyx_t_42);
11361  __Pyx_GIVEREF(__pyx_t_43);
11362  PyTuple_SET_ITEM(__pyx_t_51, 42, __pyx_t_43);
11363  __Pyx_GIVEREF(__pyx_t_44);
11364  PyTuple_SET_ITEM(__pyx_t_51, 43, __pyx_t_44);
11365  __Pyx_GIVEREF(__pyx_t_45);
11366  PyTuple_SET_ITEM(__pyx_t_51, 44, __pyx_t_45);
11367  __Pyx_GIVEREF(__pyx_t_46);
11368  PyTuple_SET_ITEM(__pyx_t_51, 45, __pyx_t_46);
11369  __Pyx_GIVEREF(__pyx_t_47);
11370  PyTuple_SET_ITEM(__pyx_t_51, 46, __pyx_t_47);
11371  __Pyx_GIVEREF(__pyx_t_48);
11372  PyTuple_SET_ITEM(__pyx_t_51, 47, __pyx_t_48);
11373  __Pyx_GIVEREF(__pyx_t_49);
11374  PyTuple_SET_ITEM(__pyx_t_51, 48, __pyx_t_49);
11375  __Pyx_GIVEREF(__pyx_t_50);
11376  PyTuple_SET_ITEM(__pyx_t_51, 49, __pyx_t_50);
11377  __pyx_t_1 = 0;
11378  __pyx_t_2 = 0;
11379  __pyx_t_3 = 0;
11380  __pyx_t_4 = 0;
11381  __pyx_t_5 = 0;
11382  __pyx_t_6 = 0;
11383  __pyx_t_7 = 0;
11384  __pyx_t_8 = 0;
11385  __pyx_t_9 = 0;
11386  __pyx_t_10 = 0;
11387  __pyx_t_11 = 0;
11388  __pyx_t_12 = 0;
11389  __pyx_t_13 = 0;
11390  __pyx_t_14 = 0;
11391  __pyx_t_15 = 0;
11392  __pyx_t_16 = 0;
11393  __pyx_t_17 = 0;
11394  __pyx_t_18 = 0;
11395  __pyx_t_19 = 0;
11396  __pyx_t_20 = 0;
11397  __pyx_t_21 = 0;
11398  __pyx_t_22 = 0;
11399  __pyx_t_23 = 0;
11400  __pyx_t_24 = 0;
11401  __pyx_t_25 = 0;
11402  __pyx_t_26 = 0;
11403  __pyx_t_27 = 0;
11404  __pyx_t_28 = 0;
11405  __pyx_t_29 = 0;
11406  __pyx_t_30 = 0;
11407  __pyx_t_31 = 0;
11408  __pyx_t_32 = 0;
11409  __pyx_t_33 = 0;
11410  __pyx_t_34 = 0;
11411  __pyx_t_35 = 0;
11412  __pyx_t_36 = 0;
11413  __pyx_t_37 = 0;
11414  __pyx_t_38 = 0;
11415  __pyx_t_39 = 0;
11416  __pyx_t_40 = 0;
11417  __pyx_t_41 = 0;
11418  __pyx_t_42 = 0;
11419  __pyx_t_43 = 0;
11420  __pyx_t_44 = 0;
11421  __pyx_t_45 = 0;
11422  __pyx_t_46 = 0;
11423  __pyx_t_47 = 0;
11424  __pyx_t_48 = 0;
11425  __pyx_t_49 = 0;
11426  __pyx_t_50 = 0;
11427  __pyx_r = __pyx_t_51;
11428  __pyx_t_51 = 0;
11429  goto __pyx_L0;
11430 
11431  /* "cmeshTools.pyx":120
11432  * self.volume = self.mesh.volume
11433  *
11434  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
11435  * """
11436  * function to be conform to old module, and to calls from MeshTools
11437  */
11438 
11439  /* function exit code */
11440  __pyx_L1_error:;
11441  __Pyx_XDECREF(__pyx_t_1);
11442  __Pyx_XDECREF(__pyx_t_2);
11443  __Pyx_XDECREF(__pyx_t_3);
11444  __Pyx_XDECREF(__pyx_t_4);
11445  __Pyx_XDECREF(__pyx_t_5);
11446  __Pyx_XDECREF(__pyx_t_6);
11447  __Pyx_XDECREF(__pyx_t_7);
11448  __Pyx_XDECREF(__pyx_t_8);
11449  __Pyx_XDECREF(__pyx_t_9);
11450  __Pyx_XDECREF(__pyx_t_10);
11451  __Pyx_XDECREF(__pyx_t_11);
11452  __Pyx_XDECREF(__pyx_t_12);
11453  __Pyx_XDECREF(__pyx_t_13);
11454  __Pyx_XDECREF(__pyx_t_14);
11455  __Pyx_XDECREF(__pyx_t_15);
11456  __Pyx_XDECREF(__pyx_t_16);
11457  __Pyx_XDECREF(__pyx_t_17);
11458  __Pyx_XDECREF(__pyx_t_18);
11459  __Pyx_XDECREF(__pyx_t_19);
11460  __Pyx_XDECREF(__pyx_t_20);
11461  __Pyx_XDECREF(__pyx_t_21);
11462  __Pyx_XDECREF(__pyx_t_22);
11463  __Pyx_XDECREF(__pyx_t_23);
11464  __Pyx_XDECREF(__pyx_t_24);
11465  __Pyx_XDECREF(__pyx_t_25);
11466  __Pyx_XDECREF(__pyx_t_26);
11467  __Pyx_XDECREF(__pyx_t_27);
11468  __Pyx_XDECREF(__pyx_t_28);
11469  __Pyx_XDECREF(__pyx_t_29);
11470  __Pyx_XDECREF(__pyx_t_30);
11471  __Pyx_XDECREF(__pyx_t_31);
11472  __Pyx_XDECREF(__pyx_t_32);
11473  __Pyx_XDECREF(__pyx_t_33);
11474  __Pyx_XDECREF(__pyx_t_34);
11475  __Pyx_XDECREF(__pyx_t_35);
11476  __Pyx_XDECREF(__pyx_t_36);
11477  __Pyx_XDECREF(__pyx_t_37);
11478  __Pyx_XDECREF(__pyx_t_38);
11479  __Pyx_XDECREF(__pyx_t_39);
11480  __Pyx_XDECREF(__pyx_t_40);
11481  __Pyx_XDECREF(__pyx_t_41);
11482  __Pyx_XDECREF(__pyx_t_42);
11483  __Pyx_XDECREF(__pyx_t_43);
11484  __Pyx_XDECREF(__pyx_t_44);
11485  __Pyx_XDECREF(__pyx_t_45);
11486  __Pyx_XDECREF(__pyx_t_46);
11487  __Pyx_XDECREF(__pyx_t_47);
11488  __Pyx_XDECREF(__pyx_t_48);
11489  __Pyx_XDECREF(__pyx_t_49);
11490  __Pyx_XDECREF(__pyx_t_50);
11491  __Pyx_XDECREF(__pyx_t_51);
11492  __Pyx_AddTraceback("cmeshTools.buildPythonMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
11493  __pyx_r = NULL;
11494  __pyx_L0:;
11495  __Pyx_XGIVEREF(__pyx_r);
11496  __Pyx_RefNannyFinishContext();
11497  return __pyx_r;
11498 }
11499 
11500 /* "cmeshTools.pyx":176
11501  * cmesh.volume)
11502  *
11503  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
11504  * """
11505  * function to be conform to old module, and to calls from MeshTools
11506  */
11507 
11508 /* Python wrapper */
11509 static PyObject *__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
11510 static char __pyx_doc_10cmeshTools_2buildPythonMeshInterfaceNoArrays[] = "\n function to be conform to old module, and to calls from MeshTools\n ";
11511 static PyMethodDef __pyx_mdef_10cmeshTools_3buildPythonMeshInterfaceNoArrays = {"buildPythonMeshInterfaceNoArrays", (PyCFunction)__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays, METH_O, __pyx_doc_10cmeshTools_2buildPythonMeshInterfaceNoArrays};
11512 static PyObject *__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
11513  PyObject *__pyx_r = 0;
11514  __Pyx_RefNannyDeclarations
11515  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays (wrapper)", 0);
11516  __pyx_r = __pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(__pyx_self, ((PyObject *)__pyx_v_cmesh));
11517 
11518  /* function exit code */
11519  __Pyx_RefNannyFinishContext();
11520  return __pyx_r;
11521 }
11522 
11523 static PyObject *__pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
11524  PyObject *__pyx_r = NULL;
11525  __Pyx_RefNannyDeclarations
11526  PyObject *__pyx_t_1 = NULL;
11527  PyObject *__pyx_t_2 = NULL;
11528  PyObject *__pyx_t_3 = NULL;
11529  PyObject *__pyx_t_4 = NULL;
11530  PyObject *__pyx_t_5 = NULL;
11531  PyObject *__pyx_t_6 = NULL;
11532  PyObject *__pyx_t_7 = NULL;
11533  PyObject *__pyx_t_8 = NULL;
11534  PyObject *__pyx_t_9 = NULL;
11535  PyObject *__pyx_t_10 = NULL;
11536  PyObject *__pyx_t_11 = NULL;
11537  PyObject *__pyx_t_12 = NULL;
11538  PyObject *__pyx_t_13 = NULL;
11539  PyObject *__pyx_t_14 = NULL;
11540  PyObject *__pyx_t_15 = NULL;
11541  PyObject *__pyx_t_16 = NULL;
11542  int __pyx_lineno = 0;
11543  const char *__pyx_filename = NULL;
11544  int __pyx_clineno = 0;
11545  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays", 0);
11546 
11547  /* "cmeshTools.pyx":180
11548  * function to be conform to old module, and to calls from MeshTools
11549  * """
11550  * cmesh.buildPythonMeshInterfaceNoArrays() # <<<<<<<<<<<<<<
11551  * return (cmesh.nElements_global,
11552  * cmesh.nNodes_global,
11553  */
11554  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_buildPythonMeshInterfaceNoArrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 180, __pyx_L1_error)
11555  __Pyx_GOTREF(__pyx_t_2);
11556  __pyx_t_3 = NULL;
11557  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11558  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11559  if (likely(__pyx_t_3)) {
11560  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11561  __Pyx_INCREF(__pyx_t_3);
11562  __Pyx_INCREF(function);
11563  __Pyx_DECREF_SET(__pyx_t_2, function);
11564  }
11565  }
11566  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
11567  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11568  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 180, __pyx_L1_error)
11569  __Pyx_GOTREF(__pyx_t_1);
11570  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11571  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11572 
11573  /* "cmeshTools.pyx":181
11574  * """
11575  * cmesh.buildPythonMeshInterfaceNoArrays()
11576  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11577  * cmesh.nNodes_global,
11578  * cmesh.nNodes_element,
11579  */
11580  __Pyx_XDECREF(__pyx_r);
11581  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 181, __pyx_L1_error)
11582  __Pyx_GOTREF(__pyx_t_1);
11583 
11584  /* "cmeshTools.pyx":182
11585  * cmesh.buildPythonMeshInterfaceNoArrays()
11586  * return (cmesh.nElements_global,
11587  * cmesh.nNodes_global, # <<<<<<<<<<<<<<
11588  * cmesh.nNodes_element,
11589  * cmesh.nNodes_elementBoundary,
11590  */
11591  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 182, __pyx_L1_error)
11592  __Pyx_GOTREF(__pyx_t_2);
11593 
11594  /* "cmeshTools.pyx":183
11595  * return (cmesh.nElements_global,
11596  * cmesh.nNodes_global,
11597  * cmesh.nNodes_element, # <<<<<<<<<<<<<<
11598  * cmesh.nNodes_elementBoundary,
11599  * cmesh.nElementBoundaries_element,
11600  */
11601  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 183, __pyx_L1_error)
11602  __Pyx_GOTREF(__pyx_t_3);
11603 
11604  /* "cmeshTools.pyx":184
11605  * cmesh.nNodes_global,
11606  * cmesh.nNodes_element,
11607  * cmesh.nNodes_elementBoundary, # <<<<<<<<<<<<<<
11608  * cmesh.nElementBoundaries_element,
11609  * cmesh.nElementBoundaries_global,
11610  */
11611  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 184, __pyx_L1_error)
11612  __Pyx_GOTREF(__pyx_t_4);
11613 
11614  /* "cmeshTools.pyx":185
11615  * cmesh.nNodes_element,
11616  * cmesh.nNodes_elementBoundary,
11617  * cmesh.nElementBoundaries_element, # <<<<<<<<<<<<<<
11618  * cmesh.nElementBoundaries_global,
11619  * cmesh.nInteriorElementBoundaries_global,
11620  */
11621  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 185, __pyx_L1_error)
11622  __Pyx_GOTREF(__pyx_t_5);
11623 
11624  /* "cmeshTools.pyx":186
11625  * cmesh.nNodes_elementBoundary,
11626  * cmesh.nElementBoundaries_element,
11627  * cmesh.nElementBoundaries_global, # <<<<<<<<<<<<<<
11628  * cmesh.nInteriorElementBoundaries_global,
11629  * cmesh.nExteriorElementBoundaries_global,
11630  */
11631  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 186, __pyx_L1_error)
11632  __Pyx_GOTREF(__pyx_t_6);
11633 
11634  /* "cmeshTools.pyx":187
11635  * cmesh.nElementBoundaries_element,
11636  * cmesh.nElementBoundaries_global,
11637  * cmesh.nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
11638  * cmesh.nExteriorElementBoundaries_global,
11639  * cmesh.max_nElements_node,
11640  */
11641  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 187, __pyx_L1_error)
11642  __Pyx_GOTREF(__pyx_t_7);
11643 
11644  /* "cmeshTools.pyx":188
11645  * cmesh.nElementBoundaries_global,
11646  * cmesh.nInteriorElementBoundaries_global,
11647  * cmesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
11648  * cmesh.max_nElements_node,
11649  * cmesh.nEdges_global,
11650  */
11651  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 188, __pyx_L1_error)
11652  __Pyx_GOTREF(__pyx_t_8);
11653 
11654  /* "cmeshTools.pyx":189
11655  * cmesh.nInteriorElementBoundaries_global,
11656  * cmesh.nExteriorElementBoundaries_global,
11657  * cmesh.max_nElements_node, # <<<<<<<<<<<<<<
11658  * cmesh.nEdges_global,
11659  * cmesh.max_nNodeNeighbors_node,
11660  */
11661  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nElements_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 189, __pyx_L1_error)
11662  __Pyx_GOTREF(__pyx_t_9);
11663 
11664  /* "cmeshTools.pyx":190
11665  * cmesh.nExteriorElementBoundaries_global,
11666  * cmesh.max_nElements_node,
11667  * cmesh.nEdges_global, # <<<<<<<<<<<<<<
11668  * cmesh.max_nNodeNeighbors_node,
11669  * cmesh.h,
11670  */
11671  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nEdges_global); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 190, __pyx_L1_error)
11672  __Pyx_GOTREF(__pyx_t_10);
11673 
11674  /* "cmeshTools.pyx":191
11675  * cmesh.max_nElements_node,
11676  * cmesh.nEdges_global,
11677  * cmesh.max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
11678  * cmesh.h,
11679  * cmesh.hMin,
11680  */
11681  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nNodeNeighbors_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 191, __pyx_L1_error)
11682  __Pyx_GOTREF(__pyx_t_11);
11683 
11684  /* "cmeshTools.pyx":192
11685  * cmesh.nEdges_global,
11686  * cmesh.max_nNodeNeighbors_node,
11687  * cmesh.h, # <<<<<<<<<<<<<<
11688  * cmesh.hMin,
11689  * cmesh.sigmaMax,
11690  */
11691  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_h); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 192, __pyx_L1_error)
11692  __Pyx_GOTREF(__pyx_t_12);
11693 
11694  /* "cmeshTools.pyx":193
11695  * cmesh.max_nNodeNeighbors_node,
11696  * cmesh.h,
11697  * cmesh.hMin, # <<<<<<<<<<<<<<
11698  * cmesh.sigmaMax,
11699  * cmesh.volume)
11700  */
11701  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_hMin); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 193, __pyx_L1_error)
11702  __Pyx_GOTREF(__pyx_t_13);
11703 
11704  /* "cmeshTools.pyx":194
11705  * cmesh.h,
11706  * cmesh.hMin,
11707  * cmesh.sigmaMax, # <<<<<<<<<<<<<<
11708  * cmesh.volume)
11709  *
11710  */
11711  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_sigmaMax); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 194, __pyx_L1_error)
11712  __Pyx_GOTREF(__pyx_t_14);
11713 
11714  /* "cmeshTools.pyx":195
11715  * cmesh.hMin,
11716  * cmesh.sigmaMax,
11717  * cmesh.volume) # <<<<<<<<<<<<<<
11718  *
11719  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11720  */
11721  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_volume); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 195, __pyx_L1_error)
11722  __Pyx_GOTREF(__pyx_t_15);
11723 
11724  /* "cmeshTools.pyx":181
11725  * """
11726  * cmesh.buildPythonMeshInterfaceNoArrays()
11727  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11728  * cmesh.nNodes_global,
11729  * cmesh.nNodes_element,
11730  */
11731  __pyx_t_16 = PyTuple_New(15); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 181, __pyx_L1_error)
11732  __Pyx_GOTREF(__pyx_t_16);
11733  __Pyx_GIVEREF(__pyx_t_1);
11734  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
11735  __Pyx_GIVEREF(__pyx_t_2);
11736  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_2);
11737  __Pyx_GIVEREF(__pyx_t_3);
11738  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3);
11739  __Pyx_GIVEREF(__pyx_t_4);
11740  PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_4);
11741  __Pyx_GIVEREF(__pyx_t_5);
11742  PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_5);
11743  __Pyx_GIVEREF(__pyx_t_6);
11744  PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_6);
11745  __Pyx_GIVEREF(__pyx_t_7);
11746  PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_7);
11747  __Pyx_GIVEREF(__pyx_t_8);
11748  PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_8);
11749  __Pyx_GIVEREF(__pyx_t_9);
11750  PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_9);
11751  __Pyx_GIVEREF(__pyx_t_10);
11752  PyTuple_SET_ITEM(__pyx_t_16, 9, __pyx_t_10);
11753  __Pyx_GIVEREF(__pyx_t_11);
11754  PyTuple_SET_ITEM(__pyx_t_16, 10, __pyx_t_11);
11755  __Pyx_GIVEREF(__pyx_t_12);
11756  PyTuple_SET_ITEM(__pyx_t_16, 11, __pyx_t_12);
11757  __Pyx_GIVEREF(__pyx_t_13);
11758  PyTuple_SET_ITEM(__pyx_t_16, 12, __pyx_t_13);
11759  __Pyx_GIVEREF(__pyx_t_14);
11760  PyTuple_SET_ITEM(__pyx_t_16, 13, __pyx_t_14);
11761  __Pyx_GIVEREF(__pyx_t_15);
11762  PyTuple_SET_ITEM(__pyx_t_16, 14, __pyx_t_15);
11763  __pyx_t_1 = 0;
11764  __pyx_t_2 = 0;
11765  __pyx_t_3 = 0;
11766  __pyx_t_4 = 0;
11767  __pyx_t_5 = 0;
11768  __pyx_t_6 = 0;
11769  __pyx_t_7 = 0;
11770  __pyx_t_8 = 0;
11771  __pyx_t_9 = 0;
11772  __pyx_t_10 = 0;
11773  __pyx_t_11 = 0;
11774  __pyx_t_12 = 0;
11775  __pyx_t_13 = 0;
11776  __pyx_t_14 = 0;
11777  __pyx_t_15 = 0;
11778  __pyx_r = __pyx_t_16;
11779  __pyx_t_16 = 0;
11780  goto __pyx_L0;
11781 
11782  /* "cmeshTools.pyx":176
11783  * cmesh.volume)
11784  *
11785  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
11786  * """
11787  * function to be conform to old module, and to calls from MeshTools
11788  */
11789 
11790  /* function exit code */
11791  __pyx_L1_error:;
11792  __Pyx_XDECREF(__pyx_t_1);
11793  __Pyx_XDECREF(__pyx_t_2);
11794  __Pyx_XDECREF(__pyx_t_3);
11795  __Pyx_XDECREF(__pyx_t_4);
11796  __Pyx_XDECREF(__pyx_t_5);
11797  __Pyx_XDECREF(__pyx_t_6);
11798  __Pyx_XDECREF(__pyx_t_7);
11799  __Pyx_XDECREF(__pyx_t_8);
11800  __Pyx_XDECREF(__pyx_t_9);
11801  __Pyx_XDECREF(__pyx_t_10);
11802  __Pyx_XDECREF(__pyx_t_11);
11803  __Pyx_XDECREF(__pyx_t_12);
11804  __Pyx_XDECREF(__pyx_t_13);
11805  __Pyx_XDECREF(__pyx_t_14);
11806  __Pyx_XDECREF(__pyx_t_15);
11807  __Pyx_XDECREF(__pyx_t_16);
11808  __Pyx_AddTraceback("cmeshTools.buildPythonMeshInterfaceNoArrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
11809  __pyx_r = NULL;
11810  __pyx_L0:;
11811  __Pyx_XGIVEREF(__pyx_r);
11812  __Pyx_RefNannyFinishContext();
11813  return __pyx_r;
11814 }
11815 
11816 /* "cmeshTools.pyx":197
11817  * cmesh.volume)
11818  *
11819  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh): # <<<<<<<<<<<<<<
11820  * CMeshnew = CMesh()
11821  * CMeshnew.mesh = mesh
11822  */
11823 
11824 static struct __pyx_obj_10cmeshTools_CMesh *__pyx_f_10cmeshTools_CMesh_FromMesh(struct Mesh __pyx_v_mesh) {
11825  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_CMeshnew = NULL;
11826  struct __pyx_obj_10cmeshTools_CMesh *__pyx_r = NULL;
11827  __Pyx_RefNannyDeclarations
11828  PyObject *__pyx_t_1 = NULL;
11829  int __pyx_lineno = 0;
11830  const char *__pyx_filename = NULL;
11831  int __pyx_clineno = 0;
11832  __Pyx_RefNannySetupContext("CMesh_FromMesh", 0);
11833 
11834  /* "cmeshTools.pyx":198
11835  *
11836  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11837  * CMeshnew = CMesh() # <<<<<<<<<<<<<<
11838  * CMeshnew.mesh = mesh
11839  * return CMeshnew
11840  */
11841  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cmeshTools_CMesh)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 198, __pyx_L1_error)
11842  __Pyx_GOTREF(__pyx_t_1);
11843  __pyx_v_CMeshnew = ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_t_1);
11844  __pyx_t_1 = 0;
11845 
11846  /* "cmeshTools.pyx":199
11847  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11848  * CMeshnew = CMesh()
11849  * CMeshnew.mesh = mesh # <<<<<<<<<<<<<<
11850  * return CMeshnew
11851  *
11852  */
11853  __pyx_v_CMeshnew->mesh = __pyx_v_mesh;
11854 
11855  /* "cmeshTools.pyx":200
11856  * CMeshnew = CMesh()
11857  * CMeshnew.mesh = mesh
11858  * return CMeshnew # <<<<<<<<<<<<<<
11859  *
11860  * cdef class CMultilevelMesh:
11861  */
11862  __Pyx_XDECREF(((PyObject *)__pyx_r));
11863  __Pyx_INCREF(((PyObject *)__pyx_v_CMeshnew));
11864  __pyx_r = __pyx_v_CMeshnew;
11865  goto __pyx_L0;
11866 
11867  /* "cmeshTools.pyx":197
11868  * cmesh.volume)
11869  *
11870  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh): # <<<<<<<<<<<<<<
11871  * CMeshnew = CMesh()
11872  * CMeshnew.mesh = mesh
11873  */
11874 
11875  /* function exit code */
11876  __pyx_L1_error:;
11877  __Pyx_XDECREF(__pyx_t_1);
11878  __Pyx_AddTraceback("cmeshTools.CMesh_FromMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
11879  __pyx_r = 0;
11880  __pyx_L0:;
11881  __Pyx_XDECREF((PyObject *)__pyx_v_CMeshnew);
11882  __Pyx_XGIVEREF((PyObject *)__pyx_r);
11883  __Pyx_RefNannyFinishContext();
11884  return __pyx_r;
11885 }
11886 
11887 /* "cmeshTools.pyx":210
11888  * list elementChildrenArrayList
11889  * list elementChildrenOffsetsList
11890  * def __init__(self, CMesh cmesh, nLevels): # <<<<<<<<<<<<<<
11891  * self.multilevelMesh = cppm.MultilevelMesh()
11892  * if cmesh.mesh.nNodes_element == 2:
11893  */
11894 
11895 /* Python wrapper */
11896 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11897 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11898  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
11899  PyObject *__pyx_v_nLevels = 0;
11900  int __pyx_lineno = 0;
11901  const char *__pyx_filename = NULL;
11902  int __pyx_clineno = 0;
11903  int __pyx_r;
11904  __Pyx_RefNannyDeclarations
11905  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
11906  {
11907  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_nLevels,0};
11908  PyObject* values[2] = {0,0};
11909  if (unlikely(__pyx_kwds)) {
11910  Py_ssize_t kw_args;
11911  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11912  switch (pos_args) {
11913  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11914  CYTHON_FALLTHROUGH;
11915  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11916  CYTHON_FALLTHROUGH;
11917  case 0: break;
11918  default: goto __pyx_L5_argtuple_error;
11919  }
11920  kw_args = PyDict_Size(__pyx_kwds);
11921  switch (pos_args) {
11922  case 0:
11923  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
11924  else goto __pyx_L5_argtuple_error;
11925  CYTHON_FALLTHROUGH;
11926  case 1:
11927  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nLevels)) != 0)) kw_args--;
11928  else {
11929  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 210, __pyx_L3_error)
11930  }
11931  }
11932  if (unlikely(kw_args > 0)) {
11933  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 210, __pyx_L3_error)
11934  }
11935  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11936  goto __pyx_L5_argtuple_error;
11937  } else {
11938  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11939  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11940  }
11941  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
11942  __pyx_v_nLevels = values[1];
11943  }
11944  goto __pyx_L4_argument_unpacking_done;
11945  __pyx_L5_argtuple_error:;
11946  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 210, __pyx_L3_error)
11947  __pyx_L3_error:;
11948  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11949  __Pyx_RefNannyFinishContext();
11950  return -1;
11951  __pyx_L4_argument_unpacking_done:;
11952  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 210, __pyx_L1_error)
11953  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), __pyx_v_cmesh, __pyx_v_nLevels);
11954 
11955  /* function exit code */
11956  goto __pyx_L0;
11957  __pyx_L1_error:;
11958  __pyx_r = -1;
11959  __pyx_L0:;
11960  __Pyx_RefNannyFinishContext();
11961  return __pyx_r;
11962 }
11963 
11964 static int __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_nLevels) {
11965  PyObject *__pyx_v_i = NULL;
11966  int __pyx_r;
11967  __Pyx_RefNannyDeclarations
11968  struct MultilevelMesh __pyx_t_1;
11969  int __pyx_t_2;
11970  int __pyx_t_3;
11971  PyObject *__pyx_t_4 = NULL;
11972  PyObject *__pyx_t_5 = NULL;
11973  Py_ssize_t __pyx_t_6;
11974  PyObject *(*__pyx_t_7)(PyObject *);
11975  Py_ssize_t __pyx_t_8;
11976  Py_ssize_t __pyx_t_9;
11977  Py_ssize_t __pyx_t_10;
11978  int __pyx_t_11;
11979  int __pyx_lineno = 0;
11980  const char *__pyx_filename = NULL;
11981  int __pyx_clineno = 0;
11982  __Pyx_RefNannySetupContext("__init__", 0);
11983 
11984  /* "cmeshTools.pyx":211
11985  * list elementChildrenOffsetsList
11986  * def __init__(self, CMesh cmesh, nLevels):
11987  * self.multilevelMesh = cppm.MultilevelMesh() # <<<<<<<<<<<<<<
11988  * if cmesh.mesh.nNodes_element == 2:
11989  * cppm.globallyRefineEdgeMesh(nLevels,
11990  */
11991  __pyx_v_self->multilevelMesh = __pyx_t_1;
11992 
11993  /* "cmeshTools.pyx":212
11994  * def __init__(self, CMesh cmesh, nLevels):
11995  * self.multilevelMesh = cppm.MultilevelMesh()
11996  * if cmesh.mesh.nNodes_element == 2: # <<<<<<<<<<<<<<
11997  * cppm.globallyRefineEdgeMesh(nLevels,
11998  * cmesh.mesh,
11999  */
12000  __pyx_t_2 = ((__pyx_v_cmesh->mesh.nNodes_element == 2) != 0);
12001  if (__pyx_t_2) {
12002 
12003  /* "cmeshTools.pyx":213
12004  * self.multilevelMesh = cppm.MultilevelMesh()
12005  * if cmesh.mesh.nNodes_element == 2:
12006  * cppm.globallyRefineEdgeMesh(nLevels, # <<<<<<<<<<<<<<
12007  * cmesh.mesh,
12008  * self.multilevelMesh,
12009  */
12010  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 213, __pyx_L1_error)
12011 
12012  /* "cmeshTools.pyx":216
12013  * cmesh.mesh,
12014  * self.multilevelMesh,
12015  * False); # <<<<<<<<<<<<<<
12016  * for i in range(1, nLevels):
12017  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
12018  */
12019  (void)(globallyRefineEdgeMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12020 
12021  /* "cmeshTools.pyx":217
12022  * self.multilevelMesh,
12023  * False);
12024  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12025  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
12026  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12027  */
12028  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 217, __pyx_L1_error)
12029  __Pyx_GOTREF(__pyx_t_4);
12030  __Pyx_INCREF(__pyx_int_1);
12031  __Pyx_GIVEREF(__pyx_int_1);
12032  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12033  __Pyx_INCREF(__pyx_v_nLevels);
12034  __Pyx_GIVEREF(__pyx_v_nLevels);
12035  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12036  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 217, __pyx_L1_error)
12037  __Pyx_GOTREF(__pyx_t_5);
12038  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12039  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12040  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12041  __pyx_t_7 = NULL;
12042  } else {
12043  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 217, __pyx_L1_error)
12044  __Pyx_GOTREF(__pyx_t_4);
12045  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 217, __pyx_L1_error)
12046  }
12047  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12048  for (;;) {
12049  if (likely(!__pyx_t_7)) {
12050  if (likely(PyList_CheckExact(__pyx_t_4))) {
12051  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12052  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12053  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 217, __pyx_L1_error)
12054  #else
12055  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 217, __pyx_L1_error)
12056  __Pyx_GOTREF(__pyx_t_5);
12057  #endif
12058  } else {
12059  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12060  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12061  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 217, __pyx_L1_error)
12062  #else
12063  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 217, __pyx_L1_error)
12064  __Pyx_GOTREF(__pyx_t_5);
12065  #endif
12066  }
12067  } else {
12068  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12069  if (unlikely(!__pyx_t_5)) {
12070  PyObject* exc_type = PyErr_Occurred();
12071  if (exc_type) {
12072  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12073  else __PYX_ERR(1, 217, __pyx_L1_error)
12074  }
12075  break;
12076  }
12077  __Pyx_GOTREF(__pyx_t_5);
12078  }
12079  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12080  __pyx_t_5 = 0;
12081 
12082  /* "cmeshTools.pyx":218
12083  * False);
12084  * for i in range(1, nLevels):
12085  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12086  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12087  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12088  */
12089  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 218, __pyx_L1_error)
12090  (void)(constructElementBoundaryElementsArray_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12091 
12092  /* "cmeshTools.pyx":219
12093  * for i in range(1, nLevels):
12094  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
12095  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12096  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12097  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12098  */
12099  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 219, __pyx_L1_error)
12100  (void)(allocateGeometricInfo_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12101 
12102  /* "cmeshTools.pyx":220
12103  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
12104  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12105  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12106  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12107  * self.multilevelMesh.meshArray[i],
12108  */
12109  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 220, __pyx_L1_error)
12110  (void)(computeGeometricInfo_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12111 
12112  /* "cmeshTools.pyx":221
12113  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12114  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12115  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12116  * self.multilevelMesh.meshArray[i],
12117  * self.multilevelMesh.elementParentsArray[i],
12118  */
12119  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 221, __pyx_L1_error)
12120  __Pyx_GOTREF(__pyx_t_5);
12121  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 221, __pyx_L1_error)
12122  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12123 
12124  /* "cmeshTools.pyx":222
12125  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12126  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12127  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12128  * self.multilevelMesh.elementParentsArray[i],
12129  * 1);
12130  */
12131  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 222, __pyx_L1_error)
12132 
12133  /* "cmeshTools.pyx":223
12134  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12135  * self.multilevelMesh.meshArray[i],
12136  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12137  * 1);
12138  * elif cmesh.mesh.nNodes_element == 3:
12139  */
12140  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 223, __pyx_L1_error)
12141 
12142  /* "cmeshTools.pyx":221
12143  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12144  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12145  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12146  * self.multilevelMesh.meshArray[i],
12147  * self.multilevelMesh.elementParentsArray[i],
12148  */
12149  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 1));
12150 
12151  /* "cmeshTools.pyx":217
12152  * self.multilevelMesh,
12153  * False);
12154  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12155  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
12156  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
12157  */
12158  }
12159  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12160 
12161  /* "cmeshTools.pyx":212
12162  * def __init__(self, CMesh cmesh, nLevels):
12163  * self.multilevelMesh = cppm.MultilevelMesh()
12164  * if cmesh.mesh.nNodes_element == 2: # <<<<<<<<<<<<<<
12165  * cppm.globallyRefineEdgeMesh(nLevels,
12166  * cmesh.mesh,
12167  */
12168  goto __pyx_L3;
12169  }
12170 
12171  /* "cmeshTools.pyx":225
12172  * self.multilevelMesh.elementParentsArray[i],
12173  * 1);
12174  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
12175  * cppm.globallyRefineTriangularMesh(nLevels,
12176  * cmesh.mesh,
12177  */
12178  __pyx_t_2 = ((__pyx_v_cmesh->mesh.nNodes_element == 3) != 0);
12179  if (__pyx_t_2) {
12180 
12181  /* "cmeshTools.pyx":226
12182  * 1);
12183  * elif cmesh.mesh.nNodes_element == 3:
12184  * cppm.globallyRefineTriangularMesh(nLevels, # <<<<<<<<<<<<<<
12185  * cmesh.mesh,
12186  * self.multilevelMesh,
12187  */
12188  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 226, __pyx_L1_error)
12189 
12190  /* "cmeshTools.pyx":229
12191  * cmesh.mesh,
12192  * self.multilevelMesh,
12193  * False); # <<<<<<<<<<<<<<
12194  * for i in range(1, nLevels):
12195  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
12196  */
12197  (void)(globallyRefineTriangularMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12198 
12199  /* "cmeshTools.pyx":230
12200  * self.multilevelMesh,
12201  * False);
12202  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12203  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
12204  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12205  */
12206  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 230, __pyx_L1_error)
12207  __Pyx_GOTREF(__pyx_t_4);
12208  __Pyx_INCREF(__pyx_int_1);
12209  __Pyx_GIVEREF(__pyx_int_1);
12210  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12211  __Pyx_INCREF(__pyx_v_nLevels);
12212  __Pyx_GIVEREF(__pyx_v_nLevels);
12213  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12214  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 230, __pyx_L1_error)
12215  __Pyx_GOTREF(__pyx_t_5);
12216  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12217  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12218  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12219  __pyx_t_7 = NULL;
12220  } else {
12221  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 230, __pyx_L1_error)
12222  __Pyx_GOTREF(__pyx_t_4);
12223  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 230, __pyx_L1_error)
12224  }
12225  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12226  for (;;) {
12227  if (likely(!__pyx_t_7)) {
12228  if (likely(PyList_CheckExact(__pyx_t_4))) {
12229  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12230  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12231  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 230, __pyx_L1_error)
12232  #else
12233  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 230, __pyx_L1_error)
12234  __Pyx_GOTREF(__pyx_t_5);
12235  #endif
12236  } else {
12237  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12238  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12239  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 230, __pyx_L1_error)
12240  #else
12241  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 230, __pyx_L1_error)
12242  __Pyx_GOTREF(__pyx_t_5);
12243  #endif
12244  }
12245  } else {
12246  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12247  if (unlikely(!__pyx_t_5)) {
12248  PyObject* exc_type = PyErr_Occurred();
12249  if (exc_type) {
12250  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12251  else __PYX_ERR(1, 230, __pyx_L1_error)
12252  }
12253  break;
12254  }
12255  __Pyx_GOTREF(__pyx_t_5);
12256  }
12257  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12258  __pyx_t_5 = 0;
12259 
12260  /* "cmeshTools.pyx":231
12261  * False);
12262  * for i in range(1, nLevels):
12263  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12264  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12265  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12266  */
12267  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 231, __pyx_L1_error)
12268  (void)(constructElementBoundaryElementsArray_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12269 
12270  /* "cmeshTools.pyx":232
12271  * for i in range(1, nLevels):
12272  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
12273  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12274  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12275  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12276  */
12277  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 232, __pyx_L1_error)
12278  (void)(allocateGeometricInfo_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12279 
12280  /* "cmeshTools.pyx":233
12281  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
12282  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12283  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12284  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12285  * self.multilevelMesh.meshArray[i],
12286  */
12287  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 233, __pyx_L1_error)
12288  (void)(computeGeometricInfo_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12289 
12290  /* "cmeshTools.pyx":234
12291  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12292  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12293  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12294  * self.multilevelMesh.meshArray[i],
12295  * self.multilevelMesh.elementParentsArray[i],
12296  */
12297  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 234, __pyx_L1_error)
12298  __Pyx_GOTREF(__pyx_t_5);
12299  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 234, __pyx_L1_error)
12300  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12301 
12302  /* "cmeshTools.pyx":235
12303  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12304  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12305  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12306  * self.multilevelMesh.elementParentsArray[i],
12307  * 2);
12308  */
12309  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error)
12310 
12311  /* "cmeshTools.pyx":236
12312  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12313  * self.multilevelMesh.meshArray[i],
12314  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12315  * 2);
12316  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2:
12317  */
12318  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error)
12319 
12320  /* "cmeshTools.pyx":234
12321  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12322  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12323  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12324  * self.multilevelMesh.meshArray[i],
12325  * self.multilevelMesh.elementParentsArray[i],
12326  */
12327  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_8]), 2));
12328 
12329  /* "cmeshTools.pyx":230
12330  * self.multilevelMesh,
12331  * False);
12332  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12333  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
12334  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
12335  */
12336  }
12337  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12338 
12339  /* "cmeshTools.pyx":225
12340  * self.multilevelMesh.elementParentsArray[i],
12341  * 1);
12342  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
12343  * cppm.globallyRefineTriangularMesh(nLevels,
12344  * cmesh.mesh,
12345  */
12346  goto __pyx_L3;
12347  }
12348 
12349  /* "cmeshTools.pyx":238
12350  * self.multilevelMesh.elementParentsArray[i],
12351  * 2);
12352  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2: # <<<<<<<<<<<<<<
12353  * cppm.globallyRefineQuadrilateralMesh(nLevels,
12354  * cmesh.mesh,
12355  */
12356  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 4) != 0);
12357  if (__pyx_t_11) {
12358  } else {
12359  __pyx_t_2 = __pyx_t_11;
12360  goto __pyx_L8_bool_binop_done;
12361  }
12362  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 2) != 0);
12363  __pyx_t_2 = __pyx_t_11;
12364  __pyx_L8_bool_binop_done:;
12365  if (__pyx_t_2) {
12366 
12367  /* "cmeshTools.pyx":239
12368  * 2);
12369  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2:
12370  * cppm.globallyRefineQuadrilateralMesh(nLevels, # <<<<<<<<<<<<<<
12371  * cmesh.mesh,
12372  * self.multilevelMesh,
12373  */
12374  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error)
12375 
12376  /* "cmeshTools.pyx":242
12377  * cmesh.mesh,
12378  * self.multilevelMesh,
12379  * False); # <<<<<<<<<<<<<<
12380  * for i in range(1, nLevels):
12381  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12382  */
12383  (void)(globallyRefineQuadrilateralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12384 
12385  /* "cmeshTools.pyx":243
12386  * self.multilevelMesh,
12387  * False);
12388  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12389  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12390  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12391  */
12392  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 243, __pyx_L1_error)
12393  __Pyx_GOTREF(__pyx_t_4);
12394  __Pyx_INCREF(__pyx_int_1);
12395  __Pyx_GIVEREF(__pyx_int_1);
12396  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12397  __Pyx_INCREF(__pyx_v_nLevels);
12398  __Pyx_GIVEREF(__pyx_v_nLevels);
12399  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12400  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 243, __pyx_L1_error)
12401  __Pyx_GOTREF(__pyx_t_5);
12402  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12403  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12404  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12405  __pyx_t_7 = NULL;
12406  } else {
12407  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 243, __pyx_L1_error)
12408  __Pyx_GOTREF(__pyx_t_4);
12409  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L1_error)
12410  }
12411  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12412  for (;;) {
12413  if (likely(!__pyx_t_7)) {
12414  if (likely(PyList_CheckExact(__pyx_t_4))) {
12415  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12416  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12417  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 243, __pyx_L1_error)
12418  #else
12419  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 243, __pyx_L1_error)
12420  __Pyx_GOTREF(__pyx_t_5);
12421  #endif
12422  } else {
12423  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12424  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12425  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 243, __pyx_L1_error)
12426  #else
12427  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 243, __pyx_L1_error)
12428  __Pyx_GOTREF(__pyx_t_5);
12429  #endif
12430  }
12431  } else {
12432  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12433  if (unlikely(!__pyx_t_5)) {
12434  PyObject* exc_type = PyErr_Occurred();
12435  if (exc_type) {
12436  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12437  else __PYX_ERR(1, 243, __pyx_L1_error)
12438  }
12439  break;
12440  }
12441  __Pyx_GOTREF(__pyx_t_5);
12442  }
12443  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12444  __pyx_t_5 = 0;
12445 
12446  /* "cmeshTools.pyx":244
12447  * False);
12448  * for i in range(1, nLevels):
12449  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12450  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12451  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12452  */
12453  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 244, __pyx_L1_error)
12454  (void)(constructElementBoundaryElementsArray_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12455 
12456  /* "cmeshTools.pyx":245
12457  * for i in range(1, nLevels):
12458  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12459  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12460  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12461  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12462  */
12463  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 245, __pyx_L1_error)
12464  (void)(allocateGeometricInfo_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12465 
12466  /* "cmeshTools.pyx":246
12467  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12468  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12469  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12470  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12471  * self.multilevelMesh.meshArray[i],
12472  */
12473  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 246, __pyx_L1_error)
12474  (void)(computeGeometricInfo_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12475 
12476  /* "cmeshTools.pyx":247
12477  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12478  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12479  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12480  * self.multilevelMesh.meshArray[i],
12481  * self.multilevelMesh.elementParentsArray[i],
12482  */
12483  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 247, __pyx_L1_error)
12484  __Pyx_GOTREF(__pyx_t_5);
12485  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 247, __pyx_L1_error)
12486  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12487 
12488  /* "cmeshTools.pyx":248
12489  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12490  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12491  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12492  * self.multilevelMesh.elementParentsArray[i],
12493  * 2);
12494  */
12495  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 248, __pyx_L1_error)
12496 
12497  /* "cmeshTools.pyx":249
12498  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12499  * self.multilevelMesh.meshArray[i],
12500  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12501  * 2);
12502  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3:
12503  */
12504  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L1_error)
12505 
12506  /* "cmeshTools.pyx":247
12507  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12508  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12509  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12510  * self.multilevelMesh.meshArray[i],
12511  * self.multilevelMesh.elementParentsArray[i],
12512  */
12513  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 2));
12514 
12515  /* "cmeshTools.pyx":243
12516  * self.multilevelMesh,
12517  * False);
12518  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12519  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12520  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12521  */
12522  }
12523  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12524 
12525  /* "cmeshTools.pyx":238
12526  * self.multilevelMesh.elementParentsArray[i],
12527  * 2);
12528  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2: # <<<<<<<<<<<<<<
12529  * cppm.globallyRefineQuadrilateralMesh(nLevels,
12530  * cmesh.mesh,
12531  */
12532  goto __pyx_L3;
12533  }
12534 
12535  /* "cmeshTools.pyx":251
12536  * self.multilevelMesh.elementParentsArray[i],
12537  * 2);
12538  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3: # <<<<<<<<<<<<<<
12539  * cppm.globallyRefineTetrahedralMesh(nLevels,
12540  * cmesh.mesh,
12541  */
12542  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 4) != 0);
12543  if (__pyx_t_11) {
12544  } else {
12545  __pyx_t_2 = __pyx_t_11;
12546  goto __pyx_L12_bool_binop_done;
12547  }
12548  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 3) != 0);
12549  __pyx_t_2 = __pyx_t_11;
12550  __pyx_L12_bool_binop_done:;
12551  if (__pyx_t_2) {
12552 
12553  /* "cmeshTools.pyx":252
12554  * 2);
12555  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3:
12556  * cppm.globallyRefineTetrahedralMesh(nLevels, # <<<<<<<<<<<<<<
12557  * cmesh.mesh,
12558  * self.multilevelMesh,
12559  */
12560  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 252, __pyx_L1_error)
12561 
12562  /* "cmeshTools.pyx":255
12563  * cmesh.mesh,
12564  * self.multilevelMesh,
12565  * False); # <<<<<<<<<<<<<<
12566  * for i in range(1, nLevels):
12567  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12568  */
12569  (void)(globallyRefineTetrahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12570 
12571  /* "cmeshTools.pyx":256
12572  * self.multilevelMesh,
12573  * False);
12574  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12575  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12576  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12577  */
12578  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 256, __pyx_L1_error)
12579  __Pyx_GOTREF(__pyx_t_4);
12580  __Pyx_INCREF(__pyx_int_1);
12581  __Pyx_GIVEREF(__pyx_int_1);
12582  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12583  __Pyx_INCREF(__pyx_v_nLevels);
12584  __Pyx_GIVEREF(__pyx_v_nLevels);
12585  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12586  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 256, __pyx_L1_error)
12587  __Pyx_GOTREF(__pyx_t_5);
12588  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12589  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12590  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12591  __pyx_t_7 = NULL;
12592  } else {
12593  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 256, __pyx_L1_error)
12594  __Pyx_GOTREF(__pyx_t_4);
12595  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 256, __pyx_L1_error)
12596  }
12597  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12598  for (;;) {
12599  if (likely(!__pyx_t_7)) {
12600  if (likely(PyList_CheckExact(__pyx_t_4))) {
12601  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12602  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12603  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 256, __pyx_L1_error)
12604  #else
12605  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 256, __pyx_L1_error)
12606  __Pyx_GOTREF(__pyx_t_5);
12607  #endif
12608  } else {
12609  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12610  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12611  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 256, __pyx_L1_error)
12612  #else
12613  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 256, __pyx_L1_error)
12614  __Pyx_GOTREF(__pyx_t_5);
12615  #endif
12616  }
12617  } else {
12618  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12619  if (unlikely(!__pyx_t_5)) {
12620  PyObject* exc_type = PyErr_Occurred();
12621  if (exc_type) {
12622  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12623  else __PYX_ERR(1, 256, __pyx_L1_error)
12624  }
12625  break;
12626  }
12627  __Pyx_GOTREF(__pyx_t_5);
12628  }
12629  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12630  __pyx_t_5 = 0;
12631 
12632  /* "cmeshTools.pyx":257
12633  * False);
12634  * for i in range(1, nLevels):
12635  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12636  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12637  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12638  */
12639  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L1_error)
12640  (void)(constructElementBoundaryElementsArray_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12641 
12642  /* "cmeshTools.pyx":258
12643  * for i in range(1, nLevels):
12644  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12645  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12646  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12647  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12648  */
12649  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 258, __pyx_L1_error)
12650  (void)(allocateGeometricInfo_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12651 
12652  /* "cmeshTools.pyx":259
12653  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12654  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12655  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12656  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12657  * self.multilevelMesh.meshArray[i],
12658  */
12659  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 259, __pyx_L1_error)
12660  (void)(computeGeometricInfo_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12661 
12662  /* "cmeshTools.pyx":260
12663  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12664  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12665  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12666  * self.multilevelMesh.meshArray[i],
12667  * self.multilevelMesh.elementParentsArray[i],
12668  */
12669  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 260, __pyx_L1_error)
12670  __Pyx_GOTREF(__pyx_t_5);
12671  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 260, __pyx_L1_error)
12672  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12673 
12674  /* "cmeshTools.pyx":261
12675  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12676  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12677  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12678  * self.multilevelMesh.elementParentsArray[i],
12679  * 3);
12680  */
12681  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 261, __pyx_L1_error)
12682 
12683  /* "cmeshTools.pyx":262
12684  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12685  * self.multilevelMesh.meshArray[i],
12686  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12687  * 3);
12688  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4:
12689  */
12690  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 262, __pyx_L1_error)
12691 
12692  /* "cmeshTools.pyx":260
12693  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12694  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12695  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12696  * self.multilevelMesh.meshArray[i],
12697  * self.multilevelMesh.elementParentsArray[i],
12698  */
12699  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_8]), 3));
12700 
12701  /* "cmeshTools.pyx":256
12702  * self.multilevelMesh,
12703  * False);
12704  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12705  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12706  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12707  */
12708  }
12709  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12710 
12711  /* "cmeshTools.pyx":251
12712  * self.multilevelMesh.elementParentsArray[i],
12713  * 2);
12714  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3: # <<<<<<<<<<<<<<
12715  * cppm.globallyRefineTetrahedralMesh(nLevels,
12716  * cmesh.mesh,
12717  */
12718  goto __pyx_L3;
12719  }
12720 
12721  /* "cmeshTools.pyx":264
12722  * self.multilevelMesh.elementParentsArray[i],
12723  * 3);
12724  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4: # <<<<<<<<<<<<<<
12725  * cppm.globallyRefineHexahedralMesh(nLevels,
12726  * cmesh.mesh,
12727  */
12728  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 8) != 0);
12729  if (__pyx_t_11) {
12730  } else {
12731  __pyx_t_2 = __pyx_t_11;
12732  goto __pyx_L16_bool_binop_done;
12733  }
12734  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 4) != 0);
12735  __pyx_t_2 = __pyx_t_11;
12736  __pyx_L16_bool_binop_done:;
12737  if (__pyx_t_2) {
12738 
12739  /* "cmeshTools.pyx":265
12740  * 3);
12741  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4:
12742  * cppm.globallyRefineHexahedralMesh(nLevels, # <<<<<<<<<<<<<<
12743  * cmesh.mesh,
12744  * self.multilevelMesh,
12745  */
12746  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 265, __pyx_L1_error)
12747 
12748  /* "cmeshTools.pyx":268
12749  * cmesh.mesh,
12750  * self.multilevelMesh,
12751  * False); # <<<<<<<<<<<<<<
12752  * for i in range(1, nLevels):
12753  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12754  */
12755  (void)(globallyRefineHexahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12756 
12757  /* "cmeshTools.pyx":269
12758  * self.multilevelMesh,
12759  * False);
12760  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12761  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12762  * meshArray[i]);
12763  */
12764  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 269, __pyx_L1_error)
12765  __Pyx_GOTREF(__pyx_t_4);
12766  __Pyx_INCREF(__pyx_int_1);
12767  __Pyx_GIVEREF(__pyx_int_1);
12768  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12769  __Pyx_INCREF(__pyx_v_nLevels);
12770  __Pyx_GIVEREF(__pyx_v_nLevels);
12771  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12772  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 269, __pyx_L1_error)
12773  __Pyx_GOTREF(__pyx_t_5);
12774  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12775  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12776  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12777  __pyx_t_7 = NULL;
12778  } else {
12779  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 269, __pyx_L1_error)
12780  __Pyx_GOTREF(__pyx_t_4);
12781  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 269, __pyx_L1_error)
12782  }
12783  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12784  for (;;) {
12785  if (likely(!__pyx_t_7)) {
12786  if (likely(PyList_CheckExact(__pyx_t_4))) {
12787  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12788  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12789  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 269, __pyx_L1_error)
12790  #else
12791  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 269, __pyx_L1_error)
12792  __Pyx_GOTREF(__pyx_t_5);
12793  #endif
12794  } else {
12795  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12796  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12797  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 269, __pyx_L1_error)
12798  #else
12799  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 269, __pyx_L1_error)
12800  __Pyx_GOTREF(__pyx_t_5);
12801  #endif
12802  }
12803  } else {
12804  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12805  if (unlikely(!__pyx_t_5)) {
12806  PyObject* exc_type = PyErr_Occurred();
12807  if (exc_type) {
12808  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12809  else __PYX_ERR(1, 269, __pyx_L1_error)
12810  }
12811  break;
12812  }
12813  __Pyx_GOTREF(__pyx_t_5);
12814  }
12815  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12816  __pyx_t_5 = 0;
12817 
12818  /* "cmeshTools.pyx":271
12819  * for i in range(1, nLevels):
12820  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12821  * meshArray[i]); # <<<<<<<<<<<<<<
12822  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12823  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12824  */
12825  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 271, __pyx_L1_error)
12826 
12827  /* "cmeshTools.pyx":270
12828  * False);
12829  * for i in range(1, nLevels):
12830  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh. # <<<<<<<<<<<<<<
12831  * meshArray[i]);
12832  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12833  */
12834  (void)(constructElementBoundaryElementsArray_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12835 
12836  /* "cmeshTools.pyx":272
12837  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12838  * meshArray[i]);
12839  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12840  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12841  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12842  */
12843  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 272, __pyx_L1_error)
12844  (void)(allocateGeometricInfo_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12845 
12846  /* "cmeshTools.pyx":273
12847  * meshArray[i]);
12848  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12849  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12850  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12851  * self.multilevelMesh.meshArray[i],
12852  */
12853  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 273, __pyx_L1_error)
12854  (void)(computeGeometricInfo_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12855 
12856  /* "cmeshTools.pyx":274
12857  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12858  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12859  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12860  * self.multilevelMesh.meshArray[i],
12861  * self.multilevelMesh.elementParentsArray[i],
12862  */
12863  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 274, __pyx_L1_error)
12864  __Pyx_GOTREF(__pyx_t_5);
12865  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 274, __pyx_L1_error)
12866  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12867 
12868  /* "cmeshTools.pyx":275
12869  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12870  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12871  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12872  * self.multilevelMesh.elementParentsArray[i],
12873  * 4);
12874  */
12875  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 275, __pyx_L1_error)
12876 
12877  /* "cmeshTools.pyx":276
12878  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12879  * self.multilevelMesh.meshArray[i],
12880  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12881  * 4);
12882  * else:
12883  */
12884  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 276, __pyx_L1_error)
12885 
12886  /* "cmeshTools.pyx":274
12887  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12888  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12889  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12890  * self.multilevelMesh.meshArray[i],
12891  * self.multilevelMesh.elementParentsArray[i],
12892  */
12893  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 4));
12894 
12895  /* "cmeshTools.pyx":269
12896  * self.multilevelMesh,
12897  * False);
12898  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12899  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12900  * meshArray[i]);
12901  */
12902  }
12903  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12904 
12905  /* "cmeshTools.pyx":264
12906  * self.multilevelMesh.elementParentsArray[i],
12907  * 3);
12908  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4: # <<<<<<<<<<<<<<
12909  * cppm.globallyRefineHexahedralMesh(nLevels,
12910  * cmesh.mesh,
12911  */
12912  goto __pyx_L3;
12913  }
12914 
12915  /* "cmeshTools.pyx":279
12916  * 4);
12917  * else:
12918  * assert nLevels == 1, 'wrong nLevels' # <<<<<<<<<<<<<<
12919  * cppm.globallyRefineTetrahedralMesh(nLevels,
12920  * cmesh.mesh,
12921  */
12922  /*else*/ {
12923  #ifndef CYTHON_WITHOUT_ASSERTIONS
12924  if (unlikely(!Py_OptimizeFlag)) {
12925  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_nLevels, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 279, __pyx_L1_error)
12926  __Pyx_GOTREF(__pyx_t_4);
12927  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 279, __pyx_L1_error)
12928  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12929  if (unlikely(!__pyx_t_2)) {
12930  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_wrong_nLevels);
12931  __PYX_ERR(1, 279, __pyx_L1_error)
12932  }
12933  }
12934  #endif
12935 
12936  /* "cmeshTools.pyx":280
12937  * else:
12938  * assert nLevels == 1, 'wrong nLevels'
12939  * cppm.globallyRefineTetrahedralMesh(nLevels, # <<<<<<<<<<<<<<
12940  * cmesh.mesh,
12941  * self.multilevelMesh,
12942  */
12943  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 280, __pyx_L1_error)
12944 
12945  /* "cmeshTools.pyx":283
12946  * cmesh.mesh,
12947  * self.multilevelMesh,
12948  * False); # <<<<<<<<<<<<<<
12949  *
12950  * def buildPythonMultilevelMeshInterface(self):
12951  */
12952  (void)(globallyRefineTetrahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12953  }
12954  __pyx_L3:;
12955 
12956  /* "cmeshTools.pyx":210
12957  * list elementChildrenArrayList
12958  * list elementChildrenOffsetsList
12959  * def __init__(self, CMesh cmesh, nLevels): # <<<<<<<<<<<<<<
12960  * self.multilevelMesh = cppm.MultilevelMesh()
12961  * if cmesh.mesh.nNodes_element == 2:
12962  */
12963 
12964  /* function exit code */
12965  __pyx_r = 0;
12966  goto __pyx_L0;
12967  __pyx_L1_error:;
12968  __Pyx_XDECREF(__pyx_t_4);
12969  __Pyx_XDECREF(__pyx_t_5);
12970  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12971  __pyx_r = -1;
12972  __pyx_L0:;
12973  __Pyx_XDECREF(__pyx_v_i);
12974  __Pyx_RefNannyFinishContext();
12975  return __pyx_r;
12976 }
12977 
12978 /* "cmeshTools.pyx":285
12979  * False);
12980  *
12981  * def buildPythonMultilevelMeshInterface(self): # <<<<<<<<<<<<<<
12982  * cdef int dim
12983  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12984  */
12985 
12986 /* Python wrapper */
12987 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12988 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12989  PyObject *__pyx_r = 0;
12990  __Pyx_RefNannyDeclarations
12991  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface (wrapper)", 0);
12992  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
12993 
12994  /* function exit code */
12995  __Pyx_RefNannyFinishContext();
12996  return __pyx_r;
12997 }
12998 
12999 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13000  CYTHON_UNUSED int __pyx_v_dim;
13001  PyObject *__pyx_v_n = NULL;
13002  PyObject *__pyx_r = NULL;
13003  __Pyx_RefNannyDeclarations
13004  PyObject *__pyx_t_1 = NULL;
13005  PyObject *__pyx_t_2 = NULL;
13006  PyObject *__pyx_t_3 = NULL;
13007  Py_ssize_t __pyx_t_4;
13008  PyObject *(*__pyx_t_5)(PyObject *);
13009  Py_ssize_t __pyx_t_6;
13010  int __pyx_t_7;
13011  PyObject *__pyx_t_8 = NULL;
13012  int *__pyx_t_9;
13013  struct __pyx_array_obj *__pyx_t_10 = NULL;
13014  PyObject *__pyx_t_11 = NULL;
13015  Py_ssize_t __pyx_t_12;
13016  int __pyx_lineno = 0;
13017  const char *__pyx_filename = NULL;
13018  int __pyx_clineno = 0;
13019  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface", 0);
13020 
13021  /* "cmeshTools.pyx":287
13022  * def buildPythonMultilevelMeshInterface(self):
13023  * cdef int dim
13024  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])] # <<<<<<<<<<<<<<
13025  * self.elementParentsArrayList = [np.zeros(0)]
13026  * self.elementChildrenArrayList = []
13027  */
13028  __pyx_t_1 = ((PyObject *)__pyx_f_10cmeshTools_CMesh_FromMesh((__pyx_v_self->multilevelMesh.meshArray[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
13029  __Pyx_GOTREF(__pyx_t_1);
13030  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 287, __pyx_L1_error)
13031  __Pyx_GOTREF(__pyx_t_2);
13032  __Pyx_GIVEREF(__pyx_t_1);
13033  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
13034  __pyx_t_1 = 0;
13035  __Pyx_GIVEREF(__pyx_t_2);
13036  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13037  __Pyx_DECREF(__pyx_v_self->cmeshList);
13038  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_2);
13039  __pyx_t_2 = 0;
13040 
13041  /* "cmeshTools.pyx":288
13042  * cdef int dim
13043  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
13044  * self.elementParentsArrayList = [np.zeros(0)] # <<<<<<<<<<<<<<
13045  * self.elementChildrenArrayList = []
13046  * self.elementChildrenOffsetsList = []
13047  */
13048  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error)
13049  __Pyx_GOTREF(__pyx_t_1);
13050  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
13051  __Pyx_GOTREF(__pyx_t_3);
13052  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13053  __pyx_t_1 = NULL;
13054  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13055  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
13056  if (likely(__pyx_t_1)) {
13057  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13058  __Pyx_INCREF(__pyx_t_1);
13059  __Pyx_INCREF(function);
13060  __Pyx_DECREF_SET(__pyx_t_3, function);
13061  }
13062  }
13063  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
13064  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13065  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
13066  __Pyx_GOTREF(__pyx_t_2);
13067  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13068  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
13069  __Pyx_GOTREF(__pyx_t_3);
13070  __Pyx_GIVEREF(__pyx_t_2);
13071  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
13072  __pyx_t_2 = 0;
13073  __Pyx_GIVEREF(__pyx_t_3);
13074  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13075  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13076  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_3);
13077  __pyx_t_3 = 0;
13078 
13079  /* "cmeshTools.pyx":289
13080  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
13081  * self.elementParentsArrayList = [np.zeros(0)]
13082  * self.elementChildrenArrayList = [] # <<<<<<<<<<<<<<
13083  * self.elementChildrenOffsetsList = []
13084  * for n in range(1, self.multilevelMesh.nLevels):
13085  */
13086  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
13087  __Pyx_GOTREF(__pyx_t_3);
13088  __Pyx_GIVEREF(__pyx_t_3);
13089  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13090  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13091  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_3);
13092  __pyx_t_3 = 0;
13093 
13094  /* "cmeshTools.pyx":290
13095  * self.elementParentsArrayList = [np.zeros(0)]
13096  * self.elementChildrenArrayList = []
13097  * self.elementChildrenOffsetsList = [] # <<<<<<<<<<<<<<
13098  * for n in range(1, self.multilevelMesh.nLevels):
13099  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13100  */
13101  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 290, __pyx_L1_error)
13102  __Pyx_GOTREF(__pyx_t_3);
13103  __Pyx_GIVEREF(__pyx_t_3);
13104  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13105  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13106  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_3);
13107  __pyx_t_3 = 0;
13108 
13109  /* "cmeshTools.pyx":291
13110  * self.elementChildrenArrayList = []
13111  * self.elementChildrenOffsetsList = []
13112  * for n in range(1, self.multilevelMesh.nLevels): # <<<<<<<<<<<<<<
13113  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13114  * dim = self.multilevelMesh.meshArray[n].nElements_global
13115  */
13116  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->multilevelMesh.nLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
13117  __Pyx_GOTREF(__pyx_t_3);
13118  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 291, __pyx_L1_error)
13119  __Pyx_GOTREF(__pyx_t_2);
13120  __Pyx_INCREF(__pyx_int_1);
13121  __Pyx_GIVEREF(__pyx_int_1);
13122  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
13123  __Pyx_GIVEREF(__pyx_t_3);
13124  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
13125  __pyx_t_3 = 0;
13126  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
13127  __Pyx_GOTREF(__pyx_t_3);
13128  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13129  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
13130  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
13131  __pyx_t_5 = NULL;
13132  } else {
13133  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 291, __pyx_L1_error)
13134  __Pyx_GOTREF(__pyx_t_2);
13135  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 291, __pyx_L1_error)
13136  }
13137  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13138  for (;;) {
13139  if (likely(!__pyx_t_5)) {
13140  if (likely(PyList_CheckExact(__pyx_t_2))) {
13141  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
13142  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13143  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 291, __pyx_L1_error)
13144  #else
13145  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
13146  __Pyx_GOTREF(__pyx_t_3);
13147  #endif
13148  } else {
13149  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
13150  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13151  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 291, __pyx_L1_error)
13152  #else
13153  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
13154  __Pyx_GOTREF(__pyx_t_3);
13155  #endif
13156  }
13157  } else {
13158  __pyx_t_3 = __pyx_t_5(__pyx_t_2);
13159  if (unlikely(!__pyx_t_3)) {
13160  PyObject* exc_type = PyErr_Occurred();
13161  if (exc_type) {
13162  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13163  else __PYX_ERR(1, 291, __pyx_L1_error)
13164  }
13165  break;
13166  }
13167  __Pyx_GOTREF(__pyx_t_3);
13168  }
13169  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
13170  __pyx_t_3 = 0;
13171 
13172  /* "cmeshTools.pyx":292
13173  * self.elementChildrenOffsetsList = []
13174  * for n in range(1, self.multilevelMesh.nLevels):
13175  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])] # <<<<<<<<<<<<<<
13176  * dim = self.multilevelMesh.meshArray[n].nElements_global
13177  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
13178  */
13179  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 292, __pyx_L1_error)
13180  __pyx_t_3 = ((PyObject *)__pyx_f_10cmeshTools_CMesh_FromMesh((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_6]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
13181  __Pyx_GOTREF(__pyx_t_3);
13182  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
13183  __Pyx_GOTREF(__pyx_t_1);
13184  __Pyx_GIVEREF(__pyx_t_3);
13185  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
13186  __pyx_t_3 = 0;
13187  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->cmeshList, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
13188  __Pyx_GOTREF(__pyx_t_3);
13189  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13190  __Pyx_GIVEREF(__pyx_t_3);
13191  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13192  __Pyx_DECREF(__pyx_v_self->cmeshList);
13193  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_3);
13194  __pyx_t_3 = 0;
13195 
13196  /* "cmeshTools.pyx":293
13197  * for n in range(1, self.multilevelMesh.nLevels):
13198  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13199  * dim = self.multilevelMesh.meshArray[n].nElements_global # <<<<<<<<<<<<<<
13200  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
13201  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
13202  */
13203  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 293, __pyx_L1_error)
13204  __pyx_t_7 = (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_6]).nElements_global;
13205  __pyx_v_dim = __pyx_t_7;
13206 
13207  /* "cmeshTools.pyx":294
13208  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13209  * dim = self.multilevelMesh.meshArray[n].nElements_global
13210  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])] # <<<<<<<<<<<<<<
13211  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
13212  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
13213  */
13214  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 294, __pyx_L1_error)
13215  __Pyx_GOTREF(__pyx_t_1);
13216  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 294, __pyx_L1_error)
13217  __Pyx_GOTREF(__pyx_t_8);
13218  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13219  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 294, __pyx_L1_error)
13220  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_6]);
13221  if (!__pyx_t_9) {
13222  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
13223  __PYX_ERR(1, 294, __pyx_L1_error)
13224  }
13225  __pyx_t_11 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 294, __pyx_L1_error)
13226  __Pyx_GOTREF(__pyx_t_11);
13227  __pyx_t_1 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 294, __pyx_L1_error)
13228  __Pyx_GOTREF(__pyx_t_1);
13229  __pyx_t_10 = __pyx_array_new(__pyx_t_1, sizeof(int), PyBytes_AS_STRING(__pyx_t_11), (char *) "c", (char *) __pyx_t_9);
13230  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 294, __pyx_L1_error)
13231  __Pyx_GOTREF(__pyx_t_10);
13232  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13233  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13234  __pyx_t_11 = NULL;
13235  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
13236  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
13237  if (likely(__pyx_t_11)) {
13238  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
13239  __Pyx_INCREF(__pyx_t_11);
13240  __Pyx_INCREF(function);
13241  __Pyx_DECREF_SET(__pyx_t_8, function);
13242  }
13243  }
13244  __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_11, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_t_10));
13245  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
13246  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
13247  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 294, __pyx_L1_error)
13248  __Pyx_GOTREF(__pyx_t_3);
13249  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13250  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 294, __pyx_L1_error)
13251  __Pyx_GOTREF(__pyx_t_8);
13252  __Pyx_GIVEREF(__pyx_t_3);
13253  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
13254  __pyx_t_3 = 0;
13255  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementParentsArrayList, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 294, __pyx_L1_error)
13256  __Pyx_GOTREF(__pyx_t_3);
13257  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13258  __Pyx_GIVEREF(__pyx_t_3);
13259  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13260  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13261  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_3);
13262  __pyx_t_3 = 0;
13263 
13264  /* "cmeshTools.pyx":295
13265  * dim = self.multilevelMesh.meshArray[n].nElements_global
13266  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
13267  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global] # <<<<<<<<<<<<<<
13268  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
13269  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
13270  */
13271  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
13272  __Pyx_GOTREF(__pyx_t_3);
13273  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error)
13274  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13275  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
13276  __Pyx_GOTREF(__pyx_t_3);
13277  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error)
13278  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13279  __pyx_v_dim = ((__pyx_v_self->multilevelMesh.elementChildrenOffsets[__pyx_t_6])[(__pyx_v_self->multilevelMesh.meshArray[__pyx_t_12]).nElements_global]);
13280 
13281  /* "cmeshTools.pyx":296
13282  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
13283  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
13284  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])] # <<<<<<<<<<<<<<
13285  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
13286  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
13287  */
13288  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 296, __pyx_L1_error)
13289  __Pyx_GOTREF(__pyx_t_8);
13290  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_asarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 296, __pyx_L1_error)
13291  __Pyx_GOTREF(__pyx_t_11);
13292  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13293  __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 296, __pyx_L1_error)
13294  __Pyx_GOTREF(__pyx_t_8);
13295  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 296, __pyx_L1_error)
13296  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13297  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementChildrenArray[__pyx_t_12]);
13298  if (!__pyx_t_9) {
13299  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
13300  __PYX_ERR(1, 296, __pyx_L1_error)
13301  }
13302  __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 296, __pyx_L1_error)
13303  __Pyx_GOTREF(__pyx_t_1);
13304  __pyx_t_8 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 296, __pyx_L1_error)
13305  __Pyx_GOTREF(__pyx_t_8);
13306  __pyx_t_10 = __pyx_array_new(__pyx_t_8, sizeof(int), PyBytes_AS_STRING(__pyx_t_1), (char *) "c", (char *) __pyx_t_9);
13307  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 296, __pyx_L1_error)
13308  __Pyx_GOTREF(__pyx_t_10);
13309  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13310  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13311  __pyx_t_1 = NULL;
13312  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
13313  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
13314  if (likely(__pyx_t_1)) {
13315  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
13316  __Pyx_INCREF(__pyx_t_1);
13317  __Pyx_INCREF(function);
13318  __Pyx_DECREF_SET(__pyx_t_11, function);
13319  }
13320  }
13321  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_11, ((PyObject *)__pyx_t_10));
13322  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13323  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
13324  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 296, __pyx_L1_error)
13325  __Pyx_GOTREF(__pyx_t_3);
13326  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13327  __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 296, __pyx_L1_error)
13328  __Pyx_GOTREF(__pyx_t_11);
13329  __Pyx_GIVEREF(__pyx_t_3);
13330  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
13331  __pyx_t_3 = 0;
13332  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementChildrenArrayList, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 296, __pyx_L1_error)
13333  __Pyx_GOTREF(__pyx_t_3);
13334  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13335  __Pyx_GIVEREF(__pyx_t_3);
13336  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13337  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13338  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_3);
13339  __pyx_t_3 = 0;
13340 
13341  /* "cmeshTools.pyx":297
13342  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
13343  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
13344  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1; # <<<<<<<<<<<<<<
13345  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
13346  *
13347  */
13348  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 297, __pyx_L1_error)
13349  __Pyx_GOTREF(__pyx_t_3);
13350  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 297, __pyx_L1_error)
13351  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13352  __pyx_v_dim = ((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_12]).nElements_global + 1);
13353 
13354  /* "cmeshTools.pyx":298
13355  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
13356  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
13357  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])] # <<<<<<<<<<<<<<
13358  *
13359  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13360  */
13361  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 298, __pyx_L1_error)
13362  __Pyx_GOTREF(__pyx_t_11);
13363  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 298, __pyx_L1_error)
13364  __Pyx_GOTREF(__pyx_t_1);
13365  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13366  __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 298, __pyx_L1_error)
13367  __Pyx_GOTREF(__pyx_t_11);
13368  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 298, __pyx_L1_error)
13369  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13370  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementChildrenOffsets[__pyx_t_12]);
13371  if (!__pyx_t_9) {
13372  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
13373  __PYX_ERR(1, 298, __pyx_L1_error)
13374  }
13375  __pyx_t_8 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 298, __pyx_L1_error)
13376  __Pyx_GOTREF(__pyx_t_8);
13377  __pyx_t_11 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 298, __pyx_L1_error)
13378  __Pyx_GOTREF(__pyx_t_11);
13379  __pyx_t_10 = __pyx_array_new(__pyx_t_11, sizeof(int), PyBytes_AS_STRING(__pyx_t_8), (char *) "c", (char *) __pyx_t_9);
13380  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 298, __pyx_L1_error)
13381  __Pyx_GOTREF(__pyx_t_10);
13382  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13383  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13384  __pyx_t_8 = NULL;
13385  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
13386  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
13387  if (likely(__pyx_t_8)) {
13388  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
13389  __Pyx_INCREF(__pyx_t_8);
13390  __Pyx_INCREF(function);
13391  __Pyx_DECREF_SET(__pyx_t_1, function);
13392  }
13393  }
13394  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_10));
13395  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13396  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
13397  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 298, __pyx_L1_error)
13398  __Pyx_GOTREF(__pyx_t_3);
13399  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13400  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 298, __pyx_L1_error)
13401  __Pyx_GOTREF(__pyx_t_1);
13402  __Pyx_GIVEREF(__pyx_t_3);
13403  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
13404  __pyx_t_3 = 0;
13405  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementChildrenOffsetsList, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 298, __pyx_L1_error)
13406  __Pyx_GOTREF(__pyx_t_3);
13407  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13408  __Pyx_GIVEREF(__pyx_t_3);
13409  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13410  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13411  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_3);
13412  __pyx_t_3 = 0;
13413 
13414  /* "cmeshTools.pyx":291
13415  * self.elementChildrenArrayList = []
13416  * self.elementChildrenOffsetsList = []
13417  * for n in range(1, self.multilevelMesh.nLevels): # <<<<<<<<<<<<<<
13418  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13419  * dim = self.multilevelMesh.meshArray[n].nElements_global
13420  */
13421  }
13422  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13423 
13424  /* "cmeshTools.pyx":285
13425  * False);
13426  *
13427  * def buildPythonMultilevelMeshInterface(self): # <<<<<<<<<<<<<<
13428  * cdef int dim
13429  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
13430  */
13431 
13432  /* function exit code */
13433  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13434  goto __pyx_L0;
13435  __pyx_L1_error:;
13436  __Pyx_XDECREF(__pyx_t_1);
13437  __Pyx_XDECREF(__pyx_t_2);
13438  __Pyx_XDECREF(__pyx_t_3);
13439  __Pyx_XDECREF(__pyx_t_8);
13440  __Pyx_XDECREF(((PyObject *)__pyx_t_10));
13441  __Pyx_XDECREF(__pyx_t_11);
13442  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.buildPythonMultilevelMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
13443  __pyx_r = NULL;
13444  __pyx_L0:;
13445  __Pyx_XDECREF(__pyx_v_n);
13446  __Pyx_XGIVEREF(__pyx_r);
13447  __Pyx_RefNannyFinishContext();
13448  return __pyx_r;
13449 }
13450 
13451 /* "cmeshTools.pyx":205
13452  * cdef cppm.MultilevelMesh multilevelMesh
13453  * cdef public:
13454  * int nLevels # <<<<<<<<<<<<<<
13455  * list cmeshList
13456  * list elementParentsArrayList
13457  */
13458 
13459 /* Python wrapper */
13460 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(PyObject *__pyx_v_self); /*proto*/
13461 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(PyObject *__pyx_v_self) {
13462  PyObject *__pyx_r = 0;
13463  __Pyx_RefNannyDeclarations
13464  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13465  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13466 
13467  /* function exit code */
13468  __Pyx_RefNannyFinishContext();
13469  return __pyx_r;
13470 }
13471 
13472 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13473  PyObject *__pyx_r = NULL;
13474  __Pyx_RefNannyDeclarations
13475  PyObject *__pyx_t_1 = NULL;
13476  int __pyx_lineno = 0;
13477  const char *__pyx_filename = NULL;
13478  int __pyx_clineno = 0;
13479  __Pyx_RefNannySetupContext("__get__", 0);
13480  __Pyx_XDECREF(__pyx_r);
13481  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 205, __pyx_L1_error)
13482  __Pyx_GOTREF(__pyx_t_1);
13483  __pyx_r = __pyx_t_1;
13484  __pyx_t_1 = 0;
13485  goto __pyx_L0;
13486 
13487  /* function exit code */
13488  __pyx_L1_error:;
13489  __Pyx_XDECREF(__pyx_t_1);
13490  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.nLevels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13491  __pyx_r = NULL;
13492  __pyx_L0:;
13493  __Pyx_XGIVEREF(__pyx_r);
13494  __Pyx_RefNannyFinishContext();
13495  return __pyx_r;
13496 }
13497 
13498 /* Python wrapper */
13499 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13500 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13501  int __pyx_r;
13502  __Pyx_RefNannyDeclarations
13503  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13504  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13505 
13506  /* function exit code */
13507  __Pyx_RefNannyFinishContext();
13508  return __pyx_r;
13509 }
13510 
13511 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13512  int __pyx_r;
13513  __Pyx_RefNannyDeclarations
13514  int __pyx_t_1;
13515  int __pyx_lineno = 0;
13516  const char *__pyx_filename = NULL;
13517  int __pyx_clineno = 0;
13518  __Pyx_RefNannySetupContext("__set__", 0);
13519  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 205, __pyx_L1_error)
13520  __pyx_v_self->nLevels = __pyx_t_1;
13521 
13522  /* function exit code */
13523  __pyx_r = 0;
13524  goto __pyx_L0;
13525  __pyx_L1_error:;
13526  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.nLevels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13527  __pyx_r = -1;
13528  __pyx_L0:;
13529  __Pyx_RefNannyFinishContext();
13530  return __pyx_r;
13531 }
13532 
13533 /* "cmeshTools.pyx":206
13534  * cdef public:
13535  * int nLevels
13536  * list cmeshList # <<<<<<<<<<<<<<
13537  * list elementParentsArrayList
13538  * list elementChildrenArrayList
13539  */
13540 
13541 /* Python wrapper */
13542 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(PyObject *__pyx_v_self); /*proto*/
13543 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(PyObject *__pyx_v_self) {
13544  PyObject *__pyx_r = 0;
13545  __Pyx_RefNannyDeclarations
13546  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13547  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13548 
13549  /* function exit code */
13550  __Pyx_RefNannyFinishContext();
13551  return __pyx_r;
13552 }
13553 
13554 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13555  PyObject *__pyx_r = NULL;
13556  __Pyx_RefNannyDeclarations
13557  __Pyx_RefNannySetupContext("__get__", 0);
13558  __Pyx_XDECREF(__pyx_r);
13559  __Pyx_INCREF(__pyx_v_self->cmeshList);
13560  __pyx_r = __pyx_v_self->cmeshList;
13561  goto __pyx_L0;
13562 
13563  /* function exit code */
13564  __pyx_L0:;
13565  __Pyx_XGIVEREF(__pyx_r);
13566  __Pyx_RefNannyFinishContext();
13567  return __pyx_r;
13568 }
13569 
13570 /* Python wrapper */
13571 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13572 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13573  int __pyx_r;
13574  __Pyx_RefNannyDeclarations
13575  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13576  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13577 
13578  /* function exit code */
13579  __Pyx_RefNannyFinishContext();
13580  return __pyx_r;
13581 }
13582 
13583 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13584  int __pyx_r;
13585  __Pyx_RefNannyDeclarations
13586  PyObject *__pyx_t_1 = NULL;
13587  int __pyx_lineno = 0;
13588  const char *__pyx_filename = NULL;
13589  int __pyx_clineno = 0;
13590  __Pyx_RefNannySetupContext("__set__", 0);
13591  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 206, __pyx_L1_error)
13592  __pyx_t_1 = __pyx_v_value;
13593  __Pyx_INCREF(__pyx_t_1);
13594  __Pyx_GIVEREF(__pyx_t_1);
13595  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13596  __Pyx_DECREF(__pyx_v_self->cmeshList);
13597  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_1);
13598  __pyx_t_1 = 0;
13599 
13600  /* function exit code */
13601  __pyx_r = 0;
13602  goto __pyx_L0;
13603  __pyx_L1_error:;
13604  __Pyx_XDECREF(__pyx_t_1);
13605  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.cmeshList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13606  __pyx_r = -1;
13607  __pyx_L0:;
13608  __Pyx_RefNannyFinishContext();
13609  return __pyx_r;
13610 }
13611 
13612 /* Python wrapper */
13613 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(PyObject *__pyx_v_self); /*proto*/
13614 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(PyObject *__pyx_v_self) {
13615  int __pyx_r;
13616  __Pyx_RefNannyDeclarations
13617  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13618  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13619 
13620  /* function exit code */
13621  __Pyx_RefNannyFinishContext();
13622  return __pyx_r;
13623 }
13624 
13625 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13626  int __pyx_r;
13627  __Pyx_RefNannyDeclarations
13628  __Pyx_RefNannySetupContext("__del__", 0);
13629  __Pyx_INCREF(Py_None);
13630  __Pyx_GIVEREF(Py_None);
13631  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13632  __Pyx_DECREF(__pyx_v_self->cmeshList);
13633  __pyx_v_self->cmeshList = ((PyObject*)Py_None);
13634 
13635  /* function exit code */
13636  __pyx_r = 0;
13637  __Pyx_RefNannyFinishContext();
13638  return __pyx_r;
13639 }
13640 
13641 /* "cmeshTools.pyx":207
13642  * int nLevels
13643  * list cmeshList
13644  * list elementParentsArrayList # <<<<<<<<<<<<<<
13645  * list elementChildrenArrayList
13646  * list elementChildrenOffsetsList
13647  */
13648 
13649 /* Python wrapper */
13650 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(PyObject *__pyx_v_self); /*proto*/
13651 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(PyObject *__pyx_v_self) {
13652  PyObject *__pyx_r = 0;
13653  __Pyx_RefNannyDeclarations
13654  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13655  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13656 
13657  /* function exit code */
13658  __Pyx_RefNannyFinishContext();
13659  return __pyx_r;
13660 }
13661 
13662 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13663  PyObject *__pyx_r = NULL;
13664  __Pyx_RefNannyDeclarations
13665  __Pyx_RefNannySetupContext("__get__", 0);
13666  __Pyx_XDECREF(__pyx_r);
13667  __Pyx_INCREF(__pyx_v_self->elementParentsArrayList);
13668  __pyx_r = __pyx_v_self->elementParentsArrayList;
13669  goto __pyx_L0;
13670 
13671  /* function exit code */
13672  __pyx_L0:;
13673  __Pyx_XGIVEREF(__pyx_r);
13674  __Pyx_RefNannyFinishContext();
13675  return __pyx_r;
13676 }
13677 
13678 /* Python wrapper */
13679 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13680 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13681  int __pyx_r;
13682  __Pyx_RefNannyDeclarations
13683  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13684  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13685 
13686  /* function exit code */
13687  __Pyx_RefNannyFinishContext();
13688  return __pyx_r;
13689 }
13690 
13691 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13692  int __pyx_r;
13693  __Pyx_RefNannyDeclarations
13694  PyObject *__pyx_t_1 = NULL;
13695  int __pyx_lineno = 0;
13696  const char *__pyx_filename = NULL;
13697  int __pyx_clineno = 0;
13698  __Pyx_RefNannySetupContext("__set__", 0);
13699  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 207, __pyx_L1_error)
13700  __pyx_t_1 = __pyx_v_value;
13701  __Pyx_INCREF(__pyx_t_1);
13702  __Pyx_GIVEREF(__pyx_t_1);
13703  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13704  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13705  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_1);
13706  __pyx_t_1 = 0;
13707 
13708  /* function exit code */
13709  __pyx_r = 0;
13710  goto __pyx_L0;
13711  __pyx_L1_error:;
13712  __Pyx_XDECREF(__pyx_t_1);
13713  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementParentsArrayList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13714  __pyx_r = -1;
13715  __pyx_L0:;
13716  __Pyx_RefNannyFinishContext();
13717  return __pyx_r;
13718 }
13719 
13720 /* Python wrapper */
13721 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(PyObject *__pyx_v_self); /*proto*/
13722 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(PyObject *__pyx_v_self) {
13723  int __pyx_r;
13724  __Pyx_RefNannyDeclarations
13725  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13726  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13727 
13728  /* function exit code */
13729  __Pyx_RefNannyFinishContext();
13730  return __pyx_r;
13731 }
13732 
13733 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13734  int __pyx_r;
13735  __Pyx_RefNannyDeclarations
13736  __Pyx_RefNannySetupContext("__del__", 0);
13737  __Pyx_INCREF(Py_None);
13738  __Pyx_GIVEREF(Py_None);
13739  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13740  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13741  __pyx_v_self->elementParentsArrayList = ((PyObject*)Py_None);
13742 
13743  /* function exit code */
13744  __pyx_r = 0;
13745  __Pyx_RefNannyFinishContext();
13746  return __pyx_r;
13747 }
13748 
13749 /* "cmeshTools.pyx":208
13750  * list cmeshList
13751  * list elementParentsArrayList
13752  * list elementChildrenArrayList # <<<<<<<<<<<<<<
13753  * list elementChildrenOffsetsList
13754  * def __init__(self, CMesh cmesh, nLevels):
13755  */
13756 
13757 /* Python wrapper */
13758 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(PyObject *__pyx_v_self); /*proto*/
13759 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(PyObject *__pyx_v_self) {
13760  PyObject *__pyx_r = 0;
13761  __Pyx_RefNannyDeclarations
13762  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13763  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13764 
13765  /* function exit code */
13766  __Pyx_RefNannyFinishContext();
13767  return __pyx_r;
13768 }
13769 
13770 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13771  PyObject *__pyx_r = NULL;
13772  __Pyx_RefNannyDeclarations
13773  __Pyx_RefNannySetupContext("__get__", 0);
13774  __Pyx_XDECREF(__pyx_r);
13775  __Pyx_INCREF(__pyx_v_self->elementChildrenArrayList);
13776  __pyx_r = __pyx_v_self->elementChildrenArrayList;
13777  goto __pyx_L0;
13778 
13779  /* function exit code */
13780  __pyx_L0:;
13781  __Pyx_XGIVEREF(__pyx_r);
13782  __Pyx_RefNannyFinishContext();
13783  return __pyx_r;
13784 }
13785 
13786 /* Python wrapper */
13787 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13788 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13789  int __pyx_r;
13790  __Pyx_RefNannyDeclarations
13791  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13792  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13793 
13794  /* function exit code */
13795  __Pyx_RefNannyFinishContext();
13796  return __pyx_r;
13797 }
13798 
13799 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13800  int __pyx_r;
13801  __Pyx_RefNannyDeclarations
13802  PyObject *__pyx_t_1 = NULL;
13803  int __pyx_lineno = 0;
13804  const char *__pyx_filename = NULL;
13805  int __pyx_clineno = 0;
13806  __Pyx_RefNannySetupContext("__set__", 0);
13807  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 208, __pyx_L1_error)
13808  __pyx_t_1 = __pyx_v_value;
13809  __Pyx_INCREF(__pyx_t_1);
13810  __Pyx_GIVEREF(__pyx_t_1);
13811  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13812  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13813  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_1);
13814  __pyx_t_1 = 0;
13815 
13816  /* function exit code */
13817  __pyx_r = 0;
13818  goto __pyx_L0;
13819  __pyx_L1_error:;
13820  __Pyx_XDECREF(__pyx_t_1);
13821  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementChildrenArrayList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13822  __pyx_r = -1;
13823  __pyx_L0:;
13824  __Pyx_RefNannyFinishContext();
13825  return __pyx_r;
13826 }
13827 
13828 /* Python wrapper */
13829 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(PyObject *__pyx_v_self); /*proto*/
13830 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(PyObject *__pyx_v_self) {
13831  int __pyx_r;
13832  __Pyx_RefNannyDeclarations
13833  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13834  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13835 
13836  /* function exit code */
13837  __Pyx_RefNannyFinishContext();
13838  return __pyx_r;
13839 }
13840 
13841 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13842  int __pyx_r;
13843  __Pyx_RefNannyDeclarations
13844  __Pyx_RefNannySetupContext("__del__", 0);
13845  __Pyx_INCREF(Py_None);
13846  __Pyx_GIVEREF(Py_None);
13847  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13848  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13849  __pyx_v_self->elementChildrenArrayList = ((PyObject*)Py_None);
13850 
13851  /* function exit code */
13852  __pyx_r = 0;
13853  __Pyx_RefNannyFinishContext();
13854  return __pyx_r;
13855 }
13856 
13857 /* "cmeshTools.pyx":209
13858  * list elementParentsArrayList
13859  * list elementChildrenArrayList
13860  * list elementChildrenOffsetsList # <<<<<<<<<<<<<<
13861  * def __init__(self, CMesh cmesh, nLevels):
13862  * self.multilevelMesh = cppm.MultilevelMesh()
13863  */
13864 
13865 /* Python wrapper */
13866 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(PyObject *__pyx_v_self); /*proto*/
13867 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(PyObject *__pyx_v_self) {
13868  PyObject *__pyx_r = 0;
13869  __Pyx_RefNannyDeclarations
13870  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13871  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13872 
13873  /* function exit code */
13874  __Pyx_RefNannyFinishContext();
13875  return __pyx_r;
13876 }
13877 
13878 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13879  PyObject *__pyx_r = NULL;
13880  __Pyx_RefNannyDeclarations
13881  __Pyx_RefNannySetupContext("__get__", 0);
13882  __Pyx_XDECREF(__pyx_r);
13883  __Pyx_INCREF(__pyx_v_self->elementChildrenOffsetsList);
13884  __pyx_r = __pyx_v_self->elementChildrenOffsetsList;
13885  goto __pyx_L0;
13886 
13887  /* function exit code */
13888  __pyx_L0:;
13889  __Pyx_XGIVEREF(__pyx_r);
13890  __Pyx_RefNannyFinishContext();
13891  return __pyx_r;
13892 }
13893 
13894 /* Python wrapper */
13895 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13896 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13897  int __pyx_r;
13898  __Pyx_RefNannyDeclarations
13899  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13900  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13901 
13902  /* function exit code */
13903  __Pyx_RefNannyFinishContext();
13904  return __pyx_r;
13905 }
13906 
13907 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13908  int __pyx_r;
13909  __Pyx_RefNannyDeclarations
13910  PyObject *__pyx_t_1 = NULL;
13911  int __pyx_lineno = 0;
13912  const char *__pyx_filename = NULL;
13913  int __pyx_clineno = 0;
13914  __Pyx_RefNannySetupContext("__set__", 0);
13915  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 209, __pyx_L1_error)
13916  __pyx_t_1 = __pyx_v_value;
13917  __Pyx_INCREF(__pyx_t_1);
13918  __Pyx_GIVEREF(__pyx_t_1);
13919  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13920  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13921  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_1);
13922  __pyx_t_1 = 0;
13923 
13924  /* function exit code */
13925  __pyx_r = 0;
13926  goto __pyx_L0;
13927  __pyx_L1_error:;
13928  __Pyx_XDECREF(__pyx_t_1);
13929  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementChildrenOffsetsList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13930  __pyx_r = -1;
13931  __pyx_L0:;
13932  __Pyx_RefNannyFinishContext();
13933  return __pyx_r;
13934 }
13935 
13936 /* Python wrapper */
13937 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(PyObject *__pyx_v_self); /*proto*/
13938 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(PyObject *__pyx_v_self) {
13939  int __pyx_r;
13940  __Pyx_RefNannyDeclarations
13941  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13942  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13943 
13944  /* function exit code */
13945  __Pyx_RefNannyFinishContext();
13946  return __pyx_r;
13947 }
13948 
13949 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13950  int __pyx_r;
13951  __Pyx_RefNannyDeclarations
13952  __Pyx_RefNannySetupContext("__del__", 0);
13953  __Pyx_INCREF(Py_None);
13954  __Pyx_GIVEREF(Py_None);
13955  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13956  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13957  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)Py_None);
13958 
13959  /* function exit code */
13960  __pyx_r = 0;
13961  __Pyx_RefNannyFinishContext();
13962  return __pyx_r;
13963 }
13964 
13965 /* "(tree fragment)":1
13966  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13967  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13968  * def __setstate_cython__(self, __pyx_state):
13969  */
13970 
13971 /* Python wrapper */
13972 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13973 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13974  PyObject *__pyx_r = 0;
13975  __Pyx_RefNannyDeclarations
13976  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
13977  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13978 
13979  /* function exit code */
13980  __Pyx_RefNannyFinishContext();
13981  return __pyx_r;
13982 }
13983 
13984 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13985  PyObject *__pyx_r = NULL;
13986  __Pyx_RefNannyDeclarations
13987  PyObject *__pyx_t_1 = NULL;
13988  int __pyx_lineno = 0;
13989  const char *__pyx_filename = NULL;
13990  int __pyx_clineno = 0;
13991  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
13992 
13993  /* "(tree fragment)":2
13994  * def __reduce_cython__(self):
13995  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
13996  * def __setstate_cython__(self, __pyx_state):
13997  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13998  */
13999  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
14000  __Pyx_GOTREF(__pyx_t_1);
14001  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
14002  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14003  __PYX_ERR(0, 2, __pyx_L1_error)
14004 
14005  /* "(tree fragment)":1
14006  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
14007  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
14008  * def __setstate_cython__(self, __pyx_state):
14009  */
14010 
14011  /* function exit code */
14012  __pyx_L1_error:;
14013  __Pyx_XDECREF(__pyx_t_1);
14014  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14015  __pyx_r = NULL;
14016  __Pyx_XGIVEREF(__pyx_r);
14017  __Pyx_RefNannyFinishContext();
14018  return __pyx_r;
14019 }
14020 
14021 /* "(tree fragment)":3
14022  * def __reduce_cython__(self):
14023  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
14024  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
14025  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
14026  */
14027 
14028 /* Python wrapper */
14029 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
14030 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
14031  PyObject *__pyx_r = 0;
14032  __Pyx_RefNannyDeclarations
14033  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
14034  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
14035 
14036  /* function exit code */
14037  __Pyx_RefNannyFinishContext();
14038  return __pyx_r;
14039 }
14040 
14041 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
14042  PyObject *__pyx_r = NULL;
14043  __Pyx_RefNannyDeclarations
14044  PyObject *__pyx_t_1 = NULL;
14045  int __pyx_lineno = 0;
14046  const char *__pyx_filename = NULL;
14047  int __pyx_clineno = 0;
14048  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
14049 
14050  /* "(tree fragment)":4
14051  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
14052  * def __setstate_cython__(self, __pyx_state):
14053  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
14054  */
14055  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
14056  __Pyx_GOTREF(__pyx_t_1);
14057  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
14058  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14059  __PYX_ERR(0, 4, __pyx_L1_error)
14060 
14061  /* "(tree fragment)":3
14062  * def __reduce_cython__(self):
14063  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
14064  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
14065  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
14066  */
14067 
14068  /* function exit code */
14069  __pyx_L1_error:;
14070  __Pyx_XDECREF(__pyx_t_1);
14071  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14072  __pyx_r = NULL;
14073  __Pyx_XGIVEREF(__pyx_r);
14074  __Pyx_RefNannyFinishContext();
14075  return __pyx_r;
14076 }
14077 
14078 /* "cmeshTools.pyx":300
14079  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
14080  *
14081  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
14082  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
14083  * return (cmultilevelMesh.nLevels,
14084  */
14085 
14086 /* Python wrapper */
14087 static PyObject *__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh); /*proto*/
14088 static PyMethodDef __pyx_mdef_10cmeshTools_5buildPythonMultilevelMeshInterface = {"buildPythonMultilevelMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface, METH_O, 0};
14089 static PyObject *__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh) {
14090  PyObject *__pyx_r = 0;
14091  __Pyx_RefNannyDeclarations
14092  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface (wrapper)", 0);
14093  __pyx_r = __pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(__pyx_self, ((PyObject *)__pyx_v_cmultilevelMesh));
14094 
14095  /* function exit code */
14096  __Pyx_RefNannyFinishContext();
14097  return __pyx_r;
14098 }
14099 
14100 static PyObject *__pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh) {
14101  PyObject *__pyx_r = NULL;
14102  __Pyx_RefNannyDeclarations
14103  PyObject *__pyx_t_1 = NULL;
14104  PyObject *__pyx_t_2 = NULL;
14105  PyObject *__pyx_t_3 = NULL;
14106  PyObject *__pyx_t_4 = NULL;
14107  PyObject *__pyx_t_5 = NULL;
14108  PyObject *__pyx_t_6 = NULL;
14109  int __pyx_lineno = 0;
14110  const char *__pyx_filename = NULL;
14111  int __pyx_clineno = 0;
14112  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface", 0);
14113 
14114  /* "cmeshTools.pyx":301
14115  *
14116  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
14117  * cmultilevelMesh.buildPythonMultilevelMeshInterface() # <<<<<<<<<<<<<<
14118  * return (cmultilevelMesh.nLevels,
14119  * cmultilevelMesh.cmeshList,
14120  */
14121  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_buildPythonMultilevelMeshInterfa); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 301, __pyx_L1_error)
14122  __Pyx_GOTREF(__pyx_t_2);
14123  __pyx_t_3 = NULL;
14124  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
14125  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
14126  if (likely(__pyx_t_3)) {
14127  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14128  __Pyx_INCREF(__pyx_t_3);
14129  __Pyx_INCREF(function);
14130  __Pyx_DECREF_SET(__pyx_t_2, function);
14131  }
14132  }
14133  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
14134  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14135  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 301, __pyx_L1_error)
14136  __Pyx_GOTREF(__pyx_t_1);
14137  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14139 
14140  /* "cmeshTools.pyx":302
14141  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
14142  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
14143  * return (cmultilevelMesh.nLevels, # <<<<<<<<<<<<<<
14144  * cmultilevelMesh.cmeshList,
14145  * cmultilevelMesh.elementParentsArrayList,
14146  */
14147  __Pyx_XDECREF(__pyx_r);
14148  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_nLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L1_error)
14149  __Pyx_GOTREF(__pyx_t_1);
14150 
14151  /* "cmeshTools.pyx":303
14152  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
14153  * return (cmultilevelMesh.nLevels,
14154  * cmultilevelMesh.cmeshList, # <<<<<<<<<<<<<<
14155  * cmultilevelMesh.elementParentsArrayList,
14156  * cmultilevelMesh.elementChildrenArrayList,
14157  */
14158  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_cmeshList); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 303, __pyx_L1_error)
14159  __Pyx_GOTREF(__pyx_t_2);
14160 
14161  /* "cmeshTools.pyx":304
14162  * return (cmultilevelMesh.nLevels,
14163  * cmultilevelMesh.cmeshList,
14164  * cmultilevelMesh.elementParentsArrayList, # <<<<<<<<<<<<<<
14165  * cmultilevelMesh.elementChildrenArrayList,
14166  * cmultilevelMesh.elementChildrenOffsetsList)
14167  */
14168  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementParentsArrayList); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 304, __pyx_L1_error)
14169  __Pyx_GOTREF(__pyx_t_3);
14170 
14171  /* "cmeshTools.pyx":305
14172  * cmultilevelMesh.cmeshList,
14173  * cmultilevelMesh.elementParentsArrayList,
14174  * cmultilevelMesh.elementChildrenArrayList, # <<<<<<<<<<<<<<
14175  * cmultilevelMesh.elementChildrenOffsetsList)
14176  *
14177  */
14178  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementChildrenArrayList); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 305, __pyx_L1_error)
14179  __Pyx_GOTREF(__pyx_t_4);
14180 
14181  /* "cmeshTools.pyx":306
14182  * cmultilevelMesh.elementParentsArrayList,
14183  * cmultilevelMesh.elementChildrenArrayList,
14184  * cmultilevelMesh.elementChildrenOffsetsList) # <<<<<<<<<<<<<<
14185  *
14186  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx,
14187  */
14188  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementChildrenOffsetsList); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 306, __pyx_L1_error)
14189  __Pyx_GOTREF(__pyx_t_5);
14190 
14191  /* "cmeshTools.pyx":302
14192  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
14193  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
14194  * return (cmultilevelMesh.nLevels, # <<<<<<<<<<<<<<
14195  * cmultilevelMesh.cmeshList,
14196  * cmultilevelMesh.elementParentsArrayList,
14197  */
14198  __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 302, __pyx_L1_error)
14199  __Pyx_GOTREF(__pyx_t_6);
14200  __Pyx_GIVEREF(__pyx_t_1);
14201  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
14202  __Pyx_GIVEREF(__pyx_t_2);
14203  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
14204  __Pyx_GIVEREF(__pyx_t_3);
14205  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
14206  __Pyx_GIVEREF(__pyx_t_4);
14207  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4);
14208  __Pyx_GIVEREF(__pyx_t_5);
14209  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5);
14210  __pyx_t_1 = 0;
14211  __pyx_t_2 = 0;
14212  __pyx_t_3 = 0;
14213  __pyx_t_4 = 0;
14214  __pyx_t_5 = 0;
14215  __pyx_r = __pyx_t_6;
14216  __pyx_t_6 = 0;
14217  goto __pyx_L0;
14218 
14219  /* "cmeshTools.pyx":300
14220  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
14221  *
14222  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
14223  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
14224  * return (cmultilevelMesh.nLevels,
14225  */
14226 
14227  /* function exit code */
14228  __pyx_L1_error:;
14229  __Pyx_XDECREF(__pyx_t_1);
14230  __Pyx_XDECREF(__pyx_t_2);
14231  __Pyx_XDECREF(__pyx_t_3);
14232  __Pyx_XDECREF(__pyx_t_4);
14233  __Pyx_XDECREF(__pyx_t_5);
14234  __Pyx_XDECREF(__pyx_t_6);
14235  __Pyx_AddTraceback("cmeshTools.buildPythonMultilevelMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
14236  __pyx_r = NULL;
14237  __pyx_L0:;
14238  __Pyx_XGIVEREF(__pyx_r);
14239  __Pyx_RefNannyFinishContext();
14240  return __pyx_r;
14241 }
14242 
14243 /* "cmeshTools.pyx":308
14244  * cmultilevelMesh.elementChildrenOffsetsList)
14245  *
14246  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
14247  * int ny,
14248  * int nz,
14249  */
14250 
14251 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14252 static void __pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
14253  __Pyx_RefNannyDeclarations
14254  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid", 0);
14255 
14256  /* "cmeshTools.pyx":315
14257  * double Lz,
14258  * CMesh cmesh):
14259  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh); # <<<<<<<<<<<<<<
14260  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
14261  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14262  */
14263  (void)(regularHexahedralToTetrahedralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_cmesh->mesh));
14264 
14265  /* "cmeshTools.pyx":316
14266  * CMesh cmesh):
14267  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh);
14268  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
14269  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14270  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14271  */
14272  (void)(regularHexahedralToTetrahedralMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
14273 
14274  /* "cmeshTools.pyx":317
14275  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh);
14276  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
14277  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
14278  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14279  *
14280  */
14281  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
14282 
14283  /* "cmeshTools.pyx":318
14284  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
14285  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14286  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
14287  *
14288  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh):
14289  */
14290  (void)(regularHexahedralToTetrahedralElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
14291 
14292  /* "cmeshTools.pyx":308
14293  * cmultilevelMesh.elementChildrenOffsetsList)
14294  *
14295  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
14296  * int ny,
14297  * int nz,
14298  */
14299 
14300  /* function exit code */
14301  __Pyx_RefNannyFinishContext();
14302 }
14303 
14304 /* Python wrapper */
14305 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14306 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14307  int __pyx_v_nx;
14308  int __pyx_v_ny;
14309  int __pyx_v_nz;
14310  double __pyx_v_Lx;
14311  double __pyx_v_Ly;
14312  double __pyx_v_Lz;
14313  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14314  int __pyx_lineno = 0;
14315  const char *__pyx_filename = NULL;
14316  int __pyx_clineno = 0;
14317  PyObject *__pyx_r = 0;
14318  __Pyx_RefNannyDeclarations
14319  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid (wrapper)", 0);
14320  {
14321  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_Lz,&__pyx_n_s_cmesh,0};
14322  PyObject* values[7] = {0,0,0,0,0,0,0};
14323  if (unlikely(__pyx_kwds)) {
14324  Py_ssize_t kw_args;
14325  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14326  switch (pos_args) {
14327  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14328  CYTHON_FALLTHROUGH;
14329  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14330  CYTHON_FALLTHROUGH;
14331  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14332  CYTHON_FALLTHROUGH;
14333  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14334  CYTHON_FALLTHROUGH;
14335  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14336  CYTHON_FALLTHROUGH;
14337  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14338  CYTHON_FALLTHROUGH;
14339  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14340  CYTHON_FALLTHROUGH;
14341  case 0: break;
14342  default: goto __pyx_L5_argtuple_error;
14343  }
14344  kw_args = PyDict_Size(__pyx_kwds);
14345  switch (pos_args) {
14346  case 0:
14347  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
14348  else goto __pyx_L5_argtuple_error;
14349  CYTHON_FALLTHROUGH;
14350  case 1:
14351  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
14352  else {
14353  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 1); __PYX_ERR(1, 308, __pyx_L3_error)
14354  }
14355  CYTHON_FALLTHROUGH;
14356  case 2:
14357  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;
14358  else {
14359  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 2); __PYX_ERR(1, 308, __pyx_L3_error)
14360  }
14361  CYTHON_FALLTHROUGH;
14362  case 3:
14363  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
14364  else {
14365  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 3); __PYX_ERR(1, 308, __pyx_L3_error)
14366  }
14367  CYTHON_FALLTHROUGH;
14368  case 4:
14369  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
14370  else {
14371  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 4); __PYX_ERR(1, 308, __pyx_L3_error)
14372  }
14373  CYTHON_FALLTHROUGH;
14374  case 5:
14375  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lz)) != 0)) kw_args--;
14376  else {
14377  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 5); __PYX_ERR(1, 308, __pyx_L3_error)
14378  }
14379  CYTHON_FALLTHROUGH;
14380  case 6:
14381  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14382  else {
14383  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 6); __PYX_ERR(1, 308, __pyx_L3_error)
14384  }
14385  }
14386  if (unlikely(kw_args > 0)) {
14387  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateTetrahedralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 308, __pyx_L3_error)
14388  }
14389  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
14390  goto __pyx_L5_argtuple_error;
14391  } else {
14392  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14393  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14394  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14395  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
14396  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
14397  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
14398  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
14399  }
14400  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 308, __pyx_L3_error)
14401  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 309, __pyx_L3_error)
14402  __pyx_v_nz = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error)
14403  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 311, __pyx_L3_error)
14404  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 312, __pyx_L3_error)
14405  __pyx_v_Lz = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_Lz == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 313, __pyx_L3_error)
14406  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[6]);
14407  }
14408  goto __pyx_L4_argument_unpacking_done;
14409  __pyx_L5_argtuple_error:;
14410  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 308, __pyx_L3_error)
14411  __pyx_L3_error:;
14412  __Pyx_AddTraceback("cmeshTools.generateTetrahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
14413  __Pyx_RefNannyFinishContext();
14414  return NULL;
14415  __pyx_L4_argument_unpacking_done:;
14416  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 314, __pyx_L1_error)
14417  __pyx_r = __pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh);
14418 
14419  /* function exit code */
14420  goto __pyx_L0;
14421  __pyx_L1_error:;
14422  __pyx_r = NULL;
14423  __pyx_L0:;
14424  __Pyx_RefNannyFinishContext();
14425  return __pyx_r;
14426 }
14427 
14428 static PyObject *__pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
14429  PyObject *__pyx_r = NULL;
14430  __Pyx_RefNannyDeclarations
14431  PyObject *__pyx_t_1 = NULL;
14432  int __pyx_lineno = 0;
14433  const char *__pyx_filename = NULL;
14434  int __pyx_clineno = 0;
14435  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid", 0);
14436  __Pyx_XDECREF(__pyx_r);
14437  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 308, __pyx_L1_error)
14438  __Pyx_GOTREF(__pyx_t_1);
14439  __pyx_r = __pyx_t_1;
14440  __pyx_t_1 = 0;
14441  goto __pyx_L0;
14442 
14443  /* function exit code */
14444  __pyx_L1_error:;
14445  __Pyx_XDECREF(__pyx_t_1);
14446  __Pyx_AddTraceback("cmeshTools.generateTetrahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
14447  __pyx_r = NULL;
14448  __pyx_L0:;
14449  __Pyx_XGIVEREF(__pyx_r);
14450  __Pyx_RefNannyFinishContext();
14451  return __pyx_r;
14452 }
14453 
14454 /* "cmeshTools.pyx":320
14455  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14456  *
14457  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
14458  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh)
14459  *
14460  */
14461 
14462 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
14463 static void __pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
14464  __Pyx_RefNannyDeclarations
14465  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron", 0);
14466 
14467  /* "cmeshTools.pyx":321
14468  *
14469  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh):
14470  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh) # <<<<<<<<<<<<<<
14471  *
14472  * # cdef static void cmeshToolsLocallyRefineMultilevelMesh(CMultilevelMesh cmesh,
14473  */
14474  (void)(computeGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
14475 
14476  /* "cmeshTools.pyx":320
14477  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14478  *
14479  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
14480  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh)
14481  *
14482  */
14483 
14484  /* function exit code */
14485  __Pyx_RefNannyFinishContext();
14486 }
14487 
14488 /* Python wrapper */
14489 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
14490 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
14491  int __pyx_lineno = 0;
14492  const char *__pyx_filename = NULL;
14493  int __pyx_clineno = 0;
14494  PyObject *__pyx_r = 0;
14495  __Pyx_RefNannyDeclarations
14496  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron (wrapper)", 0);
14497  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 320, __pyx_L1_error)
14498  __pyx_r = __pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
14499 
14500  /* function exit code */
14501  goto __pyx_L0;
14502  __pyx_L1_error:;
14503  __pyx_r = NULL;
14504  __pyx_L0:;
14505  __Pyx_RefNannyFinishContext();
14506  return __pyx_r;
14507 }
14508 
14509 static PyObject *__pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
14510  PyObject *__pyx_r = NULL;
14511  __Pyx_RefNannyDeclarations
14512  PyObject *__pyx_t_1 = NULL;
14513  int __pyx_lineno = 0;
14514  const char *__pyx_filename = NULL;
14515  int __pyx_clineno = 0;
14516  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron", 0);
14517  __Pyx_XDECREF(__pyx_r);
14518  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 320, __pyx_L1_error)
14519  __Pyx_GOTREF(__pyx_t_1);
14520  __pyx_r = __pyx_t_1;
14521  __pyx_t_1 = 0;
14522  goto __pyx_L0;
14523 
14524  /* function exit code */
14525  __pyx_L1_error:;
14526  __Pyx_XDECREF(__pyx_t_1);
14527  __Pyx_AddTraceback("cmeshTools.cmeshToolsComputeGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
14528  __pyx_r = NULL;
14529  __pyx_L0:;
14530  __Pyx_XGIVEREF(__pyx_r);
14531  __Pyx_RefNannyFinishContext();
14532  return __pyx_r;
14533 }
14534 
14535 /* "cmeshTools.pyx":326
14536  *
14537  *
14538  * cpdef void generateFromTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14539  * unicode filebase,
14540  * int base):
14541  */
14542 
14543 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14544 static void __pyx_f_10cmeshTools_generateFromTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14545  CYTHON_UNUSED int __pyx_v_failed;
14546  __Pyx_RefNannyDeclarations
14547  PyObject *__pyx_t_1 = NULL;
14548  char const *__pyx_t_2;
14549  char const *__pyx_t_3;
14550  int __pyx_lineno = 0;
14551  const char *__pyx_filename = NULL;
14552  int __pyx_clineno = 0;
14553  __Pyx_RefNannySetupContext("generateFromTriangleFiles", 0);
14554 
14555  /* "cmeshTools.pyx":331
14556  *
14557  * cdef int failed
14558  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14559  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
14560  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14561  */
14562  if (unlikely(__pyx_v_filebase == Py_None)) {
14563  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14564  __PYX_ERR(1, 331, __pyx_L1_error)
14565  }
14566  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 331, __pyx_L1_error)
14567  __Pyx_GOTREF(__pyx_t_1);
14568  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 331, __pyx_L1_error)
14569  __pyx_v_failed = readTriangleMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14570  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14571 
14572  /* "cmeshTools.pyx":332
14573  * cdef int failed
14574  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14575  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
14576  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14577  *
14578  */
14579  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
14580 
14581  /* "cmeshTools.pyx":333
14582  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14583  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
14584  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14585  *
14586  * cpdef void writeTriangleFiles(CMesh cmesh,
14587  */
14588  if (unlikely(__pyx_v_filebase == Py_None)) {
14589  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14590  __PYX_ERR(1, 333, __pyx_L1_error)
14591  }
14592  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 333, __pyx_L1_error)
14593  __Pyx_GOTREF(__pyx_t_1);
14594  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 333, __pyx_L1_error)
14595  __pyx_v_failed = readTriangleElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14596  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14597 
14598  /* "cmeshTools.pyx":326
14599  *
14600  *
14601  * cpdef void generateFromTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14602  * unicode filebase,
14603  * int base):
14604  */
14605 
14606  /* function exit code */
14607  goto __pyx_L0;
14608  __pyx_L1_error:;
14609  __Pyx_XDECREF(__pyx_t_1);
14610  __Pyx_WriteUnraisable("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14611  __pyx_L0:;
14612  __Pyx_RefNannyFinishContext();
14613 }
14614 
14615 /* Python wrapper */
14616 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14617 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14618  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14619  PyObject *__pyx_v_filebase = 0;
14620  int __pyx_v_base;
14621  int __pyx_lineno = 0;
14622  const char *__pyx_filename = NULL;
14623  int __pyx_clineno = 0;
14624  PyObject *__pyx_r = 0;
14625  __Pyx_RefNannyDeclarations
14626  __Pyx_RefNannySetupContext("generateFromTriangleFiles (wrapper)", 0);
14627  {
14628  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14629  PyObject* values[3] = {0,0,0};
14630  if (unlikely(__pyx_kwds)) {
14631  Py_ssize_t kw_args;
14632  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14633  switch (pos_args) {
14634  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14635  CYTHON_FALLTHROUGH;
14636  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14637  CYTHON_FALLTHROUGH;
14638  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14639  CYTHON_FALLTHROUGH;
14640  case 0: break;
14641  default: goto __pyx_L5_argtuple_error;
14642  }
14643  kw_args = PyDict_Size(__pyx_kwds);
14644  switch (pos_args) {
14645  case 0:
14646  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14647  else goto __pyx_L5_argtuple_error;
14648  CYTHON_FALLTHROUGH;
14649  case 1:
14650  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14651  else {
14652  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, 1); __PYX_ERR(1, 326, __pyx_L3_error)
14653  }
14654  CYTHON_FALLTHROUGH;
14655  case 2:
14656  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14657  else {
14658  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, 2); __PYX_ERR(1, 326, __pyx_L3_error)
14659  }
14660  }
14661  if (unlikely(kw_args > 0)) {
14662  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTriangleFiles") < 0)) __PYX_ERR(1, 326, __pyx_L3_error)
14663  }
14664  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14665  goto __pyx_L5_argtuple_error;
14666  } else {
14667  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14668  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14669  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14670  }
14671  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14672  __pyx_v_filebase = ((PyObject*)values[1]);
14673  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L3_error)
14674  }
14675  goto __pyx_L4_argument_unpacking_done;
14676  __pyx_L5_argtuple_error:;
14677  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 326, __pyx_L3_error)
14678  __pyx_L3_error:;
14679  __Pyx_AddTraceback("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14680  __Pyx_RefNannyFinishContext();
14681  return NULL;
14682  __pyx_L4_argument_unpacking_done:;
14683  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 326, __pyx_L1_error)
14684  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 327, __pyx_L1_error)
14685  __pyx_r = __pyx_pf_10cmeshTools_10generateFromTriangleFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14686 
14687  /* function exit code */
14688  goto __pyx_L0;
14689  __pyx_L1_error:;
14690  __pyx_r = NULL;
14691  __pyx_L0:;
14692  __Pyx_RefNannyFinishContext();
14693  return __pyx_r;
14694 }
14695 
14696 static PyObject *__pyx_pf_10cmeshTools_10generateFromTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14697  PyObject *__pyx_r = NULL;
14698  __Pyx_RefNannyDeclarations
14699  PyObject *__pyx_t_1 = NULL;
14700  int __pyx_lineno = 0;
14701  const char *__pyx_filename = NULL;
14702  int __pyx_clineno = 0;
14703  __Pyx_RefNannySetupContext("generateFromTriangleFiles", 0);
14704  __Pyx_XDECREF(__pyx_r);
14705  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTriangleFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 326, __pyx_L1_error)
14706  __Pyx_GOTREF(__pyx_t_1);
14707  __pyx_r = __pyx_t_1;
14708  __pyx_t_1 = 0;
14709  goto __pyx_L0;
14710 
14711  /* function exit code */
14712  __pyx_L1_error:;
14713  __Pyx_XDECREF(__pyx_t_1);
14714  __Pyx_AddTraceback("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14715  __pyx_r = NULL;
14716  __pyx_L0:;
14717  __Pyx_XGIVEREF(__pyx_r);
14718  __Pyx_RefNannyFinishContext();
14719  return __pyx_r;
14720 }
14721 
14722 /* "cmeshTools.pyx":335
14723  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14724  *
14725  * cpdef void writeTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14726  * unicode filebase,
14727  * int base):
14728  */
14729 
14730 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14731 static void __pyx_f_10cmeshTools_writeTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14732  CYTHON_UNUSED int __pyx_v_failed;
14733  __Pyx_RefNannyDeclarations
14734  PyObject *__pyx_t_1 = NULL;
14735  char const *__pyx_t_2;
14736  int __pyx_lineno = 0;
14737  const char *__pyx_filename = NULL;
14738  int __pyx_clineno = 0;
14739  __Pyx_RefNannySetupContext("writeTriangleFiles", 0);
14740 
14741  /* "cmeshTools.pyx":339
14742  * int base):
14743  * cdef int failed
14744  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14745  *
14746  * cpdef void generateFromTetgenFiles(CMesh cmesh,
14747  */
14748  if (unlikely(__pyx_v_filebase == Py_None)) {
14749  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14750  __PYX_ERR(1, 339, __pyx_L1_error)
14751  }
14752  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 339, __pyx_L1_error)
14753  __Pyx_GOTREF(__pyx_t_1);
14754  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 339, __pyx_L1_error)
14755  __pyx_v_failed = writeTriangleMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14756  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14757 
14758  /* "cmeshTools.pyx":335
14759  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14760  *
14761  * cpdef void writeTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14762  * unicode filebase,
14763  * int base):
14764  */
14765 
14766  /* function exit code */
14767  goto __pyx_L0;
14768  __pyx_L1_error:;
14769  __Pyx_XDECREF(__pyx_t_1);
14770  __Pyx_WriteUnraisable("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14771  __pyx_L0:;
14772  __Pyx_RefNannyFinishContext();
14773 }
14774 
14775 /* Python wrapper */
14776 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14777 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14778  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14779  PyObject *__pyx_v_filebase = 0;
14780  int __pyx_v_base;
14781  int __pyx_lineno = 0;
14782  const char *__pyx_filename = NULL;
14783  int __pyx_clineno = 0;
14784  PyObject *__pyx_r = 0;
14785  __Pyx_RefNannyDeclarations
14786  __Pyx_RefNannySetupContext("writeTriangleFiles (wrapper)", 0);
14787  {
14788  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14789  PyObject* values[3] = {0,0,0};
14790  if (unlikely(__pyx_kwds)) {
14791  Py_ssize_t kw_args;
14792  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14793  switch (pos_args) {
14794  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14795  CYTHON_FALLTHROUGH;
14796  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14797  CYTHON_FALLTHROUGH;
14798  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14799  CYTHON_FALLTHROUGH;
14800  case 0: break;
14801  default: goto __pyx_L5_argtuple_error;
14802  }
14803  kw_args = PyDict_Size(__pyx_kwds);
14804  switch (pos_args) {
14805  case 0:
14806  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14807  else goto __pyx_L5_argtuple_error;
14808  CYTHON_FALLTHROUGH;
14809  case 1:
14810  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14811  else {
14812  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, 1); __PYX_ERR(1, 335, __pyx_L3_error)
14813  }
14814  CYTHON_FALLTHROUGH;
14815  case 2:
14816  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14817  else {
14818  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, 2); __PYX_ERR(1, 335, __pyx_L3_error)
14819  }
14820  }
14821  if (unlikely(kw_args > 0)) {
14822  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeTriangleFiles") < 0)) __PYX_ERR(1, 335, __pyx_L3_error)
14823  }
14824  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14825  goto __pyx_L5_argtuple_error;
14826  } else {
14827  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14828  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14829  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14830  }
14831  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14832  __pyx_v_filebase = ((PyObject*)values[1]);
14833  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 337, __pyx_L3_error)
14834  }
14835  goto __pyx_L4_argument_unpacking_done;
14836  __pyx_L5_argtuple_error:;
14837  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 335, __pyx_L3_error)
14838  __pyx_L3_error:;
14839  __Pyx_AddTraceback("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14840  __Pyx_RefNannyFinishContext();
14841  return NULL;
14842  __pyx_L4_argument_unpacking_done:;
14843  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 335, __pyx_L1_error)
14844  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 336, __pyx_L1_error)
14845  __pyx_r = __pyx_pf_10cmeshTools_12writeTriangleFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14846 
14847  /* function exit code */
14848  goto __pyx_L0;
14849  __pyx_L1_error:;
14850  __pyx_r = NULL;
14851  __pyx_L0:;
14852  __Pyx_RefNannyFinishContext();
14853  return __pyx_r;
14854 }
14855 
14856 static PyObject *__pyx_pf_10cmeshTools_12writeTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14857  PyObject *__pyx_r = NULL;
14858  __Pyx_RefNannyDeclarations
14859  PyObject *__pyx_t_1 = NULL;
14860  int __pyx_lineno = 0;
14861  const char *__pyx_filename = NULL;
14862  int __pyx_clineno = 0;
14863  __Pyx_RefNannySetupContext("writeTriangleFiles", 0);
14864  __Pyx_XDECREF(__pyx_r);
14865  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_writeTriangleFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 335, __pyx_L1_error)
14866  __Pyx_GOTREF(__pyx_t_1);
14867  __pyx_r = __pyx_t_1;
14868  __pyx_t_1 = 0;
14869  goto __pyx_L0;
14870 
14871  /* function exit code */
14872  __pyx_L1_error:;
14873  __Pyx_XDECREF(__pyx_t_1);
14874  __Pyx_AddTraceback("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14875  __pyx_r = NULL;
14876  __pyx_L0:;
14877  __Pyx_XGIVEREF(__pyx_r);
14878  __Pyx_RefNannyFinishContext();
14879  return __pyx_r;
14880 }
14881 
14882 /* "cmeshTools.pyx":341
14883  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14884  *
14885  * cpdef void generateFromTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14886  * unicode filebase,
14887  * int base):
14888  */
14889 
14890 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14891 static void __pyx_f_10cmeshTools_generateFromTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14892  CYTHON_UNUSED int __pyx_v_failed;
14893  __Pyx_RefNannyDeclarations
14894  PyObject *__pyx_t_1 = NULL;
14895  char const *__pyx_t_2;
14896  char const *__pyx_t_3;
14897  int __pyx_lineno = 0;
14898  const char *__pyx_filename = NULL;
14899  int __pyx_clineno = 0;
14900  __Pyx_RefNannySetupContext("generateFromTetgenFiles", 0);
14901 
14902  /* "cmeshTools.pyx":345
14903  * int base):
14904  * cdef int failed
14905  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14906  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14907  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14908  */
14909  if (unlikely(__pyx_v_filebase == Py_None)) {
14910  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14911  __PYX_ERR(1, 345, __pyx_L1_error)
14912  }
14913  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 345, __pyx_L1_error)
14914  __Pyx_GOTREF(__pyx_t_1);
14915  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L1_error)
14916  __pyx_v_failed = readTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14917  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14918 
14919  /* "cmeshTools.pyx":346
14920  * cdef int failed
14921  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14922  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
14923  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14924  *
14925  */
14926  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
14927 
14928  /* "cmeshTools.pyx":347
14929  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14930  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14931  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14932  *
14933  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh,
14934  */
14935  if (unlikely(__pyx_v_filebase == Py_None)) {
14936  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14937  __PYX_ERR(1, 347, __pyx_L1_error)
14938  }
14939  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 347, __pyx_L1_error)
14940  __Pyx_GOTREF(__pyx_t_1);
14941  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 347, __pyx_L1_error)
14942  __pyx_v_failed = readTetgenElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14943  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14944 
14945  /* "cmeshTools.pyx":341
14946  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14947  *
14948  * cpdef void generateFromTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14949  * unicode filebase,
14950  * int base):
14951  */
14952 
14953  /* function exit code */
14954  goto __pyx_L0;
14955  __pyx_L1_error:;
14956  __Pyx_XDECREF(__pyx_t_1);
14957  __Pyx_WriteUnraisable("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14958  __pyx_L0:;
14959  __Pyx_RefNannyFinishContext();
14960 }
14961 
14962 /* Python wrapper */
14963 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14964 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14965  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14966  PyObject *__pyx_v_filebase = 0;
14967  int __pyx_v_base;
14968  int __pyx_lineno = 0;
14969  const char *__pyx_filename = NULL;
14970  int __pyx_clineno = 0;
14971  PyObject *__pyx_r = 0;
14972  __Pyx_RefNannyDeclarations
14973  __Pyx_RefNannySetupContext("generateFromTetgenFiles (wrapper)", 0);
14974  {
14975  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14976  PyObject* values[3] = {0,0,0};
14977  if (unlikely(__pyx_kwds)) {
14978  Py_ssize_t kw_args;
14979  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14980  switch (pos_args) {
14981  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14982  CYTHON_FALLTHROUGH;
14983  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14984  CYTHON_FALLTHROUGH;
14985  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14986  CYTHON_FALLTHROUGH;
14987  case 0: break;
14988  default: goto __pyx_L5_argtuple_error;
14989  }
14990  kw_args = PyDict_Size(__pyx_kwds);
14991  switch (pos_args) {
14992  case 0:
14993  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14994  else goto __pyx_L5_argtuple_error;
14995  CYTHON_FALLTHROUGH;
14996  case 1:
14997  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14998  else {
14999  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, 1); __PYX_ERR(1, 341, __pyx_L3_error)
15000  }
15001  CYTHON_FALLTHROUGH;
15002  case 2:
15003  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15004  else {
15005  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, 2); __PYX_ERR(1, 341, __pyx_L3_error)
15006  }
15007  }
15008  if (unlikely(kw_args > 0)) {
15009  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTetgenFiles") < 0)) __PYX_ERR(1, 341, __pyx_L3_error)
15010  }
15011  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15012  goto __pyx_L5_argtuple_error;
15013  } else {
15014  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15015  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15016  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15017  }
15018  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15019  __pyx_v_filebase = ((PyObject*)values[1]);
15020  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 343, __pyx_L3_error)
15021  }
15022  goto __pyx_L4_argument_unpacking_done;
15023  __pyx_L5_argtuple_error:;
15024  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 341, __pyx_L3_error)
15025  __pyx_L3_error:;
15026  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15027  __Pyx_RefNannyFinishContext();
15028  return NULL;
15029  __pyx_L4_argument_unpacking_done:;
15030  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 341, __pyx_L1_error)
15031  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 342, __pyx_L1_error)
15032  __pyx_r = __pyx_pf_10cmeshTools_14generateFromTetgenFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15033 
15034  /* function exit code */
15035  goto __pyx_L0;
15036  __pyx_L1_error:;
15037  __pyx_r = NULL;
15038  __pyx_L0:;
15039  __Pyx_RefNannyFinishContext();
15040  return __pyx_r;
15041 }
15042 
15043 static PyObject *__pyx_pf_10cmeshTools_14generateFromTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15044  PyObject *__pyx_r = NULL;
15045  __Pyx_RefNannyDeclarations
15046  PyObject *__pyx_t_1 = NULL;
15047  int __pyx_lineno = 0;
15048  const char *__pyx_filename = NULL;
15049  int __pyx_clineno = 0;
15050  __Pyx_RefNannySetupContext("generateFromTetgenFiles", 0);
15051  __Pyx_XDECREF(__pyx_r);
15052  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTetgenFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __pyx_L1_error)
15053  __Pyx_GOTREF(__pyx_t_1);
15054  __pyx_r = __pyx_t_1;
15055  __pyx_t_1 = 0;
15056  goto __pyx_L0;
15057 
15058  /* function exit code */
15059  __pyx_L1_error:;
15060  __Pyx_XDECREF(__pyx_t_1);
15061  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15062  __pyx_r = NULL;
15063  __pyx_L0:;
15064  __Pyx_XGIVEREF(__pyx_r);
15065  __Pyx_RefNannyFinishContext();
15066  return __pyx_r;
15067 }
15068 
15069 /* "cmeshTools.pyx":349
15070  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
15071  *
15072  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh, # <<<<<<<<<<<<<<
15073  * unicode filebase,
15074  * int base):
15075  */
15076 
15077 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15078 static void __pyx_f_10cmeshTools_generateFromTetgenFilesParallel(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15079  CYTHON_UNUSED int __pyx_v_failed;
15080  __Pyx_RefNannyDeclarations
15081  PyObject *__pyx_t_1 = NULL;
15082  char const *__pyx_t_2;
15083  char const *__pyx_t_3;
15084  int __pyx_lineno = 0;
15085  const char *__pyx_filename = NULL;
15086  int __pyx_clineno = 0;
15087  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel", 0);
15088 
15089  /* "cmeshTools.pyx":353
15090  * int base):
15091  * cdef int failed
15092  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15093  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15094  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
15095  */
15096  if (unlikely(__pyx_v_filebase == Py_None)) {
15097  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15098  __PYX_ERR(1, 353, __pyx_L1_error)
15099  }
15100  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 353, __pyx_L1_error)
15101  __Pyx_GOTREF(__pyx_t_1);
15102  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 353, __pyx_L1_error)
15103  __pyx_v_failed = readTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15105 
15106  /* "cmeshTools.pyx":354
15107  * cdef int failed
15108  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
15109  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15110  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
15111  *
15112  */
15113  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
15114 
15115  /* "cmeshTools.pyx":355
15116  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
15117  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15118  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15119  *
15120  * cpdef void writeTetgenFiles(CMesh cmesh,
15121  */
15122  if (unlikely(__pyx_v_filebase == Py_None)) {
15123  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15124  __PYX_ERR(1, 355, __pyx_L1_error)
15125  }
15126  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 355, __pyx_L1_error)
15127  __Pyx_GOTREF(__pyx_t_1);
15128  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L1_error)
15129  __pyx_v_failed = readTetgenElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
15130  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15131 
15132  /* "cmeshTools.pyx":349
15133  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
15134  *
15135  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh, # <<<<<<<<<<<<<<
15136  * unicode filebase,
15137  * int base):
15138  */
15139 
15140  /* function exit code */
15141  goto __pyx_L0;
15142  __pyx_L1_error:;
15143  __Pyx_XDECREF(__pyx_t_1);
15144  __Pyx_WriteUnraisable("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15145  __pyx_L0:;
15146  __Pyx_RefNannyFinishContext();
15147 }
15148 
15149 /* Python wrapper */
15150 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15151 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15152  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15153  PyObject *__pyx_v_filebase = 0;
15154  int __pyx_v_base;
15155  int __pyx_lineno = 0;
15156  const char *__pyx_filename = NULL;
15157  int __pyx_clineno = 0;
15158  PyObject *__pyx_r = 0;
15159  __Pyx_RefNannyDeclarations
15160  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel (wrapper)", 0);
15161  {
15162  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15163  PyObject* values[3] = {0,0,0};
15164  if (unlikely(__pyx_kwds)) {
15165  Py_ssize_t kw_args;
15166  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15167  switch (pos_args) {
15168  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15169  CYTHON_FALLTHROUGH;
15170  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15171  CYTHON_FALLTHROUGH;
15172  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15173  CYTHON_FALLTHROUGH;
15174  case 0: break;
15175  default: goto __pyx_L5_argtuple_error;
15176  }
15177  kw_args = PyDict_Size(__pyx_kwds);
15178  switch (pos_args) {
15179  case 0:
15180  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15181  else goto __pyx_L5_argtuple_error;
15182  CYTHON_FALLTHROUGH;
15183  case 1:
15184  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15185  else {
15186  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
15187  }
15188  CYTHON_FALLTHROUGH;
15189  case 2:
15190  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15191  else {
15192  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, 2); __PYX_ERR(1, 349, __pyx_L3_error)
15193  }
15194  }
15195  if (unlikely(kw_args > 0)) {
15196  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTetgenFilesParallel") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
15197  }
15198  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15199  goto __pyx_L5_argtuple_error;
15200  } else {
15201  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15202  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15203  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15204  }
15205  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15206  __pyx_v_filebase = ((PyObject*)values[1]);
15207  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 351, __pyx_L3_error)
15208  }
15209  goto __pyx_L4_argument_unpacking_done;
15210  __pyx_L5_argtuple_error:;
15211  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 349, __pyx_L3_error)
15212  __pyx_L3_error:;
15213  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
15214  __Pyx_RefNannyFinishContext();
15215  return NULL;
15216  __pyx_L4_argument_unpacking_done:;
15217  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 349, __pyx_L1_error)
15218  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 350, __pyx_L1_error)
15219  __pyx_r = __pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15220 
15221  /* function exit code */
15222  goto __pyx_L0;
15223  __pyx_L1_error:;
15224  __pyx_r = NULL;
15225  __pyx_L0:;
15226  __Pyx_RefNannyFinishContext();
15227  return __pyx_r;
15228 }
15229 
15230 static PyObject *__pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15231  PyObject *__pyx_r = NULL;
15232  __Pyx_RefNannyDeclarations
15233  PyObject *__pyx_t_1 = NULL;
15234  int __pyx_lineno = 0;
15235  const char *__pyx_filename = NULL;
15236  int __pyx_clineno = 0;
15237  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel", 0);
15238  __Pyx_XDECREF(__pyx_r);
15239  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTetgenFilesParallel(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 349, __pyx_L1_error)
15240  __Pyx_GOTREF(__pyx_t_1);
15241  __pyx_r = __pyx_t_1;
15242  __pyx_t_1 = 0;
15243  goto __pyx_L0;
15244 
15245  /* function exit code */
15246  __pyx_L1_error:;
15247  __Pyx_XDECREF(__pyx_t_1);
15248  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
15249  __pyx_r = NULL;
15250  __pyx_L0:;
15251  __Pyx_XGIVEREF(__pyx_r);
15252  __Pyx_RefNannyFinishContext();
15253  return __pyx_r;
15254 }
15255 
15256 /* "cmeshTools.pyx":357
15257  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
15258  *
15259  * cpdef void writeTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15260  * unicode filebase,
15261  * int base):
15262  */
15263 
15264 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15265 static void __pyx_f_10cmeshTools_writeTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15266  CYTHON_UNUSED int __pyx_v_failed;
15267  __Pyx_RefNannyDeclarations
15268  PyObject *__pyx_t_1 = NULL;
15269  char const *__pyx_t_2;
15270  int __pyx_lineno = 0;
15271  const char *__pyx_filename = NULL;
15272  int __pyx_clineno = 0;
15273  __Pyx_RefNannySetupContext("writeTetgenFiles", 0);
15274 
15275  /* "cmeshTools.pyx":361
15276  * int base):
15277  * cdef int failed
15278  * cppm.reorientTetrahedralMesh(cmesh.mesh); # <<<<<<<<<<<<<<
15279  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
15280  *
15281  */
15282  (void)(reorientTetrahedralMesh(__pyx_v_cmesh->mesh));
15283 
15284  /* "cmeshTools.pyx":362
15285  * cdef int failed
15286  * cppm.reorientTetrahedralMesh(cmesh.mesh);
15287  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15288  *
15289  * cpdef void write3dmFiles(CMesh cmesh,
15290  */
15291  if (unlikely(__pyx_v_filebase == Py_None)) {
15292  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15293  __PYX_ERR(1, 362, __pyx_L1_error)
15294  }
15295  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 362, __pyx_L1_error)
15296  __Pyx_GOTREF(__pyx_t_1);
15297  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 362, __pyx_L1_error)
15298  __pyx_v_failed = writeTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15299  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15300 
15301  /* "cmeshTools.pyx":357
15302  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
15303  *
15304  * cpdef void writeTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15305  * unicode filebase,
15306  * int base):
15307  */
15308 
15309  /* function exit code */
15310  goto __pyx_L0;
15311  __pyx_L1_error:;
15312  __Pyx_XDECREF(__pyx_t_1);
15313  __Pyx_WriteUnraisable("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15314  __pyx_L0:;
15315  __Pyx_RefNannyFinishContext();
15316 }
15317 
15318 /* Python wrapper */
15319 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15320 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15321  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15322  PyObject *__pyx_v_filebase = 0;
15323  int __pyx_v_base;
15324  int __pyx_lineno = 0;
15325  const char *__pyx_filename = NULL;
15326  int __pyx_clineno = 0;
15327  PyObject *__pyx_r = 0;
15328  __Pyx_RefNannyDeclarations
15329  __Pyx_RefNannySetupContext("writeTetgenFiles (wrapper)", 0);
15330  {
15331  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15332  PyObject* values[3] = {0,0,0};
15333  if (unlikely(__pyx_kwds)) {
15334  Py_ssize_t kw_args;
15335  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15336  switch (pos_args) {
15337  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15338  CYTHON_FALLTHROUGH;
15339  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15340  CYTHON_FALLTHROUGH;
15341  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15342  CYTHON_FALLTHROUGH;
15343  case 0: break;
15344  default: goto __pyx_L5_argtuple_error;
15345  }
15346  kw_args = PyDict_Size(__pyx_kwds);
15347  switch (pos_args) {
15348  case 0:
15349  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15350  else goto __pyx_L5_argtuple_error;
15351  CYTHON_FALLTHROUGH;
15352  case 1:
15353  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15354  else {
15355  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, 1); __PYX_ERR(1, 357, __pyx_L3_error)
15356  }
15357  CYTHON_FALLTHROUGH;
15358  case 2:
15359  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15360  else {
15361  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, 2); __PYX_ERR(1, 357, __pyx_L3_error)
15362  }
15363  }
15364  if (unlikely(kw_args > 0)) {
15365  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeTetgenFiles") < 0)) __PYX_ERR(1, 357, __pyx_L3_error)
15366  }
15367  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15368  goto __pyx_L5_argtuple_error;
15369  } else {
15370  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15371  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15372  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15373  }
15374  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15375  __pyx_v_filebase = ((PyObject*)values[1]);
15376  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 359, __pyx_L3_error)
15377  }
15378  goto __pyx_L4_argument_unpacking_done;
15379  __pyx_L5_argtuple_error:;
15380  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 357, __pyx_L3_error)
15381  __pyx_L3_error:;
15382  __Pyx_AddTraceback("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15383  __Pyx_RefNannyFinishContext();
15384  return NULL;
15385  __pyx_L4_argument_unpacking_done:;
15386  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 357, __pyx_L1_error)
15387  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 358, __pyx_L1_error)
15388  __pyx_r = __pyx_pf_10cmeshTools_18writeTetgenFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15389 
15390  /* function exit code */
15391  goto __pyx_L0;
15392  __pyx_L1_error:;
15393  __pyx_r = NULL;
15394  __pyx_L0:;
15395  __Pyx_RefNannyFinishContext();
15396  return __pyx_r;
15397 }
15398 
15399 static PyObject *__pyx_pf_10cmeshTools_18writeTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15400  PyObject *__pyx_r = NULL;
15401  __Pyx_RefNannyDeclarations
15402  PyObject *__pyx_t_1 = NULL;
15403  int __pyx_lineno = 0;
15404  const char *__pyx_filename = NULL;
15405  int __pyx_clineno = 0;
15406  __Pyx_RefNannySetupContext("writeTetgenFiles", 0);
15407  __Pyx_XDECREF(__pyx_r);
15408  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_writeTetgenFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 357, __pyx_L1_error)
15409  __Pyx_GOTREF(__pyx_t_1);
15410  __pyx_r = __pyx_t_1;
15411  __pyx_t_1 = 0;
15412  goto __pyx_L0;
15413 
15414  /* function exit code */
15415  __pyx_L1_error:;
15416  __Pyx_XDECREF(__pyx_t_1);
15417  __Pyx_AddTraceback("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15418  __pyx_r = NULL;
15419  __pyx_L0:;
15420  __Pyx_XGIVEREF(__pyx_r);
15421  __Pyx_RefNannyFinishContext();
15422  return __pyx_r;
15423 }
15424 
15425 /* "cmeshTools.pyx":364
15426  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
15427  *
15428  * cpdef void write3dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15429  * unicode filebase,
15430  * int base):
15431  */
15432 
15433 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15434 static void __pyx_f_10cmeshTools_write3dmFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15435  CYTHON_UNUSED int __pyx_v_failed;
15436  __Pyx_RefNannyDeclarations
15437  PyObject *__pyx_t_1 = NULL;
15438  char const *__pyx_t_2;
15439  int __pyx_lineno = 0;
15440  const char *__pyx_filename = NULL;
15441  int __pyx_clineno = 0;
15442  __Pyx_RefNannySetupContext("write3dmFiles", 0);
15443 
15444  /* "cmeshTools.pyx":368
15445  * int base):
15446  * cdef int failed
15447  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15448  *
15449  * cpdef void write2dmFiles(CMesh cmesh,
15450  */
15451  if (unlikely(__pyx_v_filebase == Py_None)) {
15452  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15453  __PYX_ERR(1, 368, __pyx_L1_error)
15454  }
15455  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 368, __pyx_L1_error)
15456  __Pyx_GOTREF(__pyx_t_1);
15457  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 368, __pyx_L1_error)
15458  __pyx_v_failed = write3dmMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15459  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15460 
15461  /* "cmeshTools.pyx":364
15462  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
15463  *
15464  * cpdef void write3dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15465  * unicode filebase,
15466  * int base):
15467  */
15468 
15469  /* function exit code */
15470  goto __pyx_L0;
15471  __pyx_L1_error:;
15472  __Pyx_XDECREF(__pyx_t_1);
15473  __Pyx_WriteUnraisable("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15474  __pyx_L0:;
15475  __Pyx_RefNannyFinishContext();
15476 }
15477 
15478 /* Python wrapper */
15479 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15480 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15481  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15482  PyObject *__pyx_v_filebase = 0;
15483  int __pyx_v_base;
15484  int __pyx_lineno = 0;
15485  const char *__pyx_filename = NULL;
15486  int __pyx_clineno = 0;
15487  PyObject *__pyx_r = 0;
15488  __Pyx_RefNannyDeclarations
15489  __Pyx_RefNannySetupContext("write3dmFiles (wrapper)", 0);
15490  {
15491  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15492  PyObject* values[3] = {0,0,0};
15493  if (unlikely(__pyx_kwds)) {
15494  Py_ssize_t kw_args;
15495  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15496  switch (pos_args) {
15497  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15498  CYTHON_FALLTHROUGH;
15499  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15500  CYTHON_FALLTHROUGH;
15501  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15502  CYTHON_FALLTHROUGH;
15503  case 0: break;
15504  default: goto __pyx_L5_argtuple_error;
15505  }
15506  kw_args = PyDict_Size(__pyx_kwds);
15507  switch (pos_args) {
15508  case 0:
15509  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15510  else goto __pyx_L5_argtuple_error;
15511  CYTHON_FALLTHROUGH;
15512  case 1:
15513  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15514  else {
15515  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, 1); __PYX_ERR(1, 364, __pyx_L3_error)
15516  }
15517  CYTHON_FALLTHROUGH;
15518  case 2:
15519  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15520  else {
15521  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, 2); __PYX_ERR(1, 364, __pyx_L3_error)
15522  }
15523  }
15524  if (unlikely(kw_args > 0)) {
15525  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write3dmFiles") < 0)) __PYX_ERR(1, 364, __pyx_L3_error)
15526  }
15527  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15528  goto __pyx_L5_argtuple_error;
15529  } else {
15530  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15531  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15532  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15533  }
15534  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15535  __pyx_v_filebase = ((PyObject*)values[1]);
15536  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 366, __pyx_L3_error)
15537  }
15538  goto __pyx_L4_argument_unpacking_done;
15539  __pyx_L5_argtuple_error:;
15540  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 364, __pyx_L3_error)
15541  __pyx_L3_error:;
15542  __Pyx_AddTraceback("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15543  __Pyx_RefNannyFinishContext();
15544  return NULL;
15545  __pyx_L4_argument_unpacking_done:;
15546  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 364, __pyx_L1_error)
15547  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 365, __pyx_L1_error)
15548  __pyx_r = __pyx_pf_10cmeshTools_20write3dmFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15549 
15550  /* function exit code */
15551  goto __pyx_L0;
15552  __pyx_L1_error:;
15553  __pyx_r = NULL;
15554  __pyx_L0:;
15555  __Pyx_RefNannyFinishContext();
15556  return __pyx_r;
15557 }
15558 
15559 static PyObject *__pyx_pf_10cmeshTools_20write3dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15560  PyObject *__pyx_r = NULL;
15561  __Pyx_RefNannyDeclarations
15562  PyObject *__pyx_t_1 = NULL;
15563  int __pyx_lineno = 0;
15564  const char *__pyx_filename = NULL;
15565  int __pyx_clineno = 0;
15566  __Pyx_RefNannySetupContext("write3dmFiles", 0);
15567  __Pyx_XDECREF(__pyx_r);
15568  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_write3dmFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
15569  __Pyx_GOTREF(__pyx_t_1);
15570  __pyx_r = __pyx_t_1;
15571  __pyx_t_1 = 0;
15572  goto __pyx_L0;
15573 
15574  /* function exit code */
15575  __pyx_L1_error:;
15576  __Pyx_XDECREF(__pyx_t_1);
15577  __Pyx_AddTraceback("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15578  __pyx_r = NULL;
15579  __pyx_L0:;
15580  __Pyx_XGIVEREF(__pyx_r);
15581  __Pyx_RefNannyFinishContext();
15582  return __pyx_r;
15583 }
15584 
15585 /* "cmeshTools.pyx":370
15586  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15587  *
15588  * cpdef void write2dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15589  * unicode filebase,
15590  * int base):
15591  */
15592 
15593 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15594 static void __pyx_f_10cmeshTools_write2dmFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15595  CYTHON_UNUSED int __pyx_v_failed;
15596  __Pyx_RefNannyDeclarations
15597  PyObject *__pyx_t_1 = NULL;
15598  char const *__pyx_t_2;
15599  int __pyx_lineno = 0;
15600  const char *__pyx_filename = NULL;
15601  int __pyx_clineno = 0;
15602  __Pyx_RefNannySetupContext("write2dmFiles", 0);
15603 
15604  /* "cmeshTools.pyx":374
15605  * int base):
15606  * cdef int failed
15607  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15608  *
15609  * cpdef void generateFromHexFile(CMesh cmesh,
15610  */
15611  if (unlikely(__pyx_v_filebase == Py_None)) {
15612  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15613  __PYX_ERR(1, 374, __pyx_L1_error)
15614  }
15615  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 374, __pyx_L1_error)
15616  __Pyx_GOTREF(__pyx_t_1);
15617  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 374, __pyx_L1_error)
15618  __pyx_v_failed = write2dmMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15619  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15620 
15621  /* "cmeshTools.pyx":370
15622  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15623  *
15624  * cpdef void write2dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15625  * unicode filebase,
15626  * int base):
15627  */
15628 
15629  /* function exit code */
15630  goto __pyx_L0;
15631  __pyx_L1_error:;
15632  __Pyx_XDECREF(__pyx_t_1);
15633  __Pyx_WriteUnraisable("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15634  __pyx_L0:;
15635  __Pyx_RefNannyFinishContext();
15636 }
15637 
15638 /* Python wrapper */
15639 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15640 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15641  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15642  PyObject *__pyx_v_filebase = 0;
15643  int __pyx_v_base;
15644  int __pyx_lineno = 0;
15645  const char *__pyx_filename = NULL;
15646  int __pyx_clineno = 0;
15647  PyObject *__pyx_r = 0;
15648  __Pyx_RefNannyDeclarations
15649  __Pyx_RefNannySetupContext("write2dmFiles (wrapper)", 0);
15650  {
15651  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15652  PyObject* values[3] = {0,0,0};
15653  if (unlikely(__pyx_kwds)) {
15654  Py_ssize_t kw_args;
15655  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15656  switch (pos_args) {
15657  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15658  CYTHON_FALLTHROUGH;
15659  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15660  CYTHON_FALLTHROUGH;
15661  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15662  CYTHON_FALLTHROUGH;
15663  case 0: break;
15664  default: goto __pyx_L5_argtuple_error;
15665  }
15666  kw_args = PyDict_Size(__pyx_kwds);
15667  switch (pos_args) {
15668  case 0:
15669  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15670  else goto __pyx_L5_argtuple_error;
15671  CYTHON_FALLTHROUGH;
15672  case 1:
15673  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15674  else {
15675  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, 1); __PYX_ERR(1, 370, __pyx_L3_error)
15676  }
15677  CYTHON_FALLTHROUGH;
15678  case 2:
15679  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15680  else {
15681  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, 2); __PYX_ERR(1, 370, __pyx_L3_error)
15682  }
15683  }
15684  if (unlikely(kw_args > 0)) {
15685  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write2dmFiles") < 0)) __PYX_ERR(1, 370, __pyx_L3_error)
15686  }
15687  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15688  goto __pyx_L5_argtuple_error;
15689  } else {
15690  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15691  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15692  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15693  }
15694  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15695  __pyx_v_filebase = ((PyObject*)values[1]);
15696  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 372, __pyx_L3_error)
15697  }
15698  goto __pyx_L4_argument_unpacking_done;
15699  __pyx_L5_argtuple_error:;
15700  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 370, __pyx_L3_error)
15701  __pyx_L3_error:;
15702  __Pyx_AddTraceback("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15703  __Pyx_RefNannyFinishContext();
15704  return NULL;
15705  __pyx_L4_argument_unpacking_done:;
15706  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 370, __pyx_L1_error)
15707  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 371, __pyx_L1_error)
15708  __pyx_r = __pyx_pf_10cmeshTools_22write2dmFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15709 
15710  /* function exit code */
15711  goto __pyx_L0;
15712  __pyx_L1_error:;
15713  __pyx_r = NULL;
15714  __pyx_L0:;
15715  __Pyx_RefNannyFinishContext();
15716  return __pyx_r;
15717 }
15718 
15719 static PyObject *__pyx_pf_10cmeshTools_22write2dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15720  PyObject *__pyx_r = NULL;
15721  __Pyx_RefNannyDeclarations
15722  PyObject *__pyx_t_1 = NULL;
15723  int __pyx_lineno = 0;
15724  const char *__pyx_filename = NULL;
15725  int __pyx_clineno = 0;
15726  __Pyx_RefNannySetupContext("write2dmFiles", 0);
15727  __Pyx_XDECREF(__pyx_r);
15728  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_write2dmFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error)
15729  __Pyx_GOTREF(__pyx_t_1);
15730  __pyx_r = __pyx_t_1;
15731  __pyx_t_1 = 0;
15732  goto __pyx_L0;
15733 
15734  /* function exit code */
15735  __pyx_L1_error:;
15736  __Pyx_XDECREF(__pyx_t_1);
15737  __Pyx_AddTraceback("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15738  __pyx_r = NULL;
15739  __pyx_L0:;
15740  __Pyx_XGIVEREF(__pyx_r);
15741  __Pyx_RefNannyFinishContext();
15742  return __pyx_r;
15743 }
15744 
15745 /* "cmeshTools.pyx":376
15746  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15747  *
15748  * cpdef void generateFromHexFile(CMesh cmesh, # <<<<<<<<<<<<<<
15749  * unicode filebase,
15750  * int base):
15751  */
15752 
15753 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15754 static void __pyx_f_10cmeshTools_generateFromHexFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15755  CYTHON_UNUSED int __pyx_v_failed;
15756  __Pyx_RefNannyDeclarations
15757  PyObject *__pyx_t_1 = NULL;
15758  char const *__pyx_t_2;
15759  int __pyx_lineno = 0;
15760  const char *__pyx_filename = NULL;
15761  int __pyx_clineno = 0;
15762  __Pyx_RefNannySetupContext("generateFromHexFile", 0);
15763 
15764  /* "cmeshTools.pyx":380
15765  * int base):
15766  * cdef int failed
15767  * failed = cppm.readHex(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15768  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15769  *
15770  */
15771  if (unlikely(__pyx_v_filebase == Py_None)) {
15772  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15773  __PYX_ERR(1, 380, __pyx_L1_error)
15774  }
15775  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 380, __pyx_L1_error)
15776  __Pyx_GOTREF(__pyx_t_1);
15777  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 380, __pyx_L1_error)
15778  __pyx_v_failed = readHex(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15779  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15780 
15781  /* "cmeshTools.pyx":381
15782  * cdef int failed
15783  * failed = cppm.readHex(cmesh.mesh,filebase.encode('utf8'),base);
15784  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15785  *
15786  * cpdef void generateFrom3DMFile(CMesh cmesh,
15787  */
15788  (void)(constructElementBoundaryElementsArray_hexahedron(__pyx_v_cmesh->mesh));
15789 
15790  /* "cmeshTools.pyx":376
15791  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15792  *
15793  * cpdef void generateFromHexFile(CMesh cmesh, # <<<<<<<<<<<<<<
15794  * unicode filebase,
15795  * int base):
15796  */
15797 
15798  /* function exit code */
15799  goto __pyx_L0;
15800  __pyx_L1_error:;
15801  __Pyx_XDECREF(__pyx_t_1);
15802  __Pyx_WriteUnraisable("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15803  __pyx_L0:;
15804  __Pyx_RefNannyFinishContext();
15805 }
15806 
15807 /* Python wrapper */
15808 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15809 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15810  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15811  PyObject *__pyx_v_filebase = 0;
15812  int __pyx_v_base;
15813  int __pyx_lineno = 0;
15814  const char *__pyx_filename = NULL;
15815  int __pyx_clineno = 0;
15816  PyObject *__pyx_r = 0;
15817  __Pyx_RefNannyDeclarations
15818  __Pyx_RefNannySetupContext("generateFromHexFile (wrapper)", 0);
15819  {
15820  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15821  PyObject* values[3] = {0,0,0};
15822  if (unlikely(__pyx_kwds)) {
15823  Py_ssize_t kw_args;
15824  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15825  switch (pos_args) {
15826  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15827  CYTHON_FALLTHROUGH;
15828  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15829  CYTHON_FALLTHROUGH;
15830  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15831  CYTHON_FALLTHROUGH;
15832  case 0: break;
15833  default: goto __pyx_L5_argtuple_error;
15834  }
15835  kw_args = PyDict_Size(__pyx_kwds);
15836  switch (pos_args) {
15837  case 0:
15838  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15839  else goto __pyx_L5_argtuple_error;
15840  CYTHON_FALLTHROUGH;
15841  case 1:
15842  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15843  else {
15844  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, 1); __PYX_ERR(1, 376, __pyx_L3_error)
15845  }
15846  CYTHON_FALLTHROUGH;
15847  case 2:
15848  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15849  else {
15850  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, 2); __PYX_ERR(1, 376, __pyx_L3_error)
15851  }
15852  }
15853  if (unlikely(kw_args > 0)) {
15854  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromHexFile") < 0)) __PYX_ERR(1, 376, __pyx_L3_error)
15855  }
15856  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15857  goto __pyx_L5_argtuple_error;
15858  } else {
15859  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15860  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15861  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15862  }
15863  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15864  __pyx_v_filebase = ((PyObject*)values[1]);
15865  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L3_error)
15866  }
15867  goto __pyx_L4_argument_unpacking_done;
15868  __pyx_L5_argtuple_error:;
15869  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 376, __pyx_L3_error)
15870  __pyx_L3_error:;
15871  __Pyx_AddTraceback("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15872  __Pyx_RefNannyFinishContext();
15873  return NULL;
15874  __pyx_L4_argument_unpacking_done:;
15875  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 376, __pyx_L1_error)
15876  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 377, __pyx_L1_error)
15877  __pyx_r = __pyx_pf_10cmeshTools_24generateFromHexFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15878 
15879  /* function exit code */
15880  goto __pyx_L0;
15881  __pyx_L1_error:;
15882  __pyx_r = NULL;
15883  __pyx_L0:;
15884  __Pyx_RefNannyFinishContext();
15885  return __pyx_r;
15886 }
15887 
15888 static PyObject *__pyx_pf_10cmeshTools_24generateFromHexFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15889  PyObject *__pyx_r = NULL;
15890  __Pyx_RefNannyDeclarations
15891  PyObject *__pyx_t_1 = NULL;
15892  int __pyx_lineno = 0;
15893  const char *__pyx_filename = NULL;
15894  int __pyx_clineno = 0;
15895  __Pyx_RefNannySetupContext("generateFromHexFile", 0);
15896  __Pyx_XDECREF(__pyx_r);
15897  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromHexFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error)
15898  __Pyx_GOTREF(__pyx_t_1);
15899  __pyx_r = __pyx_t_1;
15900  __pyx_t_1 = 0;
15901  goto __pyx_L0;
15902 
15903  /* function exit code */
15904  __pyx_L1_error:;
15905  __Pyx_XDECREF(__pyx_t_1);
15906  __Pyx_AddTraceback("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15907  __pyx_r = NULL;
15908  __pyx_L0:;
15909  __Pyx_XGIVEREF(__pyx_r);
15910  __Pyx_RefNannyFinishContext();
15911  return __pyx_r;
15912 }
15913 
15914 /* "cmeshTools.pyx":383
15915  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15916  *
15917  * cpdef void generateFrom3DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15918  * unicode filebase,
15919  * int base):
15920  */
15921 
15922 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15923 static void __pyx_f_10cmeshTools_generateFrom3DMFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15924  CYTHON_UNUSED int __pyx_v_failed;
15925  __Pyx_RefNannyDeclarations
15926  PyObject *__pyx_t_1 = NULL;
15927  char const *__pyx_t_2;
15928  char const *__pyx_t_3;
15929  int __pyx_lineno = 0;
15930  const char *__pyx_filename = NULL;
15931  int __pyx_clineno = 0;
15932  __Pyx_RefNannySetupContext("generateFrom3DMFile", 0);
15933 
15934  /* "cmeshTools.pyx":387
15935  * int base):
15936  * cdef int failed
15937  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15938  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15939  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15940  */
15941  if (unlikely(__pyx_v_filebase == Py_None)) {
15942  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15943  __PYX_ERR(1, 387, __pyx_L1_error)
15944  }
15945  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 387, __pyx_L1_error)
15946  __Pyx_GOTREF(__pyx_t_1);
15947  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 387, __pyx_L1_error)
15948  __pyx_v_failed = read3DM(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15949  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15950 
15951  /* "cmeshTools.pyx":388
15952  * cdef int failed
15953  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base);
15954  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15955  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15956  *
15957  */
15958  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
15959 
15960  /* "cmeshTools.pyx":389
15961  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base);
15962  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15963  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15964  *
15965  * cpdef void generateFrom2DMFile(CMesh cmesh,
15966  */
15967  if (unlikely(__pyx_v_filebase == Py_None)) {
15968  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15969  __PYX_ERR(1, 389, __pyx_L1_error)
15970  }
15971  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 389, __pyx_L1_error)
15972  __Pyx_GOTREF(__pyx_t_1);
15973  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 389, __pyx_L1_error)
15974  __pyx_v_failed = readBC(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
15975  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15976 
15977  /* "cmeshTools.pyx":383
15978  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15979  *
15980  * cpdef void generateFrom3DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15981  * unicode filebase,
15982  * int base):
15983  */
15984 
15985  /* function exit code */
15986  goto __pyx_L0;
15987  __pyx_L1_error:;
15988  __Pyx_XDECREF(__pyx_t_1);
15989  __Pyx_WriteUnraisable("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15990  __pyx_L0:;
15991  __Pyx_RefNannyFinishContext();
15992 }
15993 
15994 /* Python wrapper */
15995 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15996 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15997  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15998  PyObject *__pyx_v_filebase = 0;
15999  int __pyx_v_base;
16000  int __pyx_lineno = 0;
16001  const char *__pyx_filename = NULL;
16002  int __pyx_clineno = 0;
16003  PyObject *__pyx_r = 0;
16004  __Pyx_RefNannyDeclarations
16005  __Pyx_RefNannySetupContext("generateFrom3DMFile (wrapper)", 0);
16006  {
16007  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
16008  PyObject* values[3] = {0,0,0};
16009  if (unlikely(__pyx_kwds)) {
16010  Py_ssize_t kw_args;
16011  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16012  switch (pos_args) {
16013  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16014  CYTHON_FALLTHROUGH;
16015  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16016  CYTHON_FALLTHROUGH;
16017  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16018  CYTHON_FALLTHROUGH;
16019  case 0: break;
16020  default: goto __pyx_L5_argtuple_error;
16021  }
16022  kw_args = PyDict_Size(__pyx_kwds);
16023  switch (pos_args) {
16024  case 0:
16025  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16026  else goto __pyx_L5_argtuple_error;
16027  CYTHON_FALLTHROUGH;
16028  case 1:
16029  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
16030  else {
16031  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, 1); __PYX_ERR(1, 383, __pyx_L3_error)
16032  }
16033  CYTHON_FALLTHROUGH;
16034  case 2:
16035  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
16036  else {
16037  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, 2); __PYX_ERR(1, 383, __pyx_L3_error)
16038  }
16039  }
16040  if (unlikely(kw_args > 0)) {
16041  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFrom3DMFile") < 0)) __PYX_ERR(1, 383, __pyx_L3_error)
16042  }
16043  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
16044  goto __pyx_L5_argtuple_error;
16045  } else {
16046  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16047  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16048  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16049  }
16050  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
16051  __pyx_v_filebase = ((PyObject*)values[1]);
16052  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L3_error)
16053  }
16054  goto __pyx_L4_argument_unpacking_done;
16055  __pyx_L5_argtuple_error:;
16056  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 383, __pyx_L3_error)
16057  __pyx_L3_error:;
16058  __Pyx_AddTraceback("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
16059  __Pyx_RefNannyFinishContext();
16060  return NULL;
16061  __pyx_L4_argument_unpacking_done:;
16062  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 383, __pyx_L1_error)
16063  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 384, __pyx_L1_error)
16064  __pyx_r = __pyx_pf_10cmeshTools_26generateFrom3DMFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
16065 
16066  /* function exit code */
16067  goto __pyx_L0;
16068  __pyx_L1_error:;
16069  __pyx_r = NULL;
16070  __pyx_L0:;
16071  __Pyx_RefNannyFinishContext();
16072  return __pyx_r;
16073 }
16074 
16075 static PyObject *__pyx_pf_10cmeshTools_26generateFrom3DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
16076  PyObject *__pyx_r = NULL;
16077  __Pyx_RefNannyDeclarations
16078  PyObject *__pyx_t_1 = NULL;
16079  int __pyx_lineno = 0;
16080  const char *__pyx_filename = NULL;
16081  int __pyx_clineno = 0;
16082  __Pyx_RefNannySetupContext("generateFrom3DMFile", 0);
16083  __Pyx_XDECREF(__pyx_r);
16084  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFrom3DMFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error)
16085  __Pyx_GOTREF(__pyx_t_1);
16086  __pyx_r = __pyx_t_1;
16087  __pyx_t_1 = 0;
16088  goto __pyx_L0;
16089 
16090  /* function exit code */
16091  __pyx_L1_error:;
16092  __Pyx_XDECREF(__pyx_t_1);
16093  __Pyx_AddTraceback("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
16094  __pyx_r = NULL;
16095  __pyx_L0:;
16096  __Pyx_XGIVEREF(__pyx_r);
16097  __Pyx_RefNannyFinishContext();
16098  return __pyx_r;
16099 }
16100 
16101 /* "cmeshTools.pyx":391
16102  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
16103  *
16104  * cpdef void generateFrom2DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
16105  * unicode filebase,
16106  * int base):
16107  */
16108 
16109 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16110 static void __pyx_f_10cmeshTools_generateFrom2DMFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
16111  CYTHON_UNUSED int __pyx_v_failed;
16112  __Pyx_RefNannyDeclarations
16113  PyObject *__pyx_t_1 = NULL;
16114  char const *__pyx_t_2;
16115  char const *__pyx_t_3;
16116  int __pyx_lineno = 0;
16117  const char *__pyx_filename = NULL;
16118  int __pyx_clineno = 0;
16119  __Pyx_RefNannySetupContext("generateFrom2DMFile", 0);
16120 
16121  /* "cmeshTools.pyx":395
16122  * int base):
16123  * cdef int failed
16124  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
16125  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16126  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
16127  */
16128  if (unlikely(__pyx_v_filebase == Py_None)) {
16129  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
16130  __PYX_ERR(1, 395, __pyx_L1_error)
16131  }
16132  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 395, __pyx_L1_error)
16133  __Pyx_GOTREF(__pyx_t_1);
16134  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 395, __pyx_L1_error)
16135  __pyx_v_failed = read2DM(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
16136  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16137 
16138  /* "cmeshTools.pyx":396
16139  * cdef int failed
16140  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base);
16141  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16142  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
16143  *
16144  */
16145  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16146 
16147  /* "cmeshTools.pyx":397
16148  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base);
16149  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16150  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
16151  *
16152  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh):
16153  */
16154  if (unlikely(__pyx_v_filebase == Py_None)) {
16155  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
16156  __PYX_ERR(1, 397, __pyx_L1_error)
16157  }
16158  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __pyx_L1_error)
16159  __Pyx_GOTREF(__pyx_t_1);
16160  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 397, __pyx_L1_error)
16161  __pyx_v_failed = readBC(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
16162  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16163 
16164  /* "cmeshTools.pyx":391
16165  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
16166  *
16167  * cpdef void generateFrom2DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
16168  * unicode filebase,
16169  * int base):
16170  */
16171 
16172  /* function exit code */
16173  goto __pyx_L0;
16174  __pyx_L1_error:;
16175  __Pyx_XDECREF(__pyx_t_1);
16176  __Pyx_WriteUnraisable("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
16177  __pyx_L0:;
16178  __Pyx_RefNannyFinishContext();
16179 }
16180 
16181 /* Python wrapper */
16182 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16183 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16184  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16185  PyObject *__pyx_v_filebase = 0;
16186  int __pyx_v_base;
16187  int __pyx_lineno = 0;
16188  const char *__pyx_filename = NULL;
16189  int __pyx_clineno = 0;
16190  PyObject *__pyx_r = 0;
16191  __Pyx_RefNannyDeclarations
16192  __Pyx_RefNannySetupContext("generateFrom2DMFile (wrapper)", 0);
16193  {
16194  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
16195  PyObject* values[3] = {0,0,0};
16196  if (unlikely(__pyx_kwds)) {
16197  Py_ssize_t kw_args;
16198  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16199  switch (pos_args) {
16200  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16201  CYTHON_FALLTHROUGH;
16202  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16203  CYTHON_FALLTHROUGH;
16204  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16205  CYTHON_FALLTHROUGH;
16206  case 0: break;
16207  default: goto __pyx_L5_argtuple_error;
16208  }
16209  kw_args = PyDict_Size(__pyx_kwds);
16210  switch (pos_args) {
16211  case 0:
16212  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16213  else goto __pyx_L5_argtuple_error;
16214  CYTHON_FALLTHROUGH;
16215  case 1:
16216  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
16217  else {
16218  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, 1); __PYX_ERR(1, 391, __pyx_L3_error)
16219  }
16220  CYTHON_FALLTHROUGH;
16221  case 2:
16222  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
16223  else {
16224  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, 2); __PYX_ERR(1, 391, __pyx_L3_error)
16225  }
16226  }
16227  if (unlikely(kw_args > 0)) {
16228  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFrom2DMFile") < 0)) __PYX_ERR(1, 391, __pyx_L3_error)
16229  }
16230  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
16231  goto __pyx_L5_argtuple_error;
16232  } else {
16233  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16234  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16235  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16236  }
16237  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
16238  __pyx_v_filebase = ((PyObject*)values[1]);
16239  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 393, __pyx_L3_error)
16240  }
16241  goto __pyx_L4_argument_unpacking_done;
16242  __pyx_L5_argtuple_error:;
16243  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 391, __pyx_L3_error)
16244  __pyx_L3_error:;
16245  __Pyx_AddTraceback("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
16246  __Pyx_RefNannyFinishContext();
16247  return NULL;
16248  __pyx_L4_argument_unpacking_done:;
16249  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 391, __pyx_L1_error)
16250  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 392, __pyx_L1_error)
16251  __pyx_r = __pyx_pf_10cmeshTools_28generateFrom2DMFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
16252 
16253  /* function exit code */
16254  goto __pyx_L0;
16255  __pyx_L1_error:;
16256  __pyx_r = NULL;
16257  __pyx_L0:;
16258  __Pyx_RefNannyFinishContext();
16259  return __pyx_r;
16260 }
16261 
16262 static PyObject *__pyx_pf_10cmeshTools_28generateFrom2DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
16263  PyObject *__pyx_r = NULL;
16264  __Pyx_RefNannyDeclarations
16265  PyObject *__pyx_t_1 = NULL;
16266  int __pyx_lineno = 0;
16267  const char *__pyx_filename = NULL;
16268  int __pyx_clineno = 0;
16269  __Pyx_RefNannySetupContext("generateFrom2DMFile", 0);
16270  __Pyx_XDECREF(__pyx_r);
16271  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFrom2DMFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 391, __pyx_L1_error)
16272  __Pyx_GOTREF(__pyx_t_1);
16273  __pyx_r = __pyx_t_1;
16274  __pyx_t_1 = 0;
16275  goto __pyx_L0;
16276 
16277  /* function exit code */
16278  __pyx_L1_error:;
16279  __Pyx_XDECREF(__pyx_t_1);
16280  __Pyx_AddTraceback("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
16281  __pyx_r = NULL;
16282  __pyx_L0:;
16283  __Pyx_XGIVEREF(__pyx_r);
16284  __Pyx_RefNannyFinishContext();
16285  return __pyx_r;
16286 }
16287 
16288 /* "cmeshTools.pyx":399
16289  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
16290  *
16291  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
16292  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
16293  *
16294  */
16295 
16296 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16297 static void __pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16298  __Pyx_RefNannyDeclarations
16299  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron", 0);
16300 
16301  /* "cmeshTools.pyx":400
16302  *
16303  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh):
16304  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16305  *
16306  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh):
16307  */
16308  (void)(computeGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
16309 
16310  /* "cmeshTools.pyx":399
16311  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
16312  *
16313  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
16314  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
16315  *
16316  */
16317 
16318  /* function exit code */
16319  __Pyx_RefNannyFinishContext();
16320 }
16321 
16322 /* Python wrapper */
16323 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16324 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16325  int __pyx_lineno = 0;
16326  const char *__pyx_filename = NULL;
16327  int __pyx_clineno = 0;
16328  PyObject *__pyx_r = 0;
16329  __Pyx_RefNannyDeclarations
16330  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron (wrapper)", 0);
16331  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 399, __pyx_L1_error)
16332  __pyx_r = __pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16333 
16334  /* function exit code */
16335  goto __pyx_L0;
16336  __pyx_L1_error:;
16337  __pyx_r = NULL;
16338  __pyx_L0:;
16339  __Pyx_RefNannyFinishContext();
16340  return __pyx_r;
16341 }
16342 
16343 static PyObject *__pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16344  PyObject *__pyx_r = NULL;
16345  __Pyx_RefNannyDeclarations
16346  PyObject *__pyx_t_1 = NULL;
16347  int __pyx_lineno = 0;
16348  const char *__pyx_filename = NULL;
16349  int __pyx_clineno = 0;
16350  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron", 0);
16351  __Pyx_XDECREF(__pyx_r);
16352  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 399, __pyx_L1_error)
16353  __Pyx_GOTREF(__pyx_t_1);
16354  __pyx_r = __pyx_t_1;
16355  __pyx_t_1 = 0;
16356  goto __pyx_L0;
16357 
16358  /* function exit code */
16359  __pyx_L1_error:;
16360  __Pyx_XDECREF(__pyx_t_1);
16361  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
16362  __pyx_r = NULL;
16363  __pyx_L0:;
16364  __Pyx_XGIVEREF(__pyx_r);
16365  __Pyx_RefNannyFinishContext();
16366  return __pyx_r;
16367 }
16368 
16369 /* "cmeshTools.pyx":402
16370  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
16371  *
16372  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
16373  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
16374  *
16375  */
16376 
16377 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16378 static void __pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16379  __Pyx_RefNannyDeclarations
16380  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron", 0);
16381 
16382  /* "cmeshTools.pyx":403
16383  *
16384  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh):
16385  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16386  *
16387  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh,
16388  */
16389  (void)(allocateGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
16390 
16391  /* "cmeshTools.pyx":402
16392  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
16393  *
16394  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
16395  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
16396  *
16397  */
16398 
16399  /* function exit code */
16400  __Pyx_RefNannyFinishContext();
16401 }
16402 
16403 /* Python wrapper */
16404 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16405 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16406  int __pyx_lineno = 0;
16407  const char *__pyx_filename = NULL;
16408  int __pyx_clineno = 0;
16409  PyObject *__pyx_r = 0;
16410  __Pyx_RefNannyDeclarations
16411  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron (wrapper)", 0);
16412  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 402, __pyx_L1_error)
16413  __pyx_r = __pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16414 
16415  /* function exit code */
16416  goto __pyx_L0;
16417  __pyx_L1_error:;
16418  __pyx_r = NULL;
16419  __pyx_L0:;
16420  __Pyx_RefNannyFinishContext();
16421  return __pyx_r;
16422 }
16423 
16424 static PyObject *__pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16425  PyObject *__pyx_r = NULL;
16426  __Pyx_RefNannyDeclarations
16427  PyObject *__pyx_t_1 = NULL;
16428  int __pyx_lineno = 0;
16429  const char *__pyx_filename = NULL;
16430  int __pyx_clineno = 0;
16431  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron", 0);
16432  __Pyx_XDECREF(__pyx_r);
16433  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 402, __pyx_L1_error)
16434  __Pyx_GOTREF(__pyx_t_1);
16435  __pyx_r = __pyx_t_1;
16436  __pyx_t_1 = 0;
16437  goto __pyx_L0;
16438 
16439  /* function exit code */
16440  __pyx_L1_error:;
16441  __Pyx_XDECREF(__pyx_t_1);
16442  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
16443  __pyx_r = NULL;
16444  __pyx_L0:;
16445  __Pyx_XGIVEREF(__pyx_r);
16446  __Pyx_RefNannyFinishContext();
16447  return __pyx_r;
16448 }
16449 
16450 /* "cmeshTools.pyx":405
16451  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
16452  *
16453  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh, # <<<<<<<<<<<<<<
16454  * int nElements_global,
16455  * int nNodes_global,
16456  */
16457 
16458 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16459 static void __pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element, CYTHON_UNUSED int __pyx_skip_dispatch) {
16460  __Pyx_RefNannyDeclarations
16461  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures", 0);
16462 
16463  /* "cmeshTools.pyx":409
16464  * int nNodes_global,
16465  * int nNodes_element):
16466  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element); # <<<<<<<<<<<<<<
16467  *
16468  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16469  */
16470  (void)(allocateNodeAndElementNodeDataStructures(__pyx_v_cmesh->mesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element));
16471 
16472  /* "cmeshTools.pyx":405
16473  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
16474  *
16475  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh, # <<<<<<<<<<<<<<
16476  * int nElements_global,
16477  * int nNodes_global,
16478  */
16479 
16480  /* function exit code */
16481  __Pyx_RefNannyFinishContext();
16482 }
16483 
16484 /* Python wrapper */
16485 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16486 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16487  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16488  int __pyx_v_nElements_global;
16489  int __pyx_v_nNodes_global;
16490  int __pyx_v_nNodes_element;
16491  int __pyx_lineno = 0;
16492  const char *__pyx_filename = NULL;
16493  int __pyx_clineno = 0;
16494  PyObject *__pyx_r = 0;
16495  __Pyx_RefNannyDeclarations
16496  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures (wrapper)", 0);
16497  {
16498  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_nElements_global,&__pyx_n_s_nNodes_global,&__pyx_n_s_nNodes_element,0};
16499  PyObject* values[4] = {0,0,0,0};
16500  if (unlikely(__pyx_kwds)) {
16501  Py_ssize_t kw_args;
16502  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16503  switch (pos_args) {
16504  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16505  CYTHON_FALLTHROUGH;
16506  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16507  CYTHON_FALLTHROUGH;
16508  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16509  CYTHON_FALLTHROUGH;
16510  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16511  CYTHON_FALLTHROUGH;
16512  case 0: break;
16513  default: goto __pyx_L5_argtuple_error;
16514  }
16515  kw_args = PyDict_Size(__pyx_kwds);
16516  switch (pos_args) {
16517  case 0:
16518  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16519  else goto __pyx_L5_argtuple_error;
16520  CYTHON_FALLTHROUGH;
16521  case 1:
16522  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
16523  else {
16524  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 1); __PYX_ERR(1, 405, __pyx_L3_error)
16525  }
16526  CYTHON_FALLTHROUGH;
16527  case 2:
16528  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_global)) != 0)) kw_args--;
16529  else {
16530  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 2); __PYX_ERR(1, 405, __pyx_L3_error)
16531  }
16532  CYTHON_FALLTHROUGH;
16533  case 3:
16534  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
16535  else {
16536  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 3); __PYX_ERR(1, 405, __pyx_L3_error)
16537  }
16538  }
16539  if (unlikely(kw_args > 0)) {
16540  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allocateNodeAndElementNodeDataStructures") < 0)) __PYX_ERR(1, 405, __pyx_L3_error)
16541  }
16542  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
16543  goto __pyx_L5_argtuple_error;
16544  } else {
16545  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16546  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16547  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16548  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16549  }
16550  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
16551  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 406, __pyx_L3_error)
16552  __pyx_v_nNodes_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nNodes_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 407, __pyx_L3_error)
16553  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 408, __pyx_L3_error)
16554  }
16555  goto __pyx_L4_argument_unpacking_done;
16556  __pyx_L5_argtuple_error:;
16557  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 405, __pyx_L3_error)
16558  __pyx_L3_error:;
16559  __Pyx_AddTraceback("cmeshTools.allocateNodeAndElementNodeDataStructures", __pyx_clineno, __pyx_lineno, __pyx_filename);
16560  __Pyx_RefNannyFinishContext();
16561  return NULL;
16562  __pyx_L4_argument_unpacking_done:;
16563  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 405, __pyx_L1_error)
16564  __pyx_r = __pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(__pyx_self, __pyx_v_cmesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element);
16565 
16566  /* function exit code */
16567  goto __pyx_L0;
16568  __pyx_L1_error:;
16569  __pyx_r = NULL;
16570  __pyx_L0:;
16571  __Pyx_RefNannyFinishContext();
16572  return __pyx_r;
16573 }
16574 
16575 static PyObject *__pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element) {
16576  PyObject *__pyx_r = NULL;
16577  __Pyx_RefNannyDeclarations
16578  PyObject *__pyx_t_1 = NULL;
16579  int __pyx_lineno = 0;
16580  const char *__pyx_filename = NULL;
16581  int __pyx_clineno = 0;
16582  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures", 0);
16583  __Pyx_XDECREF(__pyx_r);
16584  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(__pyx_v_cmesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 405, __pyx_L1_error)
16585  __Pyx_GOTREF(__pyx_t_1);
16586  __pyx_r = __pyx_t_1;
16587  __pyx_t_1 = 0;
16588  goto __pyx_L0;
16589 
16590  /* function exit code */
16591  __pyx_L1_error:;
16592  __Pyx_XDECREF(__pyx_t_1);
16593  __Pyx_AddTraceback("cmeshTools.allocateNodeAndElementNodeDataStructures", __pyx_clineno, __pyx_lineno, __pyx_filename);
16594  __pyx_r = NULL;
16595  __pyx_L0:;
16596  __Pyx_XGIVEREF(__pyx_r);
16597  __Pyx_RefNannyFinishContext();
16598  return __pyx_r;
16599 }
16600 
16601 /* "cmeshTools.pyx":411
16602  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element);
16603  *
16604  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh): # <<<<<<<<<<<<<<
16605  * if cmesh.mesh.nNodes_element == 4:
16606  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16607  */
16608 
16609 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16610 static void __pyx_f_10cmeshTools_constructElementBoundaryElementsArray(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16611  __Pyx_RefNannyDeclarations
16612  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray", 0);
16613 
16614  /* "cmeshTools.pyx":412
16615  *
16616  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16617  * if cmesh.mesh.nNodes_element == 4: # <<<<<<<<<<<<<<
16618  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16619  * elif cmesh.mesh.nNodes_element == 3:
16620  */
16621  switch (__pyx_v_cmesh->mesh.nNodes_element) {
16622  case 4:
16623 
16624  /* "cmeshTools.pyx":413
16625  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16626  * if cmesh.mesh.nNodes_element == 4:
16627  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16628  * elif cmesh.mesh.nNodes_element == 3:
16629  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16630  */
16631  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
16632 
16633  /* "cmeshTools.pyx":412
16634  *
16635  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16636  * if cmesh.mesh.nNodes_element == 4: # <<<<<<<<<<<<<<
16637  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16638  * elif cmesh.mesh.nNodes_element == 3:
16639  */
16640  break;
16641  case 3:
16642 
16643  /* "cmeshTools.pyx":415
16644  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16645  * elif cmesh.mesh.nNodes_element == 3:
16646  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16647  * else:
16648  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16649  */
16650  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16651 
16652  /* "cmeshTools.pyx":414
16653  * if cmesh.mesh.nNodes_element == 4:
16654  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16655  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
16656  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16657  * else:
16658  */
16659  break;
16660  default:
16661 
16662  /* "cmeshTools.pyx":417
16663  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16664  * else:
16665  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh); # <<<<<<<<<<<<<<
16666  *
16667  * cpdef void generateTriangularMeshFromRectangularGrid(int nx,
16668  */
16669  (void)(constructElementBoundaryElementsArray_edge(__pyx_v_cmesh->mesh));
16670  break;
16671  }
16672 
16673  /* "cmeshTools.pyx":411
16674  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element);
16675  *
16676  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh): # <<<<<<<<<<<<<<
16677  * if cmesh.mesh.nNodes_element == 4:
16678  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16679  */
16680 
16681  /* function exit code */
16682  __Pyx_RefNannyFinishContext();
16683 }
16684 
16685 /* Python wrapper */
16686 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16687 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16688  int __pyx_lineno = 0;
16689  const char *__pyx_filename = NULL;
16690  int __pyx_clineno = 0;
16691  PyObject *__pyx_r = 0;
16692  __Pyx_RefNannyDeclarations
16693  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray (wrapper)", 0);
16694  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 411, __pyx_L1_error)
16695  __pyx_r = __pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16696 
16697  /* function exit code */
16698  goto __pyx_L0;
16699  __pyx_L1_error:;
16700  __pyx_r = NULL;
16701  __pyx_L0:;
16702  __Pyx_RefNannyFinishContext();
16703  return __pyx_r;
16704 }
16705 
16706 static PyObject *__pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16707  PyObject *__pyx_r = NULL;
16708  __Pyx_RefNannyDeclarations
16709  PyObject *__pyx_t_1 = NULL;
16710  int __pyx_lineno = 0;
16711  const char *__pyx_filename = NULL;
16712  int __pyx_clineno = 0;
16713  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray", 0);
16714  __Pyx_XDECREF(__pyx_r);
16715  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_constructElementBoundaryElementsArray(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error)
16716  __Pyx_GOTREF(__pyx_t_1);
16717  __pyx_r = __pyx_t_1;
16718  __pyx_t_1 = 0;
16719  goto __pyx_L0;
16720 
16721  /* function exit code */
16722  __pyx_L1_error:;
16723  __Pyx_XDECREF(__pyx_t_1);
16724  __Pyx_AddTraceback("cmeshTools.constructElementBoundaryElementsArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
16725  __pyx_r = NULL;
16726  __pyx_L0:;
16727  __Pyx_XGIVEREF(__pyx_r);
16728  __Pyx_RefNannyFinishContext();
16729  return __pyx_r;
16730 }
16731 
16732 /* "cmeshTools.pyx":419
16733  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16734  *
16735  * cpdef void generateTriangularMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16736  * int ny,
16737  * double Lx,
16738  */
16739 
16740 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16741 static void __pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag, CYTHON_UNUSED int __pyx_skip_dispatch) {
16742  __Pyx_RefNannyDeclarations
16743  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid", 0);
16744 
16745  /* "cmeshTools.pyx":425
16746  * CMesh cmesh,
16747  * int triangleFlag):
16748  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag); # <<<<<<<<<<<<<<
16749  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16750  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16751  */
16752  (void)(regularRectangularToTriangularMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_cmesh->mesh, __pyx_v_triangleFlag));
16753 
16754  /* "cmeshTools.pyx":426
16755  * int triangleFlag):
16756  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag);
16757  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16758  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16759  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16760  */
16761  (void)(regularRectangularToTriangularMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16762 
16763  /* "cmeshTools.pyx":427
16764  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag);
16765  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16766  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16767  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16768  *
16769  */
16770  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16771 
16772  /* "cmeshTools.pyx":428
16773  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16774  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16775  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16776  *
16777  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx,
16778  */
16779  (void)(regularRectangularToTriangularElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16780 
16781  /* "cmeshTools.pyx":419
16782  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16783  *
16784  * cpdef void generateTriangularMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16785  * int ny,
16786  * double Lx,
16787  */
16788 
16789  /* function exit code */
16790  __Pyx_RefNannyFinishContext();
16791 }
16792 
16793 /* Python wrapper */
16794 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16795 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16796  int __pyx_v_nx;
16797  int __pyx_v_ny;
16798  double __pyx_v_Lx;
16799  double __pyx_v_Ly;
16800  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16801  int __pyx_v_triangleFlag;
16802  int __pyx_lineno = 0;
16803  const char *__pyx_filename = NULL;
16804  int __pyx_clineno = 0;
16805  PyObject *__pyx_r = 0;
16806  __Pyx_RefNannyDeclarations
16807  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid (wrapper)", 0);
16808  {
16809  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_cmesh,&__pyx_n_s_triangleFlag,0};
16810  PyObject* values[6] = {0,0,0,0,0,0};
16811  if (unlikely(__pyx_kwds)) {
16812  Py_ssize_t kw_args;
16813  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16814  switch (pos_args) {
16815  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16816  CYTHON_FALLTHROUGH;
16817  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16818  CYTHON_FALLTHROUGH;
16819  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16820  CYTHON_FALLTHROUGH;
16821  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16822  CYTHON_FALLTHROUGH;
16823  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16824  CYTHON_FALLTHROUGH;
16825  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16826  CYTHON_FALLTHROUGH;
16827  case 0: break;
16828  default: goto __pyx_L5_argtuple_error;
16829  }
16830  kw_args = PyDict_Size(__pyx_kwds);
16831  switch (pos_args) {
16832  case 0:
16833  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16834  else goto __pyx_L5_argtuple_error;
16835  CYTHON_FALLTHROUGH;
16836  case 1:
16837  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16838  else {
16839  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 1); __PYX_ERR(1, 419, __pyx_L3_error)
16840  }
16841  CYTHON_FALLTHROUGH;
16842  case 2:
16843  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16844  else {
16845  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 2); __PYX_ERR(1, 419, __pyx_L3_error)
16846  }
16847  CYTHON_FALLTHROUGH;
16848  case 3:
16849  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16850  else {
16851  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 3); __PYX_ERR(1, 419, __pyx_L3_error)
16852  }
16853  CYTHON_FALLTHROUGH;
16854  case 4:
16855  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16856  else {
16857  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 4); __PYX_ERR(1, 419, __pyx_L3_error)
16858  }
16859  CYTHON_FALLTHROUGH;
16860  case 5:
16861  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_triangleFlag)) != 0)) kw_args--;
16862  else {
16863  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 5); __PYX_ERR(1, 419, __pyx_L3_error)
16864  }
16865  }
16866  if (unlikely(kw_args > 0)) {
16867  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateTriangularMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 419, __pyx_L3_error)
16868  }
16869  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
16870  goto __pyx_L5_argtuple_error;
16871  } else {
16872  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16873  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16874  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16875  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16876  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16877  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16878  }
16879  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 419, __pyx_L3_error)
16880  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 420, __pyx_L3_error)
16881  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 421, __pyx_L3_error)
16882  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 422, __pyx_L3_error)
16883  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[4]);
16884  __pyx_v_triangleFlag = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_triangleFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 424, __pyx_L3_error)
16885  }
16886  goto __pyx_L4_argument_unpacking_done;
16887  __pyx_L5_argtuple_error:;
16888  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 419, __pyx_L3_error)
16889  __pyx_L3_error:;
16890  __Pyx_AddTraceback("cmeshTools.generateTriangularMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16891  __Pyx_RefNannyFinishContext();
16892  return NULL;
16893  __pyx_L4_argument_unpacking_done:;
16894  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 423, __pyx_L1_error)
16895  __pyx_r = __pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, __pyx_v_triangleFlag);
16896 
16897  /* function exit code */
16898  goto __pyx_L0;
16899  __pyx_L1_error:;
16900  __pyx_r = NULL;
16901  __pyx_L0:;
16902  __Pyx_RefNannyFinishContext();
16903  return __pyx_r;
16904 }
16905 
16906 static PyObject *__pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag) {
16907  PyObject *__pyx_r = NULL;
16908  __Pyx_RefNannyDeclarations
16909  PyObject *__pyx_t_1 = NULL;
16910  int __pyx_lineno = 0;
16911  const char *__pyx_filename = NULL;
16912  int __pyx_clineno = 0;
16913  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid", 0);
16914  __Pyx_XDECREF(__pyx_r);
16915  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, __pyx_v_triangleFlag, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error)
16916  __Pyx_GOTREF(__pyx_t_1);
16917  __pyx_r = __pyx_t_1;
16918  __pyx_t_1 = 0;
16919  goto __pyx_L0;
16920 
16921  /* function exit code */
16922  __pyx_L1_error:;
16923  __Pyx_XDECREF(__pyx_t_1);
16924  __Pyx_AddTraceback("cmeshTools.generateTriangularMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16925  __pyx_r = NULL;
16926  __pyx_L0:;
16927  __Pyx_XGIVEREF(__pyx_r);
16928  __Pyx_RefNannyFinishContext();
16929  return __pyx_r;
16930 }
16931 
16932 /* "cmeshTools.pyx":430
16933  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16934  *
16935  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16936  * int ny,
16937  * int nz,
16938  */
16939 
16940 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16941 static void __pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16942  __Pyx_RefNannyDeclarations
16943  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid", 0);
16944 
16945  /* "cmeshTools.pyx":440
16946  * double Lz,
16947  * CMesh cmesh):
16948  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh); # <<<<<<<<<<<<<<
16949  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16950  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16951  */
16952  (void)(regularHexahedralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_cmesh->mesh));
16953 
16954  /* "cmeshTools.pyx":441
16955  * CMesh cmesh):
16956  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh);
16957  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
16958  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16959  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16960  */
16961  (void)(regularMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
16962 
16963  /* "cmeshTools.pyx":442
16964  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh);
16965  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16966  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16967  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16968  *
16969  */
16970  (void)(constructElementBoundaryElementsArray_hexahedron(__pyx_v_cmesh->mesh));
16971 
16972  /* "cmeshTools.pyx":443
16973  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16974  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16975  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
16976  *
16977  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx,
16978  */
16979  (void)(regularHexahedralMeshElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
16980 
16981  /* "cmeshTools.pyx":430
16982  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16983  *
16984  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16985  * int ny,
16986  * int nz,
16987  */
16988 
16989  /* function exit code */
16990  __Pyx_RefNannyFinishContext();
16991 }
16992 
16993 /* Python wrapper */
16994 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16995 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16996  int __pyx_v_nx;
16997  int __pyx_v_ny;
16998  int __pyx_v_nz;
16999  int __pyx_v_px;
17000  int __pyx_v_py;
17001  int __pyx_v_pz;
17002  double __pyx_v_Lx;
17003  double __pyx_v_Ly;
17004  double __pyx_v_Lz;
17005  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
17006  int __pyx_lineno = 0;
17007  const char *__pyx_filename = NULL;
17008  int __pyx_clineno = 0;
17009  PyObject *__pyx_r = 0;
17010  __Pyx_RefNannyDeclarations
17011  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid (wrapper)", 0);
17012  {
17013  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_Lz,&__pyx_n_s_cmesh,0};
17014  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
17015  if (unlikely(__pyx_kwds)) {
17016  Py_ssize_t kw_args;
17017  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17018  switch (pos_args) {
17019  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
17020  CYTHON_FALLTHROUGH;
17021  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
17022  CYTHON_FALLTHROUGH;
17023  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
17024  CYTHON_FALLTHROUGH;
17025  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17026  CYTHON_FALLTHROUGH;
17027  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17028  CYTHON_FALLTHROUGH;
17029  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17030  CYTHON_FALLTHROUGH;
17031  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17032  CYTHON_FALLTHROUGH;
17033  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17034  CYTHON_FALLTHROUGH;
17035  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17036  CYTHON_FALLTHROUGH;
17037  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17038  CYTHON_FALLTHROUGH;
17039  case 0: break;
17040  default: goto __pyx_L5_argtuple_error;
17041  }
17042  kw_args = PyDict_Size(__pyx_kwds);
17043  switch (pos_args) {
17044  case 0:
17045  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
17046  else goto __pyx_L5_argtuple_error;
17047  CYTHON_FALLTHROUGH;
17048  case 1:
17049  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
17050  else {
17051  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 1); __PYX_ERR(1, 430, __pyx_L3_error)
17052  }
17053  CYTHON_FALLTHROUGH;
17054  case 2:
17055  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;
17056  else {
17057  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 2); __PYX_ERR(1, 430, __pyx_L3_error)
17058  }
17059  CYTHON_FALLTHROUGH;
17060  case 3:
17061  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--;
17062  else {
17063  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 3); __PYX_ERR(1, 430, __pyx_L3_error)
17064  }
17065  CYTHON_FALLTHROUGH;
17066  case 4:
17067  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--;
17068  else {
17069  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 4); __PYX_ERR(1, 430, __pyx_L3_error)
17070  }
17071  CYTHON_FALLTHROUGH;
17072  case 5:
17073  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--;
17074  else {
17075  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 5); __PYX_ERR(1, 430, __pyx_L3_error)
17076  }
17077  CYTHON_FALLTHROUGH;
17078  case 6:
17079  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
17080  else {
17081  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 6); __PYX_ERR(1, 430, __pyx_L3_error)
17082  }
17083  CYTHON_FALLTHROUGH;
17084  case 7:
17085  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
17086  else {
17087  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 7); __PYX_ERR(1, 430, __pyx_L3_error)
17088  }
17089  CYTHON_FALLTHROUGH;
17090  case 8:
17091  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lz)) != 0)) kw_args--;
17092  else {
17093  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 8); __PYX_ERR(1, 430, __pyx_L3_error)
17094  }
17095  CYTHON_FALLTHROUGH;
17096  case 9:
17097  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
17098  else {
17099  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 9); __PYX_ERR(1, 430, __pyx_L3_error)
17100  }
17101  }
17102  if (unlikely(kw_args > 0)) {
17103  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateHexahedralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 430, __pyx_L3_error)
17104  }
17105  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
17106  goto __pyx_L5_argtuple_error;
17107  } else {
17108  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17109  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17110  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17111  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17112  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17113  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17114  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17115  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
17116  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
17117  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
17118  }
17119  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L3_error)
17120  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 431, __pyx_L3_error)
17121  __pyx_v_nz = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 432, __pyx_L3_error)
17122  __pyx_v_px = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_px == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 433, __pyx_L3_error)
17123  __pyx_v_py = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_py == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 434, __pyx_L3_error)
17124  __pyx_v_pz = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_pz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 435, __pyx_L3_error)
17125  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 436, __pyx_L3_error)
17126  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 437, __pyx_L3_error)
17127  __pyx_v_Lz = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_Lz == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 438, __pyx_L3_error)
17128  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[9]);
17129  }
17130  goto __pyx_L4_argument_unpacking_done;
17131  __pyx_L5_argtuple_error:;
17132  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 430, __pyx_L3_error)
17133  __pyx_L3_error:;
17134  __Pyx_AddTraceback("cmeshTools.generateHexahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17135  __Pyx_RefNannyFinishContext();
17136  return NULL;
17137  __pyx_L4_argument_unpacking_done:;
17138  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 439, __pyx_L1_error)
17139  __pyx_r = __pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh);
17140 
17141  /* function exit code */
17142  goto __pyx_L0;
17143  __pyx_L1_error:;
17144  __pyx_r = NULL;
17145  __pyx_L0:;
17146  __Pyx_RefNannyFinishContext();
17147  return __pyx_r;
17148 }
17149 
17150 static PyObject *__pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17151  PyObject *__pyx_r = NULL;
17152  __Pyx_RefNannyDeclarations
17153  PyObject *__pyx_t_1 = NULL;
17154  int __pyx_lineno = 0;
17155  const char *__pyx_filename = NULL;
17156  int __pyx_clineno = 0;
17157  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid", 0);
17158  __Pyx_XDECREF(__pyx_r);
17159  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 430, __pyx_L1_error)
17160  __Pyx_GOTREF(__pyx_t_1);
17161  __pyx_r = __pyx_t_1;
17162  __pyx_t_1 = 0;
17163  goto __pyx_L0;
17164 
17165  /* function exit code */
17166  __pyx_L1_error:;
17167  __Pyx_XDECREF(__pyx_t_1);
17168  __Pyx_AddTraceback("cmeshTools.generateHexahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17169  __pyx_r = NULL;
17170  __pyx_L0:;
17171  __Pyx_XGIVEREF(__pyx_r);
17172  __Pyx_RefNannyFinishContext();
17173  return __pyx_r;
17174 }
17175 
17176 /* "cmeshTools.pyx":445
17177  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
17178  *
17179  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
17180  * int ny,
17181  * int px,
17182  */
17183 
17184 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17185 static void __pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, CYTHON_UNUSED int __pyx_v_px, CYTHON_UNUSED int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17186  __Pyx_RefNannyDeclarations
17187  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid", 0);
17188 
17189  /* "cmeshTools.pyx":452
17190  * double Ly,
17191  * CMesh cmesh):
17192  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh); # <<<<<<<<<<<<<<
17193  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
17194  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
17195  */
17196  (void)(regularQuadrilateralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_cmesh->mesh));
17197 
17198  /* "cmeshTools.pyx":453
17199  * CMesh cmesh):
17200  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh);
17201  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
17202  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
17203  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
17204  */
17205  (void)(regularMeshNodes2D(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
17206 
17207  /* "cmeshTools.pyx":454
17208  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh);
17209  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
17210  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
17211  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
17212  *
17213  */
17214  (void)(constructElementBoundaryElementsArray_quadrilateral(__pyx_v_cmesh->mesh));
17215 
17216  /* "cmeshTools.pyx":455
17217  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
17218  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
17219  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
17220  *
17221  * cpdef void computeGeometricInfo_triangle(CMesh cmesh):
17222  */
17223  (void)(regularQuadrilateralMeshElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
17224 
17225  /* "cmeshTools.pyx":445
17226  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
17227  *
17228  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
17229  * int ny,
17230  * int px,
17231  */
17232 
17233  /* function exit code */
17234  __Pyx_RefNannyFinishContext();
17235 }
17236 
17237 /* Python wrapper */
17238 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17239 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17240  int __pyx_v_nx;
17241  int __pyx_v_ny;
17242  int __pyx_v_px;
17243  int __pyx_v_py;
17244  double __pyx_v_Lx;
17245  double __pyx_v_Ly;
17246  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
17247  int __pyx_lineno = 0;
17248  const char *__pyx_filename = NULL;
17249  int __pyx_clineno = 0;
17250  PyObject *__pyx_r = 0;
17251  __Pyx_RefNannyDeclarations
17252  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid (wrapper)", 0);
17253  {
17254  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_cmesh,0};
17255  PyObject* values[7] = {0,0,0,0,0,0,0};
17256  if (unlikely(__pyx_kwds)) {
17257  Py_ssize_t kw_args;
17258  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17259  switch (pos_args) {
17260  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17261  CYTHON_FALLTHROUGH;
17262  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17263  CYTHON_FALLTHROUGH;
17264  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17265  CYTHON_FALLTHROUGH;
17266  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17267  CYTHON_FALLTHROUGH;
17268  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17269  CYTHON_FALLTHROUGH;
17270  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17271  CYTHON_FALLTHROUGH;
17272  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17273  CYTHON_FALLTHROUGH;
17274  case 0: break;
17275  default: goto __pyx_L5_argtuple_error;
17276  }
17277  kw_args = PyDict_Size(__pyx_kwds);
17278  switch (pos_args) {
17279  case 0:
17280  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
17281  else goto __pyx_L5_argtuple_error;
17282  CYTHON_FALLTHROUGH;
17283  case 1:
17284  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
17285  else {
17286  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 1); __PYX_ERR(1, 445, __pyx_L3_error)
17287  }
17288  CYTHON_FALLTHROUGH;
17289  case 2:
17290  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--;
17291  else {
17292  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 2); __PYX_ERR(1, 445, __pyx_L3_error)
17293  }
17294  CYTHON_FALLTHROUGH;
17295  case 3:
17296  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--;
17297  else {
17298  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 3); __PYX_ERR(1, 445, __pyx_L3_error)
17299  }
17300  CYTHON_FALLTHROUGH;
17301  case 4:
17302  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
17303  else {
17304  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 4); __PYX_ERR(1, 445, __pyx_L3_error)
17305  }
17306  CYTHON_FALLTHROUGH;
17307  case 5:
17308  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
17309  else {
17310  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 5); __PYX_ERR(1, 445, __pyx_L3_error)
17311  }
17312  CYTHON_FALLTHROUGH;
17313  case 6:
17314  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
17315  else {
17316  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 6); __PYX_ERR(1, 445, __pyx_L3_error)
17317  }
17318  }
17319  if (unlikely(kw_args > 0)) {
17320  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateQuadrilateralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 445, __pyx_L3_error)
17321  }
17322  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
17323  goto __pyx_L5_argtuple_error;
17324  } else {
17325  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17326  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17327  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17328  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17329  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
17330  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
17331  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
17332  }
17333  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 445, __pyx_L3_error)
17334  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 446, __pyx_L3_error)
17335  __pyx_v_px = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_px == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L3_error)
17336  __pyx_v_py = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_py == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 448, __pyx_L3_error)
17337  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L3_error)
17338  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 450, __pyx_L3_error)
17339  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[6]);
17340  }
17341  goto __pyx_L4_argument_unpacking_done;
17342  __pyx_L5_argtuple_error:;
17343  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 445, __pyx_L3_error)
17344  __pyx_L3_error:;
17345  __Pyx_AddTraceback("cmeshTools.generateQuadrilateralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17346  __Pyx_RefNannyFinishContext();
17347  return NULL;
17348  __pyx_L4_argument_unpacking_done:;
17349  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 451, __pyx_L1_error)
17350  __pyx_r = __pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_px, __pyx_v_py, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh);
17351 
17352  /* function exit code */
17353  goto __pyx_L0;
17354  __pyx_L1_error:;
17355  __pyx_r = NULL;
17356  __pyx_L0:;
17357  __Pyx_RefNannyFinishContext();
17358  return __pyx_r;
17359 }
17360 
17361 static PyObject *__pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_px, int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17362  PyObject *__pyx_r = NULL;
17363  __Pyx_RefNannyDeclarations
17364  PyObject *__pyx_t_1 = NULL;
17365  int __pyx_lineno = 0;
17366  const char *__pyx_filename = NULL;
17367  int __pyx_clineno = 0;
17368  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid", 0);
17369  __Pyx_XDECREF(__pyx_r);
17370  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_px, __pyx_v_py, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 445, __pyx_L1_error)
17371  __Pyx_GOTREF(__pyx_t_1);
17372  __pyx_r = __pyx_t_1;
17373  __pyx_t_1 = 0;
17374  goto __pyx_L0;
17375 
17376  /* function exit code */
17377  __pyx_L1_error:;
17378  __Pyx_XDECREF(__pyx_t_1);
17379  __Pyx_AddTraceback("cmeshTools.generateQuadrilateralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17380  __pyx_r = NULL;
17381  __pyx_L0:;
17382  __Pyx_XGIVEREF(__pyx_r);
17383  __Pyx_RefNannyFinishContext();
17384  return __pyx_r;
17385 }
17386 
17387 /* "cmeshTools.pyx":457
17388  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
17389  *
17390  * cpdef void computeGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
17391  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
17392  *
17393  */
17394 
17395 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17396 static void __pyx_f_10cmeshTools_computeGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17397  __Pyx_RefNannyDeclarations
17398  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle", 0);
17399 
17400  /* "cmeshTools.pyx":458
17401  *
17402  * cpdef void computeGeometricInfo_triangle(CMesh cmesh):
17403  * cppm.computeGeometricInfo_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
17404  *
17405  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh):
17406  */
17407  (void)(computeGeometricInfo_triangle(__pyx_v_cmesh->mesh));
17408 
17409  /* "cmeshTools.pyx":457
17410  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
17411  *
17412  * cpdef void computeGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
17413  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
17414  *
17415  */
17416 
17417  /* function exit code */
17418  __Pyx_RefNannyFinishContext();
17419 }
17420 
17421 /* Python wrapper */
17422 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17423 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17424  int __pyx_lineno = 0;
17425  const char *__pyx_filename = NULL;
17426  int __pyx_clineno = 0;
17427  PyObject *__pyx_r = 0;
17428  __Pyx_RefNannyDeclarations
17429  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle (wrapper)", 0);
17430  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 457, __pyx_L1_error)
17431  __pyx_r = __pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17432 
17433  /* function exit code */
17434  goto __pyx_L0;
17435  __pyx_L1_error:;
17436  __pyx_r = NULL;
17437  __pyx_L0:;
17438  __Pyx_RefNannyFinishContext();
17439  return __pyx_r;
17440 }
17441 
17442 static PyObject *__pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17443  PyObject *__pyx_r = NULL;
17444  __Pyx_RefNannyDeclarations
17445  PyObject *__pyx_t_1 = NULL;
17446  int __pyx_lineno = 0;
17447  const char *__pyx_filename = NULL;
17448  int __pyx_clineno = 0;
17449  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle", 0);
17450  __Pyx_XDECREF(__pyx_r);
17451  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_triangle(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 457, __pyx_L1_error)
17452  __Pyx_GOTREF(__pyx_t_1);
17453  __pyx_r = __pyx_t_1;
17454  __pyx_t_1 = 0;
17455  goto __pyx_L0;
17456 
17457  /* function exit code */
17458  __pyx_L1_error:;
17459  __Pyx_XDECREF(__pyx_t_1);
17460  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
17461  __pyx_r = NULL;
17462  __pyx_L0:;
17463  __Pyx_XGIVEREF(__pyx_r);
17464  __Pyx_RefNannyFinishContext();
17465  return __pyx_r;
17466 }
17467 
17468 /* "cmeshTools.pyx":460
17469  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
17470  *
17471  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
17472  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
17473  *
17474  */
17475 
17476 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17477 static void __pyx_f_10cmeshTools_allocateGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17478  __Pyx_RefNannyDeclarations
17479  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle", 0);
17480 
17481  /* "cmeshTools.pyx":461
17482  *
17483  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh):
17484  * cppm.allocateGeometricInfo_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
17485  *
17486  * cpdef void generateEdgeMeshFromRectangularGrid(int nx,
17487  */
17488  (void)(allocateGeometricInfo_triangle(__pyx_v_cmesh->mesh));
17489 
17490  /* "cmeshTools.pyx":460
17491  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
17492  *
17493  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
17494  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
17495  *
17496  */
17497 
17498  /* function exit code */
17499  __Pyx_RefNannyFinishContext();
17500 }
17501 
17502 /* Python wrapper */
17503 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17504 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17505  int __pyx_lineno = 0;
17506  const char *__pyx_filename = NULL;
17507  int __pyx_clineno = 0;
17508  PyObject *__pyx_r = 0;
17509  __Pyx_RefNannyDeclarations
17510  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle (wrapper)", 0);
17511  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 460, __pyx_L1_error)
17512  __pyx_r = __pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17513 
17514  /* function exit code */
17515  goto __pyx_L0;
17516  __pyx_L1_error:;
17517  __pyx_r = NULL;
17518  __pyx_L0:;
17519  __Pyx_RefNannyFinishContext();
17520  return __pyx_r;
17521 }
17522 
17523 static PyObject *__pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17524  PyObject *__pyx_r = NULL;
17525  __Pyx_RefNannyDeclarations
17526  PyObject *__pyx_t_1 = NULL;
17527  int __pyx_lineno = 0;
17528  const char *__pyx_filename = NULL;
17529  int __pyx_clineno = 0;
17530  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle", 0);
17531  __Pyx_XDECREF(__pyx_r);
17532  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_triangle(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error)
17533  __Pyx_GOTREF(__pyx_t_1);
17534  __pyx_r = __pyx_t_1;
17535  __pyx_t_1 = 0;
17536  goto __pyx_L0;
17537 
17538  /* function exit code */
17539  __pyx_L1_error:;
17540  __Pyx_XDECREF(__pyx_t_1);
17541  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
17542  __pyx_r = NULL;
17543  __pyx_L0:;
17544  __Pyx_XGIVEREF(__pyx_r);
17545  __Pyx_RefNannyFinishContext();
17546  return __pyx_r;
17547 }
17548 
17549 /* "cmeshTools.pyx":463
17550  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
17551  *
17552  * cpdef void generateEdgeMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
17553  * double Lx,
17554  * CMesh cmesh):
17555  */
17556 
17557 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17558 static void __pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17559  __Pyx_RefNannyDeclarations
17560  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid", 0);
17561 
17562  /* "cmeshTools.pyx":466
17563  * double Lx,
17564  * CMesh cmesh):
17565  * cppm.edgeMeshElements(nx,cmesh.mesh); # <<<<<<<<<<<<<<
17566  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh);
17567  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17568  */
17569  (void)(edgeMeshElements(__pyx_v_nx, __pyx_v_cmesh->mesh));
17570 
17571  /* "cmeshTools.pyx":467
17572  * CMesh cmesh):
17573  * cppm.edgeMeshElements(nx,cmesh.mesh);
17574  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh); # <<<<<<<<<<<<<<
17575  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17576  *
17577  */
17578  (void)(regularEdgeMeshNodes(__pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh->mesh));
17579 
17580  /* "cmeshTools.pyx":468
17581  * cppm.edgeMeshElements(nx,cmesh.mesh);
17582  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh);
17583  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17584  *
17585  * cpdef void computeGeometricInfo_edge(CMesh cmesh):
17586  */
17587  (void)(constructElementBoundaryElementsArray_edge(__pyx_v_cmesh->mesh));
17588 
17589  /* "cmeshTools.pyx":463
17590  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
17591  *
17592  * cpdef void generateEdgeMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
17593  * double Lx,
17594  * CMesh cmesh):
17595  */
17596 
17597  /* function exit code */
17598  __Pyx_RefNannyFinishContext();
17599 }
17600 
17601 /* Python wrapper */
17602 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17603 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17604  int __pyx_v_nx;
17605  double __pyx_v_Lx;
17606  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
17607  int __pyx_lineno = 0;
17608  const char *__pyx_filename = NULL;
17609  int __pyx_clineno = 0;
17610  PyObject *__pyx_r = 0;
17611  __Pyx_RefNannyDeclarations
17612  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid (wrapper)", 0);
17613  {
17614  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_Lx,&__pyx_n_s_cmesh,0};
17615  PyObject* values[3] = {0,0,0};
17616  if (unlikely(__pyx_kwds)) {
17617  Py_ssize_t kw_args;
17618  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17619  switch (pos_args) {
17620  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17621  CYTHON_FALLTHROUGH;
17622  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17623  CYTHON_FALLTHROUGH;
17624  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17625  CYTHON_FALLTHROUGH;
17626  case 0: break;
17627  default: goto __pyx_L5_argtuple_error;
17628  }
17629  kw_args = PyDict_Size(__pyx_kwds);
17630  switch (pos_args) {
17631  case 0:
17632  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
17633  else goto __pyx_L5_argtuple_error;
17634  CYTHON_FALLTHROUGH;
17635  case 1:
17636  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
17637  else {
17638  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, 1); __PYX_ERR(1, 463, __pyx_L3_error)
17639  }
17640  CYTHON_FALLTHROUGH;
17641  case 2:
17642  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
17643  else {
17644  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, 2); __PYX_ERR(1, 463, __pyx_L3_error)
17645  }
17646  }
17647  if (unlikely(kw_args > 0)) {
17648  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateEdgeMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 463, __pyx_L3_error)
17649  }
17650  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
17651  goto __pyx_L5_argtuple_error;
17652  } else {
17653  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17654  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17655  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17656  }
17657  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 463, __pyx_L3_error)
17658  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 464, __pyx_L3_error)
17659  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[2]);
17660  }
17661  goto __pyx_L4_argument_unpacking_done;
17662  __pyx_L5_argtuple_error:;
17663  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 463, __pyx_L3_error)
17664  __pyx_L3_error:;
17665  __Pyx_AddTraceback("cmeshTools.generateEdgeMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17666  __Pyx_RefNannyFinishContext();
17667  return NULL;
17668  __pyx_L4_argument_unpacking_done:;
17669  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 465, __pyx_L1_error)
17670  __pyx_r = __pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh);
17671 
17672  /* function exit code */
17673  goto __pyx_L0;
17674  __pyx_L1_error:;
17675  __pyx_r = NULL;
17676  __pyx_L0:;
17677  __Pyx_RefNannyFinishContext();
17678  return __pyx_r;
17679 }
17680 
17681 static PyObject *__pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17682  PyObject *__pyx_r = NULL;
17683  __Pyx_RefNannyDeclarations
17684  PyObject *__pyx_t_1 = NULL;
17685  int __pyx_lineno = 0;
17686  const char *__pyx_filename = NULL;
17687  int __pyx_clineno = 0;
17688  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid", 0);
17689  __Pyx_XDECREF(__pyx_r);
17690  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error)
17691  __Pyx_GOTREF(__pyx_t_1);
17692  __pyx_r = __pyx_t_1;
17693  __pyx_t_1 = 0;
17694  goto __pyx_L0;
17695 
17696  /* function exit code */
17697  __pyx_L1_error:;
17698  __Pyx_XDECREF(__pyx_t_1);
17699  __Pyx_AddTraceback("cmeshTools.generateEdgeMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17700  __pyx_r = NULL;
17701  __pyx_L0:;
17702  __Pyx_XGIVEREF(__pyx_r);
17703  __Pyx_RefNannyFinishContext();
17704  return __pyx_r;
17705 }
17706 
17707 /* "cmeshTools.pyx":470
17708  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17709  *
17710  * cpdef void computeGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17711  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17712  *
17713  */
17714 
17715 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17716 static void __pyx_f_10cmeshTools_computeGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17717  __Pyx_RefNannyDeclarations
17718  __Pyx_RefNannySetupContext("computeGeometricInfo_edge", 0);
17719 
17720  /* "cmeshTools.pyx":471
17721  *
17722  * cpdef void computeGeometricInfo_edge(CMesh cmesh):
17723  * cppm.computeGeometricInfo_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17724  *
17725  * cpdef void allocateGeometricInfo_edge(CMesh cmesh):
17726  */
17727  (void)(computeGeometricInfo_edge(__pyx_v_cmesh->mesh));
17728 
17729  /* "cmeshTools.pyx":470
17730  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17731  *
17732  * cpdef void computeGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17733  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17734  *
17735  */
17736 
17737  /* function exit code */
17738  __Pyx_RefNannyFinishContext();
17739 }
17740 
17741 /* Python wrapper */
17742 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17743 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17744  int __pyx_lineno = 0;
17745  const char *__pyx_filename = NULL;
17746  int __pyx_clineno = 0;
17747  PyObject *__pyx_r = 0;
17748  __Pyx_RefNannyDeclarations
17749  __Pyx_RefNannySetupContext("computeGeometricInfo_edge (wrapper)", 0);
17750  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 470, __pyx_L1_error)
17751  __pyx_r = __pyx_pf_10cmeshTools_50computeGeometricInfo_edge(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17752 
17753  /* function exit code */
17754  goto __pyx_L0;
17755  __pyx_L1_error:;
17756  __pyx_r = NULL;
17757  __pyx_L0:;
17758  __Pyx_RefNannyFinishContext();
17759  return __pyx_r;
17760 }
17761 
17762 static PyObject *__pyx_pf_10cmeshTools_50computeGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17763  PyObject *__pyx_r = NULL;
17764  __Pyx_RefNannyDeclarations
17765  PyObject *__pyx_t_1 = NULL;
17766  int __pyx_lineno = 0;
17767  const char *__pyx_filename = NULL;
17768  int __pyx_clineno = 0;
17769  __Pyx_RefNannySetupContext("computeGeometricInfo_edge", 0);
17770  __Pyx_XDECREF(__pyx_r);
17771  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_edge(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 470, __pyx_L1_error)
17772  __Pyx_GOTREF(__pyx_t_1);
17773  __pyx_r = __pyx_t_1;
17774  __pyx_t_1 = 0;
17775  goto __pyx_L0;
17776 
17777  /* function exit code */
17778  __pyx_L1_error:;
17779  __Pyx_XDECREF(__pyx_t_1);
17780  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
17781  __pyx_r = NULL;
17782  __pyx_L0:;
17783  __Pyx_XGIVEREF(__pyx_r);
17784  __Pyx_RefNannyFinishContext();
17785  return __pyx_r;
17786 }
17787 
17788 /* "cmeshTools.pyx":473
17789  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17790  *
17791  * cpdef void allocateGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17792  * cppm.allocateGeometricInfo_edge(cmesh.mesh);
17793  *
17794  */
17795 
17796 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17797 static void __pyx_f_10cmeshTools_allocateGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17798  __Pyx_RefNannyDeclarations
17799  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge", 0);
17800 
17801  /* "cmeshTools.pyx":474
17802  *
17803  * cpdef void allocateGeometricInfo_edge(CMesh cmesh):
17804  * cppm.allocateGeometricInfo_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17805  *
17806  *
17807  */
17808  (void)(allocateGeometricInfo_edge(__pyx_v_cmesh->mesh));
17809 
17810  /* "cmeshTools.pyx":473
17811  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17812  *
17813  * cpdef void allocateGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17814  * cppm.allocateGeometricInfo_edge(cmesh.mesh);
17815  *
17816  */
17817 
17818  /* function exit code */
17819  __Pyx_RefNannyFinishContext();
17820 }
17821 
17822 /* Python wrapper */
17823 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17824 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17825  int __pyx_lineno = 0;
17826  const char *__pyx_filename = NULL;
17827  int __pyx_clineno = 0;
17828  PyObject *__pyx_r = 0;
17829  __Pyx_RefNannyDeclarations
17830  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge (wrapper)", 0);
17831  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 473, __pyx_L1_error)
17832  __pyx_r = __pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17833 
17834  /* function exit code */
17835  goto __pyx_L0;
17836  __pyx_L1_error:;
17837  __pyx_r = NULL;
17838  __pyx_L0:;
17839  __Pyx_RefNannyFinishContext();
17840  return __pyx_r;
17841 }
17842 
17843 static PyObject *__pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17844  PyObject *__pyx_r = NULL;
17845  __Pyx_RefNannyDeclarations
17846  PyObject *__pyx_t_1 = NULL;
17847  int __pyx_lineno = 0;
17848  const char *__pyx_filename = NULL;
17849  int __pyx_clineno = 0;
17850  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge", 0);
17851  __Pyx_XDECREF(__pyx_r);
17852  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_edge(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error)
17853  __Pyx_GOTREF(__pyx_t_1);
17854  __pyx_r = __pyx_t_1;
17855  __pyx_t_1 = 0;
17856  goto __pyx_L0;
17857 
17858  /* function exit code */
17859  __pyx_L1_error:;
17860  __Pyx_XDECREF(__pyx_t_1);
17861  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
17862  __pyx_r = NULL;
17863  __pyx_L0:;
17864  __Pyx_XGIVEREF(__pyx_r);
17865  __Pyx_RefNannyFinishContext();
17866  return __pyx_r;
17867 }
17868 
17869 /* "cmeshTools.pyx":477
17870  *
17871  *
17872  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17873  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17874  *
17875  */
17876 
17877 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17878 static void __pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17879  __Pyx_RefNannyDeclarations
17880  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron", 0);
17881 
17882  /* "cmeshTools.pyx":478
17883  *
17884  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh):
17885  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
17886  *
17887  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh):
17888  */
17889  (void)(computeGeometricInfo_hexahedron(__pyx_v_cmesh->mesh));
17890 
17891  /* "cmeshTools.pyx":477
17892  *
17893  *
17894  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17895  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17896  *
17897  */
17898 
17899  /* function exit code */
17900  __Pyx_RefNannyFinishContext();
17901 }
17902 
17903 /* Python wrapper */
17904 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17905 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17906  int __pyx_lineno = 0;
17907  const char *__pyx_filename = NULL;
17908  int __pyx_clineno = 0;
17909  PyObject *__pyx_r = 0;
17910  __Pyx_RefNannyDeclarations
17911  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron (wrapper)", 0);
17912  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 477, __pyx_L1_error)
17913  __pyx_r = __pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17914 
17915  /* function exit code */
17916  goto __pyx_L0;
17917  __pyx_L1_error:;
17918  __pyx_r = NULL;
17919  __pyx_L0:;
17920  __Pyx_RefNannyFinishContext();
17921  return __pyx_r;
17922 }
17923 
17924 static PyObject *__pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17925  PyObject *__pyx_r = NULL;
17926  __Pyx_RefNannyDeclarations
17927  PyObject *__pyx_t_1 = NULL;
17928  int __pyx_lineno = 0;
17929  const char *__pyx_filename = NULL;
17930  int __pyx_clineno = 0;
17931  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron", 0);
17932  __Pyx_XDECREF(__pyx_r);
17933  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error)
17934  __Pyx_GOTREF(__pyx_t_1);
17935  __pyx_r = __pyx_t_1;
17936  __pyx_t_1 = 0;
17937  goto __pyx_L0;
17938 
17939  /* function exit code */
17940  __pyx_L1_error:;
17941  __Pyx_XDECREF(__pyx_t_1);
17942  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_hexahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
17943  __pyx_r = NULL;
17944  __pyx_L0:;
17945  __Pyx_XGIVEREF(__pyx_r);
17946  __Pyx_RefNannyFinishContext();
17947  return __pyx_r;
17948 }
17949 
17950 /* "cmeshTools.pyx":480
17951  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17952  *
17953  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17954  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17955  *
17956  */
17957 
17958 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17959 static void __pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17960  __Pyx_RefNannyDeclarations
17961  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral", 0);
17962 
17963  /* "cmeshTools.pyx":481
17964  *
17965  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh):
17966  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
17967  *
17968  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh):
17969  */
17970  (void)(computeGeometricInfo_quadrilateral(__pyx_v_cmesh->mesh));
17971 
17972  /* "cmeshTools.pyx":480
17973  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17974  *
17975  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17976  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17977  *
17978  */
17979 
17980  /* function exit code */
17981  __Pyx_RefNannyFinishContext();
17982 }
17983 
17984 /* Python wrapper */
17985 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17986 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17987  int __pyx_lineno = 0;
17988  const char *__pyx_filename = NULL;
17989  int __pyx_clineno = 0;
17990  PyObject *__pyx_r = 0;
17991  __Pyx_RefNannyDeclarations
17992  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral (wrapper)", 0);
17993  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 480, __pyx_L1_error)
17994  __pyx_r = __pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17995 
17996  /* function exit code */
17997  goto __pyx_L0;
17998  __pyx_L1_error:;
17999  __pyx_r = NULL;
18000  __pyx_L0:;
18001  __Pyx_RefNannyFinishContext();
18002  return __pyx_r;
18003 }
18004 
18005 static PyObject *__pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
18006  PyObject *__pyx_r = NULL;
18007  __Pyx_RefNannyDeclarations
18008  PyObject *__pyx_t_1 = NULL;
18009  int __pyx_lineno = 0;
18010  const char *__pyx_filename = NULL;
18011  int __pyx_clineno = 0;
18012  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral", 0);
18013  __Pyx_XDECREF(__pyx_r);
18014  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error)
18015  __Pyx_GOTREF(__pyx_t_1);
18016  __pyx_r = __pyx_t_1;
18017  __pyx_t_1 = 0;
18018  goto __pyx_L0;
18019 
18020  /* function exit code */
18021  __pyx_L1_error:;
18022  __Pyx_XDECREF(__pyx_t_1);
18023  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_quadrilateral", __pyx_clineno, __pyx_lineno, __pyx_filename);
18024  __pyx_r = NULL;
18025  __pyx_L0:;
18026  __Pyx_XGIVEREF(__pyx_r);
18027  __Pyx_RefNannyFinishContext();
18028  return __pyx_r;
18029 }
18030 
18031 /* "cmeshTools.pyx":483
18032  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
18033  *
18034  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
18035  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
18036  *
18037  */
18038 
18039 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18040 static void __pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
18041  __Pyx_RefNannyDeclarations
18042  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron", 0);
18043 
18044  /* "cmeshTools.pyx":484
18045  *
18046  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh):
18047  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
18048  *
18049  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh):
18050  */
18051  (void)(allocateGeometricInfo_hexahedron(__pyx_v_cmesh->mesh));
18052 
18053  /* "cmeshTools.pyx":483
18054  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
18055  *
18056  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
18057  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
18058  *
18059  */
18060 
18061  /* function exit code */
18062  __Pyx_RefNannyFinishContext();
18063 }
18064 
18065 /* Python wrapper */
18066 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18067 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
18068  int __pyx_lineno = 0;
18069  const char *__pyx_filename = NULL;
18070  int __pyx_clineno = 0;
18071  PyObject *__pyx_r = 0;
18072  __Pyx_RefNannyDeclarations
18073  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron (wrapper)", 0);
18074  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 483, __pyx_L1_error)
18075  __pyx_r = __pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
18076 
18077  /* function exit code */
18078  goto __pyx_L0;
18079  __pyx_L1_error:;
18080  __pyx_r = NULL;
18081  __pyx_L0:;
18082  __Pyx_RefNannyFinishContext();
18083  return __pyx_r;
18084 }
18085 
18086 static PyObject *__pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
18087  PyObject *__pyx_r = NULL;
18088  __Pyx_RefNannyDeclarations
18089  PyObject *__pyx_t_1 = NULL;
18090  int __pyx_lineno = 0;
18091  const char *__pyx_filename = NULL;
18092  int __pyx_clineno = 0;
18093  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron", 0);
18094  __Pyx_XDECREF(__pyx_r);
18095  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error)
18096  __Pyx_GOTREF(__pyx_t_1);
18097  __pyx_r = __pyx_t_1;
18098  __pyx_t_1 = 0;
18099  goto __pyx_L0;
18100 
18101  /* function exit code */
18102  __pyx_L1_error:;
18103  __Pyx_XDECREF(__pyx_t_1);
18104  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_hexahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
18105  __pyx_r = NULL;
18106  __pyx_L0:;
18107  __Pyx_XGIVEREF(__pyx_r);
18108  __Pyx_RefNannyFinishContext();
18109  return __pyx_r;
18110 }
18111 
18112 /* "cmeshTools.pyx":486
18113  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
18114  *
18115  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
18116  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
18117  *
18118  */
18119 
18120 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18121 static void __pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
18122  __Pyx_RefNannyDeclarations
18123  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral", 0);
18124 
18125  /* "cmeshTools.pyx":487
18126  *
18127  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh):
18128  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
18129  *
18130  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh):
18131  */
18132  (void)(allocateGeometricInfo_quadrilateral(__pyx_v_cmesh->mesh));
18133 
18134  /* "cmeshTools.pyx":486
18135  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
18136  *
18137  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
18138  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
18139  *
18140  */
18141 
18142  /* function exit code */
18143  __Pyx_RefNannyFinishContext();
18144 }
18145 
18146 /* Python wrapper */
18147 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18148 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
18149  int __pyx_lineno = 0;
18150  const char *__pyx_filename = NULL;
18151  int __pyx_clineno = 0;
18152  PyObject *__pyx_r = 0;
18153  __Pyx_RefNannyDeclarations
18154  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral (wrapper)", 0);
18155  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 486, __pyx_L1_error)
18156  __pyx_r = __pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
18157 
18158  /* function exit code */
18159  goto __pyx_L0;
18160  __pyx_L1_error:;
18161  __pyx_r = NULL;
18162  __pyx_L0:;
18163  __Pyx_RefNannyFinishContext();
18164  return __pyx_r;
18165 }
18166 
18167 static PyObject *__pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
18168  PyObject *__pyx_r = NULL;
18169  __Pyx_RefNannyDeclarations
18170  PyObject *__pyx_t_1 = NULL;
18171  int __pyx_lineno = 0;
18172  const char *__pyx_filename = NULL;
18173  int __pyx_clineno = 0;
18174  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral", 0);
18175  __Pyx_XDECREF(__pyx_r);
18176  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 486, __pyx_L1_error)
18177  __Pyx_GOTREF(__pyx_t_1);
18178  __pyx_r = __pyx_t_1;
18179  __pyx_t_1 = 0;
18180  goto __pyx_L0;
18181 
18182  /* function exit code */
18183  __pyx_L1_error:;
18184  __Pyx_XDECREF(__pyx_t_1);
18185  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_quadrilateral", __pyx_clineno, __pyx_lineno, __pyx_filename);
18186  __pyx_r = NULL;
18187  __pyx_L0:;
18188  __Pyx_XGIVEREF(__pyx_r);
18189  __Pyx_RefNannyFinishContext();
18190  return __pyx_r;
18191 }
18192 
18193 /* "cmeshTools.pyx":489
18194  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
18195  *
18196  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
18197  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
18198  *
18199  */
18200 
18201 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18202 static void __pyx_f_10cmeshTools_computeGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
18203  __Pyx_RefNannyDeclarations
18204  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS", 0);
18205 
18206  /* "cmeshTools.pyx":490
18207  *
18208  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh):
18209  * cppm.computeGeometricInfo_NURBS(cmesh.mesh); # <<<<<<<<<<<<<<
18210  *
18211  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh):
18212  */
18213  (void)(computeGeometricInfo_NURBS(__pyx_v_cmesh->mesh));
18214 
18215  /* "cmeshTools.pyx":489
18216  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
18217  *
18218  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
18219  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
18220  *
18221  */
18222 
18223  /* function exit code */
18224  __Pyx_RefNannyFinishContext();
18225 }
18226 
18227 /* Python wrapper */
18228 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18229 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
18230  int __pyx_lineno = 0;
18231  const char *__pyx_filename = NULL;
18232  int __pyx_clineno = 0;
18233  PyObject *__pyx_r = 0;
18234  __Pyx_RefNannyDeclarations
18235  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS (wrapper)", 0);
18236  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 489, __pyx_L1_error)
18237  __pyx_r = __pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
18238 
18239  /* function exit code */
18240  goto __pyx_L0;
18241  __pyx_L1_error:;
18242  __pyx_r = NULL;
18243  __pyx_L0:;
18244  __Pyx_RefNannyFinishContext();
18245  return __pyx_r;
18246 }
18247 
18248 static PyObject *__pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
18249  PyObject *__pyx_r = NULL;
18250  __Pyx_RefNannyDeclarations
18251  PyObject *__pyx_t_1 = NULL;
18252  int __pyx_lineno = 0;
18253  const char *__pyx_filename = NULL;
18254  int __pyx_clineno = 0;
18255  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS", 0);
18256  __Pyx_XDECREF(__pyx_r);
18257  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_NURBS(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L1_error)
18258  __Pyx_GOTREF(__pyx_t_1);
18259  __pyx_r = __pyx_t_1;
18260  __pyx_t_1 = 0;
18261  goto __pyx_L0;
18262 
18263  /* function exit code */
18264  __pyx_L1_error:;
18265  __Pyx_XDECREF(__pyx_t_1);
18266  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_NURBS", __pyx_clineno, __pyx_lineno, __pyx_filename);
18267  __pyx_r = NULL;
18268  __pyx_L0:;
18269  __Pyx_XGIVEREF(__pyx_r);
18270  __Pyx_RefNannyFinishContext();
18271  return __pyx_r;
18272 }
18273 
18274 /* "cmeshTools.pyx":492
18275  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
18276  *
18277  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
18278  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
18279  *
18280  */
18281 
18282 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18283 static void __pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
18284  __Pyx_RefNannyDeclarations
18285  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS", 0);
18286 
18287  /* "cmeshTools.pyx":493
18288  *
18289  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh):
18290  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh); # <<<<<<<<<<<<<<
18291  *
18292  * def locallyRefineMultilevelMesh(int nSpace,
18293  */
18294  (void)(allocateGeometricInfo_NURBS(__pyx_v_cmesh->mesh));
18295 
18296  /* "cmeshTools.pyx":492
18297  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
18298  *
18299  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
18300  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
18301  *
18302  */
18303 
18304  /* function exit code */
18305  __Pyx_RefNannyFinishContext();
18306 }
18307 
18308 /* Python wrapper */
18309 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
18310 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
18311  int __pyx_lineno = 0;
18312  const char *__pyx_filename = NULL;
18313  int __pyx_clineno = 0;
18314  PyObject *__pyx_r = 0;
18315  __Pyx_RefNannyDeclarations
18316  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS (wrapper)", 0);
18317  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 492, __pyx_L1_error)
18318  __pyx_r = __pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
18319 
18320  /* function exit code */
18321  goto __pyx_L0;
18322  __pyx_L1_error:;
18323  __pyx_r = NULL;
18324  __pyx_L0:;
18325  __Pyx_RefNannyFinishContext();
18326  return __pyx_r;
18327 }
18328 
18329 static PyObject *__pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
18330  PyObject *__pyx_r = NULL;
18331  __Pyx_RefNannyDeclarations
18332  PyObject *__pyx_t_1 = NULL;
18333  int __pyx_lineno = 0;
18334  const char *__pyx_filename = NULL;
18335  int __pyx_clineno = 0;
18336  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS", 0);
18337  __Pyx_XDECREF(__pyx_r);
18338  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
18339  __Pyx_GOTREF(__pyx_t_1);
18340  __pyx_r = __pyx_t_1;
18341  __pyx_t_1 = 0;
18342  goto __pyx_L0;
18343 
18344  /* function exit code */
18345  __pyx_L1_error:;
18346  __Pyx_XDECREF(__pyx_t_1);
18347  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_NURBS", __pyx_clineno, __pyx_lineno, __pyx_filename);
18348  __pyx_r = NULL;
18349  __pyx_L0:;
18350  __Pyx_XGIVEREF(__pyx_r);
18351  __Pyx_RefNannyFinishContext();
18352  return __pyx_r;
18353 }
18354 
18355 /* "cmeshTools.pyx":495
18356  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
18357  *
18358  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
18359  * CMultilevelMesh cmultilevelMesh,
18360  * np.ndarray elementTagArray,
18361  */
18362 
18363 /* Python wrapper */
18364 static PyObject *__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18365 static PyMethodDef __pyx_mdef_10cmeshTools_67locallyRefineMultilevelMesh = {"locallyRefineMultilevelMesh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh, METH_VARARGS|METH_KEYWORDS, 0};
18366 static PyObject *__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18367  int __pyx_v_nSpace;
18368  struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh = 0;
18369  PyArrayObject *__pyx_v_elementTagArray = 0;
18370  int __pyx_v_refineTypeFlag;
18371  int __pyx_lineno = 0;
18372  const char *__pyx_filename = NULL;
18373  int __pyx_clineno = 0;
18374  PyObject *__pyx_r = 0;
18375  __Pyx_RefNannyDeclarations
18376  __Pyx_RefNannySetupContext("locallyRefineMultilevelMesh (wrapper)", 0);
18377  {
18378  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_cmultilevelMesh,&__pyx_n_s_elementTagArray,&__pyx_n_s_refineTypeFlag,0};
18379  PyObject* values[4] = {0,0,0,0};
18380  if (unlikely(__pyx_kwds)) {
18381  Py_ssize_t kw_args;
18382  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18383  switch (pos_args) {
18384  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18385  CYTHON_FALLTHROUGH;
18386  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18387  CYTHON_FALLTHROUGH;
18388  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18389  CYTHON_FALLTHROUGH;
18390  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18391  CYTHON_FALLTHROUGH;
18392  case 0: break;
18393  default: goto __pyx_L5_argtuple_error;
18394  }
18395  kw_args = PyDict_Size(__pyx_kwds);
18396  switch (pos_args) {
18397  case 0:
18398  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
18399  else goto __pyx_L5_argtuple_error;
18400  CYTHON_FALLTHROUGH;
18401  case 1:
18402  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmultilevelMesh)) != 0)) kw_args--;
18403  else {
18404  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, 1); __PYX_ERR(1, 495, __pyx_L3_error)
18405  }
18406  CYTHON_FALLTHROUGH;
18407  case 2:
18408  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementTagArray)) != 0)) kw_args--;
18409  else {
18410  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, 2); __PYX_ERR(1, 495, __pyx_L3_error)
18411  }
18412  CYTHON_FALLTHROUGH;
18413  case 3:
18414  if (kw_args > 0) {
18415  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_refineTypeFlag);
18416  if (value) { values[3] = value; kw_args--; }
18417  }
18418  }
18419  if (unlikely(kw_args > 0)) {
18420  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "locallyRefineMultilevelMesh") < 0)) __PYX_ERR(1, 495, __pyx_L3_error)
18421  }
18422  } else {
18423  switch (PyTuple_GET_SIZE(__pyx_args)) {
18424  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18425  CYTHON_FALLTHROUGH;
18426  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18427  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18428  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18429  break;
18430  default: goto __pyx_L5_argtuple_error;
18431  }
18432  }
18433  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 495, __pyx_L3_error)
18434  __pyx_v_cmultilevelMesh = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)values[1]);
18435  __pyx_v_elementTagArray = ((PyArrayObject *)values[2]);
18436  if (values[3]) {
18437  __pyx_v_refineTypeFlag = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_refineTypeFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 498, __pyx_L3_error)
18438  } else {
18439  __pyx_v_refineTypeFlag = ((int)0);
18440  }
18441  }
18442  goto __pyx_L4_argument_unpacking_done;
18443  __pyx_L5_argtuple_error:;
18444  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 495, __pyx_L3_error)
18445  __pyx_L3_error:;
18446  __Pyx_AddTraceback("cmeshTools.locallyRefineMultilevelMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18447  __Pyx_RefNannyFinishContext();
18448  return NULL;
18449  __pyx_L4_argument_unpacking_done:;
18450  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmultilevelMesh), __pyx_ptype_10cmeshTools_CMultilevelMesh, 1, "cmultilevelMesh", 0))) __PYX_ERR(1, 496, __pyx_L1_error)
18451  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementTagArray), __pyx_ptype_5numpy_ndarray, 1, "elementTagArray", 0))) __PYX_ERR(1, 497, __pyx_L1_error)
18452  __pyx_r = __pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(__pyx_self, __pyx_v_nSpace, __pyx_v_cmultilevelMesh, __pyx_v_elementTagArray, __pyx_v_refineTypeFlag);
18453 
18454  /* function exit code */
18455  goto __pyx_L0;
18456  __pyx_L1_error:;
18457  __pyx_r = NULL;
18458  __pyx_L0:;
18459  __Pyx_RefNannyFinishContext();
18460  return __pyx_r;
18461 }
18462 
18463 static PyObject *__pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh, PyArrayObject *__pyx_v_elementTagArray, int __pyx_v_refineTypeFlag) {
18464  CYTHON_UNUSED int __pyx_v_failed;
18465  int __pyx_v_finestLevel;
18466  PyObject *__pyx_r = NULL;
18467  __Pyx_RefNannyDeclarations
18468  int __pyx_t_1;
18469  int __pyx_t_2;
18470  PyObject *__pyx_t_3 = NULL;
18471  PyObject *__pyx_t_4 = NULL;
18472  PyObject *__pyx_t_5 = NULL;
18473  PyObject *__pyx_t_6 = NULL;
18474  int __pyx_lineno = 0;
18475  const char *__pyx_filename = NULL;
18476  int __pyx_clineno = 0;
18477  __Pyx_RefNannySetupContext("locallyRefineMultilevelMesh", 0);
18478 
18479  /* "cmeshTools.pyx":500
18480  * int refineTypeFlag=0):
18481  * cdef int failed,finestLevel
18482  * if nSpace == 1: # <<<<<<<<<<<<<<
18483  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
18484  * <int*>(elementTagArray.data))
18485  */
18486  switch (__pyx_v_nSpace) {
18487  case 1:
18488 
18489  /* "cmeshTools.pyx":501
18490  * cdef int failed,finestLevel
18491  * if nSpace == 1:
18492  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
18493  * <int*>(elementTagArray.data))
18494  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18495  */
18496  __pyx_v_failed = locallyRefineEdgeMesh(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
18497 
18498  /* "cmeshTools.pyx":503
18499  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
18500  * <int*>(elementTagArray.data))
18501  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels # <<<<<<<<<<<<<<
18502  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18503  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18504  */
18505  __pyx_t_1 = __pyx_v_cmultilevelMesh->multilevelMesh.nLevels;
18506  __pyx_v_finestLevel = __pyx_t_1;
18507 
18508  /* "cmeshTools.pyx":504
18509  * <int*>(elementTagArray.data))
18510  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18511  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18512  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18513  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18514  */
18515  (void)(constructElementBoundaryElementsArray_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18516 
18517  /* "cmeshTools.pyx":505
18518  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18519  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18520  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18521  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18522  * if finestLevel > 1:
18523  */
18524  (void)(allocateGeometricInfo_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18525 
18526  /* "cmeshTools.pyx":506
18527  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18528  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18529  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18530  * if finestLevel > 1:
18531  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18532  */
18533  (void)(computeGeometricInfo_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18534 
18535  /* "cmeshTools.pyx":507
18536  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18537  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18538  * if finestLevel > 1: # <<<<<<<<<<<<<<
18539  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18540  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18541  */
18542  __pyx_t_2 = ((__pyx_v_finestLevel > 1) != 0);
18543  if (__pyx_t_2) {
18544 
18545  /* "cmeshTools.pyx":508
18546  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18547  * if finestLevel > 1:
18548  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2], # <<<<<<<<<<<<<<
18549  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18550  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18551  */
18552  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 2)]), (__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)]), (__pyx_v_cmultilevelMesh->multilevelMesh.elementParentsArray[(__pyx_v_finestLevel - 1)]), 1));
18553 
18554  /* "cmeshTools.pyx":507
18555  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18556  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18557  * if finestLevel > 1: # <<<<<<<<<<<<<<
18558  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18559  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18560  */
18561  }
18562 
18563  /* "cmeshTools.pyx":500
18564  * int refineTypeFlag=0):
18565  * cdef int failed,finestLevel
18566  * if nSpace == 1: # <<<<<<<<<<<<<<
18567  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
18568  * <int*>(elementTagArray.data))
18569  */
18570  break;
18571  case 2:
18572 
18573  /* "cmeshTools.pyx":513
18574  * 1)
18575  * elif nSpace == 2:
18576  * if refineTypeFlag==1: # <<<<<<<<<<<<<<
18577  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
18578  * <int*>(elementTagArray.data))
18579  */
18580  switch (__pyx_v_refineTypeFlag) {
18581  case 1:
18582 
18583  /* "cmeshTools.pyx":514
18584  * elif nSpace == 2:
18585  * if refineTypeFlag==1:
18586  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
18587  * <int*>(elementTagArray.data))
18588  * elif refineTypeFlag==2:
18589  */
18590  __pyx_v_failed = locallyRefineTriangleMesh_4T(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
18591 
18592  /* "cmeshTools.pyx":513
18593  * 1)
18594  * elif nSpace == 2:
18595  * if refineTypeFlag==1: # <<<<<<<<<<<<<<
18596  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
18597  * <int*>(elementTagArray.data))
18598  */
18599  break;
18600  case 2:
18601 
18602  /* "cmeshTools.pyx":517
18603  * <int*>(elementTagArray.data))
18604  * elif refineTypeFlag==2:
18605  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data)) # <<<<<<<<<<<<<<
18606  * else:
18607  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh,
18608  */
18609  __pyx_v_failed = locallyRefineTriangleMesh_redGreen(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
18610 
18611  /* "cmeshTools.pyx":516
18612  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
18613  * <int*>(elementTagArray.data))
18614  * elif refineTypeFlag==2: # <<<<<<<<<<<<<<
18615  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data))
18616  * else:
18617  */
18618  break;
18619  default:
18620 
18621  /* "cmeshTools.pyx":519
18622  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data))
18623  * else:
18624  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
18625  * <int*>(elementTagArray.data))
18626  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18627  */
18628  __pyx_v_failed = locallyRefineTriangleMesh(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
18629  break;
18630  }
18631 
18632  /* "cmeshTools.pyx":521
18633  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh,
18634  * <int*>(elementTagArray.data))
18635  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels # <<<<<<<<<<<<<<
18636  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18637  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18638  */
18639  __pyx_t_1 = __pyx_v_cmultilevelMesh->multilevelMesh.nLevels;
18640  __pyx_v_finestLevel = __pyx_t_1;
18641 
18642  /* "cmeshTools.pyx":522
18643  * <int*>(elementTagArray.data))
18644  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18645  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18646  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18647  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18648  */
18649  (void)(constructElementBoundaryElementsArray_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18650 
18651  /* "cmeshTools.pyx":523
18652  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18653  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18654  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18655  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18656  * if finestLevel > 1:
18657  */
18658  (void)(allocateGeometricInfo_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18659 
18660  /* "cmeshTools.pyx":524
18661  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18662  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18663  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18664  * if finestLevel > 1:
18665  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18666  */
18667  (void)(computeGeometricInfo_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18668 
18669  /* "cmeshTools.pyx":525
18670  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18671  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18672  * if finestLevel > 1: # <<<<<<<<<<<<<<
18673  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18674  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18675  */
18676  __pyx_t_2 = ((__pyx_v_finestLevel > 1) != 0);
18677  if (__pyx_t_2) {
18678 
18679  /* "cmeshTools.pyx":526
18680  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18681  * if finestLevel > 1:
18682  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2], # <<<<<<<<<<<<<<
18683  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18684  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18685  */
18686  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 2)]), (__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)]), (__pyx_v_cmultilevelMesh->multilevelMesh.elementParentsArray[(__pyx_v_finestLevel - 1)]), 2));
18687 
18688  /* "cmeshTools.pyx":525
18689  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18690  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18691  * if finestLevel > 1: # <<<<<<<<<<<<<<
18692  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18693  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18694  */
18695  }
18696 
18697  /* "cmeshTools.pyx":512
18698  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18699  * 1)
18700  * elif nSpace == 2: # <<<<<<<<<<<<<<
18701  * if refineTypeFlag==1:
18702  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
18703  */
18704  break;
18705  default:
18706 
18707  /* "cmeshTools.pyx":531
18708  * 2)
18709  * else:
18710  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace)) # <<<<<<<<<<<<<<
18711  *
18712  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18713  */
18714  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 531, __pyx_L1_error)
18715  __Pyx_GOTREF(__pyx_t_4);
18716  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 531, __pyx_L1_error)
18717  __Pyx_GOTREF(__pyx_t_5);
18718  __pyx_t_6 = NULL;
18719  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18720  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
18721  if (likely(__pyx_t_6)) {
18722  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18723  __Pyx_INCREF(__pyx_t_6);
18724  __Pyx_INCREF(function);
18725  __Pyx_DECREF_SET(__pyx_t_4, function);
18726  }
18727  }
18728  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
18729  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18730  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18731  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 531, __pyx_L1_error)
18732  __Pyx_GOTREF(__pyx_t_3);
18733  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18734  if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(1, 531, __pyx_L1_error)
18735  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18736  break;
18737  }
18738 
18739  /* "cmeshTools.pyx":495
18740  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
18741  *
18742  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
18743  * CMultilevelMesh cmultilevelMesh,
18744  * np.ndarray elementTagArray,
18745  */
18746 
18747  /* function exit code */
18748  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18749  goto __pyx_L0;
18750  __pyx_L1_error:;
18751  __Pyx_XDECREF(__pyx_t_3);
18752  __Pyx_XDECREF(__pyx_t_4);
18753  __Pyx_XDECREF(__pyx_t_5);
18754  __Pyx_XDECREF(__pyx_t_6);
18755  __Pyx_AddTraceback("cmeshTools.locallyRefineMultilevelMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18756  __pyx_r = NULL;
18757  __pyx_L0:;
18758  __Pyx_XGIVEREF(__pyx_r);
18759  __Pyx_RefNannyFinishContext();
18760  return __pyx_r;
18761 }
18762 
18763 /* "cmeshTools.pyx":533
18764  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
18765  *
18766  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
18767  * if nSpace == 2:
18768  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18769  */
18770 
18771 /* Python wrapper */
18772 static PyObject *__pyx_pw_10cmeshTools_69setNewestNodeBases(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18773 static PyMethodDef __pyx_mdef_10cmeshTools_69setNewestNodeBases = {"setNewestNodeBases", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_69setNewestNodeBases, METH_VARARGS|METH_KEYWORDS, 0};
18774 static PyObject *__pyx_pw_10cmeshTools_69setNewestNodeBases(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18775  int __pyx_v_nSpace;
18776  struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh = 0;
18777  int __pyx_lineno = 0;
18778  const char *__pyx_filename = NULL;
18779  int __pyx_clineno = 0;
18780  PyObject *__pyx_r = 0;
18781  __Pyx_RefNannyDeclarations
18782  __Pyx_RefNannySetupContext("setNewestNodeBases (wrapper)", 0);
18783  {
18784  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_cmultilevelMesh,0};
18785  PyObject* values[2] = {0,0};
18786  if (unlikely(__pyx_kwds)) {
18787  Py_ssize_t kw_args;
18788  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18789  switch (pos_args) {
18790  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18791  CYTHON_FALLTHROUGH;
18792  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18793  CYTHON_FALLTHROUGH;
18794  case 0: break;
18795  default: goto __pyx_L5_argtuple_error;
18796  }
18797  kw_args = PyDict_Size(__pyx_kwds);
18798  switch (pos_args) {
18799  case 0:
18800  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
18801  else goto __pyx_L5_argtuple_error;
18802  CYTHON_FALLTHROUGH;
18803  case 1:
18804  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmultilevelMesh)) != 0)) kw_args--;
18805  else {
18806  __Pyx_RaiseArgtupleInvalid("setNewestNodeBases", 1, 2, 2, 1); __PYX_ERR(1, 533, __pyx_L3_error)
18807  }
18808  }
18809  if (unlikely(kw_args > 0)) {
18810  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNewestNodeBases") < 0)) __PYX_ERR(1, 533, __pyx_L3_error)
18811  }
18812  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18813  goto __pyx_L5_argtuple_error;
18814  } else {
18815  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18816  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18817  }
18818  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 533, __pyx_L3_error)
18819  __pyx_v_cmultilevelMesh = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)values[1]);
18820  }
18821  goto __pyx_L4_argument_unpacking_done;
18822  __pyx_L5_argtuple_error:;
18823  __Pyx_RaiseArgtupleInvalid("setNewestNodeBases", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 533, __pyx_L3_error)
18824  __pyx_L3_error:;
18825  __Pyx_AddTraceback("cmeshTools.setNewestNodeBases", __pyx_clineno, __pyx_lineno, __pyx_filename);
18826  __Pyx_RefNannyFinishContext();
18827  return NULL;
18828  __pyx_L4_argument_unpacking_done:;
18829  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmultilevelMesh), __pyx_ptype_10cmeshTools_CMultilevelMesh, 1, "cmultilevelMesh", 0))) __PYX_ERR(1, 533, __pyx_L1_error)
18830  __pyx_r = __pyx_pf_10cmeshTools_68setNewestNodeBases(__pyx_self, __pyx_v_nSpace, __pyx_v_cmultilevelMesh);
18831 
18832  /* function exit code */
18833  goto __pyx_L0;
18834  __pyx_L1_error:;
18835  __pyx_r = NULL;
18836  __pyx_L0:;
18837  __Pyx_RefNannyFinishContext();
18838  return __pyx_r;
18839 }
18840 
18841 static PyObject *__pyx_pf_10cmeshTools_68setNewestNodeBases(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh) {
18842  CYTHON_UNUSED int __pyx_v_failed;
18843  PyObject *__pyx_r = NULL;
18844  __Pyx_RefNannyDeclarations
18845  int __pyx_t_1;
18846  PyObject *__pyx_t_2 = NULL;
18847  PyObject *__pyx_t_3 = NULL;
18848  PyObject *__pyx_t_4 = NULL;
18849  PyObject *__pyx_t_5 = NULL;
18850  int __pyx_lineno = 0;
18851  const char *__pyx_filename = NULL;
18852  int __pyx_clineno = 0;
18853  __Pyx_RefNannySetupContext("setNewestNodeBases", 0);
18854 
18855  /* "cmeshTools.pyx":534
18856  *
18857  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18858  * if nSpace == 2: # <<<<<<<<<<<<<<
18859  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18860  * else:
18861  */
18862  __pyx_t_1 = ((__pyx_v_nSpace == 2) != 0);
18863  if (__pyx_t_1) {
18864 
18865  /* "cmeshTools.pyx":535
18866  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18867  * if nSpace == 2:
18868  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh) # <<<<<<<<<<<<<<
18869  * else:
18870  * print("setNewestNodeBases= {0:d} not implemented! Returning".format(nSpace))
18871  */
18872  __pyx_v_failed = setNewestNodeBasesToLongestEdge(__pyx_v_cmultilevelMesh->multilevelMesh);
18873 
18874  /* "cmeshTools.pyx":534
18875  *
18876  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18877  * if nSpace == 2: # <<<<<<<<<<<<<<
18878  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18879  * else:
18880  */
18881  goto __pyx_L3;
18882  }
18883 
18884  /* "cmeshTools.pyx":537
18885  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18886  * else:
18887  * print("setNewestNodeBases= {0:d} not implemented! Returning".format(nSpace)) # <<<<<<<<<<<<<<
18888  */
18889  /*else*/ {
18890  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_setNewestNodeBases_0_d_not_imple, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 537, __pyx_L1_error)
18891  __Pyx_GOTREF(__pyx_t_3);
18892  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 537, __pyx_L1_error)
18893  __Pyx_GOTREF(__pyx_t_4);
18894  __pyx_t_5 = NULL;
18895  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
18896  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
18897  if (likely(__pyx_t_5)) {
18898  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18899  __Pyx_INCREF(__pyx_t_5);
18900  __Pyx_INCREF(function);
18901  __Pyx_DECREF_SET(__pyx_t_3, function);
18902  }
18903  }
18904  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
18905  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18906  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18907  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 537, __pyx_L1_error)
18908  __Pyx_GOTREF(__pyx_t_2);
18909  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18910  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(1, 537, __pyx_L1_error)
18911  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18912  }
18913  __pyx_L3:;
18914 
18915  /* "cmeshTools.pyx":533
18916  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
18917  *
18918  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
18919  * if nSpace == 2:
18920  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18921  */
18922 
18923  /* function exit code */
18924  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18925  goto __pyx_L0;
18926  __pyx_L1_error:;
18927  __Pyx_XDECREF(__pyx_t_2);
18928  __Pyx_XDECREF(__pyx_t_3);
18929  __Pyx_XDECREF(__pyx_t_4);
18930  __Pyx_XDECREF(__pyx_t_5);
18931  __Pyx_AddTraceback("cmeshTools.setNewestNodeBases", __pyx_clineno, __pyx_lineno, __pyx_filename);
18932  __pyx_r = NULL;
18933  __pyx_L0:;
18934  __Pyx_XGIVEREF(__pyx_r);
18935  __Pyx_RefNannyFinishContext();
18936  return __pyx_r;
18937 }
18938 
18939 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
18940  * ctypedef npy_cdouble complex_t
18941  *
18942  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
18943  * return PyArray_MultiIterNew(1, <void*>a)
18944  *
18945  */
18946 
18947 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
18948  PyObject *__pyx_r = NULL;
18949  __Pyx_RefNannyDeclarations
18950  PyObject *__pyx_t_1 = NULL;
18951  int __pyx_lineno = 0;
18952  const char *__pyx_filename = NULL;
18953  int __pyx_clineno = 0;
18954  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
18955 
18956  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
18957  *
18958  * cdef inline object PyArray_MultiIterNew1(a):
18959  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
18960  *
18961  * cdef inline object PyArray_MultiIterNew2(a, b):
18962  */
18963  __Pyx_XDECREF(__pyx_r);
18964  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 736, __pyx_L1_error)
18965  __Pyx_GOTREF(__pyx_t_1);
18966  __pyx_r = __pyx_t_1;
18967  __pyx_t_1 = 0;
18968  goto __pyx_L0;
18969 
18970  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
18971  * ctypedef npy_cdouble complex_t
18972  *
18973  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
18974  * return PyArray_MultiIterNew(1, <void*>a)
18975  *
18976  */
18977 
18978  /* function exit code */
18979  __pyx_L1_error:;
18980  __Pyx_XDECREF(__pyx_t_1);
18981  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
18982  __pyx_r = 0;
18983  __pyx_L0:;
18984  __Pyx_XGIVEREF(__pyx_r);
18985  __Pyx_RefNannyFinishContext();
18986  return __pyx_r;
18987 }
18988 
18989 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
18990  * return PyArray_MultiIterNew(1, <void*>a)
18991  *
18992  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
18993  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
18994  *
18995  */
18996 
18997 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
18998  PyObject *__pyx_r = NULL;
18999  __Pyx_RefNannyDeclarations
19000  PyObject *__pyx_t_1 = NULL;
19001  int __pyx_lineno = 0;
19002  const char *__pyx_filename = NULL;
19003  int __pyx_clineno = 0;
19004  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
19005 
19006  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
19007  *
19008  * cdef inline object PyArray_MultiIterNew2(a, b):
19009  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
19010  *
19011  * cdef inline object PyArray_MultiIterNew3(a, b, c):
19012  */
19013  __Pyx_XDECREF(__pyx_r);
19014  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 739, __pyx_L1_error)
19015  __Pyx_GOTREF(__pyx_t_1);
19016  __pyx_r = __pyx_t_1;
19017  __pyx_t_1 = 0;
19018  goto __pyx_L0;
19019 
19020  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
19021  * return PyArray_MultiIterNew(1, <void*>a)
19022  *
19023  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19024  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19025  *
19026  */
19027 
19028  /* function exit code */
19029  __pyx_L1_error:;
19030  __Pyx_XDECREF(__pyx_t_1);
19031  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
19032  __pyx_r = 0;
19033  __pyx_L0:;
19034  __Pyx_XGIVEREF(__pyx_r);
19035  __Pyx_RefNannyFinishContext();
19036  return __pyx_r;
19037 }
19038 
19039 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
19040  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19041  *
19042  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19043  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19044  *
19045  */
19046 
19047 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
19048  PyObject *__pyx_r = NULL;
19049  __Pyx_RefNannyDeclarations
19050  PyObject *__pyx_t_1 = NULL;
19051  int __pyx_lineno = 0;
19052  const char *__pyx_filename = NULL;
19053  int __pyx_clineno = 0;
19054  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
19055 
19056  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
19057  *
19058  * cdef inline object PyArray_MultiIterNew3(a, b, c):
19059  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
19060  *
19061  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19062  */
19063  __Pyx_XDECREF(__pyx_r);
19064  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 742, __pyx_L1_error)
19065  __Pyx_GOTREF(__pyx_t_1);
19066  __pyx_r = __pyx_t_1;
19067  __pyx_t_1 = 0;
19068  goto __pyx_L0;
19069 
19070  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
19071  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19072  *
19073  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19074  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19075  *
19076  */
19077 
19078  /* function exit code */
19079  __pyx_L1_error:;
19080  __Pyx_XDECREF(__pyx_t_1);
19081  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19082  __pyx_r = 0;
19083  __pyx_L0:;
19084  __Pyx_XGIVEREF(__pyx_r);
19085  __Pyx_RefNannyFinishContext();
19086  return __pyx_r;
19087 }
19088 
19089 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
19090  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19091  *
19092  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19093  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19094  *
19095  */
19096 
19097 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
19098  PyObject *__pyx_r = NULL;
19099  __Pyx_RefNannyDeclarations
19100  PyObject *__pyx_t_1 = NULL;
19101  int __pyx_lineno = 0;
19102  const char *__pyx_filename = NULL;
19103  int __pyx_clineno = 0;
19104  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
19105 
19106  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
19107  *
19108  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19109  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
19110  *
19111  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19112  */
19113  __Pyx_XDECREF(__pyx_r);
19114  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 745, __pyx_L1_error)
19115  __Pyx_GOTREF(__pyx_t_1);
19116  __pyx_r = __pyx_t_1;
19117  __pyx_t_1 = 0;
19118  goto __pyx_L0;
19119 
19120  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
19121  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19122  *
19123  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19124  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19125  *
19126  */
19127 
19128  /* function exit code */
19129  __pyx_L1_error:;
19130  __Pyx_XDECREF(__pyx_t_1);
19131  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
19132  __pyx_r = 0;
19133  __pyx_L0:;
19134  __Pyx_XGIVEREF(__pyx_r);
19135  __Pyx_RefNannyFinishContext();
19136  return __pyx_r;
19137 }
19138 
19139 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
19140  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19141  *
19142  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19143  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19144  *
19145  */
19146 
19147 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
19148  PyObject *__pyx_r = NULL;
19149  __Pyx_RefNannyDeclarations
19150  PyObject *__pyx_t_1 = NULL;
19151  int __pyx_lineno = 0;
19152  const char *__pyx_filename = NULL;
19153  int __pyx_clineno = 0;
19154  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
19155 
19156  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
19157  *
19158  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19159  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
19160  *
19161  * cdef inline tuple PyDataType_SHAPE(dtype d):
19162  */
19163  __Pyx_XDECREF(__pyx_r);
19164  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 748, __pyx_L1_error)
19165  __Pyx_GOTREF(__pyx_t_1);
19166  __pyx_r = __pyx_t_1;
19167  __pyx_t_1 = 0;
19168  goto __pyx_L0;
19169 
19170  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
19171  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19172  *
19173  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19174  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19175  *
19176  */
19177 
19178  /* function exit code */
19179  __pyx_L1_error:;
19180  __Pyx_XDECREF(__pyx_t_1);
19181  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
19182  __pyx_r = 0;
19183  __pyx_L0:;
19184  __Pyx_XGIVEREF(__pyx_r);
19185  __Pyx_RefNannyFinishContext();
19186  return __pyx_r;
19187 }
19188 
19189 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
19190  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19191  *
19192  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19193  * if PyDataType_HASSUBARRAY(d):
19194  * return <tuple>d.subarray.shape
19195  */
19196 
19197 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
19198  PyObject *__pyx_r = NULL;
19199  __Pyx_RefNannyDeclarations
19200  int __pyx_t_1;
19201  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
19202 
19203  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
19204  *
19205  * cdef inline tuple PyDataType_SHAPE(dtype d):
19206  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19207  * return <tuple>d.subarray.shape
19208  * else:
19209  */
19210  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
19211  if (__pyx_t_1) {
19212 
19213  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
19214  * cdef inline tuple PyDataType_SHAPE(dtype d):
19215  * if PyDataType_HASSUBARRAY(d):
19216  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
19217  * else:
19218  * return ()
19219  */
19220  __Pyx_XDECREF(__pyx_r);
19221  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
19222  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
19223  goto __pyx_L0;
19224 
19225  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
19226  *
19227  * cdef inline tuple PyDataType_SHAPE(dtype d):
19228  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19229  * return <tuple>d.subarray.shape
19230  * else:
19231  */
19232  }
19233 
19234  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
19235  * return <tuple>d.subarray.shape
19236  * else:
19237  * return () # <<<<<<<<<<<<<<
19238  *
19239  *
19240  */
19241  /*else*/ {
19242  __Pyx_XDECREF(__pyx_r);
19243  __Pyx_INCREF(__pyx_empty_tuple);
19244  __pyx_r = __pyx_empty_tuple;
19245  goto __pyx_L0;
19246  }
19247 
19248  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
19249  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19250  *
19251  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19252  * if PyDataType_HASSUBARRAY(d):
19253  * return <tuple>d.subarray.shape
19254  */
19255 
19256  /* function exit code */
19257  __pyx_L0:;
19258  __Pyx_XGIVEREF(__pyx_r);
19259  __Pyx_RefNannyFinishContext();
19260  return __pyx_r;
19261 }
19262 
19263 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
19264  * int _import_umath() except -1
19265  *
19266  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
19267  * Py_INCREF(base) # important to do this before stealing the reference below!
19268  * PyArray_SetBaseObject(arr, base)
19269  */
19270 
19271 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
19272  __Pyx_RefNannyDeclarations
19273  __Pyx_RefNannySetupContext("set_array_base", 0);
19274 
19275  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
19276  *
19277  * cdef inline void set_array_base(ndarray arr, object base):
19278  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
19279  * PyArray_SetBaseObject(arr, base)
19280  *
19281  */
19282  Py_INCREF(__pyx_v_base);
19283 
19284  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
19285  * cdef inline void set_array_base(ndarray arr, object base):
19286  * Py_INCREF(base) # important to do this before stealing the reference below!
19287  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
19288  *
19289  * cdef inline object get_array_base(ndarray arr):
19290  */
19291  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
19292 
19293  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
19294  * int _import_umath() except -1
19295  *
19296  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
19297  * Py_INCREF(base) # important to do this before stealing the reference below!
19298  * PyArray_SetBaseObject(arr, base)
19299  */
19300 
19301  /* function exit code */
19302  __Pyx_RefNannyFinishContext();
19303 }
19304 
19305 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
19306  * PyArray_SetBaseObject(arr, base)
19307  *
19308  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
19309  * base = PyArray_BASE(arr)
19310  * if base is NULL:
19311  */
19312 
19313 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
19314  PyObject *__pyx_v_base;
19315  PyObject *__pyx_r = NULL;
19316  __Pyx_RefNannyDeclarations
19317  int __pyx_t_1;
19318  __Pyx_RefNannySetupContext("get_array_base", 0);
19319 
19320  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
19321  *
19322  * cdef inline object get_array_base(ndarray arr):
19323  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
19324  * if base is NULL:
19325  * return None
19326  */
19327  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
19328 
19329  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
19330  * cdef inline object get_array_base(ndarray arr):
19331  * base = PyArray_BASE(arr)
19332  * if base is NULL: # <<<<<<<<<<<<<<
19333  * return None
19334  * return <object>base
19335  */
19336  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
19337  if (__pyx_t_1) {
19338 
19339  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
19340  * base = PyArray_BASE(arr)
19341  * if base is NULL:
19342  * return None # <<<<<<<<<<<<<<
19343  * return <object>base
19344  *
19345  */
19346  __Pyx_XDECREF(__pyx_r);
19347  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19348  goto __pyx_L0;
19349 
19350  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
19351  * cdef inline object get_array_base(ndarray arr):
19352  * base = PyArray_BASE(arr)
19353  * if base is NULL: # <<<<<<<<<<<<<<
19354  * return None
19355  * return <object>base
19356  */
19357  }
19358 
19359  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
19360  * if base is NULL:
19361  * return None
19362  * return <object>base # <<<<<<<<<<<<<<
19363  *
19364  * # Versions of the import_* functions which are more suitable for
19365  */
19366  __Pyx_XDECREF(__pyx_r);
19367  __Pyx_INCREF(((PyObject *)__pyx_v_base));
19368  __pyx_r = ((PyObject *)__pyx_v_base);
19369  goto __pyx_L0;
19370 
19371  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
19372  * PyArray_SetBaseObject(arr, base)
19373  *
19374  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
19375  * base = PyArray_BASE(arr)
19376  * if base is NULL:
19377  */
19378 
19379  /* function exit code */
19380  __pyx_L0:;
19381  __Pyx_XGIVEREF(__pyx_r);
19382  __Pyx_RefNannyFinishContext();
19383  return __pyx_r;
19384 }
19385 
19386 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
19387  * # Versions of the import_* functions which are more suitable for
19388  * # Cython code.
19389  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
19390  * try:
19391  * __pyx_import_array()
19392  */
19393 
19394 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
19395  int __pyx_r;
19396  __Pyx_RefNannyDeclarations
19397  PyObject *__pyx_t_1 = NULL;
19398  PyObject *__pyx_t_2 = NULL;
19399  PyObject *__pyx_t_3 = NULL;
19400  int __pyx_t_4;
19401  PyObject *__pyx_t_5 = NULL;
19402  PyObject *__pyx_t_6 = NULL;
19403  PyObject *__pyx_t_7 = NULL;
19404  PyObject *__pyx_t_8 = NULL;
19405  int __pyx_lineno = 0;
19406  const char *__pyx_filename = NULL;
19407  int __pyx_clineno = 0;
19408  __Pyx_RefNannySetupContext("import_array", 0);
19409 
19410  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
19411  * # Cython code.
19412  * cdef inline int import_array() except -1:
19413  * try: # <<<<<<<<<<<<<<
19414  * __pyx_import_array()
19415  * except Exception:
19416  */
19417  {
19418  __Pyx_PyThreadState_declare
19419  __Pyx_PyThreadState_assign
19420  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
19421  __Pyx_XGOTREF(__pyx_t_1);
19422  __Pyx_XGOTREF(__pyx_t_2);
19423  __Pyx_XGOTREF(__pyx_t_3);
19424  /*try:*/ {
19425 
19426  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
19427  * cdef inline int import_array() except -1:
19428  * try:
19429  * __pyx_import_array() # <<<<<<<<<<<<<<
19430  * except Exception:
19431  * raise ImportError("numpy.core.multiarray failed to import")
19432  */
19433  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 943, __pyx_L3_error)
19434 
19435  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
19436  * # Cython code.
19437  * cdef inline int import_array() except -1:
19438  * try: # <<<<<<<<<<<<<<
19439  * __pyx_import_array()
19440  * except Exception:
19441  */
19442  }
19443  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19444  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19445  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19446  goto __pyx_L8_try_end;
19447  __pyx_L3_error:;
19448 
19449  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
19450  * try:
19451  * __pyx_import_array()
19452  * except Exception: # <<<<<<<<<<<<<<
19453  * raise ImportError("numpy.core.multiarray failed to import")
19454  *
19455  */
19456  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
19457  if (__pyx_t_4) {
19458  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
19459  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 944, __pyx_L5_except_error)
19460  __Pyx_GOTREF(__pyx_t_5);
19461  __Pyx_GOTREF(__pyx_t_6);
19462  __Pyx_GOTREF(__pyx_t_7);
19463 
19464  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
19465  * __pyx_import_array()
19466  * except Exception:
19467  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
19468  *
19469  * cdef inline int import_umath() except -1:
19470  */
19471  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 945, __pyx_L5_except_error)
19472  __Pyx_GOTREF(__pyx_t_8);
19473  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
19474  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19475  __PYX_ERR(3, 945, __pyx_L5_except_error)
19476  }
19477  goto __pyx_L5_except_error;
19478  __pyx_L5_except_error:;
19479 
19480  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
19481  * # Cython code.
19482  * cdef inline int import_array() except -1:
19483  * try: # <<<<<<<<<<<<<<
19484  * __pyx_import_array()
19485  * except Exception:
19486  */
19487  __Pyx_XGIVEREF(__pyx_t_1);
19488  __Pyx_XGIVEREF(__pyx_t_2);
19489  __Pyx_XGIVEREF(__pyx_t_3);
19490  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
19491  goto __pyx_L1_error;
19492  __pyx_L8_try_end:;
19493  }
19494 
19495  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
19496  * # Versions of the import_* functions which are more suitable for
19497  * # Cython code.
19498  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
19499  * try:
19500  * __pyx_import_array()
19501  */
19502 
19503  /* function exit code */
19504  __pyx_r = 0;
19505  goto __pyx_L0;
19506  __pyx_L1_error:;
19507  __Pyx_XDECREF(__pyx_t_5);
19508  __Pyx_XDECREF(__pyx_t_6);
19509  __Pyx_XDECREF(__pyx_t_7);
19510  __Pyx_XDECREF(__pyx_t_8);
19511  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
19512  __pyx_r = -1;
19513  __pyx_L0:;
19514  __Pyx_RefNannyFinishContext();
19515  return __pyx_r;
19516 }
19517 
19518 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
19519  * raise ImportError("numpy.core.multiarray failed to import")
19520  *
19521  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
19522  * try:
19523  * _import_umath()
19524  */
19525 
19526 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
19527  int __pyx_r;
19528  __Pyx_RefNannyDeclarations
19529  PyObject *__pyx_t_1 = NULL;
19530  PyObject *__pyx_t_2 = NULL;
19531  PyObject *__pyx_t_3 = NULL;
19532  int __pyx_t_4;
19533  PyObject *__pyx_t_5 = NULL;
19534  PyObject *__pyx_t_6 = NULL;
19535  PyObject *__pyx_t_7 = NULL;
19536  PyObject *__pyx_t_8 = NULL;
19537  int __pyx_lineno = 0;
19538  const char *__pyx_filename = NULL;
19539  int __pyx_clineno = 0;
19540  __Pyx_RefNannySetupContext("import_umath", 0);
19541 
19542  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
19543  *
19544  * cdef inline int import_umath() except -1:
19545  * try: # <<<<<<<<<<<<<<
19546  * _import_umath()
19547  * except Exception:
19548  */
19549  {
19550  __Pyx_PyThreadState_declare
19551  __Pyx_PyThreadState_assign
19552  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
19553  __Pyx_XGOTREF(__pyx_t_1);
19554  __Pyx_XGOTREF(__pyx_t_2);
19555  __Pyx_XGOTREF(__pyx_t_3);
19556  /*try:*/ {
19557 
19558  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
19559  * cdef inline int import_umath() except -1:
19560  * try:
19561  * _import_umath() # <<<<<<<<<<<<<<
19562  * except Exception:
19563  * raise ImportError("numpy.core.umath failed to import")
19564  */
19565  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 949, __pyx_L3_error)
19566 
19567  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
19568  *
19569  * cdef inline int import_umath() except -1:
19570  * try: # <<<<<<<<<<<<<<
19571  * _import_umath()
19572  * except Exception:
19573  */
19574  }
19575  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19576  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19577  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19578  goto __pyx_L8_try_end;
19579  __pyx_L3_error:;
19580 
19581  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
19582  * try:
19583  * _import_umath()
19584  * except Exception: # <<<<<<<<<<<<<<
19585  * raise ImportError("numpy.core.umath failed to import")
19586  *
19587  */
19588  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
19589  if (__pyx_t_4) {
19590  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
19591  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 950, __pyx_L5_except_error)
19592  __Pyx_GOTREF(__pyx_t_5);
19593  __Pyx_GOTREF(__pyx_t_6);
19594  __Pyx_GOTREF(__pyx_t_7);
19595 
19596  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
19597  * _import_umath()
19598  * except Exception:
19599  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
19600  *
19601  * cdef inline int import_ufunc() except -1:
19602  */
19603  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 951, __pyx_L5_except_error)
19604  __Pyx_GOTREF(__pyx_t_8);
19605  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
19606  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19607  __PYX_ERR(3, 951, __pyx_L5_except_error)
19608  }
19609  goto __pyx_L5_except_error;
19610  __pyx_L5_except_error:;
19611 
19612  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
19613  *
19614  * cdef inline int import_umath() except -1:
19615  * try: # <<<<<<<<<<<<<<
19616  * _import_umath()
19617  * except Exception:
19618  */
19619  __Pyx_XGIVEREF(__pyx_t_1);
19620  __Pyx_XGIVEREF(__pyx_t_2);
19621  __Pyx_XGIVEREF(__pyx_t_3);
19622  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
19623  goto __pyx_L1_error;
19624  __pyx_L8_try_end:;
19625  }
19626 
19627  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
19628  * raise ImportError("numpy.core.multiarray failed to import")
19629  *
19630  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
19631  * try:
19632  * _import_umath()
19633  */
19634 
19635  /* function exit code */
19636  __pyx_r = 0;
19637  goto __pyx_L0;
19638  __pyx_L1_error:;
19639  __Pyx_XDECREF(__pyx_t_5);
19640  __Pyx_XDECREF(__pyx_t_6);
19641  __Pyx_XDECREF(__pyx_t_7);
19642  __Pyx_XDECREF(__pyx_t_8);
19643  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
19644  __pyx_r = -1;
19645  __pyx_L0:;
19646  __Pyx_RefNannyFinishContext();
19647  return __pyx_r;
19648 }
19649 
19650 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
19651  * raise ImportError("numpy.core.umath failed to import")
19652  *
19653  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
19654  * try:
19655  * _import_umath()
19656  */
19657 
19658 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
19659  int __pyx_r;
19660  __Pyx_RefNannyDeclarations
19661  PyObject *__pyx_t_1 = NULL;
19662  PyObject *__pyx_t_2 = NULL;
19663  PyObject *__pyx_t_3 = NULL;
19664  int __pyx_t_4;
19665  PyObject *__pyx_t_5 = NULL;
19666  PyObject *__pyx_t_6 = NULL;
19667  PyObject *__pyx_t_7 = NULL;
19668  PyObject *__pyx_t_8 = NULL;
19669  int __pyx_lineno = 0;
19670  const char *__pyx_filename = NULL;
19671  int __pyx_clineno = 0;
19672  __Pyx_RefNannySetupContext("import_ufunc", 0);
19673 
19674  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
19675  *
19676  * cdef inline int import_ufunc() except -1:
19677  * try: # <<<<<<<<<<<<<<
19678  * _import_umath()
19679  * except Exception:
19680  */
19681  {
19682  __Pyx_PyThreadState_declare
19683  __Pyx_PyThreadState_assign
19684  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
19685  __Pyx_XGOTREF(__pyx_t_1);
19686  __Pyx_XGOTREF(__pyx_t_2);
19687  __Pyx_XGOTREF(__pyx_t_3);
19688  /*try:*/ {
19689 
19690  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
19691  * cdef inline int import_ufunc() except -1:
19692  * try:
19693  * _import_umath() # <<<<<<<<<<<<<<
19694  * except Exception:
19695  * raise ImportError("numpy.core.umath failed to import")
19696  */
19697  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 955, __pyx_L3_error)
19698 
19699  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
19700  *
19701  * cdef inline int import_ufunc() except -1:
19702  * try: # <<<<<<<<<<<<<<
19703  * _import_umath()
19704  * except Exception:
19705  */
19706  }
19707  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19708  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19709  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19710  goto __pyx_L8_try_end;
19711  __pyx_L3_error:;
19712 
19713  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
19714  * try:
19715  * _import_umath()
19716  * except Exception: # <<<<<<<<<<<<<<
19717  * raise ImportError("numpy.core.umath failed to import")
19718  *
19719  */
19720  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
19721  if (__pyx_t_4) {
19722  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
19723  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 956, __pyx_L5_except_error)
19724  __Pyx_GOTREF(__pyx_t_5);
19725  __Pyx_GOTREF(__pyx_t_6);
19726  __Pyx_GOTREF(__pyx_t_7);
19727 
19728  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
19729  * _import_umath()
19730  * except Exception:
19731  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
19732  *
19733  * cdef extern from *:
19734  */
19735  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 957, __pyx_L5_except_error)
19736  __Pyx_GOTREF(__pyx_t_8);
19737  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
19738  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19739  __PYX_ERR(3, 957, __pyx_L5_except_error)
19740  }
19741  goto __pyx_L5_except_error;
19742  __pyx_L5_except_error:;
19743 
19744  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
19745  *
19746  * cdef inline int import_ufunc() except -1:
19747  * try: # <<<<<<<<<<<<<<
19748  * _import_umath()
19749  * except Exception:
19750  */
19751  __Pyx_XGIVEREF(__pyx_t_1);
19752  __Pyx_XGIVEREF(__pyx_t_2);
19753  __Pyx_XGIVEREF(__pyx_t_3);
19754  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
19755  goto __pyx_L1_error;
19756  __pyx_L8_try_end:;
19757  }
19758 
19759  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
19760  * raise ImportError("numpy.core.umath failed to import")
19761  *
19762  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
19763  * try:
19764  * _import_umath()
19765  */
19766 
19767  /* function exit code */
19768  __pyx_r = 0;
19769  goto __pyx_L0;
19770  __pyx_L1_error:;
19771  __Pyx_XDECREF(__pyx_t_5);
19772  __Pyx_XDECREF(__pyx_t_6);
19773  __Pyx_XDECREF(__pyx_t_7);
19774  __Pyx_XDECREF(__pyx_t_8);
19775  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
19776  __pyx_r = -1;
19777  __pyx_L0:;
19778  __Pyx_RefNannyFinishContext();
19779  return __pyx_r;
19780 }
19781 
19782 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
19783  *
19784  *
19785  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
19786  * """
19787  * Cython equivalent of `isinstance(obj, np.timedelta64)`
19788  */
19789 
19790 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
19791  int __pyx_r;
19792  __Pyx_RefNannyDeclarations
19793  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
19794 
19795  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
19796  * bool
19797  * """
19798  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
19799  *
19800  *
19801  */
19802  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
19803  goto __pyx_L0;
19804 
19805  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
19806  *
19807  *
19808  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
19809  * """
19810  * Cython equivalent of `isinstance(obj, np.timedelta64)`
19811  */
19812 
19813  /* function exit code */
19814  __pyx_L0:;
19815  __Pyx_RefNannyFinishContext();
19816  return __pyx_r;
19817 }
19818 
19819 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
19820  *
19821  *
19822  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
19823  * """
19824  * Cython equivalent of `isinstance(obj, np.datetime64)`
19825  */
19826 
19827 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
19828  int __pyx_r;
19829  __Pyx_RefNannyDeclarations
19830  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
19831 
19832  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
19833  * bool
19834  * """
19835  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
19836  *
19837  *
19838  */
19839  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
19840  goto __pyx_L0;
19841 
19842  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
19843  *
19844  *
19845  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
19846  * """
19847  * Cython equivalent of `isinstance(obj, np.datetime64)`
19848  */
19849 
19850  /* function exit code */
19851  __pyx_L0:;
19852  __Pyx_RefNannyFinishContext();
19853  return __pyx_r;
19854 }
19855 
19856 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
19857  *
19858  *
19859  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
19860  * """
19861  * returns the int64 value underlying scalar numpy datetime64 object
19862  */
19863 
19864 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
19865  npy_datetime __pyx_r;
19866 
19867  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
19868  * also needed. That can be found using `get_datetime64_unit`.
19869  * """
19870  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
19871  *
19872  *
19873  */
19874  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
19875  goto __pyx_L0;
19876 
19877  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
19878  *
19879  *
19880  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
19881  * """
19882  * returns the int64 value underlying scalar numpy datetime64 object
19883  */
19884 
19885  /* function exit code */
19886  __pyx_L0:;
19887  return __pyx_r;
19888 }
19889 
19890 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
19891  *
19892  *
19893  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
19894  * """
19895  * returns the int64 value underlying scalar numpy timedelta64 object
19896  */
19897 
19898 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
19899  npy_timedelta __pyx_r;
19900 
19901  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
19902  * returns the int64 value underlying scalar numpy timedelta64 object
19903  * """
19904  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
19905  *
19906  *
19907  */
19908  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
19909  goto __pyx_L0;
19910 
19911  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
19912  *
19913  *
19914  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
19915  * """
19916  * returns the int64 value underlying scalar numpy timedelta64 object
19917  */
19918 
19919  /* function exit code */
19920  __pyx_L0:;
19921  return __pyx_r;
19922 }
19923 
19924 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
19925  *
19926  *
19927  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
19928  * """
19929  * returns the unit part of the dtype for a numpy datetime64 object.
19930  */
19931 
19932 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
19933  NPY_DATETIMEUNIT __pyx_r;
19934 
19935  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
19936  * returns the unit part of the dtype for a numpy datetime64 object.
19937  * """
19938  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
19939  */
19940  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
19941  goto __pyx_L0;
19942 
19943  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
19944  *
19945  *
19946  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
19947  * """
19948  * returns the unit part of the dtype for a numpy datetime64 object.
19949  */
19950 
19951  /* function exit code */
19952  __pyx_L0:;
19953  return __pyx_r;
19954 }
19955 
19956 /* "View.MemoryView":122
19957  * cdef bint dtype_is_object
19958  *
19959  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
19960  * mode="c", bint allocate_buffer=True):
19961  *
19962  */
19963 
19964 /* Python wrapper */
19965 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19966 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19967  PyObject *__pyx_v_shape = 0;
19968  Py_ssize_t __pyx_v_itemsize;
19969  PyObject *__pyx_v_format = 0;
19970  PyObject *__pyx_v_mode = 0;
19971  int __pyx_v_allocate_buffer;
19972  int __pyx_lineno = 0;
19973  const char *__pyx_filename = NULL;
19974  int __pyx_clineno = 0;
19975  int __pyx_r;
19976  __Pyx_RefNannyDeclarations
19977  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
19978  {
19979  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
19980  PyObject* values[5] = {0,0,0,0,0};
19981  values[3] = ((PyObject *)__pyx_n_s_c);
19982  if (unlikely(__pyx_kwds)) {
19983  Py_ssize_t kw_args;
19984  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19985  switch (pos_args) {
19986  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
19987  CYTHON_FALLTHROUGH;
19988  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
19989  CYTHON_FALLTHROUGH;
19990  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19991  CYTHON_FALLTHROUGH;
19992  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19993  CYTHON_FALLTHROUGH;
19994  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19995  CYTHON_FALLTHROUGH;
19996  case 0: break;
19997  default: goto __pyx_L5_argtuple_error;
19998  }
19999  kw_args = PyDict_Size(__pyx_kwds);
20000  switch (pos_args) {
20001  case 0:
20002  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
20003  else goto __pyx_L5_argtuple_error;
20004  CYTHON_FALLTHROUGH;
20005  case 1:
20006  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
20007  else {
20008  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
20009  }
20010  CYTHON_FALLTHROUGH;
20011  case 2:
20012  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
20013  else {
20014  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
20015  }
20016  CYTHON_FALLTHROUGH;
20017  case 3:
20018  if (kw_args > 0) {
20019  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
20020  if (value) { values[3] = value; kw_args--; }
20021  }
20022  CYTHON_FALLTHROUGH;
20023  case 4:
20024  if (kw_args > 0) {
20025  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
20026  if (value) { values[4] = value; kw_args--; }
20027  }
20028  }
20029  if (unlikely(kw_args > 0)) {
20030  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
20031  }
20032  } else {
20033  switch (PyTuple_GET_SIZE(__pyx_args)) {
20034  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20035  CYTHON_FALLTHROUGH;
20036  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20037  CYTHON_FALLTHROUGH;
20038  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20039  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20040  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20041  break;
20042  default: goto __pyx_L5_argtuple_error;
20043  }
20044  }
20045  __pyx_v_shape = ((PyObject*)values[0]);
20046  __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
20047  __pyx_v_format = values[2];
20048  __pyx_v_mode = values[3];
20049  if (values[4]) {
20050  __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
20051  } else {
20052 
20053  /* "View.MemoryView":123
20054  *
20055  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
20056  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
20057  *
20058  * cdef int idx
20059  */
20060  __pyx_v_allocate_buffer = ((int)1);
20061  }
20062  }
20063  goto __pyx_L4_argument_unpacking_done;
20064  __pyx_L5_argtuple_error:;
20065  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
20066  __pyx_L3_error:;
20067  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20068  __Pyx_RefNannyFinishContext();
20069  return -1;
20070  __pyx_L4_argument_unpacking_done:;
20071  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
20072  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
20073  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 122, __pyx_L1_error)
20074  }
20075  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
20076 
20077  /* "View.MemoryView":122
20078  * cdef bint dtype_is_object
20079  *
20080  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
20081  * mode="c", bint allocate_buffer=True):
20082  *
20083  */
20084 
20085  /* function exit code */
20086  goto __pyx_L0;
20087  __pyx_L1_error:;
20088  __pyx_r = -1;
20089  __pyx_L0:;
20090  __Pyx_RefNannyFinishContext();
20091  return __pyx_r;
20092 }
20093 
20094 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) {
20095  int __pyx_v_idx;
20096  Py_ssize_t __pyx_v_i;
20097  Py_ssize_t __pyx_v_dim;
20098  PyObject **__pyx_v_p;
20099  char __pyx_v_order;
20100  int __pyx_r;
20101  __Pyx_RefNannyDeclarations
20102  Py_ssize_t __pyx_t_1;
20103  int __pyx_t_2;
20104  PyObject *__pyx_t_3 = NULL;
20105  int __pyx_t_4;
20106  PyObject *__pyx_t_5 = NULL;
20107  PyObject *__pyx_t_6 = NULL;
20108  char *__pyx_t_7;
20109  int __pyx_t_8;
20110  Py_ssize_t __pyx_t_9;
20111  PyObject *__pyx_t_10 = NULL;
20112  Py_ssize_t __pyx_t_11;
20113  int __pyx_lineno = 0;
20114  const char *__pyx_filename = NULL;
20115  int __pyx_clineno = 0;
20116  __Pyx_RefNannySetupContext("__cinit__", 0);
20117  __Pyx_INCREF(__pyx_v_format);
20118 
20119  /* "View.MemoryView":129
20120  * cdef PyObject **p
20121  *
20122  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
20123  * self.itemsize = itemsize
20124  *
20125  */
20126  if (unlikely(__pyx_v_shape == Py_None)) {
20127  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20128  __PYX_ERR(0, 129, __pyx_L1_error)
20129  }
20130  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
20131  __pyx_v_self->ndim = ((int)__pyx_t_1);
20132 
20133  /* "View.MemoryView":130
20134  *
20135  * self.ndim = <int> len(shape)
20136  * self.itemsize = itemsize # <<<<<<<<<<<<<<
20137  *
20138  * if not self.ndim:
20139  */
20140  __pyx_v_self->itemsize = __pyx_v_itemsize;
20141 
20142  /* "View.MemoryView":132
20143  * self.itemsize = itemsize
20144  *
20145  * if not self.ndim: # <<<<<<<<<<<<<<
20146  * raise ValueError("Empty shape tuple for cython.array")
20147  *
20148  */
20149  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
20150  if (unlikely(__pyx_t_2)) {
20151 
20152  /* "View.MemoryView":133
20153  *
20154  * if not self.ndim:
20155  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
20156  *
20157  * if itemsize <= 0:
20158  */
20159  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
20160  __Pyx_GOTREF(__pyx_t_3);
20161  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20163  __PYX_ERR(0, 133, __pyx_L1_error)
20164 
20165  /* "View.MemoryView":132
20166  * self.itemsize = itemsize
20167  *
20168  * if not self.ndim: # <<<<<<<<<<<<<<
20169  * raise ValueError("Empty shape tuple for cython.array")
20170  *
20171  */
20172  }
20173 
20174  /* "View.MemoryView":135
20175  * raise ValueError("Empty shape tuple for cython.array")
20176  *
20177  * if itemsize <= 0: # <<<<<<<<<<<<<<
20178  * raise ValueError("itemsize <= 0 for cython.array")
20179  *
20180  */
20181  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
20182  if (unlikely(__pyx_t_2)) {
20183 
20184  /* "View.MemoryView":136
20185  *
20186  * if itemsize <= 0:
20187  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
20188  *
20189  * if not isinstance(format, bytes):
20190  */
20191  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
20192  __Pyx_GOTREF(__pyx_t_3);
20193  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20194  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20195  __PYX_ERR(0, 136, __pyx_L1_error)
20196 
20197  /* "View.MemoryView":135
20198  * raise ValueError("Empty shape tuple for cython.array")
20199  *
20200  * if itemsize <= 0: # <<<<<<<<<<<<<<
20201  * raise ValueError("itemsize <= 0 for cython.array")
20202  *
20203  */
20204  }
20205 
20206  /* "View.MemoryView":138
20207  * raise ValueError("itemsize <= 0 for cython.array")
20208  *
20209  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
20210  * format = format.encode('ASCII')
20211  * self._format = format # keep a reference to the byte string
20212  */
20213  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
20214  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
20215  if (__pyx_t_4) {
20216 
20217  /* "View.MemoryView":139
20218  *
20219  * if not isinstance(format, bytes):
20220  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
20221  * self._format = format # keep a reference to the byte string
20222  * self.format = self._format
20223  */
20224  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
20225  __Pyx_GOTREF(__pyx_t_5);
20226  __pyx_t_6 = NULL;
20227  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
20228  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
20229  if (likely(__pyx_t_6)) {
20230  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
20231  __Pyx_INCREF(__pyx_t_6);
20232  __Pyx_INCREF(function);
20233  __Pyx_DECREF_SET(__pyx_t_5, function);
20234  }
20235  }
20236  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
20237  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20238  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
20239  __Pyx_GOTREF(__pyx_t_3);
20240  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20241  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
20242  __pyx_t_3 = 0;
20243 
20244  /* "View.MemoryView":138
20245  * raise ValueError("itemsize <= 0 for cython.array")
20246  *
20247  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
20248  * format = format.encode('ASCII')
20249  * self._format = format # keep a reference to the byte string
20250  */
20251  }
20252 
20253  /* "View.MemoryView":140
20254  * if not isinstance(format, bytes):
20255  * format = format.encode('ASCII')
20256  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
20257  * self.format = self._format
20258  *
20259  */
20260  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(0, 140, __pyx_L1_error)
20261  __pyx_t_3 = __pyx_v_format;
20262  __Pyx_INCREF(__pyx_t_3);
20263  __Pyx_GIVEREF(__pyx_t_3);
20264  __Pyx_GOTREF(__pyx_v_self->_format);
20265  __Pyx_DECREF(__pyx_v_self->_format);
20266  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
20267  __pyx_t_3 = 0;
20268 
20269  /* "View.MemoryView":141
20270  * format = format.encode('ASCII')
20271  * self._format = format # keep a reference to the byte string
20272  * self.format = self._format # <<<<<<<<<<<<<<
20273  *
20274  *
20275  */
20276  if (unlikely(__pyx_v_self->_format == Py_None)) {
20277  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
20278  __PYX_ERR(0, 141, __pyx_L1_error)
20279  }
20280  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
20281  __pyx_v_self->format = __pyx_t_7;
20282 
20283  /* "View.MemoryView":144
20284  *
20285  *
20286  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
20287  * self._strides = self._shape + self.ndim
20288  *
20289  */
20290  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
20291 
20292  /* "View.MemoryView":145
20293  *
20294  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
20295  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
20296  *
20297  * if not self._shape:
20298  */
20299  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
20300 
20301  /* "View.MemoryView":147
20302  * self._strides = self._shape + self.ndim
20303  *
20304  * if not self._shape: # <<<<<<<<<<<<<<
20305  * raise MemoryError("unable to allocate shape and strides.")
20306  *
20307  */
20308  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
20309  if (unlikely(__pyx_t_4)) {
20310 
20311  /* "View.MemoryView":148
20312  *
20313  * if not self._shape:
20314  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
20315  *
20316  *
20317  */
20318  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
20319  __Pyx_GOTREF(__pyx_t_3);
20320  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20321  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20322  __PYX_ERR(0, 148, __pyx_L1_error)
20323 
20324  /* "View.MemoryView":147
20325  * self._strides = self._shape + self.ndim
20326  *
20327  * if not self._shape: # <<<<<<<<<<<<<<
20328  * raise MemoryError("unable to allocate shape and strides.")
20329  *
20330  */
20331  }
20332 
20333  /* "View.MemoryView":151
20334  *
20335  *
20336  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
20337  * if dim <= 0:
20338  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
20339  */
20340  __pyx_t_8 = 0;
20341  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
20342  for (;;) {
20343  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
20344  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20345  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
20346  #else
20347  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
20348  __Pyx_GOTREF(__pyx_t_5);
20349  #endif
20350  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
20351  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20352  __pyx_v_dim = __pyx_t_9;
20353  __pyx_v_idx = __pyx_t_8;
20354  __pyx_t_8 = (__pyx_t_8 + 1);
20355 
20356  /* "View.MemoryView":152
20357  *
20358  * for idx, dim in enumerate(shape):
20359  * if dim <= 0: # <<<<<<<<<<<<<<
20360  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
20361  * self._shape[idx] = dim
20362  */
20363  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
20364  if (unlikely(__pyx_t_4)) {
20365 
20366  /* "View.MemoryView":153
20367  * for idx, dim in enumerate(shape):
20368  * if dim <= 0:
20369  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
20370  * self._shape[idx] = dim
20371  *
20372  */
20373  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
20374  __Pyx_GOTREF(__pyx_t_5);
20375  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
20376  __Pyx_GOTREF(__pyx_t_6);
20377  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
20378  __Pyx_GOTREF(__pyx_t_10);
20379  __Pyx_GIVEREF(__pyx_t_5);
20380  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
20381  __Pyx_GIVEREF(__pyx_t_6);
20382  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
20383  __pyx_t_5 = 0;
20384  __pyx_t_6 = 0;
20385  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
20386  __Pyx_GOTREF(__pyx_t_6);
20387  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20388  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
20389  __Pyx_GOTREF(__pyx_t_10);
20390  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20391  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
20392  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20393  __PYX_ERR(0, 153, __pyx_L1_error)
20394 
20395  /* "View.MemoryView":152
20396  *
20397  * for idx, dim in enumerate(shape):
20398  * if dim <= 0: # <<<<<<<<<<<<<<
20399  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
20400  * self._shape[idx] = dim
20401  */
20402  }
20403 
20404  /* "View.MemoryView":154
20405  * if dim <= 0:
20406  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
20407  * self._shape[idx] = dim # <<<<<<<<<<<<<<
20408  *
20409  * cdef char order
20410  */
20411  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
20412 
20413  /* "View.MemoryView":151
20414  *
20415  *
20416  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
20417  * if dim <= 0:
20418  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
20419  */
20420  }
20421  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20422 
20423  /* "View.MemoryView":157
20424  *
20425  * cdef char order
20426  * if mode == 'fortran': # <<<<<<<<<<<<<<
20427  * order = b'F'
20428  * self.mode = u'fortran'
20429  */
20430  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
20431  if (__pyx_t_4) {
20432 
20433  /* "View.MemoryView":158
20434  * cdef char order
20435  * if mode == 'fortran':
20436  * order = b'F' # <<<<<<<<<<<<<<
20437  * self.mode = u'fortran'
20438  * elif mode == 'c':
20439  */
20440  __pyx_v_order = 'F';
20441 
20442  /* "View.MemoryView":159
20443  * if mode == 'fortran':
20444  * order = b'F'
20445  * self.mode = u'fortran' # <<<<<<<<<<<<<<
20446  * elif mode == 'c':
20447  * order = b'C'
20448  */
20449  __Pyx_INCREF(__pyx_n_u_fortran);
20450  __Pyx_GIVEREF(__pyx_n_u_fortran);
20451  __Pyx_GOTREF(__pyx_v_self->mode);
20452  __Pyx_DECREF(__pyx_v_self->mode);
20453  __pyx_v_self->mode = __pyx_n_u_fortran;
20454 
20455  /* "View.MemoryView":157
20456  *
20457  * cdef char order
20458  * if mode == 'fortran': # <<<<<<<<<<<<<<
20459  * order = b'F'
20460  * self.mode = u'fortran'
20461  */
20462  goto __pyx_L10;
20463  }
20464 
20465  /* "View.MemoryView":160
20466  * order = b'F'
20467  * self.mode = u'fortran'
20468  * elif mode == 'c': # <<<<<<<<<<<<<<
20469  * order = b'C'
20470  * self.mode = u'c'
20471  */
20472  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
20473  if (likely(__pyx_t_4)) {
20474 
20475  /* "View.MemoryView":161
20476  * self.mode = u'fortran'
20477  * elif mode == 'c':
20478  * order = b'C' # <<<<<<<<<<<<<<
20479  * self.mode = u'c'
20480  * else:
20481  */
20482  __pyx_v_order = 'C';
20483 
20484  /* "View.MemoryView":162
20485  * elif mode == 'c':
20486  * order = b'C'
20487  * self.mode = u'c' # <<<<<<<<<<<<<<
20488  * else:
20489  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
20490  */
20491  __Pyx_INCREF(__pyx_n_u_c);
20492  __Pyx_GIVEREF(__pyx_n_u_c);
20493  __Pyx_GOTREF(__pyx_v_self->mode);
20494  __Pyx_DECREF(__pyx_v_self->mode);
20495  __pyx_v_self->mode = __pyx_n_u_c;
20496 
20497  /* "View.MemoryView":160
20498  * order = b'F'
20499  * self.mode = u'fortran'
20500  * elif mode == 'c': # <<<<<<<<<<<<<<
20501  * order = b'C'
20502  * self.mode = u'c'
20503  */
20504  goto __pyx_L10;
20505  }
20506 
20507  /* "View.MemoryView":164
20508  * self.mode = u'c'
20509  * else:
20510  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
20511  *
20512  * self.len = fill_contig_strides_array(self._shape, self._strides,
20513  */
20514  /*else*/ {
20515  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
20516  __Pyx_GOTREF(__pyx_t_3);
20517  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 164, __pyx_L1_error)
20518  __Pyx_GOTREF(__pyx_t_10);
20519  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20520  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
20521  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20522  __PYX_ERR(0, 164, __pyx_L1_error)
20523  }
20524  __pyx_L10:;
20525 
20526  /* "View.MemoryView":166
20527  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
20528  *
20529  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
20530  * itemsize, self.ndim, order)
20531  *
20532  */
20533  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
20534 
20535  /* "View.MemoryView":169
20536  * itemsize, self.ndim, order)
20537  *
20538  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
20539  * self.dtype_is_object = format == b'O'
20540  * if allocate_buffer:
20541  */
20542  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
20543 
20544  /* "View.MemoryView":170
20545  *
20546  * self.free_data = allocate_buffer
20547  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
20548  * if allocate_buffer:
20549  *
20550  */
20551  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error)
20552  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error)
20553  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20554  __pyx_v_self->dtype_is_object = __pyx_t_4;
20555 
20556  /* "View.MemoryView":171
20557  * self.free_data = allocate_buffer
20558  * self.dtype_is_object = format == b'O'
20559  * if allocate_buffer: # <<<<<<<<<<<<<<
20560  *
20561  *
20562  */
20563  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
20564  if (__pyx_t_4) {
20565 
20566  /* "View.MemoryView":174
20567  *
20568  *
20569  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
20570  * if not self.data:
20571  * raise MemoryError("unable to allocate array data.")
20572  */
20573  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
20574 
20575  /* "View.MemoryView":175
20576  *
20577  * self.data = <char *>malloc(self.len)
20578  * if not self.data: # <<<<<<<<<<<<<<
20579  * raise MemoryError("unable to allocate array data.")
20580  *
20581  */
20582  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
20583  if (unlikely(__pyx_t_4)) {
20584 
20585  /* "View.MemoryView":176
20586  * self.data = <char *>malloc(self.len)
20587  * if not self.data:
20588  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
20589  *
20590  * if self.dtype_is_object:
20591  */
20592  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error)
20593  __Pyx_GOTREF(__pyx_t_10);
20594  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
20595  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20596  __PYX_ERR(0, 176, __pyx_L1_error)
20597 
20598  /* "View.MemoryView":175
20599  *
20600  * self.data = <char *>malloc(self.len)
20601  * if not self.data: # <<<<<<<<<<<<<<
20602  * raise MemoryError("unable to allocate array data.")
20603  *
20604  */
20605  }
20606 
20607  /* "View.MemoryView":178
20608  * raise MemoryError("unable to allocate array data.")
20609  *
20610  * if self.dtype_is_object: # <<<<<<<<<<<<<<
20611  * p = <PyObject **> self.data
20612  * for i in range(self.len / itemsize):
20613  */
20614  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
20615  if (__pyx_t_4) {
20616 
20617  /* "View.MemoryView":179
20618  *
20619  * if self.dtype_is_object:
20620  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
20621  * for i in range(self.len / itemsize):
20622  * p[i] = Py_None
20623  */
20624  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
20625 
20626  /* "View.MemoryView":180
20627  * if self.dtype_is_object:
20628  * p = <PyObject **> self.data
20629  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
20630  * p[i] = Py_None
20631  * Py_INCREF(Py_None)
20632  */
20633  if (unlikely(__pyx_v_itemsize == 0)) {
20634  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
20635  __PYX_ERR(0, 180, __pyx_L1_error)
20636  }
20637  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
20638  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
20639  __PYX_ERR(0, 180, __pyx_L1_error)
20640  }
20641  __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
20642  __pyx_t_9 = __pyx_t_1;
20643  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
20644  __pyx_v_i = __pyx_t_11;
20645 
20646  /* "View.MemoryView":181
20647  * p = <PyObject **> self.data
20648  * for i in range(self.len / itemsize):
20649  * p[i] = Py_None # <<<<<<<<<<<<<<
20650  * Py_INCREF(Py_None)
20651  *
20652  */
20653  (__pyx_v_p[__pyx_v_i]) = Py_None;
20654 
20655  /* "View.MemoryView":182
20656  * for i in range(self.len / itemsize):
20657  * p[i] = Py_None
20658  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
20659  *
20660  * @cname('getbuffer')
20661  */
20662  Py_INCREF(Py_None);
20663  }
20664 
20665  /* "View.MemoryView":178
20666  * raise MemoryError("unable to allocate array data.")
20667  *
20668  * if self.dtype_is_object: # <<<<<<<<<<<<<<
20669  * p = <PyObject **> self.data
20670  * for i in range(self.len / itemsize):
20671  */
20672  }
20673 
20674  /* "View.MemoryView":171
20675  * self.free_data = allocate_buffer
20676  * self.dtype_is_object = format == b'O'
20677  * if allocate_buffer: # <<<<<<<<<<<<<<
20678  *
20679  *
20680  */
20681  }
20682 
20683  /* "View.MemoryView":122
20684  * cdef bint dtype_is_object
20685  *
20686  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
20687  * mode="c", bint allocate_buffer=True):
20688  *
20689  */
20690 
20691  /* function exit code */
20692  __pyx_r = 0;
20693  goto __pyx_L0;
20694  __pyx_L1_error:;
20695  __Pyx_XDECREF(__pyx_t_3);
20696  __Pyx_XDECREF(__pyx_t_5);
20697  __Pyx_XDECREF(__pyx_t_6);
20698  __Pyx_XDECREF(__pyx_t_10);
20699  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20700  __pyx_r = -1;
20701  __pyx_L0:;
20702  __Pyx_XDECREF(__pyx_v_format);
20703  __Pyx_RefNannyFinishContext();
20704  return __pyx_r;
20705 }
20706 
20707 /* "View.MemoryView":185
20708  *
20709  * @cname('getbuffer')
20710  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
20711  * cdef int bufmode = -1
20712  * if self.mode == u"c":
20713  */
20714 
20715 /* Python wrapper */
20716 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
20717 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
20718  int __pyx_r;
20719  __Pyx_RefNannyDeclarations
20720  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
20721  __pyx_r = __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));
20722 
20723  /* function exit code */
20724  __Pyx_RefNannyFinishContext();
20725  return __pyx_r;
20726 }
20727 
20728 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) {
20729  int __pyx_v_bufmode;
20730  int __pyx_r;
20731  __Pyx_RefNannyDeclarations
20732  int __pyx_t_1;
20733  int __pyx_t_2;
20734  PyObject *__pyx_t_3 = NULL;
20735  char *__pyx_t_4;
20736  Py_ssize_t __pyx_t_5;
20737  int __pyx_t_6;
20738  Py_ssize_t *__pyx_t_7;
20739  int __pyx_lineno = 0;
20740  const char *__pyx_filename = NULL;
20741  int __pyx_clineno = 0;
20742  if (__pyx_v_info == NULL) {
20743  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
20744  return -1;
20745  }
20746  __Pyx_RefNannySetupContext("__getbuffer__", 0);
20747  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
20748  __Pyx_GIVEREF(__pyx_v_info->obj);
20749 
20750  /* "View.MemoryView":186
20751  * @cname('getbuffer')
20752  * def __getbuffer__(self, Py_buffer *info, int flags):
20753  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
20754  * if self.mode == u"c":
20755  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20756  */
20757  __pyx_v_bufmode = -1;
20758 
20759  /* "View.MemoryView":187
20760  * def __getbuffer__(self, Py_buffer *info, int flags):
20761  * cdef int bufmode = -1
20762  * if self.mode == u"c": # <<<<<<<<<<<<<<
20763  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20764  * elif self.mode == u"fortran":
20765  */
20766  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
20767  __pyx_t_2 = (__pyx_t_1 != 0);
20768  if (__pyx_t_2) {
20769 
20770  /* "View.MemoryView":188
20771  * cdef int bufmode = -1
20772  * if self.mode == u"c":
20773  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
20774  * elif self.mode == u"fortran":
20775  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20776  */
20777  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
20778 
20779  /* "View.MemoryView":187
20780  * def __getbuffer__(self, Py_buffer *info, int flags):
20781  * cdef int bufmode = -1
20782  * if self.mode == u"c": # <<<<<<<<<<<<<<
20783  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20784  * elif self.mode == u"fortran":
20785  */
20786  goto __pyx_L3;
20787  }
20788 
20789  /* "View.MemoryView":189
20790  * if self.mode == u"c":
20791  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20792  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
20793  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20794  * if not (flags & bufmode):
20795  */
20796  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
20797  __pyx_t_1 = (__pyx_t_2 != 0);
20798  if (__pyx_t_1) {
20799 
20800  /* "View.MemoryView":190
20801  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20802  * elif self.mode == u"fortran":
20803  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
20804  * if not (flags & bufmode):
20805  * raise ValueError("Can only create a buffer that is contiguous in memory.")
20806  */
20807  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
20808 
20809  /* "View.MemoryView":189
20810  * if self.mode == u"c":
20811  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20812  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
20813  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20814  * if not (flags & bufmode):
20815  */
20816  }
20817  __pyx_L3:;
20818 
20819  /* "View.MemoryView":191
20820  * elif self.mode == u"fortran":
20821  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20822  * if not (flags & bufmode): # <<<<<<<<<<<<<<
20823  * raise ValueError("Can only create a buffer that is contiguous in memory.")
20824  * info.buf = self.data
20825  */
20826  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
20827  if (unlikely(__pyx_t_1)) {
20828 
20829  /* "View.MemoryView":192
20830  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20831  * if not (flags & bufmode):
20832  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
20833  * info.buf = self.data
20834  * info.len = self.len
20835  */
20836  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
20837  __Pyx_GOTREF(__pyx_t_3);
20838  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20839  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20840  __PYX_ERR(0, 192, __pyx_L1_error)
20841 
20842  /* "View.MemoryView":191
20843  * elif self.mode == u"fortran":
20844  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
20845  * if not (flags & bufmode): # <<<<<<<<<<<<<<
20846  * raise ValueError("Can only create a buffer that is contiguous in memory.")
20847  * info.buf = self.data
20848  */
20849  }
20850 
20851  /* "View.MemoryView":193
20852  * if not (flags & bufmode):
20853  * raise ValueError("Can only create a buffer that is contiguous in memory.")
20854  * info.buf = self.data # <<<<<<<<<<<<<<
20855  * info.len = self.len
20856  * info.ndim = self.ndim
20857  */
20858  __pyx_t_4 = __pyx_v_self->data;
20859  __pyx_v_info->buf = __pyx_t_4;
20860 
20861  /* "View.MemoryView":194
20862  * raise ValueError("Can only create a buffer that is contiguous in memory.")
20863  * info.buf = self.data
20864  * info.len = self.len # <<<<<<<<<<<<<<
20865  * info.ndim = self.ndim
20866  * info.shape = self._shape
20867  */
20868  __pyx_t_5 = __pyx_v_self->len;
20869  __pyx_v_info->len = __pyx_t_5;
20870 
20871  /* "View.MemoryView":195
20872  * info.buf = self.data
20873  * info.len = self.len
20874  * info.ndim = self.ndim # <<<<<<<<<<<<<<
20875  * info.shape = self._shape
20876  * info.strides = self._strides
20877  */
20878  __pyx_t_6 = __pyx_v_self->ndim;
20879  __pyx_v_info->ndim = __pyx_t_6;
20880 
20881  /* "View.MemoryView":196
20882  * info.len = self.len
20883  * info.ndim = self.ndim
20884  * info.shape = self._shape # <<<<<<<<<<<<<<
20885  * info.strides = self._strides
20886  * info.suboffsets = NULL
20887  */
20888  __pyx_t_7 = __pyx_v_self->_shape;
20889  __pyx_v_info->shape = __pyx_t_7;
20890 
20891  /* "View.MemoryView":197
20892  * info.ndim = self.ndim
20893  * info.shape = self._shape
20894  * info.strides = self._strides # <<<<<<<<<<<<<<
20895  * info.suboffsets = NULL
20896  * info.itemsize = self.itemsize
20897  */
20898  __pyx_t_7 = __pyx_v_self->_strides;
20899  __pyx_v_info->strides = __pyx_t_7;
20900 
20901  /* "View.MemoryView":198
20902  * info.shape = self._shape
20903  * info.strides = self._strides
20904  * info.suboffsets = NULL # <<<<<<<<<<<<<<
20905  * info.itemsize = self.itemsize
20906  * info.readonly = 0
20907  */
20908  __pyx_v_info->suboffsets = NULL;
20909 
20910  /* "View.MemoryView":199
20911  * info.strides = self._strides
20912  * info.suboffsets = NULL
20913  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
20914  * info.readonly = 0
20915  *
20916  */
20917  __pyx_t_5 = __pyx_v_self->itemsize;
20918  __pyx_v_info->itemsize = __pyx_t_5;
20919 
20920  /* "View.MemoryView":200
20921  * info.suboffsets = NULL
20922  * info.itemsize = self.itemsize
20923  * info.readonly = 0 # <<<<<<<<<<<<<<
20924  *
20925  * if flags & PyBUF_FORMAT:
20926  */
20927  __pyx_v_info->readonly = 0;
20928 
20929  /* "View.MemoryView":202
20930  * info.readonly = 0
20931  *
20932  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
20933  * info.format = self.format
20934  * else:
20935  */
20936  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
20937  if (__pyx_t_1) {
20938 
20939  /* "View.MemoryView":203
20940  *
20941  * if flags & PyBUF_FORMAT:
20942  * info.format = self.format # <<<<<<<<<<<<<<
20943  * else:
20944  * info.format = NULL
20945  */
20946  __pyx_t_4 = __pyx_v_self->format;
20947  __pyx_v_info->format = __pyx_t_4;
20948 
20949  /* "View.MemoryView":202
20950  * info.readonly = 0
20951  *
20952  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
20953  * info.format = self.format
20954  * else:
20955  */
20956  goto __pyx_L5;
20957  }
20958 
20959  /* "View.MemoryView":205
20960  * info.format = self.format
20961  * else:
20962  * info.format = NULL # <<<<<<<<<<<<<<
20963  *
20964  * info.obj = self
20965  */
20966  /*else*/ {
20967  __pyx_v_info->format = NULL;
20968  }
20969  __pyx_L5:;
20970 
20971  /* "View.MemoryView":207
20972  * info.format = NULL
20973  *
20974  * info.obj = self # <<<<<<<<<<<<<<
20975  *
20976  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
20977  */
20978  __Pyx_INCREF(((PyObject *)__pyx_v_self));
20979  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
20980  __Pyx_GOTREF(__pyx_v_info->obj);
20981  __Pyx_DECREF(__pyx_v_info->obj);
20982  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
20983 
20984  /* "View.MemoryView":185
20985  *
20986  * @cname('getbuffer')
20987  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
20988  * cdef int bufmode = -1
20989  * if self.mode == u"c":
20990  */
20991 
20992  /* function exit code */
20993  __pyx_r = 0;
20994  goto __pyx_L0;
20995  __pyx_L1_error:;
20996  __Pyx_XDECREF(__pyx_t_3);
20997  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20998  __pyx_r = -1;
20999  if (__pyx_v_info->obj != NULL) {
21000  __Pyx_GOTREF(__pyx_v_info->obj);
21001  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
21002  }
21003  goto __pyx_L2;
21004  __pyx_L0:;
21005  if (__pyx_v_info->obj == Py_None) {
21006  __Pyx_GOTREF(__pyx_v_info->obj);
21007  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
21008  }
21009  __pyx_L2:;
21010  __Pyx_RefNannyFinishContext();
21011  return __pyx_r;
21012 }
21013 
21014 /* "View.MemoryView":211
21015  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21016  *
21017  * def __dealloc__(array self): # <<<<<<<<<<<<<<
21018  * if self.callback_free_data != NULL:
21019  * self.callback_free_data(self.data)
21020  */
21021 
21022 /* Python wrapper */
21023 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
21024 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
21025  __Pyx_RefNannyDeclarations
21026  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
21027  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
21028 
21029  /* function exit code */
21030  __Pyx_RefNannyFinishContext();
21031 }
21032 
21033 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
21034  __Pyx_RefNannyDeclarations
21035  int __pyx_t_1;
21036  __Pyx_RefNannySetupContext("__dealloc__", 0);
21037 
21038  /* "View.MemoryView":212
21039  *
21040  * def __dealloc__(array self):
21041  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
21042  * self.callback_free_data(self.data)
21043  * elif self.free_data:
21044  */
21045  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
21046  if (__pyx_t_1) {
21047 
21048  /* "View.MemoryView":213
21049  * def __dealloc__(array self):
21050  * if self.callback_free_data != NULL:
21051  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
21052  * elif self.free_data:
21053  * if self.dtype_is_object:
21054  */
21055  __pyx_v_self->callback_free_data(__pyx_v_self->data);
21056 
21057  /* "View.MemoryView":212
21058  *
21059  * def __dealloc__(array self):
21060  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
21061  * self.callback_free_data(self.data)
21062  * elif self.free_data:
21063  */
21064  goto __pyx_L3;
21065  }
21066 
21067  /* "View.MemoryView":214
21068  * if self.callback_free_data != NULL:
21069  * self.callback_free_data(self.data)
21070  * elif self.free_data: # <<<<<<<<<<<<<<
21071  * if self.dtype_is_object:
21072  * refcount_objects_in_slice(self.data, self._shape,
21073  */
21074  __pyx_t_1 = (__pyx_v_self->free_data != 0);
21075  if (__pyx_t_1) {
21076 
21077  /* "View.MemoryView":215
21078  * self.callback_free_data(self.data)
21079  * elif self.free_data:
21080  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21081  * refcount_objects_in_slice(self.data, self._shape,
21082  * self._strides, self.ndim, False)
21083  */
21084  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
21085  if (__pyx_t_1) {
21086 
21087  /* "View.MemoryView":216
21088  * elif self.free_data:
21089  * if self.dtype_is_object:
21090  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
21091  * self._strides, self.ndim, False)
21092  * free(self.data)
21093  */
21094  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
21095 
21096  /* "View.MemoryView":215
21097  * self.callback_free_data(self.data)
21098  * elif self.free_data:
21099  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21100  * refcount_objects_in_slice(self.data, self._shape,
21101  * self._strides, self.ndim, False)
21102  */
21103  }
21104 
21105  /* "View.MemoryView":218
21106  * refcount_objects_in_slice(self.data, self._shape,
21107  * self._strides, self.ndim, False)
21108  * free(self.data) # <<<<<<<<<<<<<<
21109  * PyObject_Free(self._shape)
21110  *
21111  */
21112  free(__pyx_v_self->data);
21113 
21114  /* "View.MemoryView":214
21115  * if self.callback_free_data != NULL:
21116  * self.callback_free_data(self.data)
21117  * elif self.free_data: # <<<<<<<<<<<<<<
21118  * if self.dtype_is_object:
21119  * refcount_objects_in_slice(self.data, self._shape,
21120  */
21121  }
21122  __pyx_L3:;
21123 
21124  /* "View.MemoryView":219
21125  * self._strides, self.ndim, False)
21126  * free(self.data)
21127  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
21128  *
21129  * @property
21130  */
21131  PyObject_Free(__pyx_v_self->_shape);
21132 
21133  /* "View.MemoryView":211
21134  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21135  *
21136  * def __dealloc__(array self): # <<<<<<<<<<<<<<
21137  * if self.callback_free_data != NULL:
21138  * self.callback_free_data(self.data)
21139  */
21140 
21141  /* function exit code */
21142  __Pyx_RefNannyFinishContext();
21143 }
21144 
21145 /* "View.MemoryView":222
21146  *
21147  * @property
21148  * def memview(self): # <<<<<<<<<<<<<<
21149  * return self.get_memview()
21150  *
21151  */
21152 
21153 /* Python wrapper */
21154 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
21155 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
21156  PyObject *__pyx_r = 0;
21157  __Pyx_RefNannyDeclarations
21158  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
21159  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
21160 
21161  /* function exit code */
21162  __Pyx_RefNannyFinishContext();
21163  return __pyx_r;
21164 }
21165 
21166 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
21167  PyObject *__pyx_r = NULL;
21168  __Pyx_RefNannyDeclarations
21169  PyObject *__pyx_t_1 = NULL;
21170  int __pyx_lineno = 0;
21171  const char *__pyx_filename = NULL;
21172  int __pyx_clineno = 0;
21173  __Pyx_RefNannySetupContext("__get__", 0);
21174 
21175  /* "View.MemoryView":223
21176  * @property
21177  * def memview(self):
21178  * return self.get_memview() # <<<<<<<<<<<<<<
21179  *
21180  * @cname('get_memview')
21181  */
21182  __Pyx_XDECREF(__pyx_r);
21183  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
21184  __Pyx_GOTREF(__pyx_t_1);
21185  __pyx_r = __pyx_t_1;
21186  __pyx_t_1 = 0;
21187  goto __pyx_L0;
21188 
21189  /* "View.MemoryView":222
21190  *
21191  * @property
21192  * def memview(self): # <<<<<<<<<<<<<<
21193  * return self.get_memview()
21194  *
21195  */
21196 
21197  /* function exit code */
21198  __pyx_L1_error:;
21199  __Pyx_XDECREF(__pyx_t_1);
21200  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21201  __pyx_r = NULL;
21202  __pyx_L0:;
21203  __Pyx_XGIVEREF(__pyx_r);
21204  __Pyx_RefNannyFinishContext();
21205  return __pyx_r;
21206 }
21207 
21208 /* "View.MemoryView":226
21209  *
21210  * @cname('get_memview')
21211  * cdef get_memview(self): # <<<<<<<<<<<<<<
21212  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
21213  * return memoryview(self, flags, self.dtype_is_object)
21214  */
21215 
21216 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
21217  int __pyx_v_flags;
21218  PyObject *__pyx_r = NULL;
21219  __Pyx_RefNannyDeclarations
21220  PyObject *__pyx_t_1 = NULL;
21221  PyObject *__pyx_t_2 = NULL;
21222  PyObject *__pyx_t_3 = NULL;
21223  int __pyx_lineno = 0;
21224  const char *__pyx_filename = NULL;
21225  int __pyx_clineno = 0;
21226  __Pyx_RefNannySetupContext("get_memview", 0);
21227 
21228  /* "View.MemoryView":227
21229  * @cname('get_memview')
21230  * cdef get_memview(self):
21231  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
21232  * return memoryview(self, flags, self.dtype_is_object)
21233  *
21234  */
21235  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
21236 
21237  /* "View.MemoryView":228
21238  * cdef get_memview(self):
21239  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
21240  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
21241  *
21242  * def __len__(self):
21243  */
21244  __Pyx_XDECREF(__pyx_r);
21245  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
21246  __Pyx_GOTREF(__pyx_t_1);
21247  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
21248  __Pyx_GOTREF(__pyx_t_2);
21249  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
21250  __Pyx_GOTREF(__pyx_t_3);
21251  __Pyx_INCREF(((PyObject *)__pyx_v_self));
21252  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
21253  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
21254  __Pyx_GIVEREF(__pyx_t_1);
21255  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
21256  __Pyx_GIVEREF(__pyx_t_2);
21257  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
21258  __pyx_t_1 = 0;
21259  __pyx_t_2 = 0;
21260  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
21261  __Pyx_GOTREF(__pyx_t_2);
21262  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21263  __pyx_r = __pyx_t_2;
21264  __pyx_t_2 = 0;
21265  goto __pyx_L0;
21266 
21267  /* "View.MemoryView":226
21268  *
21269  * @cname('get_memview')
21270  * cdef get_memview(self): # <<<<<<<<<<<<<<
21271  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
21272  * return memoryview(self, flags, self.dtype_is_object)
21273  */
21274 
21275  /* function exit code */
21276  __pyx_L1_error:;
21277  __Pyx_XDECREF(__pyx_t_1);
21278  __Pyx_XDECREF(__pyx_t_2);
21279  __Pyx_XDECREF(__pyx_t_3);
21280  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
21281  __pyx_r = 0;
21282  __pyx_L0:;
21283  __Pyx_XGIVEREF(__pyx_r);
21284  __Pyx_RefNannyFinishContext();
21285  return __pyx_r;
21286 }
21287 
21288 /* "View.MemoryView":230
21289  * return memoryview(self, flags, self.dtype_is_object)
21290  *
21291  * def __len__(self): # <<<<<<<<<<<<<<
21292  * return self._shape[0]
21293  *
21294  */
21295 
21296 /* Python wrapper */
21297 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
21298 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
21299  Py_ssize_t __pyx_r;
21300  __Pyx_RefNannyDeclarations
21301  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
21302  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
21303 
21304  /* function exit code */
21305  __Pyx_RefNannyFinishContext();
21306  return __pyx_r;
21307 }
21308 
21309 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
21310  Py_ssize_t __pyx_r;
21311  __Pyx_RefNannyDeclarations
21312  __Pyx_RefNannySetupContext("__len__", 0);
21313 
21314  /* "View.MemoryView":231
21315  *
21316  * def __len__(self):
21317  * return self._shape[0] # <<<<<<<<<<<<<<
21318  *
21319  * def __getattr__(self, attr):
21320  */
21321  __pyx_r = (__pyx_v_self->_shape[0]);
21322  goto __pyx_L0;
21323 
21324  /* "View.MemoryView":230
21325  * return memoryview(self, flags, self.dtype_is_object)
21326  *
21327  * def __len__(self): # <<<<<<<<<<<<<<
21328  * return self._shape[0]
21329  *
21330  */
21331 
21332  /* function exit code */
21333  __pyx_L0:;
21334  __Pyx_RefNannyFinishContext();
21335  return __pyx_r;
21336 }
21337 
21338 /* "View.MemoryView":233
21339  * return self._shape[0]
21340  *
21341  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
21342  * return getattr(self.memview, attr)
21343  *
21344  */
21345 
21346 /* Python wrapper */
21347 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
21348 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
21349  PyObject *__pyx_r = 0;
21350  __Pyx_RefNannyDeclarations
21351  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
21352  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
21353 
21354  /* function exit code */
21355  __Pyx_RefNannyFinishContext();
21356  return __pyx_r;
21357 }
21358 
21359 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
21360  PyObject *__pyx_r = NULL;
21361  __Pyx_RefNannyDeclarations
21362  PyObject *__pyx_t_1 = NULL;
21363  PyObject *__pyx_t_2 = NULL;
21364  int __pyx_lineno = 0;
21365  const char *__pyx_filename = NULL;
21366  int __pyx_clineno = 0;
21367  __Pyx_RefNannySetupContext("__getattr__", 0);
21368 
21369  /* "View.MemoryView":234
21370  *
21371  * def __getattr__(self, attr):
21372  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
21373  *
21374  * def __getitem__(self, item):
21375  */
21376  __Pyx_XDECREF(__pyx_r);
21377  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
21378  __Pyx_GOTREF(__pyx_t_1);
21379  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
21380  __Pyx_GOTREF(__pyx_t_2);
21381  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21382  __pyx_r = __pyx_t_2;
21383  __pyx_t_2 = 0;
21384  goto __pyx_L0;
21385 
21386  /* "View.MemoryView":233
21387  * return self._shape[0]
21388  *
21389  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
21390  * return getattr(self.memview, attr)
21391  *
21392  */
21393 
21394  /* function exit code */
21395  __pyx_L1_error:;
21396  __Pyx_XDECREF(__pyx_t_1);
21397  __Pyx_XDECREF(__pyx_t_2);
21398  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21399  __pyx_r = NULL;
21400  __pyx_L0:;
21401  __Pyx_XGIVEREF(__pyx_r);
21402  __Pyx_RefNannyFinishContext();
21403  return __pyx_r;
21404 }
21405 
21406 /* "View.MemoryView":236
21407  * return getattr(self.memview, attr)
21408  *
21409  * def __getitem__(self, item): # <<<<<<<<<<<<<<
21410  * return self.memview[item]
21411  *
21412  */
21413 
21414 /* Python wrapper */
21415 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
21416 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
21417  PyObject *__pyx_r = 0;
21418  __Pyx_RefNannyDeclarations
21419  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
21420  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
21421 
21422  /* function exit code */
21423  __Pyx_RefNannyFinishContext();
21424  return __pyx_r;
21425 }
21426 
21427 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
21428  PyObject *__pyx_r = NULL;
21429  __Pyx_RefNannyDeclarations
21430  PyObject *__pyx_t_1 = NULL;
21431  PyObject *__pyx_t_2 = NULL;
21432  int __pyx_lineno = 0;
21433  const char *__pyx_filename = NULL;
21434  int __pyx_clineno = 0;
21435  __Pyx_RefNannySetupContext("__getitem__", 0);
21436 
21437  /* "View.MemoryView":237
21438  *
21439  * def __getitem__(self, item):
21440  * return self.memview[item] # <<<<<<<<<<<<<<
21441  *
21442  * def __setitem__(self, item, value):
21443  */
21444  __Pyx_XDECREF(__pyx_r);
21445  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
21446  __Pyx_GOTREF(__pyx_t_1);
21447  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
21448  __Pyx_GOTREF(__pyx_t_2);
21449  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21450  __pyx_r = __pyx_t_2;
21451  __pyx_t_2 = 0;
21452  goto __pyx_L0;
21453 
21454  /* "View.MemoryView":236
21455  * return getattr(self.memview, attr)
21456  *
21457  * def __getitem__(self, item): # <<<<<<<<<<<<<<
21458  * return self.memview[item]
21459  *
21460  */
21461 
21462  /* function exit code */
21463  __pyx_L1_error:;
21464  __Pyx_XDECREF(__pyx_t_1);
21465  __Pyx_XDECREF(__pyx_t_2);
21466  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21467  __pyx_r = NULL;
21468  __pyx_L0:;
21469  __Pyx_XGIVEREF(__pyx_r);
21470  __Pyx_RefNannyFinishContext();
21471  return __pyx_r;
21472 }
21473 
21474 /* "View.MemoryView":239
21475  * return self.memview[item]
21476  *
21477  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
21478  * self.memview[item] = value
21479  *
21480  */
21481 
21482 /* Python wrapper */
21483 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
21484 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
21485  int __pyx_r;
21486  __Pyx_RefNannyDeclarations
21487  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
21488  __pyx_r = __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));
21489 
21490  /* function exit code */
21491  __Pyx_RefNannyFinishContext();
21492  return __pyx_r;
21493 }
21494 
21495 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) {
21496  int __pyx_r;
21497  __Pyx_RefNannyDeclarations
21498  PyObject *__pyx_t_1 = NULL;
21499  int __pyx_lineno = 0;
21500  const char *__pyx_filename = NULL;
21501  int __pyx_clineno = 0;
21502  __Pyx_RefNannySetupContext("__setitem__", 0);
21503 
21504  /* "View.MemoryView":240
21505  *
21506  * def __setitem__(self, item, value):
21507  * self.memview[item] = value # <<<<<<<<<<<<<<
21508  *
21509  *
21510  */
21511  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
21512  __Pyx_GOTREF(__pyx_t_1);
21513  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
21514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21515 
21516  /* "View.MemoryView":239
21517  * return self.memview[item]
21518  *
21519  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
21520  * self.memview[item] = value
21521  *
21522  */
21523 
21524  /* function exit code */
21525  __pyx_r = 0;
21526  goto __pyx_L0;
21527  __pyx_L1_error:;
21528  __Pyx_XDECREF(__pyx_t_1);
21529  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21530  __pyx_r = -1;
21531  __pyx_L0:;
21532  __Pyx_RefNannyFinishContext();
21533  return __pyx_r;
21534 }
21535 
21536 /* "(tree fragment)":1
21537  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
21538  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21539  * def __setstate_cython__(self, __pyx_state):
21540  */
21541 
21542 /* Python wrapper */
21543 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
21544 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
21545  PyObject *__pyx_r = 0;
21546  __Pyx_RefNannyDeclarations
21547  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
21548  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
21549 
21550  /* function exit code */
21551  __Pyx_RefNannyFinishContext();
21552  return __pyx_r;
21553 }
21554 
21555 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
21556  PyObject *__pyx_r = NULL;
21557  __Pyx_RefNannyDeclarations
21558  PyObject *__pyx_t_1 = NULL;
21559  int __pyx_lineno = 0;
21560  const char *__pyx_filename = NULL;
21561  int __pyx_clineno = 0;
21562  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
21563 
21564  /* "(tree fragment)":2
21565  * def __reduce_cython__(self):
21566  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21567  * def __setstate_cython__(self, __pyx_state):
21568  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21569  */
21570  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
21571  __Pyx_GOTREF(__pyx_t_1);
21572  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21573  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21574  __PYX_ERR(0, 2, __pyx_L1_error)
21575 
21576  /* "(tree fragment)":1
21577  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
21578  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21579  * def __setstate_cython__(self, __pyx_state):
21580  */
21581 
21582  /* function exit code */
21583  __pyx_L1_error:;
21584  __Pyx_XDECREF(__pyx_t_1);
21585  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21586  __pyx_r = NULL;
21587  __Pyx_XGIVEREF(__pyx_r);
21588  __Pyx_RefNannyFinishContext();
21589  return __pyx_r;
21590 }
21591 
21592 /* "(tree fragment)":3
21593  * def __reduce_cython__(self):
21594  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21595  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
21596  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21597  */
21598 
21599 /* Python wrapper */
21600 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
21601 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
21602  PyObject *__pyx_r = 0;
21603  __Pyx_RefNannyDeclarations
21604  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
21605  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
21606 
21607  /* function exit code */
21608  __Pyx_RefNannyFinishContext();
21609  return __pyx_r;
21610 }
21611 
21612 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) {
21613  PyObject *__pyx_r = NULL;
21614  __Pyx_RefNannyDeclarations
21615  PyObject *__pyx_t_1 = NULL;
21616  int __pyx_lineno = 0;
21617  const char *__pyx_filename = NULL;
21618  int __pyx_clineno = 0;
21619  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
21620 
21621  /* "(tree fragment)":4
21622  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21623  * def __setstate_cython__(self, __pyx_state):
21624  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21625  */
21626  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
21627  __Pyx_GOTREF(__pyx_t_1);
21628  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21629  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21630  __PYX_ERR(0, 4, __pyx_L1_error)
21631 
21632  /* "(tree fragment)":3
21633  * def __reduce_cython__(self):
21634  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21635  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
21636  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21637  */
21638 
21639  /* function exit code */
21640  __pyx_L1_error:;
21641  __Pyx_XDECREF(__pyx_t_1);
21642  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21643  __pyx_r = NULL;
21644  __Pyx_XGIVEREF(__pyx_r);
21645  __Pyx_RefNannyFinishContext();
21646  return __pyx_r;
21647 }
21648 
21649 /* "View.MemoryView":244
21650  *
21651  * @cname("__pyx_array_new")
21652  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
21653  * char *mode, char *buf):
21654  * cdef array result
21655  */
21656 
21657 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
21658  struct __pyx_array_obj *__pyx_v_result = 0;
21659  struct __pyx_array_obj *__pyx_r = NULL;
21660  __Pyx_RefNannyDeclarations
21661  int __pyx_t_1;
21662  PyObject *__pyx_t_2 = NULL;
21663  PyObject *__pyx_t_3 = NULL;
21664  PyObject *__pyx_t_4 = NULL;
21665  PyObject *__pyx_t_5 = NULL;
21666  int __pyx_lineno = 0;
21667  const char *__pyx_filename = NULL;
21668  int __pyx_clineno = 0;
21669  __Pyx_RefNannySetupContext("array_cwrapper", 0);
21670 
21671  /* "View.MemoryView":248
21672  * cdef array result
21673  *
21674  * if buf == NULL: # <<<<<<<<<<<<<<
21675  * result = array(shape, itemsize, format, mode.decode('ASCII'))
21676  * else:
21677  */
21678  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
21679  if (__pyx_t_1) {
21680 
21681  /* "View.MemoryView":249
21682  *
21683  * if buf == NULL:
21684  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
21685  * else:
21686  * result = array(shape, itemsize, format, mode.decode('ASCII'),
21687  */
21688  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
21689  __Pyx_GOTREF(__pyx_t_2);
21690  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
21691  __Pyx_GOTREF(__pyx_t_3);
21692  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
21693  __Pyx_GOTREF(__pyx_t_4);
21694  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
21695  __Pyx_GOTREF(__pyx_t_5);
21696  __Pyx_INCREF(__pyx_v_shape);
21697  __Pyx_GIVEREF(__pyx_v_shape);
21698  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
21699  __Pyx_GIVEREF(__pyx_t_2);
21700  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
21701  __Pyx_GIVEREF(__pyx_t_3);
21702  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
21703  __Pyx_GIVEREF(__pyx_t_4);
21704  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
21705  __pyx_t_2 = 0;
21706  __pyx_t_3 = 0;
21707  __pyx_t_4 = 0;
21708  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
21709  __Pyx_GOTREF(__pyx_t_4);
21710  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21711  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
21712  __pyx_t_4 = 0;
21713 
21714  /* "View.MemoryView":248
21715  * cdef array result
21716  *
21717  * if buf == NULL: # <<<<<<<<<<<<<<
21718  * result = array(shape, itemsize, format, mode.decode('ASCII'))
21719  * else:
21720  */
21721  goto __pyx_L3;
21722  }
21723 
21724  /* "View.MemoryView":251
21725  * result = array(shape, itemsize, format, mode.decode('ASCII'))
21726  * else:
21727  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
21728  * allocate_buffer=False)
21729  * result.data = buf
21730  */
21731  /*else*/ {
21732  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
21733  __Pyx_GOTREF(__pyx_t_4);
21734  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
21735  __Pyx_GOTREF(__pyx_t_5);
21736  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
21737  __Pyx_GOTREF(__pyx_t_3);
21738  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
21739  __Pyx_GOTREF(__pyx_t_2);
21740  __Pyx_INCREF(__pyx_v_shape);
21741  __Pyx_GIVEREF(__pyx_v_shape);
21742  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
21743  __Pyx_GIVEREF(__pyx_t_4);
21744  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
21745  __Pyx_GIVEREF(__pyx_t_5);
21746  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
21747  __Pyx_GIVEREF(__pyx_t_3);
21748  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
21749  __pyx_t_4 = 0;
21750  __pyx_t_5 = 0;
21751  __pyx_t_3 = 0;
21752 
21753  /* "View.MemoryView":252
21754  * else:
21755  * result = array(shape, itemsize, format, mode.decode('ASCII'),
21756  * allocate_buffer=False) # <<<<<<<<<<<<<<
21757  * result.data = buf
21758  *
21759  */
21760  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
21761  __Pyx_GOTREF(__pyx_t_3);
21762  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
21763 
21764  /* "View.MemoryView":251
21765  * result = array(shape, itemsize, format, mode.decode('ASCII'))
21766  * else:
21767  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
21768  * allocate_buffer=False)
21769  * result.data = buf
21770  */
21771  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
21772  __Pyx_GOTREF(__pyx_t_5);
21773  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21774  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21775  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
21776  __pyx_t_5 = 0;
21777 
21778  /* "View.MemoryView":253
21779  * result = array(shape, itemsize, format, mode.decode('ASCII'),
21780  * allocate_buffer=False)
21781  * result.data = buf # <<<<<<<<<<<<<<
21782  *
21783  * return result
21784  */
21785  __pyx_v_result->data = __pyx_v_buf;
21786  }
21787  __pyx_L3:;
21788 
21789  /* "View.MemoryView":255
21790  * result.data = buf
21791  *
21792  * return result # <<<<<<<<<<<<<<
21793  *
21794  *
21795  */
21796  __Pyx_XDECREF(((PyObject *)__pyx_r));
21797  __Pyx_INCREF(((PyObject *)__pyx_v_result));
21798  __pyx_r = __pyx_v_result;
21799  goto __pyx_L0;
21800 
21801  /* "View.MemoryView":244
21802  *
21803  * @cname("__pyx_array_new")
21804  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
21805  * char *mode, char *buf):
21806  * cdef array result
21807  */
21808 
21809  /* function exit code */
21810  __pyx_L1_error:;
21811  __Pyx_XDECREF(__pyx_t_2);
21812  __Pyx_XDECREF(__pyx_t_3);
21813  __Pyx_XDECREF(__pyx_t_4);
21814  __Pyx_XDECREF(__pyx_t_5);
21815  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
21816  __pyx_r = 0;
21817  __pyx_L0:;
21818  __Pyx_XDECREF((PyObject *)__pyx_v_result);
21819  __Pyx_XGIVEREF((PyObject *)__pyx_r);
21820  __Pyx_RefNannyFinishContext();
21821  return __pyx_r;
21822 }
21823 
21824 /* "View.MemoryView":281
21825  * cdef class Enum(object):
21826  * cdef object name
21827  * def __init__(self, name): # <<<<<<<<<<<<<<
21828  * self.name = name
21829  * def __repr__(self):
21830  */
21831 
21832 /* Python wrapper */
21833 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21834 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21835  PyObject *__pyx_v_name = 0;
21836  int __pyx_lineno = 0;
21837  const char *__pyx_filename = NULL;
21838  int __pyx_clineno = 0;
21839  int __pyx_r;
21840  __Pyx_RefNannyDeclarations
21841  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
21842  {
21843  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
21844  PyObject* values[1] = {0};
21845  if (unlikely(__pyx_kwds)) {
21846  Py_ssize_t kw_args;
21847  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21848  switch (pos_args) {
21849  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21850  CYTHON_FALLTHROUGH;
21851  case 0: break;
21852  default: goto __pyx_L5_argtuple_error;
21853  }
21854  kw_args = PyDict_Size(__pyx_kwds);
21855  switch (pos_args) {
21856  case 0:
21857  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
21858  else goto __pyx_L5_argtuple_error;
21859  }
21860  if (unlikely(kw_args > 0)) {
21861  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 281, __pyx_L3_error)
21862  }
21863  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
21864  goto __pyx_L5_argtuple_error;
21865  } else {
21866  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21867  }
21868  __pyx_v_name = values[0];
21869  }
21870  goto __pyx_L4_argument_unpacking_done;
21871  __pyx_L5_argtuple_error:;
21872  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 281, __pyx_L3_error)
21873  __pyx_L3_error:;
21874  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21875  __Pyx_RefNannyFinishContext();
21876  return -1;
21877  __pyx_L4_argument_unpacking_done:;
21878  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
21879 
21880  /* function exit code */
21881  __Pyx_RefNannyFinishContext();
21882  return __pyx_r;
21883 }
21884 
21885 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
21886  int __pyx_r;
21887  __Pyx_RefNannyDeclarations
21888  __Pyx_RefNannySetupContext("__init__", 0);
21889 
21890  /* "View.MemoryView":282
21891  * cdef object name
21892  * def __init__(self, name):
21893  * self.name = name # <<<<<<<<<<<<<<
21894  * def __repr__(self):
21895  * return self.name
21896  */
21897  __Pyx_INCREF(__pyx_v_name);
21898  __Pyx_GIVEREF(__pyx_v_name);
21899  __Pyx_GOTREF(__pyx_v_self->name);
21900  __Pyx_DECREF(__pyx_v_self->name);
21901  __pyx_v_self->name = __pyx_v_name;
21902 
21903  /* "View.MemoryView":281
21904  * cdef class Enum(object):
21905  * cdef object name
21906  * def __init__(self, name): # <<<<<<<<<<<<<<
21907  * self.name = name
21908  * def __repr__(self):
21909  */
21910 
21911  /* function exit code */
21912  __pyx_r = 0;
21913  __Pyx_RefNannyFinishContext();
21914  return __pyx_r;
21915 }
21916 
21917 /* "View.MemoryView":283
21918  * def __init__(self, name):
21919  * self.name = name
21920  * def __repr__(self): # <<<<<<<<<<<<<<
21921  * return self.name
21922  *
21923  */
21924 
21925 /* Python wrapper */
21926 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
21927 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
21928  PyObject *__pyx_r = 0;
21929  __Pyx_RefNannyDeclarations
21930  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
21931  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
21932 
21933  /* function exit code */
21934  __Pyx_RefNannyFinishContext();
21935  return __pyx_r;
21936 }
21937 
21938 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
21939  PyObject *__pyx_r = NULL;
21940  __Pyx_RefNannyDeclarations
21941  __Pyx_RefNannySetupContext("__repr__", 0);
21942 
21943  /* "View.MemoryView":284
21944  * self.name = name
21945  * def __repr__(self):
21946  * return self.name # <<<<<<<<<<<<<<
21947  *
21948  * cdef generic = Enum("<strided and direct or indirect>")
21949  */
21950  __Pyx_XDECREF(__pyx_r);
21951  __Pyx_INCREF(__pyx_v_self->name);
21952  __pyx_r = __pyx_v_self->name;
21953  goto __pyx_L0;
21954 
21955  /* "View.MemoryView":283
21956  * def __init__(self, name):
21957  * self.name = name
21958  * def __repr__(self): # <<<<<<<<<<<<<<
21959  * return self.name
21960  *
21961  */
21962 
21963  /* function exit code */
21964  __pyx_L0:;
21965  __Pyx_XGIVEREF(__pyx_r);
21966  __Pyx_RefNannyFinishContext();
21967  return __pyx_r;
21968 }
21969 
21970 /* "(tree fragment)":1
21971  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
21972  * cdef tuple state
21973  * cdef object _dict
21974  */
21975 
21976 /* Python wrapper */
21977 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
21978 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
21979  PyObject *__pyx_r = 0;
21980  __Pyx_RefNannyDeclarations
21981  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
21982  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
21983 
21984  /* function exit code */
21985  __Pyx_RefNannyFinishContext();
21986  return __pyx_r;
21987 }
21988 
21989 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
21990  PyObject *__pyx_v_state = 0;
21991  PyObject *__pyx_v__dict = 0;
21992  int __pyx_v_use_setstate;
21993  PyObject *__pyx_r = NULL;
21994  __Pyx_RefNannyDeclarations
21995  PyObject *__pyx_t_1 = NULL;
21996  int __pyx_t_2;
21997  int __pyx_t_3;
21998  PyObject *__pyx_t_4 = NULL;
21999  PyObject *__pyx_t_5 = NULL;
22000  int __pyx_lineno = 0;
22001  const char *__pyx_filename = NULL;
22002  int __pyx_clineno = 0;
22003  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22004 
22005  /* "(tree fragment)":5
22006  * cdef object _dict
22007  * cdef bint use_setstate
22008  * state = (self.name,) # <<<<<<<<<<<<<<
22009  * _dict = getattr(self, '__dict__', None)
22010  * if _dict is not None:
22011  */
22012  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
22013  __Pyx_GOTREF(__pyx_t_1);
22014  __Pyx_INCREF(__pyx_v_self->name);
22015  __Pyx_GIVEREF(__pyx_v_self->name);
22016  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
22017  __pyx_v_state = ((PyObject*)__pyx_t_1);
22018  __pyx_t_1 = 0;
22019 
22020  /* "(tree fragment)":6
22021  * cdef bint use_setstate
22022  * state = (self.name,)
22023  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
22024  * if _dict is not None:
22025  * state += (_dict,)
22026  */
22027  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
22028  __Pyx_GOTREF(__pyx_t_1);
22029  __pyx_v__dict = __pyx_t_1;
22030  __pyx_t_1 = 0;
22031 
22032  /* "(tree fragment)":7
22033  * state = (self.name,)
22034  * _dict = getattr(self, '__dict__', None)
22035  * if _dict is not None: # <<<<<<<<<<<<<<
22036  * state += (_dict,)
22037  * use_setstate = True
22038  */
22039  __pyx_t_2 = (__pyx_v__dict != Py_None);
22040  __pyx_t_3 = (__pyx_t_2 != 0);
22041  if (__pyx_t_3) {
22042 
22043  /* "(tree fragment)":8
22044  * _dict = getattr(self, '__dict__', None)
22045  * if _dict is not None:
22046  * state += (_dict,) # <<<<<<<<<<<<<<
22047  * use_setstate = True
22048  * else:
22049  */
22050  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
22051  __Pyx_GOTREF(__pyx_t_1);
22052  __Pyx_INCREF(__pyx_v__dict);
22053  __Pyx_GIVEREF(__pyx_v__dict);
22054  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
22055  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
22056  __Pyx_GOTREF(__pyx_t_4);
22057  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22058  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
22059  __pyx_t_4 = 0;
22060 
22061  /* "(tree fragment)":9
22062  * if _dict is not None:
22063  * state += (_dict,)
22064  * use_setstate = True # <<<<<<<<<<<<<<
22065  * else:
22066  * use_setstate = self.name is not None
22067  */
22068  __pyx_v_use_setstate = 1;
22069 
22070  /* "(tree fragment)":7
22071  * state = (self.name,)
22072  * _dict = getattr(self, '__dict__', None)
22073  * if _dict is not None: # <<<<<<<<<<<<<<
22074  * state += (_dict,)
22075  * use_setstate = True
22076  */
22077  goto __pyx_L3;
22078  }
22079 
22080  /* "(tree fragment)":11
22081  * use_setstate = True
22082  * else:
22083  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
22084  * if use_setstate:
22085  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22086  */
22087  /*else*/ {
22088  __pyx_t_3 = (__pyx_v_self->name != Py_None);
22089  __pyx_v_use_setstate = __pyx_t_3;
22090  }
22091  __pyx_L3:;
22092 
22093  /* "(tree fragment)":12
22094  * else:
22095  * use_setstate = self.name is not None
22096  * if use_setstate: # <<<<<<<<<<<<<<
22097  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22098  * else:
22099  */
22100  __pyx_t_3 = (__pyx_v_use_setstate != 0);
22101  if (__pyx_t_3) {
22102 
22103  /* "(tree fragment)":13
22104  * use_setstate = self.name is not None
22105  * if use_setstate:
22106  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
22107  * else:
22108  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22109  */
22110  __Pyx_XDECREF(__pyx_r);
22111  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
22112  __Pyx_GOTREF(__pyx_t_4);
22113  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
22114  __Pyx_GOTREF(__pyx_t_1);
22115  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22116  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22117  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22118  __Pyx_INCREF(__pyx_int_184977713);
22119  __Pyx_GIVEREF(__pyx_int_184977713);
22120  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
22121  __Pyx_INCREF(Py_None);
22122  __Pyx_GIVEREF(Py_None);
22123  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
22124  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error)
22125  __Pyx_GOTREF(__pyx_t_5);
22126  __Pyx_GIVEREF(__pyx_t_4);
22127  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
22128  __Pyx_GIVEREF(__pyx_t_1);
22129  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
22130  __Pyx_INCREF(__pyx_v_state);
22131  __Pyx_GIVEREF(__pyx_v_state);
22132  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
22133  __pyx_t_4 = 0;
22134  __pyx_t_1 = 0;
22135  __pyx_r = __pyx_t_5;
22136  __pyx_t_5 = 0;
22137  goto __pyx_L0;
22138 
22139  /* "(tree fragment)":12
22140  * else:
22141  * use_setstate = self.name is not None
22142  * if use_setstate: # <<<<<<<<<<<<<<
22143  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22144  * else:
22145  */
22146  }
22147 
22148  /* "(tree fragment)":15
22149  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22150  * else:
22151  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
22152  * def __setstate_cython__(self, __pyx_state):
22153  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22154  */
22155  /*else*/ {
22156  __Pyx_XDECREF(__pyx_r);
22157  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)
22158  __Pyx_GOTREF(__pyx_t_5);
22159  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
22160  __Pyx_GOTREF(__pyx_t_1);
22161  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22162  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22163  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22164  __Pyx_INCREF(__pyx_int_184977713);
22165  __Pyx_GIVEREF(__pyx_int_184977713);
22166  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
22167  __Pyx_INCREF(__pyx_v_state);
22168  __Pyx_GIVEREF(__pyx_v_state);
22169  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
22170  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
22171  __Pyx_GOTREF(__pyx_t_4);
22172  __Pyx_GIVEREF(__pyx_t_5);
22173  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
22174  __Pyx_GIVEREF(__pyx_t_1);
22175  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
22176  __pyx_t_5 = 0;
22177  __pyx_t_1 = 0;
22178  __pyx_r = __pyx_t_4;
22179  __pyx_t_4 = 0;
22180  goto __pyx_L0;
22181  }
22182 
22183  /* "(tree fragment)":1
22184  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22185  * cdef tuple state
22186  * cdef object _dict
22187  */
22188 
22189  /* function exit code */
22190  __pyx_L1_error:;
22191  __Pyx_XDECREF(__pyx_t_1);
22192  __Pyx_XDECREF(__pyx_t_4);
22193  __Pyx_XDECREF(__pyx_t_5);
22194  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22195  __pyx_r = NULL;
22196  __pyx_L0:;
22197  __Pyx_XDECREF(__pyx_v_state);
22198  __Pyx_XDECREF(__pyx_v__dict);
22199  __Pyx_XGIVEREF(__pyx_r);
22200  __Pyx_RefNannyFinishContext();
22201  return __pyx_r;
22202 }
22203 
22204 /* "(tree fragment)":16
22205  * else:
22206  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22207  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22208  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22209  */
22210 
22211 /* Python wrapper */
22212 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
22213 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22214  PyObject *__pyx_r = 0;
22215  __Pyx_RefNannyDeclarations
22216  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22217  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22218 
22219  /* function exit code */
22220  __Pyx_RefNannyFinishContext();
22221  return __pyx_r;
22222 }
22223 
22224 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22225  PyObject *__pyx_r = NULL;
22226  __Pyx_RefNannyDeclarations
22227  PyObject *__pyx_t_1 = NULL;
22228  int __pyx_lineno = 0;
22229  const char *__pyx_filename = NULL;
22230  int __pyx_clineno = 0;
22231  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22232 
22233  /* "(tree fragment)":17
22234  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22235  * def __setstate_cython__(self, __pyx_state):
22236  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
22237  */
22238  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(0, 17, __pyx_L1_error)
22239  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
22240  __Pyx_GOTREF(__pyx_t_1);
22241  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22242 
22243  /* "(tree fragment)":16
22244  * else:
22245  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22246  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22247  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22248  */
22249 
22250  /* function exit code */
22251  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22252  goto __pyx_L0;
22253  __pyx_L1_error:;
22254  __Pyx_XDECREF(__pyx_t_1);
22255  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22256  __pyx_r = NULL;
22257  __pyx_L0:;
22258  __Pyx_XGIVEREF(__pyx_r);
22259  __Pyx_RefNannyFinishContext();
22260  return __pyx_r;
22261 }
22262 
22263 /* "View.MemoryView":298
22264  *
22265  * @cname('__pyx_align_pointer')
22266  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
22267  * "Align pointer memory on a given boundary"
22268  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
22269  */
22270 
22271 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
22272  Py_intptr_t __pyx_v_aligned_p;
22273  size_t __pyx_v_offset;
22274  void *__pyx_r;
22275  int __pyx_t_1;
22276 
22277  /* "View.MemoryView":300
22278  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
22279  * "Align pointer memory on a given boundary"
22280  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
22281  * cdef size_t offset
22282  *
22283  */
22284  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
22285 
22286  /* "View.MemoryView":304
22287  *
22288  * with cython.cdivision(True):
22289  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
22290  *
22291  * if offset > 0:
22292  */
22293  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
22294 
22295  /* "View.MemoryView":306
22296  * offset = aligned_p % alignment
22297  *
22298  * if offset > 0: # <<<<<<<<<<<<<<
22299  * aligned_p += alignment - offset
22300  *
22301  */
22302  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
22303  if (__pyx_t_1) {
22304 
22305  /* "View.MemoryView":307
22306  *
22307  * if offset > 0:
22308  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
22309  *
22310  * return <void *> aligned_p
22311  */
22312  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
22313 
22314  /* "View.MemoryView":306
22315  * offset = aligned_p % alignment
22316  *
22317  * if offset > 0: # <<<<<<<<<<<<<<
22318  * aligned_p += alignment - offset
22319  *
22320  */
22321  }
22322 
22323  /* "View.MemoryView":309
22324  * aligned_p += alignment - offset
22325  *
22326  * return <void *> aligned_p # <<<<<<<<<<<<<<
22327  *
22328  *
22329  */
22330  __pyx_r = ((void *)__pyx_v_aligned_p);
22331  goto __pyx_L0;
22332 
22333  /* "View.MemoryView":298
22334  *
22335  * @cname('__pyx_align_pointer')
22336  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
22337  * "Align pointer memory on a given boundary"
22338  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
22339  */
22340 
22341  /* function exit code */
22342  __pyx_L0:;
22343  return __pyx_r;
22344 }
22345 
22346 /* "View.MemoryView":345
22347  * cdef __Pyx_TypeInfo *typeinfo
22348  *
22349  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
22350  * self.obj = obj
22351  * self.flags = flags
22352  */
22353 
22354 /* Python wrapper */
22355 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22356 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22357  PyObject *__pyx_v_obj = 0;
22358  int __pyx_v_flags;
22359  int __pyx_v_dtype_is_object;
22360  int __pyx_lineno = 0;
22361  const char *__pyx_filename = NULL;
22362  int __pyx_clineno = 0;
22363  int __pyx_r;
22364  __Pyx_RefNannyDeclarations
22365  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
22366  {
22367  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
22368  PyObject* values[3] = {0,0,0};
22369  if (unlikely(__pyx_kwds)) {
22370  Py_ssize_t kw_args;
22371  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22372  switch (pos_args) {
22373  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22374  CYTHON_FALLTHROUGH;
22375  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22376  CYTHON_FALLTHROUGH;
22377  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22378  CYTHON_FALLTHROUGH;
22379  case 0: break;
22380  default: goto __pyx_L5_argtuple_error;
22381  }
22382  kw_args = PyDict_Size(__pyx_kwds);
22383  switch (pos_args) {
22384  case 0:
22385  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
22386  else goto __pyx_L5_argtuple_error;
22387  CYTHON_FALLTHROUGH;
22388  case 1:
22389  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
22390  else {
22391  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 345, __pyx_L3_error)
22392  }
22393  CYTHON_FALLTHROUGH;
22394  case 2:
22395  if (kw_args > 0) {
22396  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
22397  if (value) { values[2] = value; kw_args--; }
22398  }
22399  }
22400  if (unlikely(kw_args > 0)) {
22401  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 345, __pyx_L3_error)
22402  }
22403  } else {
22404  switch (PyTuple_GET_SIZE(__pyx_args)) {
22405  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
22406  CYTHON_FALLTHROUGH;
22407  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22408  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22409  break;
22410  default: goto __pyx_L5_argtuple_error;
22411  }
22412  }
22413  __pyx_v_obj = values[0];
22414  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
22415  if (values[2]) {
22416  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
22417  } else {
22418  __pyx_v_dtype_is_object = ((int)0);
22419  }
22420  }
22421  goto __pyx_L4_argument_unpacking_done;
22422  __pyx_L5_argtuple_error:;
22423  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error)
22424  __pyx_L3_error:;
22425  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22426  __Pyx_RefNannyFinishContext();
22427  return -1;
22428  __pyx_L4_argument_unpacking_done:;
22429  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
22430 
22431  /* function exit code */
22432  __Pyx_RefNannyFinishContext();
22433  return __pyx_r;
22434 }
22435 
22436 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) {
22437  int __pyx_r;
22438  __Pyx_RefNannyDeclarations
22439  int __pyx_t_1;
22440  int __pyx_t_2;
22441  int __pyx_t_3;
22442  int __pyx_t_4;
22443  int __pyx_lineno = 0;
22444  const char *__pyx_filename = NULL;
22445  int __pyx_clineno = 0;
22446  __Pyx_RefNannySetupContext("__cinit__", 0);
22447 
22448  /* "View.MemoryView":346
22449  *
22450  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
22451  * self.obj = obj # <<<<<<<<<<<<<<
22452  * self.flags = flags
22453  * if type(self) is memoryview or obj is not None:
22454  */
22455  __Pyx_INCREF(__pyx_v_obj);
22456  __Pyx_GIVEREF(__pyx_v_obj);
22457  __Pyx_GOTREF(__pyx_v_self->obj);
22458  __Pyx_DECREF(__pyx_v_self->obj);
22459  __pyx_v_self->obj = __pyx_v_obj;
22460 
22461  /* "View.MemoryView":347
22462  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
22463  * self.obj = obj
22464  * self.flags = flags # <<<<<<<<<<<<<<
22465  * if type(self) is memoryview or obj is not None:
22466  * __Pyx_GetBuffer(obj, &self.view, flags)
22467  */
22468  __pyx_v_self->flags = __pyx_v_flags;
22469 
22470  /* "View.MemoryView":348
22471  * self.obj = obj
22472  * self.flags = flags
22473  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
22474  * __Pyx_GetBuffer(obj, &self.view, flags)
22475  * if <PyObject *> self.view.obj == NULL:
22476  */
22477  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
22478  __pyx_t_3 = (__pyx_t_2 != 0);
22479  if (!__pyx_t_3) {
22480  } else {
22481  __pyx_t_1 = __pyx_t_3;
22482  goto __pyx_L4_bool_binop_done;
22483  }
22484  __pyx_t_3 = (__pyx_v_obj != Py_None);
22485  __pyx_t_2 = (__pyx_t_3 != 0);
22486  __pyx_t_1 = __pyx_t_2;
22487  __pyx_L4_bool_binop_done:;
22488  if (__pyx_t_1) {
22489 
22490  /* "View.MemoryView":349
22491  * self.flags = flags
22492  * if type(self) is memoryview or obj is not None:
22493  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
22494  * if <PyObject *> self.view.obj == NULL:
22495  * (<__pyx_buffer *> &self.view).obj = Py_None
22496  */
22497  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error)
22498 
22499  /* "View.MemoryView":350
22500  * if type(self) is memoryview or obj is not None:
22501  * __Pyx_GetBuffer(obj, &self.view, flags)
22502  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
22503  * (<__pyx_buffer *> &self.view).obj = Py_None
22504  * Py_INCREF(Py_None)
22505  */
22506  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
22507  if (__pyx_t_1) {
22508 
22509  /* "View.MemoryView":351
22510  * __Pyx_GetBuffer(obj, &self.view, flags)
22511  * if <PyObject *> self.view.obj == NULL:
22512  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
22513  * Py_INCREF(Py_None)
22514  *
22515  */
22516  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
22517 
22518  /* "View.MemoryView":352
22519  * if <PyObject *> self.view.obj == NULL:
22520  * (<__pyx_buffer *> &self.view).obj = Py_None
22521  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
22522  *
22523  * global __pyx_memoryview_thread_locks_used
22524  */
22525  Py_INCREF(Py_None);
22526 
22527  /* "View.MemoryView":350
22528  * if type(self) is memoryview or obj is not None:
22529  * __Pyx_GetBuffer(obj, &self.view, flags)
22530  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
22531  * (<__pyx_buffer *> &self.view).obj = Py_None
22532  * Py_INCREF(Py_None)
22533  */
22534  }
22535 
22536  /* "View.MemoryView":348
22537  * self.obj = obj
22538  * self.flags = flags
22539  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
22540  * __Pyx_GetBuffer(obj, &self.view, flags)
22541  * if <PyObject *> self.view.obj == NULL:
22542  */
22543  }
22544 
22545  /* "View.MemoryView":355
22546  *
22547  * global __pyx_memoryview_thread_locks_used
22548  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
22549  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
22550  * __pyx_memoryview_thread_locks_used += 1
22551  */
22552  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
22553  if (__pyx_t_1) {
22554 
22555  /* "View.MemoryView":356
22556  * global __pyx_memoryview_thread_locks_used
22557  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
22558  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
22559  * __pyx_memoryview_thread_locks_used += 1
22560  * if self.lock is NULL:
22561  */
22562  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
22563 
22564  /* "View.MemoryView":357
22565  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
22566  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
22567  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
22568  * if self.lock is NULL:
22569  * self.lock = PyThread_allocate_lock()
22570  */
22571  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
22572 
22573  /* "View.MemoryView":355
22574  *
22575  * global __pyx_memoryview_thread_locks_used
22576  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
22577  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
22578  * __pyx_memoryview_thread_locks_used += 1
22579  */
22580  }
22581 
22582  /* "View.MemoryView":358
22583  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
22584  * __pyx_memoryview_thread_locks_used += 1
22585  * if self.lock is NULL: # <<<<<<<<<<<<<<
22586  * self.lock = PyThread_allocate_lock()
22587  * if self.lock is NULL:
22588  */
22589  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
22590  if (__pyx_t_1) {
22591 
22592  /* "View.MemoryView":359
22593  * __pyx_memoryview_thread_locks_used += 1
22594  * if self.lock is NULL:
22595  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
22596  * if self.lock is NULL:
22597  * raise MemoryError
22598  */
22599  __pyx_v_self->lock = PyThread_allocate_lock();
22600 
22601  /* "View.MemoryView":360
22602  * if self.lock is NULL:
22603  * self.lock = PyThread_allocate_lock()
22604  * if self.lock is NULL: # <<<<<<<<<<<<<<
22605  * raise MemoryError
22606  *
22607  */
22608  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
22609  if (unlikely(__pyx_t_1)) {
22610 
22611  /* "View.MemoryView":361
22612  * self.lock = PyThread_allocate_lock()
22613  * if self.lock is NULL:
22614  * raise MemoryError # <<<<<<<<<<<<<<
22615  *
22616  * if flags & PyBUF_FORMAT:
22617  */
22618  PyErr_NoMemory(); __PYX_ERR(0, 361, __pyx_L1_error)
22619 
22620  /* "View.MemoryView":360
22621  * if self.lock is NULL:
22622  * self.lock = PyThread_allocate_lock()
22623  * if self.lock is NULL: # <<<<<<<<<<<<<<
22624  * raise MemoryError
22625  *
22626  */
22627  }
22628 
22629  /* "View.MemoryView":358
22630  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
22631  * __pyx_memoryview_thread_locks_used += 1
22632  * if self.lock is NULL: # <<<<<<<<<<<<<<
22633  * self.lock = PyThread_allocate_lock()
22634  * if self.lock is NULL:
22635  */
22636  }
22637 
22638  /* "View.MemoryView":363
22639  * raise MemoryError
22640  *
22641  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
22642  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
22643  * else:
22644  */
22645  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
22646  if (__pyx_t_1) {
22647 
22648  /* "View.MemoryView":364
22649  *
22650  * if flags & PyBUF_FORMAT:
22651  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
22652  * else:
22653  * self.dtype_is_object = dtype_is_object
22654  */
22655  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
22656  if (__pyx_t_2) {
22657  } else {
22658  __pyx_t_1 = __pyx_t_2;
22659  goto __pyx_L11_bool_binop_done;
22660  }
22661  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
22662  __pyx_t_1 = __pyx_t_2;
22663  __pyx_L11_bool_binop_done:;
22664  __pyx_v_self->dtype_is_object = __pyx_t_1;
22665 
22666  /* "View.MemoryView":363
22667  * raise MemoryError
22668  *
22669  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
22670  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
22671  * else:
22672  */
22673  goto __pyx_L10;
22674  }
22675 
22676  /* "View.MemoryView":366
22677  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
22678  * else:
22679  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
22680  *
22681  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
22682  */
22683  /*else*/ {
22684  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
22685  }
22686  __pyx_L10:;
22687 
22688  /* "View.MemoryView":368
22689  * self.dtype_is_object = dtype_is_object
22690  *
22691  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
22692  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
22693  * self.typeinfo = NULL
22694  */
22695  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
22696 
22697  /* "View.MemoryView":370
22698  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
22699  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
22700  * self.typeinfo = NULL # <<<<<<<<<<<<<<
22701  *
22702  * def __dealloc__(memoryview self):
22703  */
22704  __pyx_v_self->typeinfo = NULL;
22705 
22706  /* "View.MemoryView":345
22707  * cdef __Pyx_TypeInfo *typeinfo
22708  *
22709  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
22710  * self.obj = obj
22711  * self.flags = flags
22712  */
22713 
22714  /* function exit code */
22715  __pyx_r = 0;
22716  goto __pyx_L0;
22717  __pyx_L1_error:;
22718  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22719  __pyx_r = -1;
22720  __pyx_L0:;
22721  __Pyx_RefNannyFinishContext();
22722  return __pyx_r;
22723 }
22724 
22725 /* "View.MemoryView":372
22726  * self.typeinfo = NULL
22727  *
22728  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
22729  * if self.obj is not None:
22730  * __Pyx_ReleaseBuffer(&self.view)
22731  */
22732 
22733 /* Python wrapper */
22734 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
22735 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
22736  __Pyx_RefNannyDeclarations
22737  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
22738  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
22739 
22740  /* function exit code */
22741  __Pyx_RefNannyFinishContext();
22742 }
22743 
22744 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
22745  int __pyx_v_i;
22746  __Pyx_RefNannyDeclarations
22747  int __pyx_t_1;
22748  int __pyx_t_2;
22749  int __pyx_t_3;
22750  int __pyx_t_4;
22751  int __pyx_t_5;
22752  PyThread_type_lock __pyx_t_6;
22753  PyThread_type_lock __pyx_t_7;
22754  __Pyx_RefNannySetupContext("__dealloc__", 0);
22755 
22756  /* "View.MemoryView":373
22757  *
22758  * def __dealloc__(memoryview self):
22759  * if self.obj is not None: # <<<<<<<<<<<<<<
22760  * __Pyx_ReleaseBuffer(&self.view)
22761  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
22762  */
22763  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
22764  __pyx_t_2 = (__pyx_t_1 != 0);
22765  if (__pyx_t_2) {
22766 
22767  /* "View.MemoryView":374
22768  * def __dealloc__(memoryview self):
22769  * if self.obj is not None:
22770  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
22771  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
22772  *
22773  */
22774  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
22775 
22776  /* "View.MemoryView":373
22777  *
22778  * def __dealloc__(memoryview self):
22779  * if self.obj is not None: # <<<<<<<<<<<<<<
22780  * __Pyx_ReleaseBuffer(&self.view)
22781  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
22782  */
22783  goto __pyx_L3;
22784  }
22785 
22786  /* "View.MemoryView":375
22787  * if self.obj is not None:
22788  * __Pyx_ReleaseBuffer(&self.view)
22789  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
22790  *
22791  * (<__pyx_buffer *> &self.view).obj = NULL
22792  */
22793  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
22794  if (__pyx_t_2) {
22795 
22796  /* "View.MemoryView":377
22797  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
22798  *
22799  * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
22800  * Py_DECREF(Py_None)
22801  *
22802  */
22803  ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
22804 
22805  /* "View.MemoryView":378
22806  *
22807  * (<__pyx_buffer *> &self.view).obj = NULL
22808  * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
22809  *
22810  * cdef int i
22811  */
22812  Py_DECREF(Py_None);
22813 
22814  /* "View.MemoryView":375
22815  * if self.obj is not None:
22816  * __Pyx_ReleaseBuffer(&self.view)
22817  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
22818  *
22819  * (<__pyx_buffer *> &self.view).obj = NULL
22820  */
22821  }
22822  __pyx_L3:;
22823 
22824  /* "View.MemoryView":382
22825  * cdef int i
22826  * global __pyx_memoryview_thread_locks_used
22827  * if self.lock != NULL: # <<<<<<<<<<<<<<
22828  * for i in range(__pyx_memoryview_thread_locks_used):
22829  * if __pyx_memoryview_thread_locks[i] is self.lock:
22830  */
22831  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
22832  if (__pyx_t_2) {
22833 
22834  /* "View.MemoryView":383
22835  * global __pyx_memoryview_thread_locks_used
22836  * if self.lock != NULL:
22837  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
22838  * if __pyx_memoryview_thread_locks[i] is self.lock:
22839  * __pyx_memoryview_thread_locks_used -= 1
22840  */
22841  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
22842  __pyx_t_4 = __pyx_t_3;
22843  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
22844  __pyx_v_i = __pyx_t_5;
22845 
22846  /* "View.MemoryView":384
22847  * if self.lock != NULL:
22848  * for i in range(__pyx_memoryview_thread_locks_used):
22849  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
22850  * __pyx_memoryview_thread_locks_used -= 1
22851  * if i != __pyx_memoryview_thread_locks_used:
22852  */
22853  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
22854  if (__pyx_t_2) {
22855 
22856  /* "View.MemoryView":385
22857  * for i in range(__pyx_memoryview_thread_locks_used):
22858  * if __pyx_memoryview_thread_locks[i] is self.lock:
22859  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
22860  * if i != __pyx_memoryview_thread_locks_used:
22861  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
22862  */
22863  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
22864 
22865  /* "View.MemoryView":386
22866  * if __pyx_memoryview_thread_locks[i] is self.lock:
22867  * __pyx_memoryview_thread_locks_used -= 1
22868  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
22869  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
22870  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
22871  */
22872  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
22873  if (__pyx_t_2) {
22874 
22875  /* "View.MemoryView":388
22876  * if i != __pyx_memoryview_thread_locks_used:
22877  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
22878  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
22879  * break
22880  * else:
22881  */
22882  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
22883  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
22884 
22885  /* "View.MemoryView":387
22886  * __pyx_memoryview_thread_locks_used -= 1
22887  * if i != __pyx_memoryview_thread_locks_used:
22888  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
22889  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
22890  * break
22891  */
22892  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
22893  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
22894 
22895  /* "View.MemoryView":386
22896  * if __pyx_memoryview_thread_locks[i] is self.lock:
22897  * __pyx_memoryview_thread_locks_used -= 1
22898  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
22899  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
22900  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
22901  */
22902  }
22903 
22904  /* "View.MemoryView":389
22905  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
22906  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
22907  * break # <<<<<<<<<<<<<<
22908  * else:
22909  * PyThread_free_lock(self.lock)
22910  */
22911  goto __pyx_L6_break;
22912 
22913  /* "View.MemoryView":384
22914  * if self.lock != NULL:
22915  * for i in range(__pyx_memoryview_thread_locks_used):
22916  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
22917  * __pyx_memoryview_thread_locks_used -= 1
22918  * if i != __pyx_memoryview_thread_locks_used:
22919  */
22920  }
22921  }
22922  /*else*/ {
22923 
22924  /* "View.MemoryView":391
22925  * break
22926  * else:
22927  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
22928  *
22929  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
22930  */
22931  PyThread_free_lock(__pyx_v_self->lock);
22932  }
22933  __pyx_L6_break:;
22934 
22935  /* "View.MemoryView":382
22936  * cdef int i
22937  * global __pyx_memoryview_thread_locks_used
22938  * if self.lock != NULL: # <<<<<<<<<<<<<<
22939  * for i in range(__pyx_memoryview_thread_locks_used):
22940  * if __pyx_memoryview_thread_locks[i] is self.lock:
22941  */
22942  }
22943 
22944  /* "View.MemoryView":372
22945  * self.typeinfo = NULL
22946  *
22947  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
22948  * if self.obj is not None:
22949  * __Pyx_ReleaseBuffer(&self.view)
22950  */
22951 
22952  /* function exit code */
22953  __Pyx_RefNannyFinishContext();
22954 }
22955 
22956 /* "View.MemoryView":393
22957  * PyThread_free_lock(self.lock)
22958  *
22959  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
22960  * cdef Py_ssize_t dim
22961  * cdef char *itemp = <char *> self.view.buf
22962  */
22963 
22964 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
22965  Py_ssize_t __pyx_v_dim;
22966  char *__pyx_v_itemp;
22967  PyObject *__pyx_v_idx = NULL;
22968  char *__pyx_r;
22969  __Pyx_RefNannyDeclarations
22970  Py_ssize_t __pyx_t_1;
22971  PyObject *__pyx_t_2 = NULL;
22972  Py_ssize_t __pyx_t_3;
22973  PyObject *(*__pyx_t_4)(PyObject *);
22974  PyObject *__pyx_t_5 = NULL;
22975  Py_ssize_t __pyx_t_6;
22976  char *__pyx_t_7;
22977  int __pyx_lineno = 0;
22978  const char *__pyx_filename = NULL;
22979  int __pyx_clineno = 0;
22980  __Pyx_RefNannySetupContext("get_item_pointer", 0);
22981 
22982  /* "View.MemoryView":395
22983  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
22984  * cdef Py_ssize_t dim
22985  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
22986  *
22987  * for dim, idx in enumerate(index):
22988  */
22989  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
22990 
22991  /* "View.MemoryView":397
22992  * cdef char *itemp = <char *> self.view.buf
22993  *
22994  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
22995  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
22996  *
22997  */
22998  __pyx_t_1 = 0;
22999  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
23000  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
23001  __pyx_t_4 = NULL;
23002  } else {
23003  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
23004  __Pyx_GOTREF(__pyx_t_2);
23005  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
23006  }
23007  for (;;) {
23008  if (likely(!__pyx_t_4)) {
23009  if (likely(PyList_CheckExact(__pyx_t_2))) {
23010  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
23011  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23012  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
23013  #else
23014  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
23015  __Pyx_GOTREF(__pyx_t_5);
23016  #endif
23017  } else {
23018  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
23019  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23020  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
23021  #else
23022  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
23023  __Pyx_GOTREF(__pyx_t_5);
23024  #endif
23025  }
23026  } else {
23027  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
23028  if (unlikely(!__pyx_t_5)) {
23029  PyObject* exc_type = PyErr_Occurred();
23030  if (exc_type) {
23031  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
23032  else __PYX_ERR(0, 397, __pyx_L1_error)
23033  }
23034  break;
23035  }
23036  __Pyx_GOTREF(__pyx_t_5);
23037  }
23038  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
23039  __pyx_t_5 = 0;
23040  __pyx_v_dim = __pyx_t_1;
23041  __pyx_t_1 = (__pyx_t_1 + 1);
23042 
23043  /* "View.MemoryView":398
23044  *
23045  * for dim, idx in enumerate(index):
23046  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
23047  *
23048  * return itemp
23049  */
23050  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 398, __pyx_L1_error)
23051  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 398, __pyx_L1_error)
23052  __pyx_v_itemp = __pyx_t_7;
23053 
23054  /* "View.MemoryView":397
23055  * cdef char *itemp = <char *> self.view.buf
23056  *
23057  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
23058  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23059  *
23060  */
23061  }
23062  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23063 
23064  /* "View.MemoryView":400
23065  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23066  *
23067  * return itemp # <<<<<<<<<<<<<<
23068  *
23069  *
23070  */
23071  __pyx_r = __pyx_v_itemp;
23072  goto __pyx_L0;
23073 
23074  /* "View.MemoryView":393
23075  * PyThread_free_lock(self.lock)
23076  *
23077  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
23078  * cdef Py_ssize_t dim
23079  * cdef char *itemp = <char *> self.view.buf
23080  */
23081 
23082  /* function exit code */
23083  __pyx_L1_error:;
23084  __Pyx_XDECREF(__pyx_t_2);
23085  __Pyx_XDECREF(__pyx_t_5);
23086  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
23087  __pyx_r = NULL;
23088  __pyx_L0:;
23089  __Pyx_XDECREF(__pyx_v_idx);
23090  __Pyx_RefNannyFinishContext();
23091  return __pyx_r;
23092 }
23093 
23094 /* "View.MemoryView":403
23095  *
23096  *
23097  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
23098  * if index is Ellipsis:
23099  * return self
23100  */
23101 
23102 /* Python wrapper */
23103 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
23104 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
23105  PyObject *__pyx_r = 0;
23106  __Pyx_RefNannyDeclarations
23107  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
23108  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
23109 
23110  /* function exit code */
23111  __Pyx_RefNannyFinishContext();
23112  return __pyx_r;
23113 }
23114 
23115 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
23116  PyObject *__pyx_v_have_slices = NULL;
23117  PyObject *__pyx_v_indices = NULL;
23118  char *__pyx_v_itemp;
23119  PyObject *__pyx_r = NULL;
23120  __Pyx_RefNannyDeclarations
23121  int __pyx_t_1;
23122  int __pyx_t_2;
23123  PyObject *__pyx_t_3 = NULL;
23124  PyObject *__pyx_t_4 = NULL;
23125  PyObject *__pyx_t_5 = NULL;
23126  char *__pyx_t_6;
23127  int __pyx_lineno = 0;
23128  const char *__pyx_filename = NULL;
23129  int __pyx_clineno = 0;
23130  __Pyx_RefNannySetupContext("__getitem__", 0);
23131 
23132  /* "View.MemoryView":404
23133  *
23134  * def __getitem__(memoryview self, object index):
23135  * if index is Ellipsis: # <<<<<<<<<<<<<<
23136  * return self
23137  *
23138  */
23139  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
23140  __pyx_t_2 = (__pyx_t_1 != 0);
23141  if (__pyx_t_2) {
23142 
23143  /* "View.MemoryView":405
23144  * def __getitem__(memoryview self, object index):
23145  * if index is Ellipsis:
23146  * return self # <<<<<<<<<<<<<<
23147  *
23148  * have_slices, indices = _unellipsify(index, self.view.ndim)
23149  */
23150  __Pyx_XDECREF(__pyx_r);
23151  __Pyx_INCREF(((PyObject *)__pyx_v_self));
23152  __pyx_r = ((PyObject *)__pyx_v_self);
23153  goto __pyx_L0;
23154 
23155  /* "View.MemoryView":404
23156  *
23157  * def __getitem__(memoryview self, object index):
23158  * if index is Ellipsis: # <<<<<<<<<<<<<<
23159  * return self
23160  *
23161  */
23162  }
23163 
23164  /* "View.MemoryView":407
23165  * return self
23166  *
23167  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
23168  *
23169  * cdef char *itemp
23170  */
23171  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
23172  __Pyx_GOTREF(__pyx_t_3);
23173  if (likely(__pyx_t_3 != Py_None)) {
23174  PyObject* sequence = __pyx_t_3;
23175  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
23176  if (unlikely(size != 2)) {
23177  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
23178  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
23179  __PYX_ERR(0, 407, __pyx_L1_error)
23180  }
23181  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23182  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
23183  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
23184  __Pyx_INCREF(__pyx_t_4);
23185  __Pyx_INCREF(__pyx_t_5);
23186  #else
23187  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
23188  __Pyx_GOTREF(__pyx_t_4);
23189  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error)
23190  __Pyx_GOTREF(__pyx_t_5);
23191  #endif
23192  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23193  } else {
23194  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 407, __pyx_L1_error)
23195  }
23196  __pyx_v_have_slices = __pyx_t_4;
23197  __pyx_t_4 = 0;
23198  __pyx_v_indices = __pyx_t_5;
23199  __pyx_t_5 = 0;
23200 
23201  /* "View.MemoryView":410
23202  *
23203  * cdef char *itemp
23204  * if have_slices: # <<<<<<<<<<<<<<
23205  * return memview_slice(self, indices)
23206  * else:
23207  */
23208  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
23209  if (__pyx_t_2) {
23210 
23211  /* "View.MemoryView":411
23212  * cdef char *itemp
23213  * if have_slices:
23214  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
23215  * else:
23216  * itemp = self.get_item_pointer(indices)
23217  */
23218  __Pyx_XDECREF(__pyx_r);
23219  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
23220  __Pyx_GOTREF(__pyx_t_3);
23221  __pyx_r = __pyx_t_3;
23222  __pyx_t_3 = 0;
23223  goto __pyx_L0;
23224 
23225  /* "View.MemoryView":410
23226  *
23227  * cdef char *itemp
23228  * if have_slices: # <<<<<<<<<<<<<<
23229  * return memview_slice(self, indices)
23230  * else:
23231  */
23232  }
23233 
23234  /* "View.MemoryView":413
23235  * return memview_slice(self, indices)
23236  * else:
23237  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
23238  * return self.convert_item_to_object(itemp)
23239  *
23240  */
23241  /*else*/ {
23242  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 413, __pyx_L1_error)
23243  __pyx_v_itemp = __pyx_t_6;
23244 
23245  /* "View.MemoryView":414
23246  * else:
23247  * itemp = self.get_item_pointer(indices)
23248  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
23249  *
23250  * def __setitem__(memoryview self, object index, object value):
23251  */
23252  __Pyx_XDECREF(__pyx_r);
23253  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
23254  __Pyx_GOTREF(__pyx_t_3);
23255  __pyx_r = __pyx_t_3;
23256  __pyx_t_3 = 0;
23257  goto __pyx_L0;
23258  }
23259 
23260  /* "View.MemoryView":403
23261  *
23262  *
23263  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
23264  * if index is Ellipsis:
23265  * return self
23266  */
23267 
23268  /* function exit code */
23269  __pyx_L1_error:;
23270  __Pyx_XDECREF(__pyx_t_3);
23271  __Pyx_XDECREF(__pyx_t_4);
23272  __Pyx_XDECREF(__pyx_t_5);
23273  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23274  __pyx_r = NULL;
23275  __pyx_L0:;
23276  __Pyx_XDECREF(__pyx_v_have_slices);
23277  __Pyx_XDECREF(__pyx_v_indices);
23278  __Pyx_XGIVEREF(__pyx_r);
23279  __Pyx_RefNannyFinishContext();
23280  return __pyx_r;
23281 }
23282 
23283 /* "View.MemoryView":416
23284  * return self.convert_item_to_object(itemp)
23285  *
23286  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
23287  * if self.view.readonly:
23288  * raise TypeError("Cannot assign to read-only memoryview")
23289  */
23290 
23291 /* Python wrapper */
23292 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
23293 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
23294  int __pyx_r;
23295  __Pyx_RefNannyDeclarations
23296  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
23297  __pyx_r = __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));
23298 
23299  /* function exit code */
23300  __Pyx_RefNannyFinishContext();
23301  return __pyx_r;
23302 }
23303 
23304 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) {
23305  PyObject *__pyx_v_have_slices = NULL;
23306  PyObject *__pyx_v_obj = NULL;
23307  int __pyx_r;
23308  __Pyx_RefNannyDeclarations
23309  int __pyx_t_1;
23310  PyObject *__pyx_t_2 = NULL;
23311  PyObject *__pyx_t_3 = NULL;
23312  PyObject *__pyx_t_4 = NULL;
23313  int __pyx_lineno = 0;
23314  const char *__pyx_filename = NULL;
23315  int __pyx_clineno = 0;
23316  __Pyx_RefNannySetupContext("__setitem__", 0);
23317  __Pyx_INCREF(__pyx_v_index);
23318 
23319  /* "View.MemoryView":417
23320  *
23321  * def __setitem__(memoryview self, object index, object value):
23322  * if self.view.readonly: # <<<<<<<<<<<<<<
23323  * raise TypeError("Cannot assign to read-only memoryview")
23324  *
23325  */
23326  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
23327  if (unlikely(__pyx_t_1)) {
23328 
23329  /* "View.MemoryView":418
23330  * def __setitem__(memoryview self, object index, object value):
23331  * if self.view.readonly:
23332  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
23333  *
23334  * have_slices, index = _unellipsify(index, self.view.ndim)
23335  */
23336  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
23337  __Pyx_GOTREF(__pyx_t_2);
23338  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23339  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23340  __PYX_ERR(0, 418, __pyx_L1_error)
23341 
23342  /* "View.MemoryView":417
23343  *
23344  * def __setitem__(memoryview self, object index, object value):
23345  * if self.view.readonly: # <<<<<<<<<<<<<<
23346  * raise TypeError("Cannot assign to read-only memoryview")
23347  *
23348  */
23349  }
23350 
23351  /* "View.MemoryView":420
23352  * raise TypeError("Cannot assign to read-only memoryview")
23353  *
23354  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
23355  *
23356  * if have_slices:
23357  */
23358  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
23359  __Pyx_GOTREF(__pyx_t_2);
23360  if (likely(__pyx_t_2 != Py_None)) {
23361  PyObject* sequence = __pyx_t_2;
23362  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
23363  if (unlikely(size != 2)) {
23364  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
23365  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
23366  __PYX_ERR(0, 420, __pyx_L1_error)
23367  }
23368  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23369  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
23370  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
23371  __Pyx_INCREF(__pyx_t_3);
23372  __Pyx_INCREF(__pyx_t_4);
23373  #else
23374  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
23375  __Pyx_GOTREF(__pyx_t_3);
23376  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
23377  __Pyx_GOTREF(__pyx_t_4);
23378  #endif
23379  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23380  } else {
23381  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 420, __pyx_L1_error)
23382  }
23383  __pyx_v_have_slices = __pyx_t_3;
23384  __pyx_t_3 = 0;
23385  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
23386  __pyx_t_4 = 0;
23387 
23388  /* "View.MemoryView":422
23389  * have_slices, index = _unellipsify(index, self.view.ndim)
23390  *
23391  * if have_slices: # <<<<<<<<<<<<<<
23392  * obj = self.is_slice(value)
23393  * if obj:
23394  */
23395  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
23396  if (__pyx_t_1) {
23397 
23398  /* "View.MemoryView":423
23399  *
23400  * if have_slices:
23401  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
23402  * if obj:
23403  * self.setitem_slice_assignment(self[index], obj)
23404  */
23405  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
23406  __Pyx_GOTREF(__pyx_t_2);
23407  __pyx_v_obj = __pyx_t_2;
23408  __pyx_t_2 = 0;
23409 
23410  /* "View.MemoryView":424
23411  * if have_slices:
23412  * obj = self.is_slice(value)
23413  * if obj: # <<<<<<<<<<<<<<
23414  * self.setitem_slice_assignment(self[index], obj)
23415  * else:
23416  */
23417  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
23418  if (__pyx_t_1) {
23419 
23420  /* "View.MemoryView":425
23421  * obj = self.is_slice(value)
23422  * if obj:
23423  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
23424  * else:
23425  * self.setitem_slice_assign_scalar(self[index], value)
23426  */
23427  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
23428  __Pyx_GOTREF(__pyx_t_2);
23429  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
23430  __Pyx_GOTREF(__pyx_t_4);
23431  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23432  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23433 
23434  /* "View.MemoryView":424
23435  * if have_slices:
23436  * obj = self.is_slice(value)
23437  * if obj: # <<<<<<<<<<<<<<
23438  * self.setitem_slice_assignment(self[index], obj)
23439  * else:
23440  */
23441  goto __pyx_L5;
23442  }
23443 
23444  /* "View.MemoryView":427
23445  * self.setitem_slice_assignment(self[index], obj)
23446  * else:
23447  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
23448  * else:
23449  * self.setitem_indexed(index, value)
23450  */
23451  /*else*/ {
23452  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
23453  __Pyx_GOTREF(__pyx_t_4);
23454  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(0, 427, __pyx_L1_error)
23455  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
23456  __Pyx_GOTREF(__pyx_t_2);
23457  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23458  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23459  }
23460  __pyx_L5:;
23461 
23462  /* "View.MemoryView":422
23463  * have_slices, index = _unellipsify(index, self.view.ndim)
23464  *
23465  * if have_slices: # <<<<<<<<<<<<<<
23466  * obj = self.is_slice(value)
23467  * if obj:
23468  */
23469  goto __pyx_L4;
23470  }
23471 
23472  /* "View.MemoryView":429
23473  * self.setitem_slice_assign_scalar(self[index], value)
23474  * else:
23475  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
23476  *
23477  * cdef is_slice(self, obj):
23478  */
23479  /*else*/ {
23480  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
23481  __Pyx_GOTREF(__pyx_t_2);
23482  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23483  }
23484  __pyx_L4:;
23485 
23486  /* "View.MemoryView":416
23487  * return self.convert_item_to_object(itemp)
23488  *
23489  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
23490  * if self.view.readonly:
23491  * raise TypeError("Cannot assign to read-only memoryview")
23492  */
23493 
23494  /* function exit code */
23495  __pyx_r = 0;
23496  goto __pyx_L0;
23497  __pyx_L1_error:;
23498  __Pyx_XDECREF(__pyx_t_2);
23499  __Pyx_XDECREF(__pyx_t_3);
23500  __Pyx_XDECREF(__pyx_t_4);
23501  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23502  __pyx_r = -1;
23503  __pyx_L0:;
23504  __Pyx_XDECREF(__pyx_v_have_slices);
23505  __Pyx_XDECREF(__pyx_v_obj);
23506  __Pyx_XDECREF(__pyx_v_index);
23507  __Pyx_RefNannyFinishContext();
23508  return __pyx_r;
23509 }
23510 
23511 /* "View.MemoryView":431
23512  * self.setitem_indexed(index, value)
23513  *
23514  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
23515  * if not isinstance(obj, memoryview):
23516  * try:
23517  */
23518 
23519 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
23520  PyObject *__pyx_r = NULL;
23521  __Pyx_RefNannyDeclarations
23522  int __pyx_t_1;
23523  int __pyx_t_2;
23524  PyObject *__pyx_t_3 = NULL;
23525  PyObject *__pyx_t_4 = NULL;
23526  PyObject *__pyx_t_5 = NULL;
23527  PyObject *__pyx_t_6 = NULL;
23528  PyObject *__pyx_t_7 = NULL;
23529  PyObject *__pyx_t_8 = NULL;
23530  int __pyx_t_9;
23531  int __pyx_lineno = 0;
23532  const char *__pyx_filename = NULL;
23533  int __pyx_clineno = 0;
23534  __Pyx_RefNannySetupContext("is_slice", 0);
23535  __Pyx_INCREF(__pyx_v_obj);
23536 
23537  /* "View.MemoryView":432
23538  *
23539  * cdef is_slice(self, obj):
23540  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
23541  * try:
23542  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23543  */
23544  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
23545  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
23546  if (__pyx_t_2) {
23547 
23548  /* "View.MemoryView":433
23549  * cdef is_slice(self, obj):
23550  * if not isinstance(obj, memoryview):
23551  * try: # <<<<<<<<<<<<<<
23552  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23553  * self.dtype_is_object)
23554  */
23555  {
23556  __Pyx_PyThreadState_declare
23557  __Pyx_PyThreadState_assign
23558  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
23559  __Pyx_XGOTREF(__pyx_t_3);
23560  __Pyx_XGOTREF(__pyx_t_4);
23561  __Pyx_XGOTREF(__pyx_t_5);
23562  /*try:*/ {
23563 
23564  /* "View.MemoryView":434
23565  * if not isinstance(obj, memoryview):
23566  * try:
23567  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
23568  * self.dtype_is_object)
23569  * except TypeError:
23570  */
23571  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L4_error)
23572  __Pyx_GOTREF(__pyx_t_6);
23573 
23574  /* "View.MemoryView":435
23575  * try:
23576  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23577  * self.dtype_is_object) # <<<<<<<<<<<<<<
23578  * except TypeError:
23579  * return None
23580  */
23581  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L4_error)
23582  __Pyx_GOTREF(__pyx_t_7);
23583 
23584  /* "View.MemoryView":434
23585  * if not isinstance(obj, memoryview):
23586  * try:
23587  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
23588  * self.dtype_is_object)
23589  * except TypeError:
23590  */
23591  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 434, __pyx_L4_error)
23592  __Pyx_GOTREF(__pyx_t_8);
23593  __Pyx_INCREF(__pyx_v_obj);
23594  __Pyx_GIVEREF(__pyx_v_obj);
23595  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
23596  __Pyx_GIVEREF(__pyx_t_6);
23597  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
23598  __Pyx_GIVEREF(__pyx_t_7);
23599  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
23600  __pyx_t_6 = 0;
23601  __pyx_t_7 = 0;
23602  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L4_error)
23603  __Pyx_GOTREF(__pyx_t_7);
23604  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23605  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
23606  __pyx_t_7 = 0;
23607 
23608  /* "View.MemoryView":433
23609  * cdef is_slice(self, obj):
23610  * if not isinstance(obj, memoryview):
23611  * try: # <<<<<<<<<<<<<<
23612  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23613  * self.dtype_is_object)
23614  */
23615  }
23616  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
23617  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23618  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23619  goto __pyx_L9_try_end;
23620  __pyx_L4_error:;
23621  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
23622  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
23623  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
23624 
23625  /* "View.MemoryView":436
23626  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23627  * self.dtype_is_object)
23628  * except TypeError: # <<<<<<<<<<<<<<
23629  * return None
23630  *
23631  */
23632  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
23633  if (__pyx_t_9) {
23634  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
23635  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 436, __pyx_L6_except_error)
23636  __Pyx_GOTREF(__pyx_t_7);
23637  __Pyx_GOTREF(__pyx_t_8);
23638  __Pyx_GOTREF(__pyx_t_6);
23639 
23640  /* "View.MemoryView":437
23641  * self.dtype_is_object)
23642  * except TypeError:
23643  * return None # <<<<<<<<<<<<<<
23644  *
23645  * return obj
23646  */
23647  __Pyx_XDECREF(__pyx_r);
23648  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23649  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23650  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23651  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23652  goto __pyx_L7_except_return;
23653  }
23654  goto __pyx_L6_except_error;
23655  __pyx_L6_except_error:;
23656 
23657  /* "View.MemoryView":433
23658  * cdef is_slice(self, obj):
23659  * if not isinstance(obj, memoryview):
23660  * try: # <<<<<<<<<<<<<<
23661  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23662  * self.dtype_is_object)
23663  */
23664  __Pyx_XGIVEREF(__pyx_t_3);
23665  __Pyx_XGIVEREF(__pyx_t_4);
23666  __Pyx_XGIVEREF(__pyx_t_5);
23667  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
23668  goto __pyx_L1_error;
23669  __pyx_L7_except_return:;
23670  __Pyx_XGIVEREF(__pyx_t_3);
23671  __Pyx_XGIVEREF(__pyx_t_4);
23672  __Pyx_XGIVEREF(__pyx_t_5);
23673  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
23674  goto __pyx_L0;
23675  __pyx_L9_try_end:;
23676  }
23677 
23678  /* "View.MemoryView":432
23679  *
23680  * cdef is_slice(self, obj):
23681  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
23682  * try:
23683  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
23684  */
23685  }
23686 
23687  /* "View.MemoryView":439
23688  * return None
23689  *
23690  * return obj # <<<<<<<<<<<<<<
23691  *
23692  * cdef setitem_slice_assignment(self, dst, src):
23693  */
23694  __Pyx_XDECREF(__pyx_r);
23695  __Pyx_INCREF(__pyx_v_obj);
23696  __pyx_r = __pyx_v_obj;
23697  goto __pyx_L0;
23698 
23699  /* "View.MemoryView":431
23700  * self.setitem_indexed(index, value)
23701  *
23702  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
23703  * if not isinstance(obj, memoryview):
23704  * try:
23705  */
23706 
23707  /* function exit code */
23708  __pyx_L1_error:;
23709  __Pyx_XDECREF(__pyx_t_6);
23710  __Pyx_XDECREF(__pyx_t_7);
23711  __Pyx_XDECREF(__pyx_t_8);
23712  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
23713  __pyx_r = 0;
23714  __pyx_L0:;
23715  __Pyx_XDECREF(__pyx_v_obj);
23716  __Pyx_XGIVEREF(__pyx_r);
23717  __Pyx_RefNannyFinishContext();
23718  return __pyx_r;
23719 }
23720 
23721 /* "View.MemoryView":441
23722  * return obj
23723  *
23724  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
23725  * cdef __Pyx_memviewslice dst_slice
23726  * cdef __Pyx_memviewslice src_slice
23727  */
23728 
23729 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
23730  __Pyx_memviewslice __pyx_v_dst_slice;
23731  __Pyx_memviewslice __pyx_v_src_slice;
23732  PyObject *__pyx_r = NULL;
23733  __Pyx_RefNannyDeclarations
23734  __Pyx_memviewslice *__pyx_t_1;
23735  __Pyx_memviewslice *__pyx_t_2;
23736  PyObject *__pyx_t_3 = NULL;
23737  int __pyx_t_4;
23738  int __pyx_t_5;
23739  int __pyx_t_6;
23740  int __pyx_lineno = 0;
23741  const char *__pyx_filename = NULL;
23742  int __pyx_clineno = 0;
23743  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
23744 
23745  /* "View.MemoryView":445
23746  * cdef __Pyx_memviewslice src_slice
23747  *
23748  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
23749  * get_slice_from_memview(dst, &dst_slice)[0],
23750  * src.ndim, dst.ndim, self.dtype_is_object)
23751  */
23752  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 445, __pyx_L1_error)
23753  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 445, __pyx_L1_error)
23754 
23755  /* "View.MemoryView":446
23756  *
23757  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
23758  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
23759  * src.ndim, dst.ndim, self.dtype_is_object)
23760  *
23761  */
23762  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 446, __pyx_L1_error)
23763  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 446, __pyx_L1_error)
23764 
23765  /* "View.MemoryView":447
23766  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
23767  * get_slice_from_memview(dst, &dst_slice)[0],
23768  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
23769  *
23770  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
23771  */
23772  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
23773  __Pyx_GOTREF(__pyx_t_3);
23774  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
23775  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23776  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
23777  __Pyx_GOTREF(__pyx_t_3);
23778  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
23779  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23780 
23781  /* "View.MemoryView":445
23782  * cdef __Pyx_memviewslice src_slice
23783  *
23784  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
23785  * get_slice_from_memview(dst, &dst_slice)[0],
23786  * src.ndim, dst.ndim, self.dtype_is_object)
23787  */
23788  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 445, __pyx_L1_error)
23789 
23790  /* "View.MemoryView":441
23791  * return obj
23792  *
23793  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
23794  * cdef __Pyx_memviewslice dst_slice
23795  * cdef __Pyx_memviewslice src_slice
23796  */
23797 
23798  /* function exit code */
23799  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23800  goto __pyx_L0;
23801  __pyx_L1_error:;
23802  __Pyx_XDECREF(__pyx_t_3);
23803  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
23804  __pyx_r = 0;
23805  __pyx_L0:;
23806  __Pyx_XGIVEREF(__pyx_r);
23807  __Pyx_RefNannyFinishContext();
23808  return __pyx_r;
23809 }
23810 
23811 /* "View.MemoryView":449
23812  * src.ndim, dst.ndim, self.dtype_is_object)
23813  *
23814  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
23815  * cdef int array[128]
23816  * cdef void *tmp = NULL
23817  */
23818 
23819 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) {
23820  int __pyx_v_array[0x80];
23821  void *__pyx_v_tmp;
23822  void *__pyx_v_item;
23823  __Pyx_memviewslice *__pyx_v_dst_slice;
23824  __Pyx_memviewslice __pyx_v_tmp_slice;
23825  PyObject *__pyx_r = NULL;
23826  __Pyx_RefNannyDeclarations
23827  __Pyx_memviewslice *__pyx_t_1;
23828  int __pyx_t_2;
23829  PyObject *__pyx_t_3 = NULL;
23830  int __pyx_t_4;
23831  int __pyx_t_5;
23832  char const *__pyx_t_6;
23833  PyObject *__pyx_t_7 = NULL;
23834  PyObject *__pyx_t_8 = NULL;
23835  PyObject *__pyx_t_9 = NULL;
23836  PyObject *__pyx_t_10 = NULL;
23837  PyObject *__pyx_t_11 = NULL;
23838  PyObject *__pyx_t_12 = NULL;
23839  int __pyx_lineno = 0;
23840  const char *__pyx_filename = NULL;
23841  int __pyx_clineno = 0;
23842  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
23843 
23844  /* "View.MemoryView":451
23845  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
23846  * cdef int array[128]
23847  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
23848  * cdef void *item
23849  *
23850  */
23851  __pyx_v_tmp = NULL;
23852 
23853  /* "View.MemoryView":456
23854  * cdef __Pyx_memviewslice *dst_slice
23855  * cdef __Pyx_memviewslice tmp_slice
23856  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
23857  *
23858  * if <size_t>self.view.itemsize > sizeof(array):
23859  */
23860  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 456, __pyx_L1_error)
23861  __pyx_v_dst_slice = __pyx_t_1;
23862 
23863  /* "View.MemoryView":458
23864  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
23865  *
23866  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
23867  * tmp = PyMem_Malloc(self.view.itemsize)
23868  * if tmp == NULL:
23869  */
23870  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
23871  if (__pyx_t_2) {
23872 
23873  /* "View.MemoryView":459
23874  *
23875  * if <size_t>self.view.itemsize > sizeof(array):
23876  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
23877  * if tmp == NULL:
23878  * raise MemoryError
23879  */
23880  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
23881 
23882  /* "View.MemoryView":460
23883  * if <size_t>self.view.itemsize > sizeof(array):
23884  * tmp = PyMem_Malloc(self.view.itemsize)
23885  * if tmp == NULL: # <<<<<<<<<<<<<<
23886  * raise MemoryError
23887  * item = tmp
23888  */
23889  __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
23890  if (unlikely(__pyx_t_2)) {
23891 
23892  /* "View.MemoryView":461
23893  * tmp = PyMem_Malloc(self.view.itemsize)
23894  * if tmp == NULL:
23895  * raise MemoryError # <<<<<<<<<<<<<<
23896  * item = tmp
23897  * else:
23898  */
23899  PyErr_NoMemory(); __PYX_ERR(0, 461, __pyx_L1_error)
23900 
23901  /* "View.MemoryView":460
23902  * if <size_t>self.view.itemsize > sizeof(array):
23903  * tmp = PyMem_Malloc(self.view.itemsize)
23904  * if tmp == NULL: # <<<<<<<<<<<<<<
23905  * raise MemoryError
23906  * item = tmp
23907  */
23908  }
23909 
23910  /* "View.MemoryView":462
23911  * if tmp == NULL:
23912  * raise MemoryError
23913  * item = tmp # <<<<<<<<<<<<<<
23914  * else:
23915  * item = <void *> array
23916  */
23917  __pyx_v_item = __pyx_v_tmp;
23918 
23919  /* "View.MemoryView":458
23920  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
23921  *
23922  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
23923  * tmp = PyMem_Malloc(self.view.itemsize)
23924  * if tmp == NULL:
23925  */
23926  goto __pyx_L3;
23927  }
23928 
23929  /* "View.MemoryView":464
23930  * item = tmp
23931  * else:
23932  * item = <void *> array # <<<<<<<<<<<<<<
23933  *
23934  * try:
23935  */
23936  /*else*/ {
23937  __pyx_v_item = ((void *)__pyx_v_array);
23938  }
23939  __pyx_L3:;
23940 
23941  /* "View.MemoryView":466
23942  * item = <void *> array
23943  *
23944  * try: # <<<<<<<<<<<<<<
23945  * if self.dtype_is_object:
23946  * (<PyObject **> item)[0] = <PyObject *> value
23947  */
23948  /*try:*/ {
23949 
23950  /* "View.MemoryView":467
23951  *
23952  * try:
23953  * if self.dtype_is_object: # <<<<<<<<<<<<<<
23954  * (<PyObject **> item)[0] = <PyObject *> value
23955  * else:
23956  */
23957  __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
23958  if (__pyx_t_2) {
23959 
23960  /* "View.MemoryView":468
23961  * try:
23962  * if self.dtype_is_object:
23963  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
23964  * else:
23965  * self.assign_item_from_object(<char *> item, value)
23966  */
23967  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
23968 
23969  /* "View.MemoryView":467
23970  *
23971  * try:
23972  * if self.dtype_is_object: # <<<<<<<<<<<<<<
23973  * (<PyObject **> item)[0] = <PyObject *> value
23974  * else:
23975  */
23976  goto __pyx_L8;
23977  }
23978 
23979  /* "View.MemoryView":470
23980  * (<PyObject **> item)[0] = <PyObject *> value
23981  * else:
23982  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
23983  *
23984  *
23985  */
23986  /*else*/ {
23987  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L6_error)
23988  __Pyx_GOTREF(__pyx_t_3);
23989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23990  }
23991  __pyx_L8:;
23992 
23993  /* "View.MemoryView":474
23994  *
23995  *
23996  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
23997  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
23998  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
23999  */
24000  __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
24001  if (__pyx_t_2) {
24002 
24003  /* "View.MemoryView":475
24004  *
24005  * if self.view.suboffsets != NULL:
24006  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
24007  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24008  * item, self.dtype_is_object)
24009  */
24010  __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L6_error)
24011  __Pyx_GOTREF(__pyx_t_3);
24012  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24013 
24014  /* "View.MemoryView":474
24015  *
24016  *
24017  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
24018  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24019  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24020  */
24021  }
24022 
24023  /* "View.MemoryView":476
24024  * if self.view.suboffsets != NULL:
24025  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24026  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
24027  * item, self.dtype_is_object)
24028  * finally:
24029  */
24030  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
24031  }
24032 
24033  /* "View.MemoryView":479
24034  * item, self.dtype_is_object)
24035  * finally:
24036  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
24037  *
24038  * cdef setitem_indexed(self, index, value):
24039  */
24040  /*finally:*/ {
24041  /*normal exit:*/{
24042  PyMem_Free(__pyx_v_tmp);
24043  goto __pyx_L7;
24044  }
24045  __pyx_L6_error:;
24046  /*exception exit:*/{
24047  __Pyx_PyThreadState_declare
24048  __Pyx_PyThreadState_assign
24049  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
24050  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24051  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
24052  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
24053  __Pyx_XGOTREF(__pyx_t_7);
24054  __Pyx_XGOTREF(__pyx_t_8);
24055  __Pyx_XGOTREF(__pyx_t_9);
24056  __Pyx_XGOTREF(__pyx_t_10);
24057  __Pyx_XGOTREF(__pyx_t_11);
24058  __Pyx_XGOTREF(__pyx_t_12);
24059  __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
24060  {
24061  PyMem_Free(__pyx_v_tmp);
24062  }
24063  if (PY_MAJOR_VERSION >= 3) {
24064  __Pyx_XGIVEREF(__pyx_t_10);
24065  __Pyx_XGIVEREF(__pyx_t_11);
24066  __Pyx_XGIVEREF(__pyx_t_12);
24067  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
24068  }
24069  __Pyx_XGIVEREF(__pyx_t_7);
24070  __Pyx_XGIVEREF(__pyx_t_8);
24071  __Pyx_XGIVEREF(__pyx_t_9);
24072  __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24073  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
24074  __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
24075  goto __pyx_L1_error;
24076  }
24077  __pyx_L7:;
24078  }
24079 
24080  /* "View.MemoryView":449
24081  * src.ndim, dst.ndim, self.dtype_is_object)
24082  *
24083  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
24084  * cdef int array[128]
24085  * cdef void *tmp = NULL
24086  */
24087 
24088  /* function exit code */
24089  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24090  goto __pyx_L0;
24091  __pyx_L1_error:;
24092  __Pyx_XDECREF(__pyx_t_3);
24093  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
24094  __pyx_r = 0;
24095  __pyx_L0:;
24096  __Pyx_XGIVEREF(__pyx_r);
24097  __Pyx_RefNannyFinishContext();
24098  return __pyx_r;
24099 }
24100 
24101 /* "View.MemoryView":481
24102  * PyMem_Free(tmp)
24103  *
24104  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
24105  * cdef char *itemp = self.get_item_pointer(index)
24106  * self.assign_item_from_object(itemp, value)
24107  */
24108 
24109 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
24110  char *__pyx_v_itemp;
24111  PyObject *__pyx_r = NULL;
24112  __Pyx_RefNannyDeclarations
24113  char *__pyx_t_1;
24114  PyObject *__pyx_t_2 = NULL;
24115  int __pyx_lineno = 0;
24116  const char *__pyx_filename = NULL;
24117  int __pyx_clineno = 0;
24118  __Pyx_RefNannySetupContext("setitem_indexed", 0);
24119 
24120  /* "View.MemoryView":482
24121  *
24122  * cdef setitem_indexed(self, index, value):
24123  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
24124  * self.assign_item_from_object(itemp, value)
24125  *
24126  */
24127  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 482, __pyx_L1_error)
24128  __pyx_v_itemp = __pyx_t_1;
24129 
24130  /* "View.MemoryView":483
24131  * cdef setitem_indexed(self, index, value):
24132  * cdef char *itemp = self.get_item_pointer(index)
24133  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
24134  *
24135  * cdef convert_item_to_object(self, char *itemp):
24136  */
24137  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
24138  __Pyx_GOTREF(__pyx_t_2);
24139  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24140 
24141  /* "View.MemoryView":481
24142  * PyMem_Free(tmp)
24143  *
24144  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
24145  * cdef char *itemp = self.get_item_pointer(index)
24146  * self.assign_item_from_object(itemp, value)
24147  */
24148 
24149  /* function exit code */
24150  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24151  goto __pyx_L0;
24152  __pyx_L1_error:;
24153  __Pyx_XDECREF(__pyx_t_2);
24154  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
24155  __pyx_r = 0;
24156  __pyx_L0:;
24157  __Pyx_XGIVEREF(__pyx_r);
24158  __Pyx_RefNannyFinishContext();
24159  return __pyx_r;
24160 }
24161 
24162 /* "View.MemoryView":485
24163  * self.assign_item_from_object(itemp, value)
24164  *
24165  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
24166  * """Only used if instantiated manually by the user, or if Cython doesn't
24167  * know how to convert the type"""
24168  */
24169 
24170 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
24171  PyObject *__pyx_v_struct = NULL;
24172  PyObject *__pyx_v_bytesitem = 0;
24173  PyObject *__pyx_v_result = NULL;
24174  PyObject *__pyx_r = NULL;
24175  __Pyx_RefNannyDeclarations
24176  PyObject *__pyx_t_1 = NULL;
24177  PyObject *__pyx_t_2 = NULL;
24178  PyObject *__pyx_t_3 = NULL;
24179  PyObject *__pyx_t_4 = NULL;
24180  PyObject *__pyx_t_5 = NULL;
24181  PyObject *__pyx_t_6 = NULL;
24182  PyObject *__pyx_t_7 = NULL;
24183  int __pyx_t_8;
24184  PyObject *__pyx_t_9 = NULL;
24185  size_t __pyx_t_10;
24186  int __pyx_t_11;
24187  int __pyx_lineno = 0;
24188  const char *__pyx_filename = NULL;
24189  int __pyx_clineno = 0;
24190  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
24191 
24192  /* "View.MemoryView":488
24193  * """Only used if instantiated manually by the user, or if Cython doesn't
24194  * know how to convert the type"""
24195  * import struct # <<<<<<<<<<<<<<
24196  * cdef bytes bytesitem
24197  *
24198  */
24199  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
24200  __Pyx_GOTREF(__pyx_t_1);
24201  __pyx_v_struct = __pyx_t_1;
24202  __pyx_t_1 = 0;
24203 
24204  /* "View.MemoryView":491
24205  * cdef bytes bytesitem
24206  *
24207  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
24208  * try:
24209  * result = struct.unpack(self.view.format, bytesitem)
24210  */
24211  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
24212  __Pyx_GOTREF(__pyx_t_1);
24213  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
24214  __pyx_t_1 = 0;
24215 
24216  /* "View.MemoryView":492
24217  *
24218  * bytesitem = itemp[:self.view.itemsize]
24219  * try: # <<<<<<<<<<<<<<
24220  * result = struct.unpack(self.view.format, bytesitem)
24221  * except struct.error:
24222  */
24223  {
24224  __Pyx_PyThreadState_declare
24225  __Pyx_PyThreadState_assign
24226  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
24227  __Pyx_XGOTREF(__pyx_t_2);
24228  __Pyx_XGOTREF(__pyx_t_3);
24229  __Pyx_XGOTREF(__pyx_t_4);
24230  /*try:*/ {
24231 
24232  /* "View.MemoryView":493
24233  * bytesitem = itemp[:self.view.itemsize]
24234  * try:
24235  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
24236  * except struct.error:
24237  * raise ValueError("Unable to convert item to object")
24238  */
24239  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L3_error)
24240  __Pyx_GOTREF(__pyx_t_5);
24241  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 493, __pyx_L3_error)
24242  __Pyx_GOTREF(__pyx_t_6);
24243  __pyx_t_7 = NULL;
24244  __pyx_t_8 = 0;
24245  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24246  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
24247  if (likely(__pyx_t_7)) {
24248  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24249  __Pyx_INCREF(__pyx_t_7);
24250  __Pyx_INCREF(function);
24251  __Pyx_DECREF_SET(__pyx_t_5, function);
24252  __pyx_t_8 = 1;
24253  }
24254  }
24255  #if CYTHON_FAST_PYCALL
24256  if (PyFunction_Check(__pyx_t_5)) {
24257  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
24258  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
24259  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24260  __Pyx_GOTREF(__pyx_t_1);
24261  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24262  } else
24263  #endif
24264  #if CYTHON_FAST_PYCCALL
24265  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24266  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
24267  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
24268  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24269  __Pyx_GOTREF(__pyx_t_1);
24270  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24271  } else
24272  #endif
24273  {
24274  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 493, __pyx_L3_error)
24275  __Pyx_GOTREF(__pyx_t_9);
24276  if (__pyx_t_7) {
24277  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
24278  }
24279  __Pyx_GIVEREF(__pyx_t_6);
24280  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
24281  __Pyx_INCREF(__pyx_v_bytesitem);
24282  __Pyx_GIVEREF(__pyx_v_bytesitem);
24283  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
24284  __pyx_t_6 = 0;
24285  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
24286  __Pyx_GOTREF(__pyx_t_1);
24287  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24288  }
24289  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24290  __pyx_v_result = __pyx_t_1;
24291  __pyx_t_1 = 0;
24292 
24293  /* "View.MemoryView":492
24294  *
24295  * bytesitem = itemp[:self.view.itemsize]
24296  * try: # <<<<<<<<<<<<<<
24297  * result = struct.unpack(self.view.format, bytesitem)
24298  * except struct.error:
24299  */
24300  }
24301 
24302  /* "View.MemoryView":497
24303  * raise ValueError("Unable to convert item to object")
24304  * else:
24305  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
24306  * return result[0]
24307  * return result
24308  */
24309  /*else:*/ {
24310  __pyx_t_10 = strlen(__pyx_v_self->view.format);
24311  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
24312  if (__pyx_t_11) {
24313 
24314  /* "View.MemoryView":498
24315  * else:
24316  * if len(self.view.format) == 1:
24317  * return result[0] # <<<<<<<<<<<<<<
24318  * return result
24319  *
24320  */
24321  __Pyx_XDECREF(__pyx_r);
24322  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L5_except_error)
24323  __Pyx_GOTREF(__pyx_t_1);
24324  __pyx_r = __pyx_t_1;
24325  __pyx_t_1 = 0;
24326  goto __pyx_L6_except_return;
24327 
24328  /* "View.MemoryView":497
24329  * raise ValueError("Unable to convert item to object")
24330  * else:
24331  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
24332  * return result[0]
24333  * return result
24334  */
24335  }
24336 
24337  /* "View.MemoryView":499
24338  * if len(self.view.format) == 1:
24339  * return result[0]
24340  * return result # <<<<<<<<<<<<<<
24341  *
24342  * cdef assign_item_from_object(self, char *itemp, object value):
24343  */
24344  __Pyx_XDECREF(__pyx_r);
24345  __Pyx_INCREF(__pyx_v_result);
24346  __pyx_r = __pyx_v_result;
24347  goto __pyx_L6_except_return;
24348  }
24349  __pyx_L3_error:;
24350  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
24351  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24352  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24353  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24354  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
24355 
24356  /* "View.MemoryView":494
24357  * try:
24358  * result = struct.unpack(self.view.format, bytesitem)
24359  * except struct.error: # <<<<<<<<<<<<<<
24360  * raise ValueError("Unable to convert item to object")
24361  * else:
24362  */
24363  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
24364  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L5_except_error)
24365  __Pyx_GOTREF(__pyx_t_6);
24366  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
24367  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24368  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
24369  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
24370  if (__pyx_t_8) {
24371  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
24372  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 494, __pyx_L5_except_error)
24373  __Pyx_GOTREF(__pyx_t_9);
24374  __Pyx_GOTREF(__pyx_t_5);
24375  __Pyx_GOTREF(__pyx_t_1);
24376 
24377  /* "View.MemoryView":495
24378  * result = struct.unpack(self.view.format, bytesitem)
24379  * except struct.error:
24380  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
24381  * else:
24382  * if len(self.view.format) == 1:
24383  */
24384  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L5_except_error)
24385  __Pyx_GOTREF(__pyx_t_6);
24386  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
24387  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24388  __PYX_ERR(0, 495, __pyx_L5_except_error)
24389  }
24390  goto __pyx_L5_except_error;
24391  __pyx_L5_except_error:;
24392 
24393  /* "View.MemoryView":492
24394  *
24395  * bytesitem = itemp[:self.view.itemsize]
24396  * try: # <<<<<<<<<<<<<<
24397  * result = struct.unpack(self.view.format, bytesitem)
24398  * except struct.error:
24399  */
24400  __Pyx_XGIVEREF(__pyx_t_2);
24401  __Pyx_XGIVEREF(__pyx_t_3);
24402  __Pyx_XGIVEREF(__pyx_t_4);
24403  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
24404  goto __pyx_L1_error;
24405  __pyx_L6_except_return:;
24406  __Pyx_XGIVEREF(__pyx_t_2);
24407  __Pyx_XGIVEREF(__pyx_t_3);
24408  __Pyx_XGIVEREF(__pyx_t_4);
24409  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
24410  goto __pyx_L0;
24411  }
24412 
24413  /* "View.MemoryView":485
24414  * self.assign_item_from_object(itemp, value)
24415  *
24416  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
24417  * """Only used if instantiated manually by the user, or if Cython doesn't
24418  * know how to convert the type"""
24419  */
24420 
24421  /* function exit code */
24422  __pyx_L1_error:;
24423  __Pyx_XDECREF(__pyx_t_1);
24424  __Pyx_XDECREF(__pyx_t_5);
24425  __Pyx_XDECREF(__pyx_t_6);
24426  __Pyx_XDECREF(__pyx_t_7);
24427  __Pyx_XDECREF(__pyx_t_9);
24428  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
24429  __pyx_r = 0;
24430  __pyx_L0:;
24431  __Pyx_XDECREF(__pyx_v_struct);
24432  __Pyx_XDECREF(__pyx_v_bytesitem);
24433  __Pyx_XDECREF(__pyx_v_result);
24434  __Pyx_XGIVEREF(__pyx_r);
24435  __Pyx_RefNannyFinishContext();
24436  return __pyx_r;
24437 }
24438 
24439 /* "View.MemoryView":501
24440  * return result
24441  *
24442  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
24443  * """Only used if instantiated manually by the user, or if Cython doesn't
24444  * know how to convert the type"""
24445  */
24446 
24447 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
24448  PyObject *__pyx_v_struct = NULL;
24449  char __pyx_v_c;
24450  PyObject *__pyx_v_bytesvalue = 0;
24451  Py_ssize_t __pyx_v_i;
24452  PyObject *__pyx_r = NULL;
24453  __Pyx_RefNannyDeclarations
24454  PyObject *__pyx_t_1 = NULL;
24455  int __pyx_t_2;
24456  int __pyx_t_3;
24457  PyObject *__pyx_t_4 = NULL;
24458  PyObject *__pyx_t_5 = NULL;
24459  PyObject *__pyx_t_6 = NULL;
24460  int __pyx_t_7;
24461  PyObject *__pyx_t_8 = NULL;
24462  Py_ssize_t __pyx_t_9;
24463  PyObject *__pyx_t_10 = NULL;
24464  char *__pyx_t_11;
24465  char *__pyx_t_12;
24466  char *__pyx_t_13;
24467  char *__pyx_t_14;
24468  int __pyx_lineno = 0;
24469  const char *__pyx_filename = NULL;
24470  int __pyx_clineno = 0;
24471  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
24472 
24473  /* "View.MemoryView":504
24474  * """Only used if instantiated manually by the user, or if Cython doesn't
24475  * know how to convert the type"""
24476  * import struct # <<<<<<<<<<<<<<
24477  * cdef char c
24478  * cdef bytes bytesvalue
24479  */
24480  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
24481  __Pyx_GOTREF(__pyx_t_1);
24482  __pyx_v_struct = __pyx_t_1;
24483  __pyx_t_1 = 0;
24484 
24485  /* "View.MemoryView":509
24486  * cdef Py_ssize_t i
24487  *
24488  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
24489  * bytesvalue = struct.pack(self.view.format, *value)
24490  * else:
24491  */
24492  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
24493  __pyx_t_3 = (__pyx_t_2 != 0);
24494  if (__pyx_t_3) {
24495 
24496  /* "View.MemoryView":510
24497  *
24498  * if isinstance(value, tuple):
24499  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
24500  * else:
24501  * bytesvalue = struct.pack(self.view.format, value)
24502  */
24503  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
24504  __Pyx_GOTREF(__pyx_t_1);
24505  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
24506  __Pyx_GOTREF(__pyx_t_4);
24507  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error)
24508  __Pyx_GOTREF(__pyx_t_5);
24509  __Pyx_GIVEREF(__pyx_t_4);
24510  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
24511  __pyx_t_4 = 0;
24512  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
24513  __Pyx_GOTREF(__pyx_t_4);
24514  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error)
24515  __Pyx_GOTREF(__pyx_t_6);
24516  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24517  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24518  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
24519  __Pyx_GOTREF(__pyx_t_4);
24520  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24521  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24522  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 510, __pyx_L1_error)
24523  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
24524  __pyx_t_4 = 0;
24525 
24526  /* "View.MemoryView":509
24527  * cdef Py_ssize_t i
24528  *
24529  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
24530  * bytesvalue = struct.pack(self.view.format, *value)
24531  * else:
24532  */
24533  goto __pyx_L3;
24534  }
24535 
24536  /* "View.MemoryView":512
24537  * bytesvalue = struct.pack(self.view.format, *value)
24538  * else:
24539  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
24540  *
24541  * for i, c in enumerate(bytesvalue):
24542  */
24543  /*else*/ {
24544  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
24545  __Pyx_GOTREF(__pyx_t_6);
24546  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
24547  __Pyx_GOTREF(__pyx_t_1);
24548  __pyx_t_5 = NULL;
24549  __pyx_t_7 = 0;
24550  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
24551  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
24552  if (likely(__pyx_t_5)) {
24553  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
24554  __Pyx_INCREF(__pyx_t_5);
24555  __Pyx_INCREF(function);
24556  __Pyx_DECREF_SET(__pyx_t_6, function);
24557  __pyx_t_7 = 1;
24558  }
24559  }
24560  #if CYTHON_FAST_PYCALL
24561  if (PyFunction_Check(__pyx_t_6)) {
24562  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
24563  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
24564  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24565  __Pyx_GOTREF(__pyx_t_4);
24566  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24567  } else
24568  #endif
24569  #if CYTHON_FAST_PYCCALL
24570  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
24571  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
24572  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
24573  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24574  __Pyx_GOTREF(__pyx_t_4);
24575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24576  } else
24577  #endif
24578  {
24579  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
24580  __Pyx_GOTREF(__pyx_t_8);
24581  if (__pyx_t_5) {
24582  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
24583  }
24584  __Pyx_GIVEREF(__pyx_t_1);
24585  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
24586  __Pyx_INCREF(__pyx_v_value);
24587  __Pyx_GIVEREF(__pyx_v_value);
24588  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
24589  __pyx_t_1 = 0;
24590  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
24591  __Pyx_GOTREF(__pyx_t_4);
24592  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
24593  }
24594  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24595  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 512, __pyx_L1_error)
24596  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
24597  __pyx_t_4 = 0;
24598  }
24599  __pyx_L3:;
24600 
24601  /* "View.MemoryView":514
24602  * bytesvalue = struct.pack(self.view.format, value)
24603  *
24604  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
24605  * itemp[i] = c
24606  *
24607  */
24608  __pyx_t_9 = 0;
24609  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
24610  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
24611  __PYX_ERR(0, 514, __pyx_L1_error)
24612  }
24613  __Pyx_INCREF(__pyx_v_bytesvalue);
24614  __pyx_t_10 = __pyx_v_bytesvalue;
24615  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
24616  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
24617  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
24618  __pyx_t_11 = __pyx_t_14;
24619  __pyx_v_c = (__pyx_t_11[0]);
24620 
24621  /* "View.MemoryView":515
24622  *
24623  * for i, c in enumerate(bytesvalue):
24624  * itemp[i] = c # <<<<<<<<<<<<<<
24625  *
24626  * @cname('getbuffer')
24627  */
24628  __pyx_v_i = __pyx_t_9;
24629 
24630  /* "View.MemoryView":514
24631  * bytesvalue = struct.pack(self.view.format, value)
24632  *
24633  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
24634  * itemp[i] = c
24635  *
24636  */
24637  __pyx_t_9 = (__pyx_t_9 + 1);
24638 
24639  /* "View.MemoryView":515
24640  *
24641  * for i, c in enumerate(bytesvalue):
24642  * itemp[i] = c # <<<<<<<<<<<<<<
24643  *
24644  * @cname('getbuffer')
24645  */
24646  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
24647  }
24648  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24649 
24650  /* "View.MemoryView":501
24651  * return result
24652  *
24653  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
24654  * """Only used if instantiated manually by the user, or if Cython doesn't
24655  * know how to convert the type"""
24656  */
24657 
24658  /* function exit code */
24659  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24660  goto __pyx_L0;
24661  __pyx_L1_error:;
24662  __Pyx_XDECREF(__pyx_t_1);
24663  __Pyx_XDECREF(__pyx_t_4);
24664  __Pyx_XDECREF(__pyx_t_5);
24665  __Pyx_XDECREF(__pyx_t_6);
24666  __Pyx_XDECREF(__pyx_t_8);
24667  __Pyx_XDECREF(__pyx_t_10);
24668  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
24669  __pyx_r = 0;
24670  __pyx_L0:;
24671  __Pyx_XDECREF(__pyx_v_struct);
24672  __Pyx_XDECREF(__pyx_v_bytesvalue);
24673  __Pyx_XGIVEREF(__pyx_r);
24674  __Pyx_RefNannyFinishContext();
24675  return __pyx_r;
24676 }
24677 
24678 /* "View.MemoryView":518
24679  *
24680  * @cname('getbuffer')
24681  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
24682  * if flags & PyBUF_WRITABLE and self.view.readonly:
24683  * raise ValueError("Cannot create writable memory view from read-only memoryview")
24684  */
24685 
24686 /* Python wrapper */
24687 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
24688 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
24689  int __pyx_r;
24690  __Pyx_RefNannyDeclarations
24691  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
24692  __pyx_r = __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));
24693 
24694  /* function exit code */
24695  __Pyx_RefNannyFinishContext();
24696  return __pyx_r;
24697 }
24698 
24699 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) {
24700  int __pyx_r;
24701  __Pyx_RefNannyDeclarations
24702  int __pyx_t_1;
24703  int __pyx_t_2;
24704  PyObject *__pyx_t_3 = NULL;
24705  Py_ssize_t *__pyx_t_4;
24706  char *__pyx_t_5;
24707  void *__pyx_t_6;
24708  int __pyx_t_7;
24709  Py_ssize_t __pyx_t_8;
24710  int __pyx_lineno = 0;
24711  const char *__pyx_filename = NULL;
24712  int __pyx_clineno = 0;
24713  if (__pyx_v_info == NULL) {
24714  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
24715  return -1;
24716  }
24717  __Pyx_RefNannySetupContext("__getbuffer__", 0);
24718  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
24719  __Pyx_GIVEREF(__pyx_v_info->obj);
24720 
24721  /* "View.MemoryView":519
24722  * @cname('getbuffer')
24723  * def __getbuffer__(self, Py_buffer *info, int flags):
24724  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
24725  * raise ValueError("Cannot create writable memory view from read-only memoryview")
24726  *
24727  */
24728  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
24729  if (__pyx_t_2) {
24730  } else {
24731  __pyx_t_1 = __pyx_t_2;
24732  goto __pyx_L4_bool_binop_done;
24733  }
24734  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
24735  __pyx_t_1 = __pyx_t_2;
24736  __pyx_L4_bool_binop_done:;
24737  if (unlikely(__pyx_t_1)) {
24738 
24739  /* "View.MemoryView":520
24740  * def __getbuffer__(self, Py_buffer *info, int flags):
24741  * if flags & PyBUF_WRITABLE and self.view.readonly:
24742  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
24743  *
24744  * if flags & PyBUF_ND:
24745  */
24746  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
24747  __Pyx_GOTREF(__pyx_t_3);
24748  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
24749  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24750  __PYX_ERR(0, 520, __pyx_L1_error)
24751 
24752  /* "View.MemoryView":519
24753  * @cname('getbuffer')
24754  * def __getbuffer__(self, Py_buffer *info, int flags):
24755  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
24756  * raise ValueError("Cannot create writable memory view from read-only memoryview")
24757  *
24758  */
24759  }
24760 
24761  /* "View.MemoryView":522
24762  * raise ValueError("Cannot create writable memory view from read-only memoryview")
24763  *
24764  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
24765  * info.shape = self.view.shape
24766  * else:
24767  */
24768  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
24769  if (__pyx_t_1) {
24770 
24771  /* "View.MemoryView":523
24772  *
24773  * if flags & PyBUF_ND:
24774  * info.shape = self.view.shape # <<<<<<<<<<<<<<
24775  * else:
24776  * info.shape = NULL
24777  */
24778  __pyx_t_4 = __pyx_v_self->view.shape;
24779  __pyx_v_info->shape = __pyx_t_4;
24780 
24781  /* "View.MemoryView":522
24782  * raise ValueError("Cannot create writable memory view from read-only memoryview")
24783  *
24784  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
24785  * info.shape = self.view.shape
24786  * else:
24787  */
24788  goto __pyx_L6;
24789  }
24790 
24791  /* "View.MemoryView":525
24792  * info.shape = self.view.shape
24793  * else:
24794  * info.shape = NULL # <<<<<<<<<<<<<<
24795  *
24796  * if flags & PyBUF_STRIDES:
24797  */
24798  /*else*/ {
24799  __pyx_v_info->shape = NULL;
24800  }
24801  __pyx_L6:;
24802 
24803  /* "View.MemoryView":527
24804  * info.shape = NULL
24805  *
24806  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
24807  * info.strides = self.view.strides
24808  * else:
24809  */
24810  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
24811  if (__pyx_t_1) {
24812 
24813  /* "View.MemoryView":528
24814  *
24815  * if flags & PyBUF_STRIDES:
24816  * info.strides = self.view.strides # <<<<<<<<<<<<<<
24817  * else:
24818  * info.strides = NULL
24819  */
24820  __pyx_t_4 = __pyx_v_self->view.strides;
24821  __pyx_v_info->strides = __pyx_t_4;
24822 
24823  /* "View.MemoryView":527
24824  * info.shape = NULL
24825  *
24826  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
24827  * info.strides = self.view.strides
24828  * else:
24829  */
24830  goto __pyx_L7;
24831  }
24832 
24833  /* "View.MemoryView":530
24834  * info.strides = self.view.strides
24835  * else:
24836  * info.strides = NULL # <<<<<<<<<<<<<<
24837  *
24838  * if flags & PyBUF_INDIRECT:
24839  */
24840  /*else*/ {
24841  __pyx_v_info->strides = NULL;
24842  }
24843  __pyx_L7:;
24844 
24845  /* "View.MemoryView":532
24846  * info.strides = NULL
24847  *
24848  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
24849  * info.suboffsets = self.view.suboffsets
24850  * else:
24851  */
24852  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
24853  if (__pyx_t_1) {
24854 
24855  /* "View.MemoryView":533
24856  *
24857  * if flags & PyBUF_INDIRECT:
24858  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
24859  * else:
24860  * info.suboffsets = NULL
24861  */
24862  __pyx_t_4 = __pyx_v_self->view.suboffsets;
24863  __pyx_v_info->suboffsets = __pyx_t_4;
24864 
24865  /* "View.MemoryView":532
24866  * info.strides = NULL
24867  *
24868  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
24869  * info.suboffsets = self.view.suboffsets
24870  * else:
24871  */
24872  goto __pyx_L8;
24873  }
24874 
24875  /* "View.MemoryView":535
24876  * info.suboffsets = self.view.suboffsets
24877  * else:
24878  * info.suboffsets = NULL # <<<<<<<<<<<<<<
24879  *
24880  * if flags & PyBUF_FORMAT:
24881  */
24882  /*else*/ {
24883  __pyx_v_info->suboffsets = NULL;
24884  }
24885  __pyx_L8:;
24886 
24887  /* "View.MemoryView":537
24888  * info.suboffsets = NULL
24889  *
24890  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
24891  * info.format = self.view.format
24892  * else:
24893  */
24894  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
24895  if (__pyx_t_1) {
24896 
24897  /* "View.MemoryView":538
24898  *
24899  * if flags & PyBUF_FORMAT:
24900  * info.format = self.view.format # <<<<<<<<<<<<<<
24901  * else:
24902  * info.format = NULL
24903  */
24904  __pyx_t_5 = __pyx_v_self->view.format;
24905  __pyx_v_info->format = __pyx_t_5;
24906 
24907  /* "View.MemoryView":537
24908  * info.suboffsets = NULL
24909  *
24910  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
24911  * info.format = self.view.format
24912  * else:
24913  */
24914  goto __pyx_L9;
24915  }
24916 
24917  /* "View.MemoryView":540
24918  * info.format = self.view.format
24919  * else:
24920  * info.format = NULL # <<<<<<<<<<<<<<
24921  *
24922  * info.buf = self.view.buf
24923  */
24924  /*else*/ {
24925  __pyx_v_info->format = NULL;
24926  }
24927  __pyx_L9:;
24928 
24929  /* "View.MemoryView":542
24930  * info.format = NULL
24931  *
24932  * info.buf = self.view.buf # <<<<<<<<<<<<<<
24933  * info.ndim = self.view.ndim
24934  * info.itemsize = self.view.itemsize
24935  */
24936  __pyx_t_6 = __pyx_v_self->view.buf;
24937  __pyx_v_info->buf = __pyx_t_6;
24938 
24939  /* "View.MemoryView":543
24940  *
24941  * info.buf = self.view.buf
24942  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
24943  * info.itemsize = self.view.itemsize
24944  * info.len = self.view.len
24945  */
24946  __pyx_t_7 = __pyx_v_self->view.ndim;
24947  __pyx_v_info->ndim = __pyx_t_7;
24948 
24949  /* "View.MemoryView":544
24950  * info.buf = self.view.buf
24951  * info.ndim = self.view.ndim
24952  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
24953  * info.len = self.view.len
24954  * info.readonly = self.view.readonly
24955  */
24956  __pyx_t_8 = __pyx_v_self->view.itemsize;
24957  __pyx_v_info->itemsize = __pyx_t_8;
24958 
24959  /* "View.MemoryView":545
24960  * info.ndim = self.view.ndim
24961  * info.itemsize = self.view.itemsize
24962  * info.len = self.view.len # <<<<<<<<<<<<<<
24963  * info.readonly = self.view.readonly
24964  * info.obj = self
24965  */
24966  __pyx_t_8 = __pyx_v_self->view.len;
24967  __pyx_v_info->len = __pyx_t_8;
24968 
24969  /* "View.MemoryView":546
24970  * info.itemsize = self.view.itemsize
24971  * info.len = self.view.len
24972  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
24973  * info.obj = self
24974  *
24975  */
24976  __pyx_t_1 = __pyx_v_self->view.readonly;
24977  __pyx_v_info->readonly = __pyx_t_1;
24978 
24979  /* "View.MemoryView":547
24980  * info.len = self.view.len
24981  * info.readonly = self.view.readonly
24982  * info.obj = self # <<<<<<<<<<<<<<
24983  *
24984  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
24985  */
24986  __Pyx_INCREF(((PyObject *)__pyx_v_self));
24987  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
24988  __Pyx_GOTREF(__pyx_v_info->obj);
24989  __Pyx_DECREF(__pyx_v_info->obj);
24990  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
24991 
24992  /* "View.MemoryView":518
24993  *
24994  * @cname('getbuffer')
24995  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
24996  * if flags & PyBUF_WRITABLE and self.view.readonly:
24997  * raise ValueError("Cannot create writable memory view from read-only memoryview")
24998  */
24999 
25000  /* function exit code */
25001  __pyx_r = 0;
25002  goto __pyx_L0;
25003  __pyx_L1_error:;
25004  __Pyx_XDECREF(__pyx_t_3);
25005  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25006  __pyx_r = -1;
25007  if (__pyx_v_info->obj != NULL) {
25008  __Pyx_GOTREF(__pyx_v_info->obj);
25009  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25010  }
25011  goto __pyx_L2;
25012  __pyx_L0:;
25013  if (__pyx_v_info->obj == Py_None) {
25014  __Pyx_GOTREF(__pyx_v_info->obj);
25015  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25016  }
25017  __pyx_L2:;
25018  __Pyx_RefNannyFinishContext();
25019  return __pyx_r;
25020 }
25021 
25022 /* "View.MemoryView":553
25023  *
25024  * @property
25025  * def T(self): # <<<<<<<<<<<<<<
25026  * cdef _memoryviewslice result = memoryview_copy(self)
25027  * transpose_memslice(&result.from_slice)
25028  */
25029 
25030 /* Python wrapper */
25031 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
25032 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
25033  PyObject *__pyx_r = 0;
25034  __Pyx_RefNannyDeclarations
25035  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25036  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25037 
25038  /* function exit code */
25039  __Pyx_RefNannyFinishContext();
25040  return __pyx_r;
25041 }
25042 
25043 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25044  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
25045  PyObject *__pyx_r = NULL;
25046  __Pyx_RefNannyDeclarations
25047  PyObject *__pyx_t_1 = NULL;
25048  int __pyx_t_2;
25049  int __pyx_lineno = 0;
25050  const char *__pyx_filename = NULL;
25051  int __pyx_clineno = 0;
25052  __Pyx_RefNannySetupContext("__get__", 0);
25053 
25054  /* "View.MemoryView":554
25055  * @property
25056  * def T(self):
25057  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
25058  * transpose_memslice(&result.from_slice)
25059  * return result
25060  */
25061  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
25062  __Pyx_GOTREF(__pyx_t_1);
25063  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 554, __pyx_L1_error)
25064  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
25065  __pyx_t_1 = 0;
25066 
25067  /* "View.MemoryView":555
25068  * def T(self):
25069  * cdef _memoryviewslice result = memoryview_copy(self)
25070  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
25071  * return result
25072  *
25073  */
25074  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 555, __pyx_L1_error)
25075 
25076  /* "View.MemoryView":556
25077  * cdef _memoryviewslice result = memoryview_copy(self)
25078  * transpose_memslice(&result.from_slice)
25079  * return result # <<<<<<<<<<<<<<
25080  *
25081  * @property
25082  */
25083  __Pyx_XDECREF(__pyx_r);
25084  __Pyx_INCREF(((PyObject *)__pyx_v_result));
25085  __pyx_r = ((PyObject *)__pyx_v_result);
25086  goto __pyx_L0;
25087 
25088  /* "View.MemoryView":553
25089  *
25090  * @property
25091  * def T(self): # <<<<<<<<<<<<<<
25092  * cdef _memoryviewslice result = memoryview_copy(self)
25093  * transpose_memslice(&result.from_slice)
25094  */
25095 
25096  /* function exit code */
25097  __pyx_L1_error:;
25098  __Pyx_XDECREF(__pyx_t_1);
25099  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25100  __pyx_r = NULL;
25101  __pyx_L0:;
25102  __Pyx_XDECREF((PyObject *)__pyx_v_result);
25103  __Pyx_XGIVEREF(__pyx_r);
25104  __Pyx_RefNannyFinishContext();
25105  return __pyx_r;
25106 }
25107 
25108 /* "View.MemoryView":559
25109  *
25110  * @property
25111  * def base(self): # <<<<<<<<<<<<<<
25112  * return self.obj
25113  *
25114  */
25115 
25116 /* Python wrapper */
25117 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
25118 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
25119  PyObject *__pyx_r = 0;
25120  __Pyx_RefNannyDeclarations
25121  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25122  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25123 
25124  /* function exit code */
25125  __Pyx_RefNannyFinishContext();
25126  return __pyx_r;
25127 }
25128 
25129 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25130  PyObject *__pyx_r = NULL;
25131  __Pyx_RefNannyDeclarations
25132  __Pyx_RefNannySetupContext("__get__", 0);
25133 
25134  /* "View.MemoryView":560
25135  * @property
25136  * def base(self):
25137  * return self.obj # <<<<<<<<<<<<<<
25138  *
25139  * @property
25140  */
25141  __Pyx_XDECREF(__pyx_r);
25142  __Pyx_INCREF(__pyx_v_self->obj);
25143  __pyx_r = __pyx_v_self->obj;
25144  goto __pyx_L0;
25145 
25146  /* "View.MemoryView":559
25147  *
25148  * @property
25149  * def base(self): # <<<<<<<<<<<<<<
25150  * return self.obj
25151  *
25152  */
25153 
25154  /* function exit code */
25155  __pyx_L0:;
25156  __Pyx_XGIVEREF(__pyx_r);
25157  __Pyx_RefNannyFinishContext();
25158  return __pyx_r;
25159 }
25160 
25161 /* "View.MemoryView":563
25162  *
25163  * @property
25164  * def shape(self): # <<<<<<<<<<<<<<
25165  * return tuple([length for length in self.view.shape[:self.view.ndim]])
25166  *
25167  */
25168 
25169 /* Python wrapper */
25170 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
25171 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
25172  PyObject *__pyx_r = 0;
25173  __Pyx_RefNannyDeclarations
25174  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25175  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25176 
25177  /* function exit code */
25178  __Pyx_RefNannyFinishContext();
25179  return __pyx_r;
25180 }
25181 
25182 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25183  Py_ssize_t __pyx_v_length;
25184  PyObject *__pyx_r = NULL;
25185  __Pyx_RefNannyDeclarations
25186  PyObject *__pyx_t_1 = NULL;
25187  Py_ssize_t *__pyx_t_2;
25188  Py_ssize_t *__pyx_t_3;
25189  Py_ssize_t *__pyx_t_4;
25190  PyObject *__pyx_t_5 = NULL;
25191  int __pyx_lineno = 0;
25192  const char *__pyx_filename = NULL;
25193  int __pyx_clineno = 0;
25194  __Pyx_RefNannySetupContext("__get__", 0);
25195 
25196  /* "View.MemoryView":564
25197  * @property
25198  * def shape(self):
25199  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
25200  *
25201  * @property
25202  */
25203  __Pyx_XDECREF(__pyx_r);
25204  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
25205  __Pyx_GOTREF(__pyx_t_1);
25206  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
25207  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
25208  __pyx_t_2 = __pyx_t_4;
25209  __pyx_v_length = (__pyx_t_2[0]);
25210  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
25211  __Pyx_GOTREF(__pyx_t_5);
25212  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 564, __pyx_L1_error)
25213  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25214  }
25215  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
25216  __Pyx_GOTREF(__pyx_t_5);
25217  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25218  __pyx_r = __pyx_t_5;
25219  __pyx_t_5 = 0;
25220  goto __pyx_L0;
25221 
25222  /* "View.MemoryView":563
25223  *
25224  * @property
25225  * def shape(self): # <<<<<<<<<<<<<<
25226  * return tuple([length for length in self.view.shape[:self.view.ndim]])
25227  *
25228  */
25229 
25230  /* function exit code */
25231  __pyx_L1_error:;
25232  __Pyx_XDECREF(__pyx_t_1);
25233  __Pyx_XDECREF(__pyx_t_5);
25234  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25235  __pyx_r = NULL;
25236  __pyx_L0:;
25237  __Pyx_XGIVEREF(__pyx_r);
25238  __Pyx_RefNannyFinishContext();
25239  return __pyx_r;
25240 }
25241 
25242 /* "View.MemoryView":567
25243  *
25244  * @property
25245  * def strides(self): # <<<<<<<<<<<<<<
25246  * if self.view.strides == NULL:
25247  *
25248  */
25249 
25250 /* Python wrapper */
25251 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
25252 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
25253  PyObject *__pyx_r = 0;
25254  __Pyx_RefNannyDeclarations
25255  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25256  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25257 
25258  /* function exit code */
25259  __Pyx_RefNannyFinishContext();
25260  return __pyx_r;
25261 }
25262 
25263 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25264  Py_ssize_t __pyx_v_stride;
25265  PyObject *__pyx_r = NULL;
25266  __Pyx_RefNannyDeclarations
25267  int __pyx_t_1;
25268  PyObject *__pyx_t_2 = NULL;
25269  Py_ssize_t *__pyx_t_3;
25270  Py_ssize_t *__pyx_t_4;
25271  Py_ssize_t *__pyx_t_5;
25272  PyObject *__pyx_t_6 = NULL;
25273  int __pyx_lineno = 0;
25274  const char *__pyx_filename = NULL;
25275  int __pyx_clineno = 0;
25276  __Pyx_RefNannySetupContext("__get__", 0);
25277 
25278  /* "View.MemoryView":568
25279  * @property
25280  * def strides(self):
25281  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
25282  *
25283  * raise ValueError("Buffer view does not expose strides")
25284  */
25285  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
25286  if (unlikely(__pyx_t_1)) {
25287 
25288  /* "View.MemoryView":570
25289  * if self.view.strides == NULL:
25290  *
25291  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
25292  *
25293  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
25294  */
25295  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
25296  __Pyx_GOTREF(__pyx_t_2);
25297  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
25298  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25299  __PYX_ERR(0, 570, __pyx_L1_error)
25300 
25301  /* "View.MemoryView":568
25302  * @property
25303  * def strides(self):
25304  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
25305  *
25306  * raise ValueError("Buffer view does not expose strides")
25307  */
25308  }
25309 
25310  /* "View.MemoryView":572
25311  * raise ValueError("Buffer view does not expose strides")
25312  *
25313  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
25314  *
25315  * @property
25316  */
25317  __Pyx_XDECREF(__pyx_r);
25318  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
25319  __Pyx_GOTREF(__pyx_t_2);
25320  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
25321  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
25322  __pyx_t_3 = __pyx_t_5;
25323  __pyx_v_stride = (__pyx_t_3[0]);
25324  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
25325  __Pyx_GOTREF(__pyx_t_6);
25326  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 572, __pyx_L1_error)
25327  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25328  }
25329  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
25330  __Pyx_GOTREF(__pyx_t_6);
25331  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25332  __pyx_r = __pyx_t_6;
25333  __pyx_t_6 = 0;
25334  goto __pyx_L0;
25335 
25336  /* "View.MemoryView":567
25337  *
25338  * @property
25339  * def strides(self): # <<<<<<<<<<<<<<
25340  * if self.view.strides == NULL:
25341  *
25342  */
25343 
25344  /* function exit code */
25345  __pyx_L1_error:;
25346  __Pyx_XDECREF(__pyx_t_2);
25347  __Pyx_XDECREF(__pyx_t_6);
25348  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25349  __pyx_r = NULL;
25350  __pyx_L0:;
25351  __Pyx_XGIVEREF(__pyx_r);
25352  __Pyx_RefNannyFinishContext();
25353  return __pyx_r;
25354 }
25355 
25356 /* "View.MemoryView":575
25357  *
25358  * @property
25359  * def suboffsets(self): # <<<<<<<<<<<<<<
25360  * if self.view.suboffsets == NULL:
25361  * return (-1,) * self.view.ndim
25362  */
25363 
25364 /* Python wrapper */
25365 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
25366 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
25367  PyObject *__pyx_r = 0;
25368  __Pyx_RefNannyDeclarations
25369  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25370  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25371 
25372  /* function exit code */
25373  __Pyx_RefNannyFinishContext();
25374  return __pyx_r;
25375 }
25376 
25377 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25378  Py_ssize_t __pyx_v_suboffset;
25379  PyObject *__pyx_r = NULL;
25380  __Pyx_RefNannyDeclarations
25381  int __pyx_t_1;
25382  PyObject *__pyx_t_2 = NULL;
25383  PyObject *__pyx_t_3 = NULL;
25384  Py_ssize_t *__pyx_t_4;
25385  Py_ssize_t *__pyx_t_5;
25386  Py_ssize_t *__pyx_t_6;
25387  int __pyx_lineno = 0;
25388  const char *__pyx_filename = NULL;
25389  int __pyx_clineno = 0;
25390  __Pyx_RefNannySetupContext("__get__", 0);
25391 
25392  /* "View.MemoryView":576
25393  * @property
25394  * def suboffsets(self):
25395  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
25396  * return (-1,) * self.view.ndim
25397  *
25398  */
25399  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
25400  if (__pyx_t_1) {
25401 
25402  /* "View.MemoryView":577
25403  * def suboffsets(self):
25404  * if self.view.suboffsets == NULL:
25405  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
25406  *
25407  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
25408  */
25409  __Pyx_XDECREF(__pyx_r);
25410  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
25411  __Pyx_GOTREF(__pyx_t_2);
25412  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__19, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
25413  __Pyx_GOTREF(__pyx_t_3);
25414  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25415  __pyx_r = __pyx_t_3;
25416  __pyx_t_3 = 0;
25417  goto __pyx_L0;
25418 
25419  /* "View.MemoryView":576
25420  * @property
25421  * def suboffsets(self):
25422  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
25423  * return (-1,) * self.view.ndim
25424  *
25425  */
25426  }
25427 
25428  /* "View.MemoryView":579
25429  * return (-1,) * self.view.ndim
25430  *
25431  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
25432  *
25433  * @property
25434  */
25435  __Pyx_XDECREF(__pyx_r);
25436  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
25437  __Pyx_GOTREF(__pyx_t_3);
25438  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
25439  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
25440  __pyx_t_4 = __pyx_t_6;
25441  __pyx_v_suboffset = (__pyx_t_4[0]);
25442  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
25443  __Pyx_GOTREF(__pyx_t_2);
25444  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 579, __pyx_L1_error)
25445  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25446  }
25447  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
25448  __Pyx_GOTREF(__pyx_t_2);
25449  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25450  __pyx_r = __pyx_t_2;
25451  __pyx_t_2 = 0;
25452  goto __pyx_L0;
25453 
25454  /* "View.MemoryView":575
25455  *
25456  * @property
25457  * def suboffsets(self): # <<<<<<<<<<<<<<
25458  * if self.view.suboffsets == NULL:
25459  * return (-1,) * self.view.ndim
25460  */
25461 
25462  /* function exit code */
25463  __pyx_L1_error:;
25464  __Pyx_XDECREF(__pyx_t_2);
25465  __Pyx_XDECREF(__pyx_t_3);
25466  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25467  __pyx_r = NULL;
25468  __pyx_L0:;
25469  __Pyx_XGIVEREF(__pyx_r);
25470  __Pyx_RefNannyFinishContext();
25471  return __pyx_r;
25472 }
25473 
25474 /* "View.MemoryView":582
25475  *
25476  * @property
25477  * def ndim(self): # <<<<<<<<<<<<<<
25478  * return self.view.ndim
25479  *
25480  */
25481 
25482 /* Python wrapper */
25483 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
25484 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
25485  PyObject *__pyx_r = 0;
25486  __Pyx_RefNannyDeclarations
25487  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25488  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25489 
25490  /* function exit code */
25491  __Pyx_RefNannyFinishContext();
25492  return __pyx_r;
25493 }
25494 
25495 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25496  PyObject *__pyx_r = NULL;
25497  __Pyx_RefNannyDeclarations
25498  PyObject *__pyx_t_1 = NULL;
25499  int __pyx_lineno = 0;
25500  const char *__pyx_filename = NULL;
25501  int __pyx_clineno = 0;
25502  __Pyx_RefNannySetupContext("__get__", 0);
25503 
25504  /* "View.MemoryView":583
25505  * @property
25506  * def ndim(self):
25507  * return self.view.ndim # <<<<<<<<<<<<<<
25508  *
25509  * @property
25510  */
25511  __Pyx_XDECREF(__pyx_r);
25512  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
25513  __Pyx_GOTREF(__pyx_t_1);
25514  __pyx_r = __pyx_t_1;
25515  __pyx_t_1 = 0;
25516  goto __pyx_L0;
25517 
25518  /* "View.MemoryView":582
25519  *
25520  * @property
25521  * def ndim(self): # <<<<<<<<<<<<<<
25522  * return self.view.ndim
25523  *
25524  */
25525 
25526  /* function exit code */
25527  __pyx_L1_error:;
25528  __Pyx_XDECREF(__pyx_t_1);
25529  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25530  __pyx_r = NULL;
25531  __pyx_L0:;
25532  __Pyx_XGIVEREF(__pyx_r);
25533  __Pyx_RefNannyFinishContext();
25534  return __pyx_r;
25535 }
25536 
25537 /* "View.MemoryView":586
25538  *
25539  * @property
25540  * def itemsize(self): # <<<<<<<<<<<<<<
25541  * return self.view.itemsize
25542  *
25543  */
25544 
25545 /* Python wrapper */
25546 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
25547 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
25548  PyObject *__pyx_r = 0;
25549  __Pyx_RefNannyDeclarations
25550  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25551  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25552 
25553  /* function exit code */
25554  __Pyx_RefNannyFinishContext();
25555  return __pyx_r;
25556 }
25557 
25558 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25559  PyObject *__pyx_r = NULL;
25560  __Pyx_RefNannyDeclarations
25561  PyObject *__pyx_t_1 = NULL;
25562  int __pyx_lineno = 0;
25563  const char *__pyx_filename = NULL;
25564  int __pyx_clineno = 0;
25565  __Pyx_RefNannySetupContext("__get__", 0);
25566 
25567  /* "View.MemoryView":587
25568  * @property
25569  * def itemsize(self):
25570  * return self.view.itemsize # <<<<<<<<<<<<<<
25571  *
25572  * @property
25573  */
25574  __Pyx_XDECREF(__pyx_r);
25575  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
25576  __Pyx_GOTREF(__pyx_t_1);
25577  __pyx_r = __pyx_t_1;
25578  __pyx_t_1 = 0;
25579  goto __pyx_L0;
25580 
25581  /* "View.MemoryView":586
25582  *
25583  * @property
25584  * def itemsize(self): # <<<<<<<<<<<<<<
25585  * return self.view.itemsize
25586  *
25587  */
25588 
25589  /* function exit code */
25590  __pyx_L1_error:;
25591  __Pyx_XDECREF(__pyx_t_1);
25592  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25593  __pyx_r = NULL;
25594  __pyx_L0:;
25595  __Pyx_XGIVEREF(__pyx_r);
25596  __Pyx_RefNannyFinishContext();
25597  return __pyx_r;
25598 }
25599 
25600 /* "View.MemoryView":590
25601  *
25602  * @property
25603  * def nbytes(self): # <<<<<<<<<<<<<<
25604  * return self.size * self.view.itemsize
25605  *
25606  */
25607 
25608 /* Python wrapper */
25609 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
25610 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
25611  PyObject *__pyx_r = 0;
25612  __Pyx_RefNannyDeclarations
25613  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25614  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25615 
25616  /* function exit code */
25617  __Pyx_RefNannyFinishContext();
25618  return __pyx_r;
25619 }
25620 
25621 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25622  PyObject *__pyx_r = NULL;
25623  __Pyx_RefNannyDeclarations
25624  PyObject *__pyx_t_1 = NULL;
25625  PyObject *__pyx_t_2 = NULL;
25626  PyObject *__pyx_t_3 = NULL;
25627  int __pyx_lineno = 0;
25628  const char *__pyx_filename = NULL;
25629  int __pyx_clineno = 0;
25630  __Pyx_RefNannySetupContext("__get__", 0);
25631 
25632  /* "View.MemoryView":591
25633  * @property
25634  * def nbytes(self):
25635  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
25636  *
25637  * @property
25638  */
25639  __Pyx_XDECREF(__pyx_r);
25640  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
25641  __Pyx_GOTREF(__pyx_t_1);
25642  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
25643  __Pyx_GOTREF(__pyx_t_2);
25644  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
25645  __Pyx_GOTREF(__pyx_t_3);
25646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25647  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25648  __pyx_r = __pyx_t_3;
25649  __pyx_t_3 = 0;
25650  goto __pyx_L0;
25651 
25652  /* "View.MemoryView":590
25653  *
25654  * @property
25655  * def nbytes(self): # <<<<<<<<<<<<<<
25656  * return self.size * self.view.itemsize
25657  *
25658  */
25659 
25660  /* function exit code */
25661  __pyx_L1_error:;
25662  __Pyx_XDECREF(__pyx_t_1);
25663  __Pyx_XDECREF(__pyx_t_2);
25664  __Pyx_XDECREF(__pyx_t_3);
25665  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25666  __pyx_r = NULL;
25667  __pyx_L0:;
25668  __Pyx_XGIVEREF(__pyx_r);
25669  __Pyx_RefNannyFinishContext();
25670  return __pyx_r;
25671 }
25672 
25673 /* "View.MemoryView":594
25674  *
25675  * @property
25676  * def size(self): # <<<<<<<<<<<<<<
25677  * if self._size is None:
25678  * result = 1
25679  */
25680 
25681 /* Python wrapper */
25682 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
25683 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
25684  PyObject *__pyx_r = 0;
25685  __Pyx_RefNannyDeclarations
25686  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25687  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25688 
25689  /* function exit code */
25690  __Pyx_RefNannyFinishContext();
25691  return __pyx_r;
25692 }
25693 
25694 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25695  PyObject *__pyx_v_result = NULL;
25696  PyObject *__pyx_v_length = NULL;
25697  PyObject *__pyx_r = NULL;
25698  __Pyx_RefNannyDeclarations
25699  int __pyx_t_1;
25700  int __pyx_t_2;
25701  Py_ssize_t *__pyx_t_3;
25702  Py_ssize_t *__pyx_t_4;
25703  Py_ssize_t *__pyx_t_5;
25704  PyObject *__pyx_t_6 = NULL;
25705  int __pyx_lineno = 0;
25706  const char *__pyx_filename = NULL;
25707  int __pyx_clineno = 0;
25708  __Pyx_RefNannySetupContext("__get__", 0);
25709 
25710  /* "View.MemoryView":595
25711  * @property
25712  * def size(self):
25713  * if self._size is None: # <<<<<<<<<<<<<<
25714  * result = 1
25715  *
25716  */
25717  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
25718  __pyx_t_2 = (__pyx_t_1 != 0);
25719  if (__pyx_t_2) {
25720 
25721  /* "View.MemoryView":596
25722  * def size(self):
25723  * if self._size is None:
25724  * result = 1 # <<<<<<<<<<<<<<
25725  *
25726  * for length in self.view.shape[:self.view.ndim]:
25727  */
25728  __Pyx_INCREF(__pyx_int_1);
25729  __pyx_v_result = __pyx_int_1;
25730 
25731  /* "View.MemoryView":598
25732  * result = 1
25733  *
25734  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
25735  * result *= length
25736  *
25737  */
25738  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
25739  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
25740  __pyx_t_3 = __pyx_t_5;
25741  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error)
25742  __Pyx_GOTREF(__pyx_t_6);
25743  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
25744  __pyx_t_6 = 0;
25745 
25746  /* "View.MemoryView":599
25747  *
25748  * for length in self.view.shape[:self.view.ndim]:
25749  * result *= length # <<<<<<<<<<<<<<
25750  *
25751  * self._size = result
25752  */
25753  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
25754  __Pyx_GOTREF(__pyx_t_6);
25755  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
25756  __pyx_t_6 = 0;
25757  }
25758 
25759  /* "View.MemoryView":601
25760  * result *= length
25761  *
25762  * self._size = result # <<<<<<<<<<<<<<
25763  *
25764  * return self._size
25765  */
25766  __Pyx_INCREF(__pyx_v_result);
25767  __Pyx_GIVEREF(__pyx_v_result);
25768  __Pyx_GOTREF(__pyx_v_self->_size);
25769  __Pyx_DECREF(__pyx_v_self->_size);
25770  __pyx_v_self->_size = __pyx_v_result;
25771 
25772  /* "View.MemoryView":595
25773  * @property
25774  * def size(self):
25775  * if self._size is None: # <<<<<<<<<<<<<<
25776  * result = 1
25777  *
25778  */
25779  }
25780 
25781  /* "View.MemoryView":603
25782  * self._size = result
25783  *
25784  * return self._size # <<<<<<<<<<<<<<
25785  *
25786  * def __len__(self):
25787  */
25788  __Pyx_XDECREF(__pyx_r);
25789  __Pyx_INCREF(__pyx_v_self->_size);
25790  __pyx_r = __pyx_v_self->_size;
25791  goto __pyx_L0;
25792 
25793  /* "View.MemoryView":594
25794  *
25795  * @property
25796  * def size(self): # <<<<<<<<<<<<<<
25797  * if self._size is None:
25798  * result = 1
25799  */
25800 
25801  /* function exit code */
25802  __pyx_L1_error:;
25803  __Pyx_XDECREF(__pyx_t_6);
25804  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25805  __pyx_r = NULL;
25806  __pyx_L0:;
25807  __Pyx_XDECREF(__pyx_v_result);
25808  __Pyx_XDECREF(__pyx_v_length);
25809  __Pyx_XGIVEREF(__pyx_r);
25810  __Pyx_RefNannyFinishContext();
25811  return __pyx_r;
25812 }
25813 
25814 /* "View.MemoryView":605
25815  * return self._size
25816  *
25817  * def __len__(self): # <<<<<<<<<<<<<<
25818  * if self.view.ndim >= 1:
25819  * return self.view.shape[0]
25820  */
25821 
25822 /* Python wrapper */
25823 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
25824 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
25825  Py_ssize_t __pyx_r;
25826  __Pyx_RefNannyDeclarations
25827  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
25828  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25829 
25830  /* function exit code */
25831  __Pyx_RefNannyFinishContext();
25832  return __pyx_r;
25833 }
25834 
25835 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
25836  Py_ssize_t __pyx_r;
25837  __Pyx_RefNannyDeclarations
25838  int __pyx_t_1;
25839  __Pyx_RefNannySetupContext("__len__", 0);
25840 
25841  /* "View.MemoryView":606
25842  *
25843  * def __len__(self):
25844  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
25845  * return self.view.shape[0]
25846  *
25847  */
25848  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
25849  if (__pyx_t_1) {
25850 
25851  /* "View.MemoryView":607
25852  * def __len__(self):
25853  * if self.view.ndim >= 1:
25854  * return self.view.shape[0] # <<<<<<<<<<<<<<
25855  *
25856  * return 0
25857  */
25858  __pyx_r = (__pyx_v_self->view.shape[0]);
25859  goto __pyx_L0;
25860 
25861  /* "View.MemoryView":606
25862  *
25863  * def __len__(self):
25864  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
25865  * return self.view.shape[0]
25866  *
25867  */
25868  }
25869 
25870  /* "View.MemoryView":609
25871  * return self.view.shape[0]
25872  *
25873  * return 0 # <<<<<<<<<<<<<<
25874  *
25875  * def __repr__(self):
25876  */
25877  __pyx_r = 0;
25878  goto __pyx_L0;
25879 
25880  /* "View.MemoryView":605
25881  * return self._size
25882  *
25883  * def __len__(self): # <<<<<<<<<<<<<<
25884  * if self.view.ndim >= 1:
25885  * return self.view.shape[0]
25886  */
25887 
25888  /* function exit code */
25889  __pyx_L0:;
25890  __Pyx_RefNannyFinishContext();
25891  return __pyx_r;
25892 }
25893 
25894 /* "View.MemoryView":611
25895  * return 0
25896  *
25897  * def __repr__(self): # <<<<<<<<<<<<<<
25898  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
25899  * id(self))
25900  */
25901 
25902 /* Python wrapper */
25903 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
25904 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
25905  PyObject *__pyx_r = 0;
25906  __Pyx_RefNannyDeclarations
25907  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
25908  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25909 
25910  /* function exit code */
25911  __Pyx_RefNannyFinishContext();
25912  return __pyx_r;
25913 }
25914 
25915 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
25916  PyObject *__pyx_r = NULL;
25917  __Pyx_RefNannyDeclarations
25918  PyObject *__pyx_t_1 = NULL;
25919  PyObject *__pyx_t_2 = NULL;
25920  PyObject *__pyx_t_3 = NULL;
25921  int __pyx_lineno = 0;
25922  const char *__pyx_filename = NULL;
25923  int __pyx_clineno = 0;
25924  __Pyx_RefNannySetupContext("__repr__", 0);
25925 
25926  /* "View.MemoryView":612
25927  *
25928  * def __repr__(self):
25929  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
25930  * id(self))
25931  *
25932  */
25933  __Pyx_XDECREF(__pyx_r);
25934  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
25935  __Pyx_GOTREF(__pyx_t_1);
25936  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
25937  __Pyx_GOTREF(__pyx_t_2);
25938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25939  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
25940  __Pyx_GOTREF(__pyx_t_1);
25941  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25942 
25943  /* "View.MemoryView":613
25944  * def __repr__(self):
25945  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
25946  * id(self)) # <<<<<<<<<<<<<<
25947  *
25948  * def __str__(self):
25949  */
25950  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
25951  __Pyx_GOTREF(__pyx_t_2);
25952 
25953  /* "View.MemoryView":612
25954  *
25955  * def __repr__(self):
25956  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
25957  * id(self))
25958  *
25959  */
25960  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
25961  __Pyx_GOTREF(__pyx_t_3);
25962  __Pyx_GIVEREF(__pyx_t_1);
25963  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
25964  __Pyx_GIVEREF(__pyx_t_2);
25965  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
25966  __pyx_t_1 = 0;
25967  __pyx_t_2 = 0;
25968  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
25969  __Pyx_GOTREF(__pyx_t_2);
25970  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25971  __pyx_r = __pyx_t_2;
25972  __pyx_t_2 = 0;
25973  goto __pyx_L0;
25974 
25975  /* "View.MemoryView":611
25976  * return 0
25977  *
25978  * def __repr__(self): # <<<<<<<<<<<<<<
25979  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
25980  * id(self))
25981  */
25982 
25983  /* function exit code */
25984  __pyx_L1_error:;
25985  __Pyx_XDECREF(__pyx_t_1);
25986  __Pyx_XDECREF(__pyx_t_2);
25987  __Pyx_XDECREF(__pyx_t_3);
25988  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25989  __pyx_r = NULL;
25990  __pyx_L0:;
25991  __Pyx_XGIVEREF(__pyx_r);
25992  __Pyx_RefNannyFinishContext();
25993  return __pyx_r;
25994 }
25995 
25996 /* "View.MemoryView":615
25997  * id(self))
25998  *
25999  * def __str__(self): # <<<<<<<<<<<<<<
26000  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
26001  *
26002  */
26003 
26004 /* Python wrapper */
26005 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
26006 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
26007  PyObject *__pyx_r = 0;
26008  __Pyx_RefNannyDeclarations
26009  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
26010  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26011 
26012  /* function exit code */
26013  __Pyx_RefNannyFinishContext();
26014  return __pyx_r;
26015 }
26016 
26017 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
26018  PyObject *__pyx_r = NULL;
26019  __Pyx_RefNannyDeclarations
26020  PyObject *__pyx_t_1 = NULL;
26021  PyObject *__pyx_t_2 = NULL;
26022  int __pyx_lineno = 0;
26023  const char *__pyx_filename = NULL;
26024  int __pyx_clineno = 0;
26025  __Pyx_RefNannySetupContext("__str__", 0);
26026 
26027  /* "View.MemoryView":616
26028  *
26029  * def __str__(self):
26030  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
26031  *
26032  *
26033  */
26034  __Pyx_XDECREF(__pyx_r);
26035  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
26036  __Pyx_GOTREF(__pyx_t_1);
26037  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
26038  __Pyx_GOTREF(__pyx_t_2);
26039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26040  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
26041  __Pyx_GOTREF(__pyx_t_1);
26042  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26043  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
26044  __Pyx_GOTREF(__pyx_t_2);
26045  __Pyx_GIVEREF(__pyx_t_1);
26046  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
26047  __pyx_t_1 = 0;
26048  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
26049  __Pyx_GOTREF(__pyx_t_1);
26050  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26051  __pyx_r = __pyx_t_1;
26052  __pyx_t_1 = 0;
26053  goto __pyx_L0;
26054 
26055  /* "View.MemoryView":615
26056  * id(self))
26057  *
26058  * def __str__(self): # <<<<<<<<<<<<<<
26059  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
26060  *
26061  */
26062 
26063  /* function exit code */
26064  __pyx_L1_error:;
26065  __Pyx_XDECREF(__pyx_t_1);
26066  __Pyx_XDECREF(__pyx_t_2);
26067  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26068  __pyx_r = NULL;
26069  __pyx_L0:;
26070  __Pyx_XGIVEREF(__pyx_r);
26071  __Pyx_RefNannyFinishContext();
26072  return __pyx_r;
26073 }
26074 
26075 /* "View.MemoryView":619
26076  *
26077  *
26078  * def is_c_contig(self): # <<<<<<<<<<<<<<
26079  * cdef __Pyx_memviewslice *mslice
26080  * cdef __Pyx_memviewslice tmp
26081  */
26082 
26083 /* Python wrapper */
26084 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26085 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26086  PyObject *__pyx_r = 0;
26087  __Pyx_RefNannyDeclarations
26088  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
26089  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
26090 
26091  /* function exit code */
26092  __Pyx_RefNannyFinishContext();
26093  return __pyx_r;
26094 }
26095 
26096 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
26097  __Pyx_memviewslice *__pyx_v_mslice;
26098  __Pyx_memviewslice __pyx_v_tmp;
26099  PyObject *__pyx_r = NULL;
26100  __Pyx_RefNannyDeclarations
26101  __Pyx_memviewslice *__pyx_t_1;
26102  PyObject *__pyx_t_2 = NULL;
26103  int __pyx_lineno = 0;
26104  const char *__pyx_filename = NULL;
26105  int __pyx_clineno = 0;
26106  __Pyx_RefNannySetupContext("is_c_contig", 0);
26107 
26108  /* "View.MemoryView":622
26109  * cdef __Pyx_memviewslice *mslice
26110  * cdef __Pyx_memviewslice tmp
26111  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
26112  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26113  *
26114  */
26115  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 622, __pyx_L1_error)
26116  __pyx_v_mslice = __pyx_t_1;
26117 
26118  /* "View.MemoryView":623
26119  * cdef __Pyx_memviewslice tmp
26120  * mslice = get_slice_from_memview(self, &tmp)
26121  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
26122  *
26123  * def is_f_contig(self):
26124  */
26125  __Pyx_XDECREF(__pyx_r);
26126  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)
26127  __Pyx_GOTREF(__pyx_t_2);
26128  __pyx_r = __pyx_t_2;
26129  __pyx_t_2 = 0;
26130  goto __pyx_L0;
26131 
26132  /* "View.MemoryView":619
26133  *
26134  *
26135  * def is_c_contig(self): # <<<<<<<<<<<<<<
26136  * cdef __Pyx_memviewslice *mslice
26137  * cdef __Pyx_memviewslice tmp
26138  */
26139 
26140  /* function exit code */
26141  __pyx_L1_error:;
26142  __Pyx_XDECREF(__pyx_t_2);
26143  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
26144  __pyx_r = NULL;
26145  __pyx_L0:;
26146  __Pyx_XGIVEREF(__pyx_r);
26147  __Pyx_RefNannyFinishContext();
26148  return __pyx_r;
26149 }
26150 
26151 /* "View.MemoryView":625
26152  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26153  *
26154  * def is_f_contig(self): # <<<<<<<<<<<<<<
26155  * cdef __Pyx_memviewslice *mslice
26156  * cdef __Pyx_memviewslice tmp
26157  */
26158 
26159 /* Python wrapper */
26160 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26161 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26162  PyObject *__pyx_r = 0;
26163  __Pyx_RefNannyDeclarations
26164  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
26165  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
26166 
26167  /* function exit code */
26168  __Pyx_RefNannyFinishContext();
26169  return __pyx_r;
26170 }
26171 
26172 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
26173  __Pyx_memviewslice *__pyx_v_mslice;
26174  __Pyx_memviewslice __pyx_v_tmp;
26175  PyObject *__pyx_r = NULL;
26176  __Pyx_RefNannyDeclarations
26177  __Pyx_memviewslice *__pyx_t_1;
26178  PyObject *__pyx_t_2 = NULL;
26179  int __pyx_lineno = 0;
26180  const char *__pyx_filename = NULL;
26181  int __pyx_clineno = 0;
26182  __Pyx_RefNannySetupContext("is_f_contig", 0);
26183 
26184  /* "View.MemoryView":628
26185  * cdef __Pyx_memviewslice *mslice
26186  * cdef __Pyx_memviewslice tmp
26187  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
26188  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26189  *
26190  */
26191  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(0, 628, __pyx_L1_error)
26192  __pyx_v_mslice = __pyx_t_1;
26193 
26194  /* "View.MemoryView":629
26195  * cdef __Pyx_memviewslice tmp
26196  * mslice = get_slice_from_memview(self, &tmp)
26197  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
26198  *
26199  * def copy(self):
26200  */
26201  __Pyx_XDECREF(__pyx_r);
26202  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
26203  __Pyx_GOTREF(__pyx_t_2);
26204  __pyx_r = __pyx_t_2;
26205  __pyx_t_2 = 0;
26206  goto __pyx_L0;
26207 
26208  /* "View.MemoryView":625
26209  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26210  *
26211  * def is_f_contig(self): # <<<<<<<<<<<<<<
26212  * cdef __Pyx_memviewslice *mslice
26213  * cdef __Pyx_memviewslice tmp
26214  */
26215 
26216  /* function exit code */
26217  __pyx_L1_error:;
26218  __Pyx_XDECREF(__pyx_t_2);
26219  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
26220  __pyx_r = NULL;
26221  __pyx_L0:;
26222  __Pyx_XGIVEREF(__pyx_r);
26223  __Pyx_RefNannyFinishContext();
26224  return __pyx_r;
26225 }
26226 
26227 /* "View.MemoryView":631
26228  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26229  *
26230  * def copy(self): # <<<<<<<<<<<<<<
26231  * cdef __Pyx_memviewslice mslice
26232  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26233  */
26234 
26235 /* Python wrapper */
26236 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26237 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26238  PyObject *__pyx_r = 0;
26239  __Pyx_RefNannyDeclarations
26240  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
26241  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
26242 
26243  /* function exit code */
26244  __Pyx_RefNannyFinishContext();
26245  return __pyx_r;
26246 }
26247 
26248 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
26249  __Pyx_memviewslice __pyx_v_mslice;
26250  int __pyx_v_flags;
26251  PyObject *__pyx_r = NULL;
26252  __Pyx_RefNannyDeclarations
26253  __Pyx_memviewslice __pyx_t_1;
26254  PyObject *__pyx_t_2 = NULL;
26255  int __pyx_lineno = 0;
26256  const char *__pyx_filename = NULL;
26257  int __pyx_clineno = 0;
26258  __Pyx_RefNannySetupContext("copy", 0);
26259 
26260  /* "View.MemoryView":633
26261  * def copy(self):
26262  * cdef __Pyx_memviewslice mslice
26263  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
26264  *
26265  * slice_copy(self, &mslice)
26266  */
26267  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
26268 
26269  /* "View.MemoryView":635
26270  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26271  *
26272  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
26273  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
26274  * self.view.itemsize,
26275  */
26276  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
26277 
26278  /* "View.MemoryView":636
26279  *
26280  * slice_copy(self, &mslice)
26281  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
26282  * self.view.itemsize,
26283  * flags|PyBUF_C_CONTIGUOUS,
26284  */
26285  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
26286  __pyx_v_mslice = __pyx_t_1;
26287 
26288  /* "View.MemoryView":641
26289  * self.dtype_is_object)
26290  *
26291  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
26292  *
26293  * def copy_fortran(self):
26294  */
26295  __Pyx_XDECREF(__pyx_r);
26296  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
26297  __Pyx_GOTREF(__pyx_t_2);
26298  __pyx_r = __pyx_t_2;
26299  __pyx_t_2 = 0;
26300  goto __pyx_L0;
26301 
26302  /* "View.MemoryView":631
26303  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26304  *
26305  * def copy(self): # <<<<<<<<<<<<<<
26306  * cdef __Pyx_memviewslice mslice
26307  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26308  */
26309 
26310  /* function exit code */
26311  __pyx_L1_error:;
26312  __Pyx_XDECREF(__pyx_t_2);
26313  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
26314  __pyx_r = NULL;
26315  __pyx_L0:;
26316  __Pyx_XGIVEREF(__pyx_r);
26317  __Pyx_RefNannyFinishContext();
26318  return __pyx_r;
26319 }
26320 
26321 /* "View.MemoryView":643
26322  * return memoryview_copy_from_slice(self, &mslice)
26323  *
26324  * def copy_fortran(self): # <<<<<<<<<<<<<<
26325  * cdef __Pyx_memviewslice src, dst
26326  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
26327  */
26328 
26329 /* Python wrapper */
26330 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26331 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26332  PyObject *__pyx_r = 0;
26333  __Pyx_RefNannyDeclarations
26334  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
26335  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
26336 
26337  /* function exit code */
26338  __Pyx_RefNannyFinishContext();
26339  return __pyx_r;
26340 }
26341 
26342 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
26343  __Pyx_memviewslice __pyx_v_src;
26344  __Pyx_memviewslice __pyx_v_dst;
26345  int __pyx_v_flags;
26346  PyObject *__pyx_r = NULL;
26347  __Pyx_RefNannyDeclarations
26348  __Pyx_memviewslice __pyx_t_1;
26349  PyObject *__pyx_t_2 = NULL;
26350  int __pyx_lineno = 0;
26351  const char *__pyx_filename = NULL;
26352  int __pyx_clineno = 0;
26353  __Pyx_RefNannySetupContext("copy_fortran", 0);
26354 
26355  /* "View.MemoryView":645
26356  * def copy_fortran(self):
26357  * cdef __Pyx_memviewslice src, dst
26358  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
26359  *
26360  * slice_copy(self, &src)
26361  */
26362  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
26363 
26364  /* "View.MemoryView":647
26365  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
26366  *
26367  * slice_copy(self, &src) # <<<<<<<<<<<<<<
26368  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
26369  * self.view.itemsize,
26370  */
26371  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
26372 
26373  /* "View.MemoryView":648
26374  *
26375  * slice_copy(self, &src)
26376  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
26377  * self.view.itemsize,
26378  * flags|PyBUF_F_CONTIGUOUS,
26379  */
26380  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error)
26381  __pyx_v_dst = __pyx_t_1;
26382 
26383  /* "View.MemoryView":653
26384  * self.dtype_is_object)
26385  *
26386  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
26387  *
26388  *
26389  */
26390  __Pyx_XDECREF(__pyx_r);
26391  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
26392  __Pyx_GOTREF(__pyx_t_2);
26393  __pyx_r = __pyx_t_2;
26394  __pyx_t_2 = 0;
26395  goto __pyx_L0;
26396 
26397  /* "View.MemoryView":643
26398  * return memoryview_copy_from_slice(self, &mslice)
26399  *
26400  * def copy_fortran(self): # <<<<<<<<<<<<<<
26401  * cdef __Pyx_memviewslice src, dst
26402  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
26403  */
26404 
26405  /* function exit code */
26406  __pyx_L1_error:;
26407  __Pyx_XDECREF(__pyx_t_2);
26408  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
26409  __pyx_r = NULL;
26410  __pyx_L0:;
26411  __Pyx_XGIVEREF(__pyx_r);
26412  __Pyx_RefNannyFinishContext();
26413  return __pyx_r;
26414 }
26415 
26416 /* "(tree fragment)":1
26417  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
26418  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26419  * def __setstate_cython__(self, __pyx_state):
26420  */
26421 
26422 /* Python wrapper */
26423 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26424 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26425  PyObject *__pyx_r = 0;
26426  __Pyx_RefNannyDeclarations
26427  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
26428  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26429 
26430  /* function exit code */
26431  __Pyx_RefNannyFinishContext();
26432  return __pyx_r;
26433 }
26434 
26435 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
26436  PyObject *__pyx_r = NULL;
26437  __Pyx_RefNannyDeclarations
26438  PyObject *__pyx_t_1 = NULL;
26439  int __pyx_lineno = 0;
26440  const char *__pyx_filename = NULL;
26441  int __pyx_clineno = 0;
26442  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
26443 
26444  /* "(tree fragment)":2
26445  * def __reduce_cython__(self):
26446  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
26447  * def __setstate_cython__(self, __pyx_state):
26448  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26449  */
26450  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
26451  __Pyx_GOTREF(__pyx_t_1);
26452  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
26453  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26454  __PYX_ERR(0, 2, __pyx_L1_error)
26455 
26456  /* "(tree fragment)":1
26457  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
26458  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26459  * def __setstate_cython__(self, __pyx_state):
26460  */
26461 
26462  /* function exit code */
26463  __pyx_L1_error:;
26464  __Pyx_XDECREF(__pyx_t_1);
26465  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26466  __pyx_r = NULL;
26467  __Pyx_XGIVEREF(__pyx_r);
26468  __Pyx_RefNannyFinishContext();
26469  return __pyx_r;
26470 }
26471 
26472 /* "(tree fragment)":3
26473  * def __reduce_cython__(self):
26474  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26475  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
26476  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26477  */
26478 
26479 /* Python wrapper */
26480 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
26481 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
26482  PyObject *__pyx_r = 0;
26483  __Pyx_RefNannyDeclarations
26484  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
26485  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
26486 
26487  /* function exit code */
26488  __Pyx_RefNannyFinishContext();
26489  return __pyx_r;
26490 }
26491 
26492 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) {
26493  PyObject *__pyx_r = NULL;
26494  __Pyx_RefNannyDeclarations
26495  PyObject *__pyx_t_1 = NULL;
26496  int __pyx_lineno = 0;
26497  const char *__pyx_filename = NULL;
26498  int __pyx_clineno = 0;
26499  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
26500 
26501  /* "(tree fragment)":4
26502  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26503  * def __setstate_cython__(self, __pyx_state):
26504  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
26505  */
26506  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
26507  __Pyx_GOTREF(__pyx_t_1);
26508  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
26509  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26510  __PYX_ERR(0, 4, __pyx_L1_error)
26511 
26512  /* "(tree fragment)":3
26513  * def __reduce_cython__(self):
26514  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26515  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
26516  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
26517  */
26518 
26519  /* function exit code */
26520  __pyx_L1_error:;
26521  __Pyx_XDECREF(__pyx_t_1);
26522  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26523  __pyx_r = NULL;
26524  __Pyx_XGIVEREF(__pyx_r);
26525  __Pyx_RefNannyFinishContext();
26526  return __pyx_r;
26527 }
26528 
26529 /* "View.MemoryView":657
26530  *
26531  * @cname('__pyx_memoryview_new')
26532  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
26533  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
26534  * result.typeinfo = typeinfo
26535  */
26536 
26537 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
26538  struct __pyx_memoryview_obj *__pyx_v_result = 0;
26539  PyObject *__pyx_r = NULL;
26540  __Pyx_RefNannyDeclarations
26541  PyObject *__pyx_t_1 = NULL;
26542  PyObject *__pyx_t_2 = NULL;
26543  PyObject *__pyx_t_3 = NULL;
26544  int __pyx_lineno = 0;
26545  const char *__pyx_filename = NULL;
26546  int __pyx_clineno = 0;
26547  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
26548 
26549  /* "View.MemoryView":658
26550  * @cname('__pyx_memoryview_new')
26551  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
26552  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
26553  * result.typeinfo = typeinfo
26554  * return result
26555  */
26556  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
26557  __Pyx_GOTREF(__pyx_t_1);
26558  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
26559  __Pyx_GOTREF(__pyx_t_2);
26560  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
26561  __Pyx_GOTREF(__pyx_t_3);
26562  __Pyx_INCREF(__pyx_v_o);
26563  __Pyx_GIVEREF(__pyx_v_o);
26564  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
26565  __Pyx_GIVEREF(__pyx_t_1);
26566  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
26567  __Pyx_GIVEREF(__pyx_t_2);
26568  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
26569  __pyx_t_1 = 0;
26570  __pyx_t_2 = 0;
26571  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
26572  __Pyx_GOTREF(__pyx_t_2);
26573  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26574  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
26575  __pyx_t_2 = 0;
26576 
26577  /* "View.MemoryView":659
26578  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
26579  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
26580  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
26581  * return result
26582  *
26583  */
26584  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
26585 
26586  /* "View.MemoryView":660
26587  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
26588  * result.typeinfo = typeinfo
26589  * return result # <<<<<<<<<<<<<<
26590  *
26591  * @cname('__pyx_memoryview_check')
26592  */
26593  __Pyx_XDECREF(__pyx_r);
26594  __Pyx_INCREF(((PyObject *)__pyx_v_result));
26595  __pyx_r = ((PyObject *)__pyx_v_result);
26596  goto __pyx_L0;
26597 
26598  /* "View.MemoryView":657
26599  *
26600  * @cname('__pyx_memoryview_new')
26601  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
26602  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
26603  * result.typeinfo = typeinfo
26604  */
26605 
26606  /* function exit code */
26607  __pyx_L1_error:;
26608  __Pyx_XDECREF(__pyx_t_1);
26609  __Pyx_XDECREF(__pyx_t_2);
26610  __Pyx_XDECREF(__pyx_t_3);
26611  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
26612  __pyx_r = 0;
26613  __pyx_L0:;
26614  __Pyx_XDECREF((PyObject *)__pyx_v_result);
26615  __Pyx_XGIVEREF(__pyx_r);
26616  __Pyx_RefNannyFinishContext();
26617  return __pyx_r;
26618 }
26619 
26620 /* "View.MemoryView":663
26621  *
26622  * @cname('__pyx_memoryview_check')
26623  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
26624  * return isinstance(o, memoryview)
26625  *
26626  */
26627 
26628 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
26629  int __pyx_r;
26630  __Pyx_RefNannyDeclarations
26631  int __pyx_t_1;
26632  __Pyx_RefNannySetupContext("memoryview_check", 0);
26633 
26634  /* "View.MemoryView":664
26635  * @cname('__pyx_memoryview_check')
26636  * cdef inline bint memoryview_check(object o):
26637  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
26638  *
26639  * cdef tuple _unellipsify(object index, int ndim):
26640  */
26641  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
26642  __pyx_r = __pyx_t_1;
26643  goto __pyx_L0;
26644 
26645  /* "View.MemoryView":663
26646  *
26647  * @cname('__pyx_memoryview_check')
26648  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
26649  * return isinstance(o, memoryview)
26650  *
26651  */
26652 
26653  /* function exit code */
26654  __pyx_L0:;
26655  __Pyx_RefNannyFinishContext();
26656  return __pyx_r;
26657 }
26658 
26659 /* "View.MemoryView":666
26660  * return isinstance(o, memoryview)
26661  *
26662  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
26663  * """
26664  * Replace all ellipses with full slices and fill incomplete indices with
26665  */
26666 
26667 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
26668  PyObject *__pyx_v_tup = NULL;
26669  PyObject *__pyx_v_result = NULL;
26670  int __pyx_v_have_slices;
26671  int __pyx_v_seen_ellipsis;
26672  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
26673  PyObject *__pyx_v_item = NULL;
26674  Py_ssize_t __pyx_v_nslices;
26675  PyObject *__pyx_r = NULL;
26676  __Pyx_RefNannyDeclarations
26677  int __pyx_t_1;
26678  int __pyx_t_2;
26679  PyObject *__pyx_t_3 = NULL;
26680  PyObject *__pyx_t_4 = NULL;
26681  Py_ssize_t __pyx_t_5;
26682  PyObject *(*__pyx_t_6)(PyObject *);
26683  PyObject *__pyx_t_7 = NULL;
26684  Py_ssize_t __pyx_t_8;
26685  int __pyx_t_9;
26686  int __pyx_t_10;
26687  PyObject *__pyx_t_11 = NULL;
26688  int __pyx_lineno = 0;
26689  const char *__pyx_filename = NULL;
26690  int __pyx_clineno = 0;
26691  __Pyx_RefNannySetupContext("_unellipsify", 0);
26692 
26693  /* "View.MemoryView":671
26694  * full slices.
26695  * """
26696  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
26697  * tup = (index,)
26698  * else:
26699  */
26700  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
26701  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
26702  if (__pyx_t_2) {
26703 
26704  /* "View.MemoryView":672
26705  * """
26706  * if not isinstance(index, tuple):
26707  * tup = (index,) # <<<<<<<<<<<<<<
26708  * else:
26709  * tup = index
26710  */
26711  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
26712  __Pyx_GOTREF(__pyx_t_3);
26713  __Pyx_INCREF(__pyx_v_index);
26714  __Pyx_GIVEREF(__pyx_v_index);
26715  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
26716  __pyx_v_tup = __pyx_t_3;
26717  __pyx_t_3 = 0;
26718 
26719  /* "View.MemoryView":671
26720  * full slices.
26721  * """
26722  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
26723  * tup = (index,)
26724  * else:
26725  */
26726  goto __pyx_L3;
26727  }
26728 
26729  /* "View.MemoryView":674
26730  * tup = (index,)
26731  * else:
26732  * tup = index # <<<<<<<<<<<<<<
26733  *
26734  * result = []
26735  */
26736  /*else*/ {
26737  __Pyx_INCREF(__pyx_v_index);
26738  __pyx_v_tup = __pyx_v_index;
26739  }
26740  __pyx_L3:;
26741 
26742  /* "View.MemoryView":676
26743  * tup = index
26744  *
26745  * result = [] # <<<<<<<<<<<<<<
26746  * have_slices = False
26747  * seen_ellipsis = False
26748  */
26749  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
26750  __Pyx_GOTREF(__pyx_t_3);
26751  __pyx_v_result = ((PyObject*)__pyx_t_3);
26752  __pyx_t_3 = 0;
26753 
26754  /* "View.MemoryView":677
26755  *
26756  * result = []
26757  * have_slices = False # <<<<<<<<<<<<<<
26758  * seen_ellipsis = False
26759  * for idx, item in enumerate(tup):
26760  */
26761  __pyx_v_have_slices = 0;
26762 
26763  /* "View.MemoryView":678
26764  * result = []
26765  * have_slices = False
26766  * seen_ellipsis = False # <<<<<<<<<<<<<<
26767  * for idx, item in enumerate(tup):
26768  * if item is Ellipsis:
26769  */
26770  __pyx_v_seen_ellipsis = 0;
26771 
26772  /* "View.MemoryView":679
26773  * have_slices = False
26774  * seen_ellipsis = False
26775  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
26776  * if item is Ellipsis:
26777  * if not seen_ellipsis:
26778  */
26779  __Pyx_INCREF(__pyx_int_0);
26780  __pyx_t_3 = __pyx_int_0;
26781  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
26782  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
26783  __pyx_t_6 = NULL;
26784  } else {
26785  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
26786  __Pyx_GOTREF(__pyx_t_4);
26787  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
26788  }
26789  for (;;) {
26790  if (likely(!__pyx_t_6)) {
26791  if (likely(PyList_CheckExact(__pyx_t_4))) {
26792  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
26793  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26794  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
26795  #else
26796  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
26797  __Pyx_GOTREF(__pyx_t_7);
26798  #endif
26799  } else {
26800  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
26801  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26802  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
26803  #else
26804  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
26805  __Pyx_GOTREF(__pyx_t_7);
26806  #endif
26807  }
26808  } else {
26809  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
26810  if (unlikely(!__pyx_t_7)) {
26811  PyObject* exc_type = PyErr_Occurred();
26812  if (exc_type) {
26813  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
26814  else __PYX_ERR(0, 679, __pyx_L1_error)
26815  }
26816  break;
26817  }
26818  __Pyx_GOTREF(__pyx_t_7);
26819  }
26820  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
26821  __pyx_t_7 = 0;
26822  __Pyx_INCREF(__pyx_t_3);
26823  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
26824  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
26825  __Pyx_GOTREF(__pyx_t_7);
26826  __Pyx_DECREF(__pyx_t_3);
26827  __pyx_t_3 = __pyx_t_7;
26828  __pyx_t_7 = 0;
26829 
26830  /* "View.MemoryView":680
26831  * seen_ellipsis = False
26832  * for idx, item in enumerate(tup):
26833  * if item is Ellipsis: # <<<<<<<<<<<<<<
26834  * if not seen_ellipsis:
26835  * result.extend([slice(None)] * (ndim - len(tup) + 1))
26836  */
26837  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
26838  __pyx_t_1 = (__pyx_t_2 != 0);
26839  if (__pyx_t_1) {
26840 
26841  /* "View.MemoryView":681
26842  * for idx, item in enumerate(tup):
26843  * if item is Ellipsis:
26844  * if not seen_ellipsis: # <<<<<<<<<<<<<<
26845  * result.extend([slice(None)] * (ndim - len(tup) + 1))
26846  * seen_ellipsis = True
26847  */
26848  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
26849  if (__pyx_t_1) {
26850 
26851  /* "View.MemoryView":682
26852  * if item is Ellipsis:
26853  * if not seen_ellipsis:
26854  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
26855  * seen_ellipsis = True
26856  * else:
26857  */
26858  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
26859  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
26860  __Pyx_GOTREF(__pyx_t_7);
26861  { Py_ssize_t __pyx_temp;
26862  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
26863  __Pyx_INCREF(__pyx_slice__22);
26864  __Pyx_GIVEREF(__pyx_slice__22);
26865  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__22);
26866  }
26867  }
26868  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
26869  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26870 
26871  /* "View.MemoryView":683
26872  * if not seen_ellipsis:
26873  * result.extend([slice(None)] * (ndim - len(tup) + 1))
26874  * seen_ellipsis = True # <<<<<<<<<<<<<<
26875  * else:
26876  * result.append(slice(None))
26877  */
26878  __pyx_v_seen_ellipsis = 1;
26879 
26880  /* "View.MemoryView":681
26881  * for idx, item in enumerate(tup):
26882  * if item is Ellipsis:
26883  * if not seen_ellipsis: # <<<<<<<<<<<<<<
26884  * result.extend([slice(None)] * (ndim - len(tup) + 1))
26885  * seen_ellipsis = True
26886  */
26887  goto __pyx_L7;
26888  }
26889 
26890  /* "View.MemoryView":685
26891  * seen_ellipsis = True
26892  * else:
26893  * result.append(slice(None)) # <<<<<<<<<<<<<<
26894  * have_slices = True
26895  * else:
26896  */
26897  /*else*/ {
26898  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__22); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)
26899  }
26900  __pyx_L7:;
26901 
26902  /* "View.MemoryView":686
26903  * else:
26904  * result.append(slice(None))
26905  * have_slices = True # <<<<<<<<<<<<<<
26906  * else:
26907  * if not isinstance(item, slice) and not PyIndex_Check(item):
26908  */
26909  __pyx_v_have_slices = 1;
26910 
26911  /* "View.MemoryView":680
26912  * seen_ellipsis = False
26913  * for idx, item in enumerate(tup):
26914  * if item is Ellipsis: # <<<<<<<<<<<<<<
26915  * if not seen_ellipsis:
26916  * result.extend([slice(None)] * (ndim - len(tup) + 1))
26917  */
26918  goto __pyx_L6;
26919  }
26920 
26921  /* "View.MemoryView":688
26922  * have_slices = True
26923  * else:
26924  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
26925  * raise TypeError("Cannot index with type '%s'" % type(item))
26926  *
26927  */
26928  /*else*/ {
26929  __pyx_t_2 = PySlice_Check(__pyx_v_item);
26930  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
26931  if (__pyx_t_10) {
26932  } else {
26933  __pyx_t_1 = __pyx_t_10;
26934  goto __pyx_L9_bool_binop_done;
26935  }
26936  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
26937  __pyx_t_1 = __pyx_t_10;
26938  __pyx_L9_bool_binop_done:;
26939  if (unlikely(__pyx_t_1)) {
26940 
26941  /* "View.MemoryView":689
26942  * else:
26943  * if not isinstance(item, slice) and not PyIndex_Check(item):
26944  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
26945  *
26946  * have_slices = have_slices or isinstance(item, slice)
26947  */
26948  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error)
26949  __Pyx_GOTREF(__pyx_t_7);
26950  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 689, __pyx_L1_error)
26951  __Pyx_GOTREF(__pyx_t_11);
26952  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26953  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
26954  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26955  __PYX_ERR(0, 689, __pyx_L1_error)
26956 
26957  /* "View.MemoryView":688
26958  * have_slices = True
26959  * else:
26960  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
26961  * raise TypeError("Cannot index with type '%s'" % type(item))
26962  *
26963  */
26964  }
26965 
26966  /* "View.MemoryView":691
26967  * raise TypeError("Cannot index with type '%s'" % type(item))
26968  *
26969  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
26970  * result.append(item)
26971  *
26972  */
26973  __pyx_t_10 = (__pyx_v_have_slices != 0);
26974  if (!__pyx_t_10) {
26975  } else {
26976  __pyx_t_1 = __pyx_t_10;
26977  goto __pyx_L11_bool_binop_done;
26978  }
26979  __pyx_t_10 = PySlice_Check(__pyx_v_item);
26980  __pyx_t_2 = (__pyx_t_10 != 0);
26981  __pyx_t_1 = __pyx_t_2;
26982  __pyx_L11_bool_binop_done:;
26983  __pyx_v_have_slices = __pyx_t_1;
26984 
26985  /* "View.MemoryView":692
26986  *
26987  * have_slices = have_slices or isinstance(item, slice)
26988  * result.append(item) # <<<<<<<<<<<<<<
26989  *
26990  * nslices = ndim - len(result)
26991  */
26992  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
26993  }
26994  __pyx_L6:;
26995 
26996  /* "View.MemoryView":679
26997  * have_slices = False
26998  * seen_ellipsis = False
26999  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
27000  * if item is Ellipsis:
27001  * if not seen_ellipsis:
27002  */
27003  }
27004  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27005  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27006 
27007  /* "View.MemoryView":694
27008  * result.append(item)
27009  *
27010  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
27011  * if nslices:
27012  * result.extend([slice(None)] * nslices)
27013  */
27014  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 694, __pyx_L1_error)
27015  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
27016 
27017  /* "View.MemoryView":695
27018  *
27019  * nslices = ndim - len(result)
27020  * if nslices: # <<<<<<<<<<<<<<
27021  * result.extend([slice(None)] * nslices)
27022  *
27023  */
27024  __pyx_t_1 = (__pyx_v_nslices != 0);
27025  if (__pyx_t_1) {
27026 
27027  /* "View.MemoryView":696
27028  * nslices = ndim - len(result)
27029  * if nslices:
27030  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
27031  *
27032  * return have_slices or nslices, tuple(result)
27033  */
27034  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
27035  __Pyx_GOTREF(__pyx_t_3);
27036  { Py_ssize_t __pyx_temp;
27037  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
27038  __Pyx_INCREF(__pyx_slice__22);
27039  __Pyx_GIVEREF(__pyx_slice__22);
27040  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__22);
27041  }
27042  }
27043  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error)
27044  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27045 
27046  /* "View.MemoryView":695
27047  *
27048  * nslices = ndim - len(result)
27049  * if nslices: # <<<<<<<<<<<<<<
27050  * result.extend([slice(None)] * nslices)
27051  *
27052  */
27053  }
27054 
27055  /* "View.MemoryView":698
27056  * result.extend([slice(None)] * nslices)
27057  *
27058  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
27059  *
27060  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27061  */
27062  __Pyx_XDECREF(__pyx_r);
27063  if (!__pyx_v_have_slices) {
27064  } else {
27065  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
27066  __Pyx_GOTREF(__pyx_t_4);
27067  __pyx_t_3 = __pyx_t_4;
27068  __pyx_t_4 = 0;
27069  goto __pyx_L14_bool_binop_done;
27070  }
27071  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
27072  __Pyx_GOTREF(__pyx_t_4);
27073  __pyx_t_3 = __pyx_t_4;
27074  __pyx_t_4 = 0;
27075  __pyx_L14_bool_binop_done:;
27076  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
27077  __Pyx_GOTREF(__pyx_t_4);
27078  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 698, __pyx_L1_error)
27079  __Pyx_GOTREF(__pyx_t_11);
27080  __Pyx_GIVEREF(__pyx_t_3);
27081  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
27082  __Pyx_GIVEREF(__pyx_t_4);
27083  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
27084  __pyx_t_3 = 0;
27085  __pyx_t_4 = 0;
27086  __pyx_r = ((PyObject*)__pyx_t_11);
27087  __pyx_t_11 = 0;
27088  goto __pyx_L0;
27089 
27090  /* "View.MemoryView":666
27091  * return isinstance(o, memoryview)
27092  *
27093  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
27094  * """
27095  * Replace all ellipses with full slices and fill incomplete indices with
27096  */
27097 
27098  /* function exit code */
27099  __pyx_L1_error:;
27100  __Pyx_XDECREF(__pyx_t_3);
27101  __Pyx_XDECREF(__pyx_t_4);
27102  __Pyx_XDECREF(__pyx_t_7);
27103  __Pyx_XDECREF(__pyx_t_11);
27104  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
27105  __pyx_r = 0;
27106  __pyx_L0:;
27107  __Pyx_XDECREF(__pyx_v_tup);
27108  __Pyx_XDECREF(__pyx_v_result);
27109  __Pyx_XDECREF(__pyx_v_idx);
27110  __Pyx_XDECREF(__pyx_v_item);
27111  __Pyx_XGIVEREF(__pyx_r);
27112  __Pyx_RefNannyFinishContext();
27113  return __pyx_r;
27114 }
27115 
27116 /* "View.MemoryView":700
27117  * return have_slices or nslices, tuple(result)
27118  *
27119  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
27120  * for suboffset in suboffsets[:ndim]:
27121  * if suboffset >= 0:
27122  */
27123 
27124 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
27125  Py_ssize_t __pyx_v_suboffset;
27126  PyObject *__pyx_r = NULL;
27127  __Pyx_RefNannyDeclarations
27128  Py_ssize_t *__pyx_t_1;
27129  Py_ssize_t *__pyx_t_2;
27130  Py_ssize_t *__pyx_t_3;
27131  int __pyx_t_4;
27132  PyObject *__pyx_t_5 = NULL;
27133  int __pyx_lineno = 0;
27134  const char *__pyx_filename = NULL;
27135  int __pyx_clineno = 0;
27136  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
27137 
27138  /* "View.MemoryView":701
27139  *
27140  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27141  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
27142  * if suboffset >= 0:
27143  * raise ValueError("Indirect dimensions not supported")
27144  */
27145  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
27146  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
27147  __pyx_t_1 = __pyx_t_3;
27148  __pyx_v_suboffset = (__pyx_t_1[0]);
27149 
27150  /* "View.MemoryView":702
27151  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27152  * for suboffset in suboffsets[:ndim]:
27153  * if suboffset >= 0: # <<<<<<<<<<<<<<
27154  * raise ValueError("Indirect dimensions not supported")
27155  *
27156  */
27157  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
27158  if (unlikely(__pyx_t_4)) {
27159 
27160  /* "View.MemoryView":703
27161  * for suboffset in suboffsets[:ndim]:
27162  * if suboffset >= 0:
27163  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
27164  *
27165  *
27166  */
27167  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
27168  __Pyx_GOTREF(__pyx_t_5);
27169  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
27170  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27171  __PYX_ERR(0, 703, __pyx_L1_error)
27172 
27173  /* "View.MemoryView":702
27174  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27175  * for suboffset in suboffsets[:ndim]:
27176  * if suboffset >= 0: # <<<<<<<<<<<<<<
27177  * raise ValueError("Indirect dimensions not supported")
27178  *
27179  */
27180  }
27181  }
27182 
27183  /* "View.MemoryView":700
27184  * return have_slices or nslices, tuple(result)
27185  *
27186  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
27187  * for suboffset in suboffsets[:ndim]:
27188  * if suboffset >= 0:
27189  */
27190 
27191  /* function exit code */
27192  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27193  goto __pyx_L0;
27194  __pyx_L1_error:;
27195  __Pyx_XDECREF(__pyx_t_5);
27196  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
27197  __pyx_r = 0;
27198  __pyx_L0:;
27199  __Pyx_XGIVEREF(__pyx_r);
27200  __Pyx_RefNannyFinishContext();
27201  return __pyx_r;
27202 }
27203 
27204 /* "View.MemoryView":710
27205  *
27206  * @cname('__pyx_memview_slice')
27207  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
27208  * cdef int new_ndim = 0, suboffset_dim = -1, dim
27209  * cdef bint negative_step
27210  */
27211 
27212 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
27213  int __pyx_v_new_ndim;
27214  int __pyx_v_suboffset_dim;
27215  int __pyx_v_dim;
27216  __Pyx_memviewslice __pyx_v_src;
27217  __Pyx_memviewslice __pyx_v_dst;
27218  __Pyx_memviewslice *__pyx_v_p_src;
27219  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
27220  __Pyx_memviewslice *__pyx_v_p_dst;
27221  int *__pyx_v_p_suboffset_dim;
27222  Py_ssize_t __pyx_v_start;
27223  Py_ssize_t __pyx_v_stop;
27224  Py_ssize_t __pyx_v_step;
27225  int __pyx_v_have_start;
27226  int __pyx_v_have_stop;
27227  int __pyx_v_have_step;
27228  PyObject *__pyx_v_index = NULL;
27229  struct __pyx_memoryview_obj *__pyx_r = NULL;
27230  __Pyx_RefNannyDeclarations
27231  int __pyx_t_1;
27232  int __pyx_t_2;
27233  PyObject *__pyx_t_3 = NULL;
27234  struct __pyx_memoryview_obj *__pyx_t_4;
27235  char *__pyx_t_5;
27236  int __pyx_t_6;
27237  Py_ssize_t __pyx_t_7;
27238  PyObject *(*__pyx_t_8)(PyObject *);
27239  PyObject *__pyx_t_9 = NULL;
27240  Py_ssize_t __pyx_t_10;
27241  int __pyx_t_11;
27242  Py_ssize_t __pyx_t_12;
27243  int __pyx_lineno = 0;
27244  const char *__pyx_filename = NULL;
27245  int __pyx_clineno = 0;
27246  __Pyx_RefNannySetupContext("memview_slice", 0);
27247 
27248  /* "View.MemoryView":711
27249  * @cname('__pyx_memview_slice')
27250  * cdef memoryview memview_slice(memoryview memview, object indices):
27251  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
27252  * cdef bint negative_step
27253  * cdef __Pyx_memviewslice src, dst
27254  */
27255  __pyx_v_new_ndim = 0;
27256  __pyx_v_suboffset_dim = -1;
27257 
27258  /* "View.MemoryView":718
27259  *
27260  *
27261  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
27262  *
27263  * cdef _memoryviewslice memviewsliceobj
27264  */
27265  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
27266 
27267  /* "View.MemoryView":722
27268  * cdef _memoryviewslice memviewsliceobj
27269  *
27270  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
27271  *
27272  * if isinstance(memview, _memoryviewslice):
27273  */
27274  #ifndef CYTHON_WITHOUT_ASSERTIONS
27275  if (unlikely(!Py_OptimizeFlag)) {
27276  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
27277  PyErr_SetNone(PyExc_AssertionError);
27278  __PYX_ERR(0, 722, __pyx_L1_error)
27279  }
27280  }
27281  #endif
27282 
27283  /* "View.MemoryView":724
27284  * assert memview.view.ndim > 0
27285  *
27286  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27287  * memviewsliceobj = memview
27288  * p_src = &memviewsliceobj.from_slice
27289  */
27290  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
27291  __pyx_t_2 = (__pyx_t_1 != 0);
27292  if (__pyx_t_2) {
27293 
27294  /* "View.MemoryView":725
27295  *
27296  * if isinstance(memview, _memoryviewslice):
27297  * memviewsliceobj = memview # <<<<<<<<<<<<<<
27298  * p_src = &memviewsliceobj.from_slice
27299  * else:
27300  */
27301  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 725, __pyx_L1_error)
27302  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
27303  __Pyx_INCREF(__pyx_t_3);
27304  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
27305  __pyx_t_3 = 0;
27306 
27307  /* "View.MemoryView":726
27308  * if isinstance(memview, _memoryviewslice):
27309  * memviewsliceobj = memview
27310  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
27311  * else:
27312  * slice_copy(memview, &src)
27313  */
27314  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
27315 
27316  /* "View.MemoryView":724
27317  * assert memview.view.ndim > 0
27318  *
27319  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27320  * memviewsliceobj = memview
27321  * p_src = &memviewsliceobj.from_slice
27322  */
27323  goto __pyx_L3;
27324  }
27325 
27326  /* "View.MemoryView":728
27327  * p_src = &memviewsliceobj.from_slice
27328  * else:
27329  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
27330  * p_src = &src
27331  *
27332  */
27333  /*else*/ {
27334  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
27335 
27336  /* "View.MemoryView":729
27337  * else:
27338  * slice_copy(memview, &src)
27339  * p_src = &src # <<<<<<<<<<<<<<
27340  *
27341  *
27342  */
27343  __pyx_v_p_src = (&__pyx_v_src);
27344  }
27345  __pyx_L3:;
27346 
27347  /* "View.MemoryView":735
27348  *
27349  *
27350  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
27351  * dst.data = p_src.data
27352  *
27353  */
27354  __pyx_t_4 = __pyx_v_p_src->memview;
27355  __pyx_v_dst.memview = __pyx_t_4;
27356 
27357  /* "View.MemoryView":736
27358  *
27359  * dst.memview = p_src.memview
27360  * dst.data = p_src.data # <<<<<<<<<<<<<<
27361  *
27362  *
27363  */
27364  __pyx_t_5 = __pyx_v_p_src->data;
27365  __pyx_v_dst.data = __pyx_t_5;
27366 
27367  /* "View.MemoryView":741
27368  *
27369  *
27370  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
27371  * cdef int *p_suboffset_dim = &suboffset_dim
27372  * cdef Py_ssize_t start, stop, step
27373  */
27374  __pyx_v_p_dst = (&__pyx_v_dst);
27375 
27376  /* "View.MemoryView":742
27377  *
27378  * cdef __Pyx_memviewslice *p_dst = &dst
27379  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
27380  * cdef Py_ssize_t start, stop, step
27381  * cdef bint have_start, have_stop, have_step
27382  */
27383  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
27384 
27385  /* "View.MemoryView":746
27386  * cdef bint have_start, have_stop, have_step
27387  *
27388  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
27389  * if PyIndex_Check(index):
27390  * slice_memviewslice(
27391  */
27392  __pyx_t_6 = 0;
27393  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
27394  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
27395  __pyx_t_8 = NULL;
27396  } else {
27397  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
27398  __Pyx_GOTREF(__pyx_t_3);
27399  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
27400  }
27401  for (;;) {
27402  if (likely(!__pyx_t_8)) {
27403  if (likely(PyList_CheckExact(__pyx_t_3))) {
27404  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
27405  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27406  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
27407  #else
27408  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
27409  __Pyx_GOTREF(__pyx_t_9);
27410  #endif
27411  } else {
27412  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
27413  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27414  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
27415  #else
27416  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 746, __pyx_L1_error)
27417  __Pyx_GOTREF(__pyx_t_9);
27418  #endif
27419  }
27420  } else {
27421  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
27422  if (unlikely(!__pyx_t_9)) {
27423  PyObject* exc_type = PyErr_Occurred();
27424  if (exc_type) {
27425  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
27426  else __PYX_ERR(0, 746, __pyx_L1_error)
27427  }
27428  break;
27429  }
27430  __Pyx_GOTREF(__pyx_t_9);
27431  }
27432  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
27433  __pyx_t_9 = 0;
27434  __pyx_v_dim = __pyx_t_6;
27435  __pyx_t_6 = (__pyx_t_6 + 1);
27436 
27437  /* "View.MemoryView":747
27438  *
27439  * for dim, index in enumerate(indices):
27440  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
27441  * slice_memviewslice(
27442  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
27443  */
27444  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
27445  if (__pyx_t_2) {
27446 
27447  /* "View.MemoryView":751
27448  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
27449  * dim, new_ndim, p_suboffset_dim,
27450  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
27451  * 0, 0, 0, # have_{start,stop,step}
27452  * False)
27453  */
27454  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 751, __pyx_L1_error)
27455 
27456  /* "View.MemoryView":748
27457  * for dim, index in enumerate(indices):
27458  * if PyIndex_Check(index):
27459  * slice_memviewslice( # <<<<<<<<<<<<<<
27460  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
27461  * dim, new_ndim, p_suboffset_dim,
27462  */
27463  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 748, __pyx_L1_error)
27464 
27465  /* "View.MemoryView":747
27466  *
27467  * for dim, index in enumerate(indices):
27468  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
27469  * slice_memviewslice(
27470  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
27471  */
27472  goto __pyx_L6;
27473  }
27474 
27475  /* "View.MemoryView":754
27476  * 0, 0, 0, # have_{start,stop,step}
27477  * False)
27478  * elif index is None: # <<<<<<<<<<<<<<
27479  * p_dst.shape[new_ndim] = 1
27480  * p_dst.strides[new_ndim] = 0
27481  */
27482  __pyx_t_2 = (__pyx_v_index == Py_None);
27483  __pyx_t_1 = (__pyx_t_2 != 0);
27484  if (__pyx_t_1) {
27485 
27486  /* "View.MemoryView":755
27487  * False)
27488  * elif index is None:
27489  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
27490  * p_dst.strides[new_ndim] = 0
27491  * p_dst.suboffsets[new_ndim] = -1
27492  */
27493  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
27494 
27495  /* "View.MemoryView":756
27496  * elif index is None:
27497  * p_dst.shape[new_ndim] = 1
27498  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
27499  * p_dst.suboffsets[new_ndim] = -1
27500  * new_ndim += 1
27501  */
27502  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
27503 
27504  /* "View.MemoryView":757
27505  * p_dst.shape[new_ndim] = 1
27506  * p_dst.strides[new_ndim] = 0
27507  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
27508  * new_ndim += 1
27509  * else:
27510  */
27511  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
27512 
27513  /* "View.MemoryView":758
27514  * p_dst.strides[new_ndim] = 0
27515  * p_dst.suboffsets[new_ndim] = -1
27516  * new_ndim += 1 # <<<<<<<<<<<<<<
27517  * else:
27518  * start = index.start or 0
27519  */
27520  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
27521 
27522  /* "View.MemoryView":754
27523  * 0, 0, 0, # have_{start,stop,step}
27524  * False)
27525  * elif index is None: # <<<<<<<<<<<<<<
27526  * p_dst.shape[new_ndim] = 1
27527  * p_dst.strides[new_ndim] = 0
27528  */
27529  goto __pyx_L6;
27530  }
27531 
27532  /* "View.MemoryView":760
27533  * new_ndim += 1
27534  * else:
27535  * start = index.start or 0 # <<<<<<<<<<<<<<
27536  * stop = index.stop or 0
27537  * step = index.step or 0
27538  */
27539  /*else*/ {
27540  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error)
27541  __Pyx_GOTREF(__pyx_t_9);
27542  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 760, __pyx_L1_error)
27543  if (!__pyx_t_1) {
27544  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27545  } else {
27546  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
27547  __pyx_t_10 = __pyx_t_12;
27548  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27549  goto __pyx_L7_bool_binop_done;
27550  }
27551  __pyx_t_10 = 0;
27552  __pyx_L7_bool_binop_done:;
27553  __pyx_v_start = __pyx_t_10;
27554 
27555  /* "View.MemoryView":761
27556  * else:
27557  * start = index.start or 0
27558  * stop = index.stop or 0 # <<<<<<<<<<<<<<
27559  * step = index.step or 0
27560  *
27561  */
27562  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error)
27563  __Pyx_GOTREF(__pyx_t_9);
27564  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
27565  if (!__pyx_t_1) {
27566  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27567  } else {
27568  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
27569  __pyx_t_10 = __pyx_t_12;
27570  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27571  goto __pyx_L9_bool_binop_done;
27572  }
27573  __pyx_t_10 = 0;
27574  __pyx_L9_bool_binop_done:;
27575  __pyx_v_stop = __pyx_t_10;
27576 
27577  /* "View.MemoryView":762
27578  * start = index.start or 0
27579  * stop = index.stop or 0
27580  * step = index.step or 0 # <<<<<<<<<<<<<<
27581  *
27582  * have_start = index.start is not None
27583  */
27584  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
27585  __Pyx_GOTREF(__pyx_t_9);
27586  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
27587  if (!__pyx_t_1) {
27588  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27589  } else {
27590  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
27591  __pyx_t_10 = __pyx_t_12;
27592  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27593  goto __pyx_L11_bool_binop_done;
27594  }
27595  __pyx_t_10 = 0;
27596  __pyx_L11_bool_binop_done:;
27597  __pyx_v_step = __pyx_t_10;
27598 
27599  /* "View.MemoryView":764
27600  * step = index.step or 0
27601  *
27602  * have_start = index.start is not None # <<<<<<<<<<<<<<
27603  * have_stop = index.stop is not None
27604  * have_step = index.step is not None
27605  */
27606  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L1_error)
27607  __Pyx_GOTREF(__pyx_t_9);
27608  __pyx_t_1 = (__pyx_t_9 != Py_None);
27609  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27610  __pyx_v_have_start = __pyx_t_1;
27611 
27612  /* "View.MemoryView":765
27613  *
27614  * have_start = index.start is not None
27615  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
27616  * have_step = index.step is not None
27617  *
27618  */
27619  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
27620  __Pyx_GOTREF(__pyx_t_9);
27621  __pyx_t_1 = (__pyx_t_9 != Py_None);
27622  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27623  __pyx_v_have_stop = __pyx_t_1;
27624 
27625  /* "View.MemoryView":766
27626  * have_start = index.start is not None
27627  * have_stop = index.stop is not None
27628  * have_step = index.step is not None # <<<<<<<<<<<<<<
27629  *
27630  * slice_memviewslice(
27631  */
27632  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
27633  __Pyx_GOTREF(__pyx_t_9);
27634  __pyx_t_1 = (__pyx_t_9 != Py_None);
27635  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
27636  __pyx_v_have_step = __pyx_t_1;
27637 
27638  /* "View.MemoryView":768
27639  * have_step = index.step is not None
27640  *
27641  * slice_memviewslice( # <<<<<<<<<<<<<<
27642  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
27643  * dim, new_ndim, p_suboffset_dim,
27644  */
27645  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 768, __pyx_L1_error)
27646 
27647  /* "View.MemoryView":774
27648  * have_start, have_stop, have_step,
27649  * True)
27650  * new_ndim += 1 # <<<<<<<<<<<<<<
27651  *
27652  * if isinstance(memview, _memoryviewslice):
27653  */
27654  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
27655  }
27656  __pyx_L6:;
27657 
27658  /* "View.MemoryView":746
27659  * cdef bint have_start, have_stop, have_step
27660  *
27661  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
27662  * if PyIndex_Check(index):
27663  * slice_memviewslice(
27664  */
27665  }
27666  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27667 
27668  /* "View.MemoryView":776
27669  * new_ndim += 1
27670  *
27671  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27672  * return memoryview_fromslice(dst, new_ndim,
27673  * memviewsliceobj.to_object_func,
27674  */
27675  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
27676  __pyx_t_2 = (__pyx_t_1 != 0);
27677  if (__pyx_t_2) {
27678 
27679  /* "View.MemoryView":777
27680  *
27681  * if isinstance(memview, _memoryviewslice):
27682  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
27683  * memviewsliceobj.to_object_func,
27684  * memviewsliceobj.to_dtype_func,
27685  */
27686  __Pyx_XDECREF(((PyObject *)__pyx_r));
27687 
27688  /* "View.MemoryView":778
27689  * if isinstance(memview, _memoryviewslice):
27690  * return memoryview_fromslice(dst, new_ndim,
27691  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
27692  * memviewsliceobj.to_dtype_func,
27693  * memview.dtype_is_object)
27694  */
27695  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 778, __pyx_L1_error) }
27696 
27697  /* "View.MemoryView":779
27698  * return memoryview_fromslice(dst, new_ndim,
27699  * memviewsliceobj.to_object_func,
27700  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
27701  * memview.dtype_is_object)
27702  * else:
27703  */
27704  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 779, __pyx_L1_error) }
27705 
27706  /* "View.MemoryView":777
27707  *
27708  * if isinstance(memview, _memoryviewslice):
27709  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
27710  * memviewsliceobj.to_object_func,
27711  * memviewsliceobj.to_dtype_func,
27712  */
27713  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
27714  __Pyx_GOTREF(__pyx_t_3);
27715  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 777, __pyx_L1_error)
27716  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
27717  __pyx_t_3 = 0;
27718  goto __pyx_L0;
27719 
27720  /* "View.MemoryView":776
27721  * new_ndim += 1
27722  *
27723  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27724  * return memoryview_fromslice(dst, new_ndim,
27725  * memviewsliceobj.to_object_func,
27726  */
27727  }
27728 
27729  /* "View.MemoryView":782
27730  * memview.dtype_is_object)
27731  * else:
27732  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
27733  * memview.dtype_is_object)
27734  *
27735  */
27736  /*else*/ {
27737  __Pyx_XDECREF(((PyObject *)__pyx_r));
27738 
27739  /* "View.MemoryView":783
27740  * else:
27741  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
27742  * memview.dtype_is_object) # <<<<<<<<<<<<<<
27743  *
27744  *
27745  */
27746  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
27747  __Pyx_GOTREF(__pyx_t_3);
27748 
27749  /* "View.MemoryView":782
27750  * memview.dtype_is_object)
27751  * else:
27752  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
27753  * memview.dtype_is_object)
27754  *
27755  */
27756  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 782, __pyx_L1_error)
27757  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
27758  __pyx_t_3 = 0;
27759  goto __pyx_L0;
27760  }
27761 
27762  /* "View.MemoryView":710
27763  *
27764  * @cname('__pyx_memview_slice')
27765  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
27766  * cdef int new_ndim = 0, suboffset_dim = -1, dim
27767  * cdef bint negative_step
27768  */
27769 
27770  /* function exit code */
27771  __pyx_L1_error:;
27772  __Pyx_XDECREF(__pyx_t_3);
27773  __Pyx_XDECREF(__pyx_t_9);
27774  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
27775  __pyx_r = 0;
27776  __pyx_L0:;
27777  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
27778  __Pyx_XDECREF(__pyx_v_index);
27779  __Pyx_XGIVEREF((PyObject *)__pyx_r);
27780  __Pyx_RefNannyFinishContext();
27781  return __pyx_r;
27782 }
27783 
27784 /* "View.MemoryView":807
27785  *
27786  * @cname('__pyx_memoryview_slice_memviewslice')
27787  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
27788  * __Pyx_memviewslice *dst,
27789  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
27790  */
27791 
27792 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
27793  Py_ssize_t __pyx_v_new_shape;
27794  int __pyx_v_negative_step;
27795  int __pyx_r;
27796  int __pyx_t_1;
27797  int __pyx_t_2;
27798  int __pyx_t_3;
27799  int __pyx_lineno = 0;
27800  const char *__pyx_filename = NULL;
27801  int __pyx_clineno = 0;
27802 
27803  /* "View.MemoryView":827
27804  * cdef bint negative_step
27805  *
27806  * if not is_slice: # <<<<<<<<<<<<<<
27807  *
27808  * if start < 0:
27809  */
27810  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
27811  if (__pyx_t_1) {
27812 
27813  /* "View.MemoryView":829
27814  * if not is_slice:
27815  *
27816  * if start < 0: # <<<<<<<<<<<<<<
27817  * start += shape
27818  * if not 0 <= start < shape:
27819  */
27820  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
27821  if (__pyx_t_1) {
27822 
27823  /* "View.MemoryView":830
27824  *
27825  * if start < 0:
27826  * start += shape # <<<<<<<<<<<<<<
27827  * if not 0 <= start < shape:
27828  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
27829  */
27830  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
27831 
27832  /* "View.MemoryView":829
27833  * if not is_slice:
27834  *
27835  * if start < 0: # <<<<<<<<<<<<<<
27836  * start += shape
27837  * if not 0 <= start < shape:
27838  */
27839  }
27840 
27841  /* "View.MemoryView":831
27842  * if start < 0:
27843  * start += shape
27844  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
27845  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
27846  * else:
27847  */
27848  __pyx_t_1 = (0 <= __pyx_v_start);
27849  if (__pyx_t_1) {
27850  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
27851  }
27852  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
27853  if (__pyx_t_2) {
27854 
27855  /* "View.MemoryView":832
27856  * start += shape
27857  * if not 0 <= start < shape:
27858  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
27859  * else:
27860  *
27861  */
27862  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 832, __pyx_L1_error)
27863 
27864  /* "View.MemoryView":831
27865  * if start < 0:
27866  * start += shape
27867  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
27868  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
27869  * else:
27870  */
27871  }
27872 
27873  /* "View.MemoryView":827
27874  * cdef bint negative_step
27875  *
27876  * if not is_slice: # <<<<<<<<<<<<<<
27877  *
27878  * if start < 0:
27879  */
27880  goto __pyx_L3;
27881  }
27882 
27883  /* "View.MemoryView":835
27884  * else:
27885  *
27886  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
27887  *
27888  * if have_step and step == 0:
27889  */
27890  /*else*/ {
27891  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
27892  if (__pyx_t_1) {
27893  } else {
27894  __pyx_t_2 = __pyx_t_1;
27895  goto __pyx_L6_bool_binop_done;
27896  }
27897  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
27898  __pyx_t_2 = __pyx_t_1;
27899  __pyx_L6_bool_binop_done:;
27900  __pyx_v_negative_step = __pyx_t_2;
27901 
27902  /* "View.MemoryView":837
27903  * negative_step = have_step != 0 and step < 0
27904  *
27905  * if have_step and step == 0: # <<<<<<<<<<<<<<
27906  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
27907  *
27908  */
27909  __pyx_t_1 = (__pyx_v_have_step != 0);
27910  if (__pyx_t_1) {
27911  } else {
27912  __pyx_t_2 = __pyx_t_1;
27913  goto __pyx_L9_bool_binop_done;
27914  }
27915  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
27916  __pyx_t_2 = __pyx_t_1;
27917  __pyx_L9_bool_binop_done:;
27918  if (__pyx_t_2) {
27919 
27920  /* "View.MemoryView":838
27921  *
27922  * if have_step and step == 0:
27923  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
27924  *
27925  *
27926  */
27927  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 838, __pyx_L1_error)
27928 
27929  /* "View.MemoryView":837
27930  * negative_step = have_step != 0 and step < 0
27931  *
27932  * if have_step and step == 0: # <<<<<<<<<<<<<<
27933  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
27934  *
27935  */
27936  }
27937 
27938  /* "View.MemoryView":841
27939  *
27940  *
27941  * if have_start: # <<<<<<<<<<<<<<
27942  * if start < 0:
27943  * start += shape
27944  */
27945  __pyx_t_2 = (__pyx_v_have_start != 0);
27946  if (__pyx_t_2) {
27947 
27948  /* "View.MemoryView":842
27949  *
27950  * if have_start:
27951  * if start < 0: # <<<<<<<<<<<<<<
27952  * start += shape
27953  * if start < 0:
27954  */
27955  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
27956  if (__pyx_t_2) {
27957 
27958  /* "View.MemoryView":843
27959  * if have_start:
27960  * if start < 0:
27961  * start += shape # <<<<<<<<<<<<<<
27962  * if start < 0:
27963  * start = 0
27964  */
27965  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
27966 
27967  /* "View.MemoryView":844
27968  * if start < 0:
27969  * start += shape
27970  * if start < 0: # <<<<<<<<<<<<<<
27971  * start = 0
27972  * elif start >= shape:
27973  */
27974  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
27975  if (__pyx_t_2) {
27976 
27977  /* "View.MemoryView":845
27978  * start += shape
27979  * if start < 0:
27980  * start = 0 # <<<<<<<<<<<<<<
27981  * elif start >= shape:
27982  * if negative_step:
27983  */
27984  __pyx_v_start = 0;
27985 
27986  /* "View.MemoryView":844
27987  * if start < 0:
27988  * start += shape
27989  * if start < 0: # <<<<<<<<<<<<<<
27990  * start = 0
27991  * elif start >= shape:
27992  */
27993  }
27994 
27995  /* "View.MemoryView":842
27996  *
27997  * if have_start:
27998  * if start < 0: # <<<<<<<<<<<<<<
27999  * start += shape
28000  * if start < 0:
28001  */
28002  goto __pyx_L12;
28003  }
28004 
28005  /* "View.MemoryView":846
28006  * if start < 0:
28007  * start = 0
28008  * elif start >= shape: # <<<<<<<<<<<<<<
28009  * if negative_step:
28010  * start = shape - 1
28011  */
28012  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
28013  if (__pyx_t_2) {
28014 
28015  /* "View.MemoryView":847
28016  * start = 0
28017  * elif start >= shape:
28018  * if negative_step: # <<<<<<<<<<<<<<
28019  * start = shape - 1
28020  * else:
28021  */
28022  __pyx_t_2 = (__pyx_v_negative_step != 0);
28023  if (__pyx_t_2) {
28024 
28025  /* "View.MemoryView":848
28026  * elif start >= shape:
28027  * if negative_step:
28028  * start = shape - 1 # <<<<<<<<<<<<<<
28029  * else:
28030  * start = shape
28031  */
28032  __pyx_v_start = (__pyx_v_shape - 1);
28033 
28034  /* "View.MemoryView":847
28035  * start = 0
28036  * elif start >= shape:
28037  * if negative_step: # <<<<<<<<<<<<<<
28038  * start = shape - 1
28039  * else:
28040  */
28041  goto __pyx_L14;
28042  }
28043 
28044  /* "View.MemoryView":850
28045  * start = shape - 1
28046  * else:
28047  * start = shape # <<<<<<<<<<<<<<
28048  * else:
28049  * if negative_step:
28050  */
28051  /*else*/ {
28052  __pyx_v_start = __pyx_v_shape;
28053  }
28054  __pyx_L14:;
28055 
28056  /* "View.MemoryView":846
28057  * if start < 0:
28058  * start = 0
28059  * elif start >= shape: # <<<<<<<<<<<<<<
28060  * if negative_step:
28061  * start = shape - 1
28062  */
28063  }
28064  __pyx_L12:;
28065 
28066  /* "View.MemoryView":841
28067  *
28068  *
28069  * if have_start: # <<<<<<<<<<<<<<
28070  * if start < 0:
28071  * start += shape
28072  */
28073  goto __pyx_L11;
28074  }
28075 
28076  /* "View.MemoryView":852
28077  * start = shape
28078  * else:
28079  * if negative_step: # <<<<<<<<<<<<<<
28080  * start = shape - 1
28081  * else:
28082  */
28083  /*else*/ {
28084  __pyx_t_2 = (__pyx_v_negative_step != 0);
28085  if (__pyx_t_2) {
28086 
28087  /* "View.MemoryView":853
28088  * else:
28089  * if negative_step:
28090  * start = shape - 1 # <<<<<<<<<<<<<<
28091  * else:
28092  * start = 0
28093  */
28094  __pyx_v_start = (__pyx_v_shape - 1);
28095 
28096  /* "View.MemoryView":852
28097  * start = shape
28098  * else:
28099  * if negative_step: # <<<<<<<<<<<<<<
28100  * start = shape - 1
28101  * else:
28102  */
28103  goto __pyx_L15;
28104  }
28105 
28106  /* "View.MemoryView":855
28107  * start = shape - 1
28108  * else:
28109  * start = 0 # <<<<<<<<<<<<<<
28110  *
28111  * if have_stop:
28112  */
28113  /*else*/ {
28114  __pyx_v_start = 0;
28115  }
28116  __pyx_L15:;
28117  }
28118  __pyx_L11:;
28119 
28120  /* "View.MemoryView":857
28121  * start = 0
28122  *
28123  * if have_stop: # <<<<<<<<<<<<<<
28124  * if stop < 0:
28125  * stop += shape
28126  */
28127  __pyx_t_2 = (__pyx_v_have_stop != 0);
28128  if (__pyx_t_2) {
28129 
28130  /* "View.MemoryView":858
28131  *
28132  * if have_stop:
28133  * if stop < 0: # <<<<<<<<<<<<<<
28134  * stop += shape
28135  * if stop < 0:
28136  */
28137  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
28138  if (__pyx_t_2) {
28139 
28140  /* "View.MemoryView":859
28141  * if have_stop:
28142  * if stop < 0:
28143  * stop += shape # <<<<<<<<<<<<<<
28144  * if stop < 0:
28145  * stop = 0
28146  */
28147  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
28148 
28149  /* "View.MemoryView":860
28150  * if stop < 0:
28151  * stop += shape
28152  * if stop < 0: # <<<<<<<<<<<<<<
28153  * stop = 0
28154  * elif stop > shape:
28155  */
28156  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
28157  if (__pyx_t_2) {
28158 
28159  /* "View.MemoryView":861
28160  * stop += shape
28161  * if stop < 0:
28162  * stop = 0 # <<<<<<<<<<<<<<
28163  * elif stop > shape:
28164  * stop = shape
28165  */
28166  __pyx_v_stop = 0;
28167 
28168  /* "View.MemoryView":860
28169  * if stop < 0:
28170  * stop += shape
28171  * if stop < 0: # <<<<<<<<<<<<<<
28172  * stop = 0
28173  * elif stop > shape:
28174  */
28175  }
28176 
28177  /* "View.MemoryView":858
28178  *
28179  * if have_stop:
28180  * if stop < 0: # <<<<<<<<<<<<<<
28181  * stop += shape
28182  * if stop < 0:
28183  */
28184  goto __pyx_L17;
28185  }
28186 
28187  /* "View.MemoryView":862
28188  * if stop < 0:
28189  * stop = 0
28190  * elif stop > shape: # <<<<<<<<<<<<<<
28191  * stop = shape
28192  * else:
28193  */
28194  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
28195  if (__pyx_t_2) {
28196 
28197  /* "View.MemoryView":863
28198  * stop = 0
28199  * elif stop > shape:
28200  * stop = shape # <<<<<<<<<<<<<<
28201  * else:
28202  * if negative_step:
28203  */
28204  __pyx_v_stop = __pyx_v_shape;
28205 
28206  /* "View.MemoryView":862
28207  * if stop < 0:
28208  * stop = 0
28209  * elif stop > shape: # <<<<<<<<<<<<<<
28210  * stop = shape
28211  * else:
28212  */
28213  }
28214  __pyx_L17:;
28215 
28216  /* "View.MemoryView":857
28217  * start = 0
28218  *
28219  * if have_stop: # <<<<<<<<<<<<<<
28220  * if stop < 0:
28221  * stop += shape
28222  */
28223  goto __pyx_L16;
28224  }
28225 
28226  /* "View.MemoryView":865
28227  * stop = shape
28228  * else:
28229  * if negative_step: # <<<<<<<<<<<<<<
28230  * stop = -1
28231  * else:
28232  */
28233  /*else*/ {
28234  __pyx_t_2 = (__pyx_v_negative_step != 0);
28235  if (__pyx_t_2) {
28236 
28237  /* "View.MemoryView":866
28238  * else:
28239  * if negative_step:
28240  * stop = -1 # <<<<<<<<<<<<<<
28241  * else:
28242  * stop = shape
28243  */
28244  __pyx_v_stop = -1L;
28245 
28246  /* "View.MemoryView":865
28247  * stop = shape
28248  * else:
28249  * if negative_step: # <<<<<<<<<<<<<<
28250  * stop = -1
28251  * else:
28252  */
28253  goto __pyx_L19;
28254  }
28255 
28256  /* "View.MemoryView":868
28257  * stop = -1
28258  * else:
28259  * stop = shape # <<<<<<<<<<<<<<
28260  *
28261  * if not have_step:
28262  */
28263  /*else*/ {
28264  __pyx_v_stop = __pyx_v_shape;
28265  }
28266  __pyx_L19:;
28267  }
28268  __pyx_L16:;
28269 
28270  /* "View.MemoryView":870
28271  * stop = shape
28272  *
28273  * if not have_step: # <<<<<<<<<<<<<<
28274  * step = 1
28275  *
28276  */
28277  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
28278  if (__pyx_t_2) {
28279 
28280  /* "View.MemoryView":871
28281  *
28282  * if not have_step:
28283  * step = 1 # <<<<<<<<<<<<<<
28284  *
28285  *
28286  */
28287  __pyx_v_step = 1;
28288 
28289  /* "View.MemoryView":870
28290  * stop = shape
28291  *
28292  * if not have_step: # <<<<<<<<<<<<<<
28293  * step = 1
28294  *
28295  */
28296  }
28297 
28298  /* "View.MemoryView":875
28299  *
28300  * with cython.cdivision(True):
28301  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
28302  *
28303  * if (stop - start) - step * new_shape:
28304  */
28305  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
28306 
28307  /* "View.MemoryView":877
28308  * new_shape = (stop - start) // step
28309  *
28310  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
28311  * new_shape += 1
28312  *
28313  */
28314  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
28315  if (__pyx_t_2) {
28316 
28317  /* "View.MemoryView":878
28318  *
28319  * if (stop - start) - step * new_shape:
28320  * new_shape += 1 # <<<<<<<<<<<<<<
28321  *
28322  * if new_shape < 0:
28323  */
28324  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
28325 
28326  /* "View.MemoryView":877
28327  * new_shape = (stop - start) // step
28328  *
28329  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
28330  * new_shape += 1
28331  *
28332  */
28333  }
28334 
28335  /* "View.MemoryView":880
28336  * new_shape += 1
28337  *
28338  * if new_shape < 0: # <<<<<<<<<<<<<<
28339  * new_shape = 0
28340  *
28341  */
28342  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
28343  if (__pyx_t_2) {
28344 
28345  /* "View.MemoryView":881
28346  *
28347  * if new_shape < 0:
28348  * new_shape = 0 # <<<<<<<<<<<<<<
28349  *
28350  *
28351  */
28352  __pyx_v_new_shape = 0;
28353 
28354  /* "View.MemoryView":880
28355  * new_shape += 1
28356  *
28357  * if new_shape < 0: # <<<<<<<<<<<<<<
28358  * new_shape = 0
28359  *
28360  */
28361  }
28362 
28363  /* "View.MemoryView":884
28364  *
28365  *
28366  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
28367  * dst.shape[new_ndim] = new_shape
28368  * dst.suboffsets[new_ndim] = suboffset
28369  */
28370  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
28371 
28372  /* "View.MemoryView":885
28373  *
28374  * dst.strides[new_ndim] = stride * step
28375  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
28376  * dst.suboffsets[new_ndim] = suboffset
28377  *
28378  */
28379  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
28380 
28381  /* "View.MemoryView":886
28382  * dst.strides[new_ndim] = stride * step
28383  * dst.shape[new_ndim] = new_shape
28384  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
28385  *
28386  *
28387  */
28388  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
28389  }
28390  __pyx_L3:;
28391 
28392  /* "View.MemoryView":889
28393  *
28394  *
28395  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
28396  * dst.data += start * stride
28397  * else:
28398  */
28399  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
28400  if (__pyx_t_2) {
28401 
28402  /* "View.MemoryView":890
28403  *
28404  * if suboffset_dim[0] < 0:
28405  * dst.data += start * stride # <<<<<<<<<<<<<<
28406  * else:
28407  * dst.suboffsets[suboffset_dim[0]] += start * stride
28408  */
28409  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
28410 
28411  /* "View.MemoryView":889
28412  *
28413  *
28414  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
28415  * dst.data += start * stride
28416  * else:
28417  */
28418  goto __pyx_L23;
28419  }
28420 
28421  /* "View.MemoryView":892
28422  * dst.data += start * stride
28423  * else:
28424  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
28425  *
28426  * if suboffset >= 0:
28427  */
28428  /*else*/ {
28429  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
28430  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
28431  }
28432  __pyx_L23:;
28433 
28434  /* "View.MemoryView":894
28435  * dst.suboffsets[suboffset_dim[0]] += start * stride
28436  *
28437  * if suboffset >= 0: # <<<<<<<<<<<<<<
28438  * if not is_slice:
28439  * if new_ndim == 0:
28440  */
28441  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
28442  if (__pyx_t_2) {
28443 
28444  /* "View.MemoryView":895
28445  *
28446  * if suboffset >= 0:
28447  * if not is_slice: # <<<<<<<<<<<<<<
28448  * if new_ndim == 0:
28449  * dst.data = (<char **> dst.data)[0] + suboffset
28450  */
28451  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
28452  if (__pyx_t_2) {
28453 
28454  /* "View.MemoryView":896
28455  * if suboffset >= 0:
28456  * if not is_slice:
28457  * if new_ndim == 0: # <<<<<<<<<<<<<<
28458  * dst.data = (<char **> dst.data)[0] + suboffset
28459  * else:
28460  */
28461  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
28462  if (__pyx_t_2) {
28463 
28464  /* "View.MemoryView":897
28465  * if not is_slice:
28466  * if new_ndim == 0:
28467  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
28468  * else:
28469  * _err_dim(IndexError, "All dimensions preceding dimension %d "
28470  */
28471  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
28472 
28473  /* "View.MemoryView":896
28474  * if suboffset >= 0:
28475  * if not is_slice:
28476  * if new_ndim == 0: # <<<<<<<<<<<<<<
28477  * dst.data = (<char **> dst.data)[0] + suboffset
28478  * else:
28479  */
28480  goto __pyx_L26;
28481  }
28482 
28483  /* "View.MemoryView":899
28484  * dst.data = (<char **> dst.data)[0] + suboffset
28485  * else:
28486  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
28487  * "must be indexed and not sliced", dim)
28488  * else:
28489  */
28490  /*else*/ {
28491 
28492  /* "View.MemoryView":900
28493  * else:
28494  * _err_dim(IndexError, "All dimensions preceding dimension %d "
28495  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
28496  * else:
28497  * suboffset_dim[0] = new_ndim
28498  */
28499  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 899, __pyx_L1_error)
28500  }
28501  __pyx_L26:;
28502 
28503  /* "View.MemoryView":895
28504  *
28505  * if suboffset >= 0:
28506  * if not is_slice: # <<<<<<<<<<<<<<
28507  * if new_ndim == 0:
28508  * dst.data = (<char **> dst.data)[0] + suboffset
28509  */
28510  goto __pyx_L25;
28511  }
28512 
28513  /* "View.MemoryView":902
28514  * "must be indexed and not sliced", dim)
28515  * else:
28516  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
28517  *
28518  * return 0
28519  */
28520  /*else*/ {
28521  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
28522  }
28523  __pyx_L25:;
28524 
28525  /* "View.MemoryView":894
28526  * dst.suboffsets[suboffset_dim[0]] += start * stride
28527  *
28528  * if suboffset >= 0: # <<<<<<<<<<<<<<
28529  * if not is_slice:
28530  * if new_ndim == 0:
28531  */
28532  }
28533 
28534  /* "View.MemoryView":904
28535  * suboffset_dim[0] = new_ndim
28536  *
28537  * return 0 # <<<<<<<<<<<<<<
28538  *
28539  *
28540  */
28541  __pyx_r = 0;
28542  goto __pyx_L0;
28543 
28544  /* "View.MemoryView":807
28545  *
28546  * @cname('__pyx_memoryview_slice_memviewslice')
28547  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
28548  * __Pyx_memviewslice *dst,
28549  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
28550  */
28551 
28552  /* function exit code */
28553  __pyx_L1_error:;
28554  {
28555  #ifdef WITH_THREAD
28556  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
28557  #endif
28558  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
28559  #ifdef WITH_THREAD
28560  __Pyx_PyGILState_Release(__pyx_gilstate_save);
28561  #endif
28562  }
28563  __pyx_r = -1;
28564  __pyx_L0:;
28565  return __pyx_r;
28566 }
28567 
28568 /* "View.MemoryView":910
28569  *
28570  * @cname('__pyx_pybuffer_index')
28571  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
28572  * Py_ssize_t dim) except NULL:
28573  * cdef Py_ssize_t shape, stride, suboffset = -1
28574  */
28575 
28576 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
28577  Py_ssize_t __pyx_v_shape;
28578  Py_ssize_t __pyx_v_stride;
28579  Py_ssize_t __pyx_v_suboffset;
28580  Py_ssize_t __pyx_v_itemsize;
28581  char *__pyx_v_resultp;
28582  char *__pyx_r;
28583  __Pyx_RefNannyDeclarations
28584  Py_ssize_t __pyx_t_1;
28585  int __pyx_t_2;
28586  PyObject *__pyx_t_3 = NULL;
28587  PyObject *__pyx_t_4 = NULL;
28588  int __pyx_lineno = 0;
28589  const char *__pyx_filename = NULL;
28590  int __pyx_clineno = 0;
28591  __Pyx_RefNannySetupContext("pybuffer_index", 0);
28592 
28593  /* "View.MemoryView":912
28594  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
28595  * Py_ssize_t dim) except NULL:
28596  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
28597  * cdef Py_ssize_t itemsize = view.itemsize
28598  * cdef char *resultp
28599  */
28600  __pyx_v_suboffset = -1L;
28601 
28602  /* "View.MemoryView":913
28603  * Py_ssize_t dim) except NULL:
28604  * cdef Py_ssize_t shape, stride, suboffset = -1
28605  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
28606  * cdef char *resultp
28607  *
28608  */
28609  __pyx_t_1 = __pyx_v_view->itemsize;
28610  __pyx_v_itemsize = __pyx_t_1;
28611 
28612  /* "View.MemoryView":916
28613  * cdef char *resultp
28614  *
28615  * if view.ndim == 0: # <<<<<<<<<<<<<<
28616  * shape = view.len / itemsize
28617  * stride = itemsize
28618  */
28619  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
28620  if (__pyx_t_2) {
28621 
28622  /* "View.MemoryView":917
28623  *
28624  * if view.ndim == 0:
28625  * shape = view.len / itemsize # <<<<<<<<<<<<<<
28626  * stride = itemsize
28627  * else:
28628  */
28629  if (unlikely(__pyx_v_itemsize == 0)) {
28630  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
28631  __PYX_ERR(0, 917, __pyx_L1_error)
28632  }
28633  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
28634  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
28635  __PYX_ERR(0, 917, __pyx_L1_error)
28636  }
28637  __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
28638 
28639  /* "View.MemoryView":918
28640  * if view.ndim == 0:
28641  * shape = view.len / itemsize
28642  * stride = itemsize # <<<<<<<<<<<<<<
28643  * else:
28644  * shape = view.shape[dim]
28645  */
28646  __pyx_v_stride = __pyx_v_itemsize;
28647 
28648  /* "View.MemoryView":916
28649  * cdef char *resultp
28650  *
28651  * if view.ndim == 0: # <<<<<<<<<<<<<<
28652  * shape = view.len / itemsize
28653  * stride = itemsize
28654  */
28655  goto __pyx_L3;
28656  }
28657 
28658  /* "View.MemoryView":920
28659  * stride = itemsize
28660  * else:
28661  * shape = view.shape[dim] # <<<<<<<<<<<<<<
28662  * stride = view.strides[dim]
28663  * if view.suboffsets != NULL:
28664  */
28665  /*else*/ {
28666  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
28667 
28668  /* "View.MemoryView":921
28669  * else:
28670  * shape = view.shape[dim]
28671  * stride = view.strides[dim] # <<<<<<<<<<<<<<
28672  * if view.suboffsets != NULL:
28673  * suboffset = view.suboffsets[dim]
28674  */
28675  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
28676 
28677  /* "View.MemoryView":922
28678  * shape = view.shape[dim]
28679  * stride = view.strides[dim]
28680  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
28681  * suboffset = view.suboffsets[dim]
28682  *
28683  */
28684  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
28685  if (__pyx_t_2) {
28686 
28687  /* "View.MemoryView":923
28688  * stride = view.strides[dim]
28689  * if view.suboffsets != NULL:
28690  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
28691  *
28692  * if index < 0:
28693  */
28694  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
28695 
28696  /* "View.MemoryView":922
28697  * shape = view.shape[dim]
28698  * stride = view.strides[dim]
28699  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
28700  * suboffset = view.suboffsets[dim]
28701  *
28702  */
28703  }
28704  }
28705  __pyx_L3:;
28706 
28707  /* "View.MemoryView":925
28708  * suboffset = view.suboffsets[dim]
28709  *
28710  * if index < 0: # <<<<<<<<<<<<<<
28711  * index += view.shape[dim]
28712  * if index < 0:
28713  */
28714  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
28715  if (__pyx_t_2) {
28716 
28717  /* "View.MemoryView":926
28718  *
28719  * if index < 0:
28720  * index += view.shape[dim] # <<<<<<<<<<<<<<
28721  * if index < 0:
28722  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28723  */
28724  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
28725 
28726  /* "View.MemoryView":927
28727  * if index < 0:
28728  * index += view.shape[dim]
28729  * if index < 0: # <<<<<<<<<<<<<<
28730  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28731  *
28732  */
28733  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
28734  if (unlikely(__pyx_t_2)) {
28735 
28736  /* "View.MemoryView":928
28737  * index += view.shape[dim]
28738  * if index < 0:
28739  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
28740  *
28741  * if index >= shape:
28742  */
28743  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
28744  __Pyx_GOTREF(__pyx_t_3);
28745  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
28746  __Pyx_GOTREF(__pyx_t_4);
28747  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28748  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
28749  __Pyx_GOTREF(__pyx_t_3);
28750  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28751  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
28752  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28753  __PYX_ERR(0, 928, __pyx_L1_error)
28754 
28755  /* "View.MemoryView":927
28756  * if index < 0:
28757  * index += view.shape[dim]
28758  * if index < 0: # <<<<<<<<<<<<<<
28759  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28760  *
28761  */
28762  }
28763 
28764  /* "View.MemoryView":925
28765  * suboffset = view.suboffsets[dim]
28766  *
28767  * if index < 0: # <<<<<<<<<<<<<<
28768  * index += view.shape[dim]
28769  * if index < 0:
28770  */
28771  }
28772 
28773  /* "View.MemoryView":930
28774  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28775  *
28776  * if index >= shape: # <<<<<<<<<<<<<<
28777  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28778  *
28779  */
28780  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
28781  if (unlikely(__pyx_t_2)) {
28782 
28783  /* "View.MemoryView":931
28784  *
28785  * if index >= shape:
28786  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
28787  *
28788  * resultp = bufp + index * stride
28789  */
28790  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
28791  __Pyx_GOTREF(__pyx_t_3);
28792  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
28793  __Pyx_GOTREF(__pyx_t_4);
28794  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28795  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
28796  __Pyx_GOTREF(__pyx_t_3);
28797  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28798  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
28799  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28800  __PYX_ERR(0, 931, __pyx_L1_error)
28801 
28802  /* "View.MemoryView":930
28803  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28804  *
28805  * if index >= shape: # <<<<<<<<<<<<<<
28806  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28807  *
28808  */
28809  }
28810 
28811  /* "View.MemoryView":933
28812  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
28813  *
28814  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
28815  * if suboffset >= 0:
28816  * resultp = (<char **> resultp)[0] + suboffset
28817  */
28818  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
28819 
28820  /* "View.MemoryView":934
28821  *
28822  * resultp = bufp + index * stride
28823  * if suboffset >= 0: # <<<<<<<<<<<<<<
28824  * resultp = (<char **> resultp)[0] + suboffset
28825  *
28826  */
28827  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
28828  if (__pyx_t_2) {
28829 
28830  /* "View.MemoryView":935
28831  * resultp = bufp + index * stride
28832  * if suboffset >= 0:
28833  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
28834  *
28835  * return resultp
28836  */
28837  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
28838 
28839  /* "View.MemoryView":934
28840  *
28841  * resultp = bufp + index * stride
28842  * if suboffset >= 0: # <<<<<<<<<<<<<<
28843  * resultp = (<char **> resultp)[0] + suboffset
28844  *
28845  */
28846  }
28847 
28848  /* "View.MemoryView":937
28849  * resultp = (<char **> resultp)[0] + suboffset
28850  *
28851  * return resultp # <<<<<<<<<<<<<<
28852  *
28853  *
28854  */
28855  __pyx_r = __pyx_v_resultp;
28856  goto __pyx_L0;
28857 
28858  /* "View.MemoryView":910
28859  *
28860  * @cname('__pyx_pybuffer_index')
28861  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
28862  * Py_ssize_t dim) except NULL:
28863  * cdef Py_ssize_t shape, stride, suboffset = -1
28864  */
28865 
28866  /* function exit code */
28867  __pyx_L1_error:;
28868  __Pyx_XDECREF(__pyx_t_3);
28869  __Pyx_XDECREF(__pyx_t_4);
28870  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
28871  __pyx_r = NULL;
28872  __pyx_L0:;
28873  __Pyx_RefNannyFinishContext();
28874  return __pyx_r;
28875 }
28876 
28877 /* "View.MemoryView":943
28878  *
28879  * @cname('__pyx_memslice_transpose')
28880  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
28881  * cdef int ndim = memslice.memview.view.ndim
28882  *
28883  */
28884 
28885 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
28886  int __pyx_v_ndim;
28887  Py_ssize_t *__pyx_v_shape;
28888  Py_ssize_t *__pyx_v_strides;
28889  int __pyx_v_i;
28890  int __pyx_v_j;
28891  int __pyx_r;
28892  int __pyx_t_1;
28893  Py_ssize_t *__pyx_t_2;
28894  long __pyx_t_3;
28895  long __pyx_t_4;
28896  Py_ssize_t __pyx_t_5;
28897  Py_ssize_t __pyx_t_6;
28898  int __pyx_t_7;
28899  int __pyx_t_8;
28900  int __pyx_t_9;
28901  int __pyx_lineno = 0;
28902  const char *__pyx_filename = NULL;
28903  int __pyx_clineno = 0;
28904 
28905  /* "View.MemoryView":944
28906  * @cname('__pyx_memslice_transpose')
28907  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
28908  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
28909  *
28910  * cdef Py_ssize_t *shape = memslice.shape
28911  */
28912  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
28913  __pyx_v_ndim = __pyx_t_1;
28914 
28915  /* "View.MemoryView":946
28916  * cdef int ndim = memslice.memview.view.ndim
28917  *
28918  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
28919  * cdef Py_ssize_t *strides = memslice.strides
28920  *
28921  */
28922  __pyx_t_2 = __pyx_v_memslice->shape;
28923  __pyx_v_shape = __pyx_t_2;
28924 
28925  /* "View.MemoryView":947
28926  *
28927  * cdef Py_ssize_t *shape = memslice.shape
28928  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
28929  *
28930  *
28931  */
28932  __pyx_t_2 = __pyx_v_memslice->strides;
28933  __pyx_v_strides = __pyx_t_2;
28934 
28935  /* "View.MemoryView":951
28936  *
28937  * cdef int i, j
28938  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
28939  * j = ndim - 1 - i
28940  * strides[i], strides[j] = strides[j], strides[i]
28941  */
28942  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
28943  __pyx_t_4 = __pyx_t_3;
28944  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
28945  __pyx_v_i = __pyx_t_1;
28946 
28947  /* "View.MemoryView":952
28948  * cdef int i, j
28949  * for i in range(ndim / 2):
28950  * j = ndim - 1 - i # <<<<<<<<<<<<<<
28951  * strides[i], strides[j] = strides[j], strides[i]
28952  * shape[i], shape[j] = shape[j], shape[i]
28953  */
28954  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
28955 
28956  /* "View.MemoryView":953
28957  * for i in range(ndim / 2):
28958  * j = ndim - 1 - i
28959  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
28960  * shape[i], shape[j] = shape[j], shape[i]
28961  *
28962  */
28963  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
28964  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
28965  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
28966  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
28967 
28968  /* "View.MemoryView":954
28969  * j = ndim - 1 - i
28970  * strides[i], strides[j] = strides[j], strides[i]
28971  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
28972  *
28973  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
28974  */
28975  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
28976  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
28977  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
28978  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
28979 
28980  /* "View.MemoryView":956
28981  * shape[i], shape[j] = shape[j], shape[i]
28982  *
28983  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
28984  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
28985  *
28986  */
28987  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
28988  if (!__pyx_t_8) {
28989  } else {
28990  __pyx_t_7 = __pyx_t_8;
28991  goto __pyx_L6_bool_binop_done;
28992  }
28993  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
28994  __pyx_t_7 = __pyx_t_8;
28995  __pyx_L6_bool_binop_done:;
28996  if (__pyx_t_7) {
28997 
28998  /* "View.MemoryView":957
28999  *
29000  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
29001  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
29002  *
29003  * return 1
29004  */
29005  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error)
29006 
29007  /* "View.MemoryView":956
29008  * shape[i], shape[j] = shape[j], shape[i]
29009  *
29010  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
29011  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29012  *
29013  */
29014  }
29015  }
29016 
29017  /* "View.MemoryView":959
29018  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29019  *
29020  * return 1 # <<<<<<<<<<<<<<
29021  *
29022  *
29023  */
29024  __pyx_r = 1;
29025  goto __pyx_L0;
29026 
29027  /* "View.MemoryView":943
29028  *
29029  * @cname('__pyx_memslice_transpose')
29030  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
29031  * cdef int ndim = memslice.memview.view.ndim
29032  *
29033  */
29034 
29035  /* function exit code */
29036  __pyx_L1_error:;
29037  {
29038  #ifdef WITH_THREAD
29039  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29040  #endif
29041  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
29042  #ifdef WITH_THREAD
29043  __Pyx_PyGILState_Release(__pyx_gilstate_save);
29044  #endif
29045  }
29046  __pyx_r = 0;
29047  __pyx_L0:;
29048  return __pyx_r;
29049 }
29050 
29051 /* "View.MemoryView":976
29052  * cdef int (*to_dtype_func)(char *, object) except 0
29053  *
29054  * def __dealloc__(self): # <<<<<<<<<<<<<<
29055  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29056  *
29057  */
29058 
29059 /* Python wrapper */
29060 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
29061 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
29062  __Pyx_RefNannyDeclarations
29063  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
29064  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29065 
29066  /* function exit code */
29067  __Pyx_RefNannyFinishContext();
29068 }
29069 
29070 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29071  __Pyx_RefNannyDeclarations
29072  __Pyx_RefNannySetupContext("__dealloc__", 0);
29073 
29074  /* "View.MemoryView":977
29075  *
29076  * def __dealloc__(self):
29077  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
29078  *
29079  * cdef convert_item_to_object(self, char *itemp):
29080  */
29081  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
29082 
29083  /* "View.MemoryView":976
29084  * cdef int (*to_dtype_func)(char *, object) except 0
29085  *
29086  * def __dealloc__(self): # <<<<<<<<<<<<<<
29087  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29088  *
29089  */
29090 
29091  /* function exit code */
29092  __Pyx_RefNannyFinishContext();
29093 }
29094 
29095 /* "View.MemoryView":979
29096  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29097  *
29098  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
29099  * if self.to_object_func != NULL:
29100  * return self.to_object_func(itemp)
29101  */
29102 
29103 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
29104  PyObject *__pyx_r = NULL;
29105  __Pyx_RefNannyDeclarations
29106  int __pyx_t_1;
29107  PyObject *__pyx_t_2 = NULL;
29108  int __pyx_lineno = 0;
29109  const char *__pyx_filename = NULL;
29110  int __pyx_clineno = 0;
29111  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
29112 
29113  /* "View.MemoryView":980
29114  *
29115  * cdef convert_item_to_object(self, char *itemp):
29116  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
29117  * return self.to_object_func(itemp)
29118  * else:
29119  */
29120  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
29121  if (__pyx_t_1) {
29122 
29123  /* "View.MemoryView":981
29124  * cdef convert_item_to_object(self, char *itemp):
29125  * if self.to_object_func != NULL:
29126  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
29127  * else:
29128  * return memoryview.convert_item_to_object(self, itemp)
29129  */
29130  __Pyx_XDECREF(__pyx_r);
29131  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
29132  __Pyx_GOTREF(__pyx_t_2);
29133  __pyx_r = __pyx_t_2;
29134  __pyx_t_2 = 0;
29135  goto __pyx_L0;
29136 
29137  /* "View.MemoryView":980
29138  *
29139  * cdef convert_item_to_object(self, char *itemp):
29140  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
29141  * return self.to_object_func(itemp)
29142  * else:
29143  */
29144  }
29145 
29146  /* "View.MemoryView":983
29147  * return self.to_object_func(itemp)
29148  * else:
29149  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
29150  *
29151  * cdef assign_item_from_object(self, char *itemp, object value):
29152  */
29153  /*else*/ {
29154  __Pyx_XDECREF(__pyx_r);
29155  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
29156  __Pyx_GOTREF(__pyx_t_2);
29157  __pyx_r = __pyx_t_2;
29158  __pyx_t_2 = 0;
29159  goto __pyx_L0;
29160  }
29161 
29162  /* "View.MemoryView":979
29163  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29164  *
29165  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
29166  * if self.to_object_func != NULL:
29167  * return self.to_object_func(itemp)
29168  */
29169 
29170  /* function exit code */
29171  __pyx_L1_error:;
29172  __Pyx_XDECREF(__pyx_t_2);
29173  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
29174  __pyx_r = 0;
29175  __pyx_L0:;
29176  __Pyx_XGIVEREF(__pyx_r);
29177  __Pyx_RefNannyFinishContext();
29178  return __pyx_r;
29179 }
29180 
29181 /* "View.MemoryView":985
29182  * return memoryview.convert_item_to_object(self, itemp)
29183  *
29184  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
29185  * if self.to_dtype_func != NULL:
29186  * self.to_dtype_func(itemp, value)
29187  */
29188 
29189 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
29190  PyObject *__pyx_r = NULL;
29191  __Pyx_RefNannyDeclarations
29192  int __pyx_t_1;
29193  int __pyx_t_2;
29194  PyObject *__pyx_t_3 = NULL;
29195  int __pyx_lineno = 0;
29196  const char *__pyx_filename = NULL;
29197  int __pyx_clineno = 0;
29198  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
29199 
29200  /* "View.MemoryView":986
29201  *
29202  * cdef assign_item_from_object(self, char *itemp, object value):
29203  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
29204  * self.to_dtype_func(itemp, value)
29205  * else:
29206  */
29207  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
29208  if (__pyx_t_1) {
29209 
29210  /* "View.MemoryView":987
29211  * cdef assign_item_from_object(self, char *itemp, object value):
29212  * if self.to_dtype_func != NULL:
29213  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
29214  * else:
29215  * memoryview.assign_item_from_object(self, itemp, value)
29216  */
29217  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 987, __pyx_L1_error)
29218 
29219  /* "View.MemoryView":986
29220  *
29221  * cdef assign_item_from_object(self, char *itemp, object value):
29222  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
29223  * self.to_dtype_func(itemp, value)
29224  * else:
29225  */
29226  goto __pyx_L3;
29227  }
29228 
29229  /* "View.MemoryView":989
29230  * self.to_dtype_func(itemp, value)
29231  * else:
29232  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
29233  *
29234  * @property
29235  */
29236  /*else*/ {
29237  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error)
29238  __Pyx_GOTREF(__pyx_t_3);
29239  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29240  }
29241  __pyx_L3:;
29242 
29243  /* "View.MemoryView":985
29244  * return memoryview.convert_item_to_object(self, itemp)
29245  *
29246  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
29247  * if self.to_dtype_func != NULL:
29248  * self.to_dtype_func(itemp, value)
29249  */
29250 
29251  /* function exit code */
29252  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29253  goto __pyx_L0;
29254  __pyx_L1_error:;
29255  __Pyx_XDECREF(__pyx_t_3);
29256  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
29257  __pyx_r = 0;
29258  __pyx_L0:;
29259  __Pyx_XGIVEREF(__pyx_r);
29260  __Pyx_RefNannyFinishContext();
29261  return __pyx_r;
29262 }
29263 
29264 /* "View.MemoryView":992
29265  *
29266  * @property
29267  * def base(self): # <<<<<<<<<<<<<<
29268  * return self.from_object
29269  *
29270  */
29271 
29272 /* Python wrapper */
29273 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
29274 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
29275  PyObject *__pyx_r = 0;
29276  __Pyx_RefNannyDeclarations
29277  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29278  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29279 
29280  /* function exit code */
29281  __Pyx_RefNannyFinishContext();
29282  return __pyx_r;
29283 }
29284 
29285 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29286  PyObject *__pyx_r = NULL;
29287  __Pyx_RefNannyDeclarations
29288  __Pyx_RefNannySetupContext("__get__", 0);
29289 
29290  /* "View.MemoryView":993
29291  * @property
29292  * def base(self):
29293  * return self.from_object # <<<<<<<<<<<<<<
29294  *
29295  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
29296  */
29297  __Pyx_XDECREF(__pyx_r);
29298  __Pyx_INCREF(__pyx_v_self->from_object);
29299  __pyx_r = __pyx_v_self->from_object;
29300  goto __pyx_L0;
29301 
29302  /* "View.MemoryView":992
29303  *
29304  * @property
29305  * def base(self): # <<<<<<<<<<<<<<
29306  * return self.from_object
29307  *
29308  */
29309 
29310  /* function exit code */
29311  __pyx_L0:;
29312  __Pyx_XGIVEREF(__pyx_r);
29313  __Pyx_RefNannyFinishContext();
29314  return __pyx_r;
29315 }
29316 
29317 /* "(tree fragment)":1
29318  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
29319  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29320  * def __setstate_cython__(self, __pyx_state):
29321  */
29322 
29323 /* Python wrapper */
29324 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
29325 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
29326  PyObject *__pyx_r = 0;
29327  __Pyx_RefNannyDeclarations
29328  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
29329  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29330 
29331  /* function exit code */
29332  __Pyx_RefNannyFinishContext();
29333  return __pyx_r;
29334 }
29335 
29336 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29337  PyObject *__pyx_r = NULL;
29338  __Pyx_RefNannyDeclarations
29339  PyObject *__pyx_t_1 = NULL;
29340  int __pyx_lineno = 0;
29341  const char *__pyx_filename = NULL;
29342  int __pyx_clineno = 0;
29343  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
29344 
29345  /* "(tree fragment)":2
29346  * def __reduce_cython__(self):
29347  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
29348  * def __setstate_cython__(self, __pyx_state):
29349  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29350  */
29351  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
29352  __Pyx_GOTREF(__pyx_t_1);
29353  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29355  __PYX_ERR(0, 2, __pyx_L1_error)
29356 
29357  /* "(tree fragment)":1
29358  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
29359  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29360  * def __setstate_cython__(self, __pyx_state):
29361  */
29362 
29363  /* function exit code */
29364  __pyx_L1_error:;
29365  __Pyx_XDECREF(__pyx_t_1);
29366  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29367  __pyx_r = NULL;
29368  __Pyx_XGIVEREF(__pyx_r);
29369  __Pyx_RefNannyFinishContext();
29370  return __pyx_r;
29371 }
29372 
29373 /* "(tree fragment)":3
29374  * def __reduce_cython__(self):
29375  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29376  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
29377  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29378  */
29379 
29380 /* Python wrapper */
29381 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
29382 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
29383  PyObject *__pyx_r = 0;
29384  __Pyx_RefNannyDeclarations
29385  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
29386  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
29387 
29388  /* function exit code */
29389  __Pyx_RefNannyFinishContext();
29390  return __pyx_r;
29391 }
29392 
29393 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) {
29394  PyObject *__pyx_r = NULL;
29395  __Pyx_RefNannyDeclarations
29396  PyObject *__pyx_t_1 = NULL;
29397  int __pyx_lineno = 0;
29398  const char *__pyx_filename = NULL;
29399  int __pyx_clineno = 0;
29400  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
29401 
29402  /* "(tree fragment)":4
29403  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29404  * def __setstate_cython__(self, __pyx_state):
29405  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
29406  */
29407  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
29408  __Pyx_GOTREF(__pyx_t_1);
29409  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29410  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29411  __PYX_ERR(0, 4, __pyx_L1_error)
29412 
29413  /* "(tree fragment)":3
29414  * def __reduce_cython__(self):
29415  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29416  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
29417  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29418  */
29419 
29420  /* function exit code */
29421  __pyx_L1_error:;
29422  __Pyx_XDECREF(__pyx_t_1);
29423  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29424  __pyx_r = NULL;
29425  __Pyx_XGIVEREF(__pyx_r);
29426  __Pyx_RefNannyFinishContext();
29427  return __pyx_r;
29428 }
29429 
29430 /* "View.MemoryView":999
29431  *
29432  * @cname('__pyx_memoryview_fromslice')
29433  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
29434  * int ndim,
29435  * object (*to_object_func)(char *),
29436  */
29437 
29438 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
29439  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
29440  Py_ssize_t __pyx_v_suboffset;
29441  PyObject *__pyx_v_length = NULL;
29442  PyObject *__pyx_r = NULL;
29443  __Pyx_RefNannyDeclarations
29444  int __pyx_t_1;
29445  PyObject *__pyx_t_2 = NULL;
29446  PyObject *__pyx_t_3 = NULL;
29447  __Pyx_TypeInfo *__pyx_t_4;
29448  Py_buffer __pyx_t_5;
29449  Py_ssize_t *__pyx_t_6;
29450  Py_ssize_t *__pyx_t_7;
29451  Py_ssize_t *__pyx_t_8;
29452  Py_ssize_t __pyx_t_9;
29453  int __pyx_lineno = 0;
29454  const char *__pyx_filename = NULL;
29455  int __pyx_clineno = 0;
29456  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
29457 
29458  /* "View.MemoryView":1007
29459  * cdef _memoryviewslice result
29460  *
29461  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
29462  * return None
29463  *
29464  */
29465  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
29466  if (__pyx_t_1) {
29467 
29468  /* "View.MemoryView":1008
29469  *
29470  * if <PyObject *> memviewslice.memview == Py_None:
29471  * return None # <<<<<<<<<<<<<<
29472  *
29473  *
29474  */
29475  __Pyx_XDECREF(__pyx_r);
29476  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29477  goto __pyx_L0;
29478 
29479  /* "View.MemoryView":1007
29480  * cdef _memoryviewslice result
29481  *
29482  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
29483  * return None
29484  *
29485  */
29486  }
29487 
29488  /* "View.MemoryView":1013
29489  *
29490  *
29491  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
29492  *
29493  * result.from_slice = memviewslice
29494  */
29495  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
29496  __Pyx_GOTREF(__pyx_t_2);
29497  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
29498  __Pyx_GOTREF(__pyx_t_3);
29499  __Pyx_INCREF(Py_None);
29500  __Pyx_GIVEREF(Py_None);
29501  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
29502  __Pyx_INCREF(__pyx_int_0);
29503  __Pyx_GIVEREF(__pyx_int_0);
29504  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
29505  __Pyx_GIVEREF(__pyx_t_2);
29506  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
29507  __pyx_t_2 = 0;
29508  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
29509  __Pyx_GOTREF(__pyx_t_2);
29510  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29511  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
29512  __pyx_t_2 = 0;
29513 
29514  /* "View.MemoryView":1015
29515  * result = _memoryviewslice(None, 0, dtype_is_object)
29516  *
29517  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
29518  * __PYX_INC_MEMVIEW(&memviewslice, 1)
29519  *
29520  */
29521  __pyx_v_result->from_slice = __pyx_v_memviewslice;
29522 
29523  /* "View.MemoryView":1016
29524  *
29525  * result.from_slice = memviewslice
29526  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
29527  *
29528  * result.from_object = (<memoryview> memviewslice.memview).base
29529  */
29530  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
29531 
29532  /* "View.MemoryView":1018
29533  * __PYX_INC_MEMVIEW(&memviewslice, 1)
29534  *
29535  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
29536  * result.typeinfo = memviewslice.memview.typeinfo
29537  *
29538  */
29539  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
29540  __Pyx_GOTREF(__pyx_t_2);
29541  __Pyx_GIVEREF(__pyx_t_2);
29542  __Pyx_GOTREF(__pyx_v_result->from_object);
29543  __Pyx_DECREF(__pyx_v_result->from_object);
29544  __pyx_v_result->from_object = __pyx_t_2;
29545  __pyx_t_2 = 0;
29546 
29547  /* "View.MemoryView":1019
29548  *
29549  * result.from_object = (<memoryview> memviewslice.memview).base
29550  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
29551  *
29552  * result.view = memviewslice.memview.view
29553  */
29554  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
29555  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
29556 
29557  /* "View.MemoryView":1021
29558  * result.typeinfo = memviewslice.memview.typeinfo
29559  *
29560  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
29561  * result.view.buf = <void *> memviewslice.data
29562  * result.view.ndim = ndim
29563  */
29564  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
29565  __pyx_v_result->__pyx_base.view = __pyx_t_5;
29566 
29567  /* "View.MemoryView":1022
29568  *
29569  * result.view = memviewslice.memview.view
29570  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
29571  * result.view.ndim = ndim
29572  * (<__pyx_buffer *> &result.view).obj = Py_None
29573  */
29574  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
29575 
29576  /* "View.MemoryView":1023
29577  * result.view = memviewslice.memview.view
29578  * result.view.buf = <void *> memviewslice.data
29579  * result.view.ndim = ndim # <<<<<<<<<<<<<<
29580  * (<__pyx_buffer *> &result.view).obj = Py_None
29581  * Py_INCREF(Py_None)
29582  */
29583  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
29584 
29585  /* "View.MemoryView":1024
29586  * result.view.buf = <void *> memviewslice.data
29587  * result.view.ndim = ndim
29588  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
29589  * Py_INCREF(Py_None)
29590  *
29591  */
29592  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
29593 
29594  /* "View.MemoryView":1025
29595  * result.view.ndim = ndim
29596  * (<__pyx_buffer *> &result.view).obj = Py_None
29597  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
29598  *
29599  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
29600  */
29601  Py_INCREF(Py_None);
29602 
29603  /* "View.MemoryView":1027
29604  * Py_INCREF(Py_None)
29605  *
29606  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
29607  * result.flags = PyBUF_RECORDS
29608  * else:
29609  */
29610  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
29611  if (__pyx_t_1) {
29612 
29613  /* "View.MemoryView":1028
29614  *
29615  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
29616  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
29617  * else:
29618  * result.flags = PyBUF_RECORDS_RO
29619  */
29620  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
29621 
29622  /* "View.MemoryView":1027
29623  * Py_INCREF(Py_None)
29624  *
29625  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
29626  * result.flags = PyBUF_RECORDS
29627  * else:
29628  */
29629  goto __pyx_L4;
29630  }
29631 
29632  /* "View.MemoryView":1030
29633  * result.flags = PyBUF_RECORDS
29634  * else:
29635  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
29636  *
29637  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
29638  */
29639  /*else*/ {
29640  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
29641  }
29642  __pyx_L4:;
29643 
29644  /* "View.MemoryView":1032
29645  * result.flags = PyBUF_RECORDS_RO
29646  *
29647  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
29648  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
29649  *
29650  */
29651  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
29652 
29653  /* "View.MemoryView":1033
29654  *
29655  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
29656  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
29657  *
29658  *
29659  */
29660  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
29661 
29662  /* "View.MemoryView":1036
29663  *
29664  *
29665  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
29666  * for suboffset in result.from_slice.suboffsets[:ndim]:
29667  * if suboffset >= 0:
29668  */
29669  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
29670 
29671  /* "View.MemoryView":1037
29672  *
29673  * result.view.suboffsets = NULL
29674  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
29675  * if suboffset >= 0:
29676  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
29677  */
29678  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
29679  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
29680  __pyx_t_6 = __pyx_t_8;
29681  __pyx_v_suboffset = (__pyx_t_6[0]);
29682 
29683  /* "View.MemoryView":1038
29684  * result.view.suboffsets = NULL
29685  * for suboffset in result.from_slice.suboffsets[:ndim]:
29686  * if suboffset >= 0: # <<<<<<<<<<<<<<
29687  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
29688  * break
29689  */
29690  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
29691  if (__pyx_t_1) {
29692 
29693  /* "View.MemoryView":1039
29694  * for suboffset in result.from_slice.suboffsets[:ndim]:
29695  * if suboffset >= 0:
29696  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
29697  * break
29698  *
29699  */
29700  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
29701 
29702  /* "View.MemoryView":1040
29703  * if suboffset >= 0:
29704  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
29705  * break # <<<<<<<<<<<<<<
29706  *
29707  * result.view.len = result.view.itemsize
29708  */
29709  goto __pyx_L6_break;
29710 
29711  /* "View.MemoryView":1038
29712  * result.view.suboffsets = NULL
29713  * for suboffset in result.from_slice.suboffsets[:ndim]:
29714  * if suboffset >= 0: # <<<<<<<<<<<<<<
29715  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
29716  * break
29717  */
29718  }
29719  }
29720  __pyx_L6_break:;
29721 
29722  /* "View.MemoryView":1042
29723  * break
29724  *
29725  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
29726  * for length in result.view.shape[:ndim]:
29727  * result.view.len *= length
29728  */
29729  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
29730  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
29731 
29732  /* "View.MemoryView":1043
29733  *
29734  * result.view.len = result.view.itemsize
29735  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
29736  * result.view.len *= length
29737  *
29738  */
29739  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
29740  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
29741  __pyx_t_6 = __pyx_t_8;
29742  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
29743  __Pyx_GOTREF(__pyx_t_2);
29744  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
29745  __pyx_t_2 = 0;
29746 
29747  /* "View.MemoryView":1044
29748  * result.view.len = result.view.itemsize
29749  * for length in result.view.shape[:ndim]:
29750  * result.view.len *= length # <<<<<<<<<<<<<<
29751  *
29752  * result.to_object_func = to_object_func
29753  */
29754  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error)
29755  __Pyx_GOTREF(__pyx_t_2);
29756  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error)
29757  __Pyx_GOTREF(__pyx_t_3);
29758  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29759  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error)
29760  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29761  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
29762  }
29763 
29764  /* "View.MemoryView":1046
29765  * result.view.len *= length
29766  *
29767  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
29768  * result.to_dtype_func = to_dtype_func
29769  *
29770  */
29771  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
29772 
29773  /* "View.MemoryView":1047
29774  *
29775  * result.to_object_func = to_object_func
29776  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
29777  *
29778  * return result
29779  */
29780  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
29781 
29782  /* "View.MemoryView":1049
29783  * result.to_dtype_func = to_dtype_func
29784  *
29785  * return result # <<<<<<<<<<<<<<
29786  *
29787  * @cname('__pyx_memoryview_get_slice_from_memoryview')
29788  */
29789  __Pyx_XDECREF(__pyx_r);
29790  __Pyx_INCREF(((PyObject *)__pyx_v_result));
29791  __pyx_r = ((PyObject *)__pyx_v_result);
29792  goto __pyx_L0;
29793 
29794  /* "View.MemoryView":999
29795  *
29796  * @cname('__pyx_memoryview_fromslice')
29797  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
29798  * int ndim,
29799  * object (*to_object_func)(char *),
29800  */
29801 
29802  /* function exit code */
29803  __pyx_L1_error:;
29804  __Pyx_XDECREF(__pyx_t_2);
29805  __Pyx_XDECREF(__pyx_t_3);
29806  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
29807  __pyx_r = 0;
29808  __pyx_L0:;
29809  __Pyx_XDECREF((PyObject *)__pyx_v_result);
29810  __Pyx_XDECREF(__pyx_v_length);
29811  __Pyx_XGIVEREF(__pyx_r);
29812  __Pyx_RefNannyFinishContext();
29813  return __pyx_r;
29814 }
29815 
29816 /* "View.MemoryView":1052
29817  *
29818  * @cname('__pyx_memoryview_get_slice_from_memoryview')
29819  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
29820  * __Pyx_memviewslice *mslice) except NULL:
29821  * cdef _memoryviewslice obj
29822  */
29823 
29824 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
29825  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
29826  __Pyx_memviewslice *__pyx_r;
29827  __Pyx_RefNannyDeclarations
29828  int __pyx_t_1;
29829  int __pyx_t_2;
29830  PyObject *__pyx_t_3 = NULL;
29831  int __pyx_lineno = 0;
29832  const char *__pyx_filename = NULL;
29833  int __pyx_clineno = 0;
29834  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
29835 
29836  /* "View.MemoryView":1055
29837  * __Pyx_memviewslice *mslice) except NULL:
29838  * cdef _memoryviewslice obj
29839  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
29840  * obj = memview
29841  * return &obj.from_slice
29842  */
29843  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
29844  __pyx_t_2 = (__pyx_t_1 != 0);
29845  if (__pyx_t_2) {
29846 
29847  /* "View.MemoryView":1056
29848  * cdef _memoryviewslice obj
29849  * if isinstance(memview, _memoryviewslice):
29850  * obj = memview # <<<<<<<<<<<<<<
29851  * return &obj.from_slice
29852  * else:
29853  */
29854  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1056, __pyx_L1_error)
29855  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
29856  __Pyx_INCREF(__pyx_t_3);
29857  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
29858  __pyx_t_3 = 0;
29859 
29860  /* "View.MemoryView":1057
29861  * if isinstance(memview, _memoryviewslice):
29862  * obj = memview
29863  * return &obj.from_slice # <<<<<<<<<<<<<<
29864  * else:
29865  * slice_copy(memview, mslice)
29866  */
29867  __pyx_r = (&__pyx_v_obj->from_slice);
29868  goto __pyx_L0;
29869 
29870  /* "View.MemoryView":1055
29871  * __Pyx_memviewslice *mslice) except NULL:
29872  * cdef _memoryviewslice obj
29873  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
29874  * obj = memview
29875  * return &obj.from_slice
29876  */
29877  }
29878 
29879  /* "View.MemoryView":1059
29880  * return &obj.from_slice
29881  * else:
29882  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
29883  * return mslice
29884  *
29885  */
29886  /*else*/ {
29887  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
29888 
29889  /* "View.MemoryView":1060
29890  * else:
29891  * slice_copy(memview, mslice)
29892  * return mslice # <<<<<<<<<<<<<<
29893  *
29894  * @cname('__pyx_memoryview_slice_copy')
29895  */
29896  __pyx_r = __pyx_v_mslice;
29897  goto __pyx_L0;
29898  }
29899 
29900  /* "View.MemoryView":1052
29901  *
29902  * @cname('__pyx_memoryview_get_slice_from_memoryview')
29903  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
29904  * __Pyx_memviewslice *mslice) except NULL:
29905  * cdef _memoryviewslice obj
29906  */
29907 
29908  /* function exit code */
29909  __pyx_L1_error:;
29910  __Pyx_XDECREF(__pyx_t_3);
29911  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
29912  __pyx_r = NULL;
29913  __pyx_L0:;
29914  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
29915  __Pyx_RefNannyFinishContext();
29916  return __pyx_r;
29917 }
29918 
29919 /* "View.MemoryView":1063
29920  *
29921  * @cname('__pyx_memoryview_slice_copy')
29922  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
29923  * cdef int dim
29924  * cdef (Py_ssize_t*) shape, strides, suboffsets
29925  */
29926 
29927 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
29928  int __pyx_v_dim;
29929  Py_ssize_t *__pyx_v_shape;
29930  Py_ssize_t *__pyx_v_strides;
29931  Py_ssize_t *__pyx_v_suboffsets;
29932  __Pyx_RefNannyDeclarations
29933  Py_ssize_t *__pyx_t_1;
29934  int __pyx_t_2;
29935  int __pyx_t_3;
29936  int __pyx_t_4;
29937  Py_ssize_t __pyx_t_5;
29938  __Pyx_RefNannySetupContext("slice_copy", 0);
29939 
29940  /* "View.MemoryView":1067
29941  * cdef (Py_ssize_t*) shape, strides, suboffsets
29942  *
29943  * shape = memview.view.shape # <<<<<<<<<<<<<<
29944  * strides = memview.view.strides
29945  * suboffsets = memview.view.suboffsets
29946  */
29947  __pyx_t_1 = __pyx_v_memview->view.shape;
29948  __pyx_v_shape = __pyx_t_1;
29949 
29950  /* "View.MemoryView":1068
29951  *
29952  * shape = memview.view.shape
29953  * strides = memview.view.strides # <<<<<<<<<<<<<<
29954  * suboffsets = memview.view.suboffsets
29955  *
29956  */
29957  __pyx_t_1 = __pyx_v_memview->view.strides;
29958  __pyx_v_strides = __pyx_t_1;
29959 
29960  /* "View.MemoryView":1069
29961  * shape = memview.view.shape
29962  * strides = memview.view.strides
29963  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
29964  *
29965  * dst.memview = <__pyx_memoryview *> memview
29966  */
29967  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
29968  __pyx_v_suboffsets = __pyx_t_1;
29969 
29970  /* "View.MemoryView":1071
29971  * suboffsets = memview.view.suboffsets
29972  *
29973  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
29974  * dst.data = <char *> memview.view.buf
29975  *
29976  */
29977  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
29978 
29979  /* "View.MemoryView":1072
29980  *
29981  * dst.memview = <__pyx_memoryview *> memview
29982  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
29983  *
29984  * for dim in range(memview.view.ndim):
29985  */
29986  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
29987 
29988  /* "View.MemoryView":1074
29989  * dst.data = <char *> memview.view.buf
29990  *
29991  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
29992  * dst.shape[dim] = shape[dim]
29993  * dst.strides[dim] = strides[dim]
29994  */
29995  __pyx_t_2 = __pyx_v_memview->view.ndim;
29996  __pyx_t_3 = __pyx_t_2;
29997  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
29998  __pyx_v_dim = __pyx_t_4;
29999 
30000  /* "View.MemoryView":1075
30001  *
30002  * for dim in range(memview.view.ndim):
30003  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
30004  * dst.strides[dim] = strides[dim]
30005  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
30006  */
30007  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
30008 
30009  /* "View.MemoryView":1076
30010  * for dim in range(memview.view.ndim):
30011  * dst.shape[dim] = shape[dim]
30012  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
30013  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
30014  *
30015  */
30016  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
30017 
30018  /* "View.MemoryView":1077
30019  * dst.shape[dim] = shape[dim]
30020  * dst.strides[dim] = strides[dim]
30021  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
30022  *
30023  * @cname('__pyx_memoryview_copy_object')
30024  */
30025  if ((__pyx_v_suboffsets != 0)) {
30026  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
30027  } else {
30028  __pyx_t_5 = -1L;
30029  }
30030  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
30031  }
30032 
30033  /* "View.MemoryView":1063
30034  *
30035  * @cname('__pyx_memoryview_slice_copy')
30036  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
30037  * cdef int dim
30038  * cdef (Py_ssize_t*) shape, strides, suboffsets
30039  */
30040 
30041  /* function exit code */
30042  __Pyx_RefNannyFinishContext();
30043 }
30044 
30045 /* "View.MemoryView":1080
30046  *
30047  * @cname('__pyx_memoryview_copy_object')
30048  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
30049  * "Create a new memoryview object"
30050  * cdef __Pyx_memviewslice memviewslice
30051  */
30052 
30053 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
30054  __Pyx_memviewslice __pyx_v_memviewslice;
30055  PyObject *__pyx_r = NULL;
30056  __Pyx_RefNannyDeclarations
30057  PyObject *__pyx_t_1 = NULL;
30058  int __pyx_lineno = 0;
30059  const char *__pyx_filename = NULL;
30060  int __pyx_clineno = 0;
30061  __Pyx_RefNannySetupContext("memoryview_copy", 0);
30062 
30063  /* "View.MemoryView":1083
30064  * "Create a new memoryview object"
30065  * cdef __Pyx_memviewslice memviewslice
30066  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
30067  * return memoryview_copy_from_slice(memview, &memviewslice)
30068  *
30069  */
30070  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
30071 
30072  /* "View.MemoryView":1084
30073  * cdef __Pyx_memviewslice memviewslice
30074  * slice_copy(memview, &memviewslice)
30075  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
30076  *
30077  * @cname('__pyx_memoryview_copy_object_from_slice')
30078  */
30079  __Pyx_XDECREF(__pyx_r);
30080  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
30081  __Pyx_GOTREF(__pyx_t_1);
30082  __pyx_r = __pyx_t_1;
30083  __pyx_t_1 = 0;
30084  goto __pyx_L0;
30085 
30086  /* "View.MemoryView":1080
30087  *
30088  * @cname('__pyx_memoryview_copy_object')
30089  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
30090  * "Create a new memoryview object"
30091  * cdef __Pyx_memviewslice memviewslice
30092  */
30093 
30094  /* function exit code */
30095  __pyx_L1_error:;
30096  __Pyx_XDECREF(__pyx_t_1);
30097  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
30098  __pyx_r = 0;
30099  __pyx_L0:;
30100  __Pyx_XGIVEREF(__pyx_r);
30101  __Pyx_RefNannyFinishContext();
30102  return __pyx_r;
30103 }
30104 
30105 /* "View.MemoryView":1087
30106  *
30107  * @cname('__pyx_memoryview_copy_object_from_slice')
30108  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
30109  * """
30110  * Create a new memoryview object from a given memoryview object and slice.
30111  */
30112 
30113 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
30114  PyObject *(*__pyx_v_to_object_func)(char *);
30115  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
30116  PyObject *__pyx_r = NULL;
30117  __Pyx_RefNannyDeclarations
30118  int __pyx_t_1;
30119  int __pyx_t_2;
30120  PyObject *(*__pyx_t_3)(char *);
30121  int (*__pyx_t_4)(char *, PyObject *);
30122  PyObject *__pyx_t_5 = NULL;
30123  int __pyx_lineno = 0;
30124  const char *__pyx_filename = NULL;
30125  int __pyx_clineno = 0;
30126  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
30127 
30128  /* "View.MemoryView":1094
30129  * cdef int (*to_dtype_func)(char *, object) except 0
30130  *
30131  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30132  * to_object_func = (<_memoryviewslice> memview).to_object_func
30133  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30134  */
30135  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
30136  __pyx_t_2 = (__pyx_t_1 != 0);
30137  if (__pyx_t_2) {
30138 
30139  /* "View.MemoryView":1095
30140  *
30141  * if isinstance(memview, _memoryviewslice):
30142  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
30143  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30144  * else:
30145  */
30146  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
30147  __pyx_v_to_object_func = __pyx_t_3;
30148 
30149  /* "View.MemoryView":1096
30150  * if isinstance(memview, _memoryviewslice):
30151  * to_object_func = (<_memoryviewslice> memview).to_object_func
30152  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
30153  * else:
30154  * to_object_func = NULL
30155  */
30156  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
30157  __pyx_v_to_dtype_func = __pyx_t_4;
30158 
30159  /* "View.MemoryView":1094
30160  * cdef int (*to_dtype_func)(char *, object) except 0
30161  *
30162  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30163  * to_object_func = (<_memoryviewslice> memview).to_object_func
30164  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30165  */
30166  goto __pyx_L3;
30167  }
30168 
30169  /* "View.MemoryView":1098
30170  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30171  * else:
30172  * to_object_func = NULL # <<<<<<<<<<<<<<
30173  * to_dtype_func = NULL
30174  *
30175  */
30176  /*else*/ {
30177  __pyx_v_to_object_func = NULL;
30178 
30179  /* "View.MemoryView":1099
30180  * else:
30181  * to_object_func = NULL
30182  * to_dtype_func = NULL # <<<<<<<<<<<<<<
30183  *
30184  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
30185  */
30186  __pyx_v_to_dtype_func = NULL;
30187  }
30188  __pyx_L3:;
30189 
30190  /* "View.MemoryView":1101
30191  * to_dtype_func = NULL
30192  *
30193  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
30194  * to_object_func, to_dtype_func,
30195  * memview.dtype_is_object)
30196  */
30197  __Pyx_XDECREF(__pyx_r);
30198 
30199  /* "View.MemoryView":1103
30200  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
30201  * to_object_func, to_dtype_func,
30202  * memview.dtype_is_object) # <<<<<<<<<<<<<<
30203  *
30204  *
30205  */
30206  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
30207  __Pyx_GOTREF(__pyx_t_5);
30208  __pyx_r = __pyx_t_5;
30209  __pyx_t_5 = 0;
30210  goto __pyx_L0;
30211 
30212  /* "View.MemoryView":1087
30213  *
30214  * @cname('__pyx_memoryview_copy_object_from_slice')
30215  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
30216  * """
30217  * Create a new memoryview object from a given memoryview object and slice.
30218  */
30219 
30220  /* function exit code */
30221  __pyx_L1_error:;
30222  __Pyx_XDECREF(__pyx_t_5);
30223  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
30224  __pyx_r = 0;
30225  __pyx_L0:;
30226  __Pyx_XGIVEREF(__pyx_r);
30227  __Pyx_RefNannyFinishContext();
30228  return __pyx_r;
30229 }
30230 
30231 /* "View.MemoryView":1109
30232  *
30233  *
30234  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
30235  * if arg < 0:
30236  * return -arg
30237  */
30238 
30239 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
30240  Py_ssize_t __pyx_r;
30241  int __pyx_t_1;
30242 
30243  /* "View.MemoryView":1110
30244  *
30245  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30246  * if arg < 0: # <<<<<<<<<<<<<<
30247  * return -arg
30248  * else:
30249  */
30250  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
30251  if (__pyx_t_1) {
30252 
30253  /* "View.MemoryView":1111
30254  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30255  * if arg < 0:
30256  * return -arg # <<<<<<<<<<<<<<
30257  * else:
30258  * return arg
30259  */
30260  __pyx_r = (-__pyx_v_arg);
30261  goto __pyx_L0;
30262 
30263  /* "View.MemoryView":1110
30264  *
30265  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30266  * if arg < 0: # <<<<<<<<<<<<<<
30267  * return -arg
30268  * else:
30269  */
30270  }
30271 
30272  /* "View.MemoryView":1113
30273  * return -arg
30274  * else:
30275  * return arg # <<<<<<<<<<<<<<
30276  *
30277  * @cname('__pyx_get_best_slice_order')
30278  */
30279  /*else*/ {
30280  __pyx_r = __pyx_v_arg;
30281  goto __pyx_L0;
30282  }
30283 
30284  /* "View.MemoryView":1109
30285  *
30286  *
30287  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
30288  * if arg < 0:
30289  * return -arg
30290  */
30291 
30292  /* function exit code */
30293  __pyx_L0:;
30294  return __pyx_r;
30295 }
30296 
30297 /* "View.MemoryView":1116
30298  *
30299  * @cname('__pyx_get_best_slice_order')
30300  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
30301  * """
30302  * Figure out the best memory access order for a given slice.
30303  */
30304 
30305 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
30306  int __pyx_v_i;
30307  Py_ssize_t __pyx_v_c_stride;
30308  Py_ssize_t __pyx_v_f_stride;
30309  char __pyx_r;
30310  int __pyx_t_1;
30311  int __pyx_t_2;
30312  int __pyx_t_3;
30313  int __pyx_t_4;
30314 
30315  /* "View.MemoryView":1121
30316  * """
30317  * cdef int i
30318  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
30319  * cdef Py_ssize_t f_stride = 0
30320  *
30321  */
30322  __pyx_v_c_stride = 0;
30323 
30324  /* "View.MemoryView":1122
30325  * cdef int i
30326  * cdef Py_ssize_t c_stride = 0
30327  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
30328  *
30329  * for i in range(ndim - 1, -1, -1):
30330  */
30331  __pyx_v_f_stride = 0;
30332 
30333  /* "View.MemoryView":1124
30334  * cdef Py_ssize_t f_stride = 0
30335  *
30336  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
30337  * if mslice.shape[i] > 1:
30338  * c_stride = mslice.strides[i]
30339  */
30340  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
30341  __pyx_v_i = __pyx_t_1;
30342 
30343  /* "View.MemoryView":1125
30344  *
30345  * for i in range(ndim - 1, -1, -1):
30346  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30347  * c_stride = mslice.strides[i]
30348  * break
30349  */
30350  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
30351  if (__pyx_t_2) {
30352 
30353  /* "View.MemoryView":1126
30354  * for i in range(ndim - 1, -1, -1):
30355  * if mslice.shape[i] > 1:
30356  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
30357  * break
30358  *
30359  */
30360  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
30361 
30362  /* "View.MemoryView":1127
30363  * if mslice.shape[i] > 1:
30364  * c_stride = mslice.strides[i]
30365  * break # <<<<<<<<<<<<<<
30366  *
30367  * for i in range(ndim):
30368  */
30369  goto __pyx_L4_break;
30370 
30371  /* "View.MemoryView":1125
30372  *
30373  * for i in range(ndim - 1, -1, -1):
30374  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30375  * c_stride = mslice.strides[i]
30376  * break
30377  */
30378  }
30379  }
30380  __pyx_L4_break:;
30381 
30382  /* "View.MemoryView":1129
30383  * break
30384  *
30385  * for i in range(ndim): # <<<<<<<<<<<<<<
30386  * if mslice.shape[i] > 1:
30387  * f_stride = mslice.strides[i]
30388  */
30389  __pyx_t_1 = __pyx_v_ndim;
30390  __pyx_t_3 = __pyx_t_1;
30391  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
30392  __pyx_v_i = __pyx_t_4;
30393 
30394  /* "View.MemoryView":1130
30395  *
30396  * for i in range(ndim):
30397  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30398  * f_stride = mslice.strides[i]
30399  * break
30400  */
30401  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
30402  if (__pyx_t_2) {
30403 
30404  /* "View.MemoryView":1131
30405  * for i in range(ndim):
30406  * if mslice.shape[i] > 1:
30407  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
30408  * break
30409  *
30410  */
30411  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
30412 
30413  /* "View.MemoryView":1132
30414  * if mslice.shape[i] > 1:
30415  * f_stride = mslice.strides[i]
30416  * break # <<<<<<<<<<<<<<
30417  *
30418  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
30419  */
30420  goto __pyx_L7_break;
30421 
30422  /* "View.MemoryView":1130
30423  *
30424  * for i in range(ndim):
30425  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30426  * f_stride = mslice.strides[i]
30427  * break
30428  */
30429  }
30430  }
30431  __pyx_L7_break:;
30432 
30433  /* "View.MemoryView":1134
30434  * break
30435  *
30436  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
30437  * return 'C'
30438  * else:
30439  */
30440  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
30441  if (__pyx_t_2) {
30442 
30443  /* "View.MemoryView":1135
30444  *
30445  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
30446  * return 'C' # <<<<<<<<<<<<<<
30447  * else:
30448  * return 'F'
30449  */
30450  __pyx_r = 'C';
30451  goto __pyx_L0;
30452 
30453  /* "View.MemoryView":1134
30454  * break
30455  *
30456  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
30457  * return 'C'
30458  * else:
30459  */
30460  }
30461 
30462  /* "View.MemoryView":1137
30463  * return 'C'
30464  * else:
30465  * return 'F' # <<<<<<<<<<<<<<
30466  *
30467  * @cython.cdivision(True)
30468  */
30469  /*else*/ {
30470  __pyx_r = 'F';
30471  goto __pyx_L0;
30472  }
30473 
30474  /* "View.MemoryView":1116
30475  *
30476  * @cname('__pyx_get_best_slice_order')
30477  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
30478  * """
30479  * Figure out the best memory access order for a given slice.
30480  */
30481 
30482  /* function exit code */
30483  __pyx_L0:;
30484  return __pyx_r;
30485 }
30486 
30487 /* "View.MemoryView":1140
30488  *
30489  * @cython.cdivision(True)
30490  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
30491  * char *dst_data, Py_ssize_t *dst_strides,
30492  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
30493  */
30494 
30495 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
30496  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
30497  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
30498  Py_ssize_t __pyx_v_dst_extent;
30499  Py_ssize_t __pyx_v_src_stride;
30500  Py_ssize_t __pyx_v_dst_stride;
30501  int __pyx_t_1;
30502  int __pyx_t_2;
30503  int __pyx_t_3;
30504  Py_ssize_t __pyx_t_4;
30505  Py_ssize_t __pyx_t_5;
30506  Py_ssize_t __pyx_t_6;
30507 
30508  /* "View.MemoryView":1147
30509  *
30510  * cdef Py_ssize_t i
30511  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
30512  * cdef Py_ssize_t dst_extent = dst_shape[0]
30513  * cdef Py_ssize_t src_stride = src_strides[0]
30514  */
30515  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
30516 
30517  /* "View.MemoryView":1148
30518  * cdef Py_ssize_t i
30519  * cdef Py_ssize_t src_extent = src_shape[0]
30520  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
30521  * cdef Py_ssize_t src_stride = src_strides[0]
30522  * cdef Py_ssize_t dst_stride = dst_strides[0]
30523  */
30524  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
30525 
30526  /* "View.MemoryView":1149
30527  * cdef Py_ssize_t src_extent = src_shape[0]
30528  * cdef Py_ssize_t dst_extent = dst_shape[0]
30529  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
30530  * cdef Py_ssize_t dst_stride = dst_strides[0]
30531  *
30532  */
30533  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
30534 
30535  /* "View.MemoryView":1150
30536  * cdef Py_ssize_t dst_extent = dst_shape[0]
30537  * cdef Py_ssize_t src_stride = src_strides[0]
30538  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
30539  *
30540  * if ndim == 1:
30541  */
30542  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
30543 
30544  /* "View.MemoryView":1152
30545  * cdef Py_ssize_t dst_stride = dst_strides[0]
30546  *
30547  * if ndim == 1: # <<<<<<<<<<<<<<
30548  * if (src_stride > 0 and dst_stride > 0 and
30549  * <size_t> src_stride == itemsize == <size_t> dst_stride):
30550  */
30551  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
30552  if (__pyx_t_1) {
30553 
30554  /* "View.MemoryView":1153
30555  *
30556  * if ndim == 1:
30557  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
30558  * <size_t> src_stride == itemsize == <size_t> dst_stride):
30559  * memcpy(dst_data, src_data, itemsize * dst_extent)
30560  */
30561  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
30562  if (__pyx_t_2) {
30563  } else {
30564  __pyx_t_1 = __pyx_t_2;
30565  goto __pyx_L5_bool_binop_done;
30566  }
30567  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
30568  if (__pyx_t_2) {
30569  } else {
30570  __pyx_t_1 = __pyx_t_2;
30571  goto __pyx_L5_bool_binop_done;
30572  }
30573 
30574  /* "View.MemoryView":1154
30575  * if ndim == 1:
30576  * if (src_stride > 0 and dst_stride > 0 and
30577  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
30578  * memcpy(dst_data, src_data, itemsize * dst_extent)
30579  * else:
30580  */
30581  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
30582  if (__pyx_t_2) {
30583  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
30584  }
30585  __pyx_t_3 = (__pyx_t_2 != 0);
30586  __pyx_t_1 = __pyx_t_3;
30587  __pyx_L5_bool_binop_done:;
30588 
30589  /* "View.MemoryView":1153
30590  *
30591  * if ndim == 1:
30592  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
30593  * <size_t> src_stride == itemsize == <size_t> dst_stride):
30594  * memcpy(dst_data, src_data, itemsize * dst_extent)
30595  */
30596  if (__pyx_t_1) {
30597 
30598  /* "View.MemoryView":1155
30599  * if (src_stride > 0 and dst_stride > 0 and
30600  * <size_t> src_stride == itemsize == <size_t> dst_stride):
30601  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
30602  * else:
30603  * for i in range(dst_extent):
30604  */
30605  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
30606 
30607  /* "View.MemoryView":1153
30608  *
30609  * if ndim == 1:
30610  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
30611  * <size_t> src_stride == itemsize == <size_t> dst_stride):
30612  * memcpy(dst_data, src_data, itemsize * dst_extent)
30613  */
30614  goto __pyx_L4;
30615  }
30616 
30617  /* "View.MemoryView":1157
30618  * memcpy(dst_data, src_data, itemsize * dst_extent)
30619  * else:
30620  * for i in range(dst_extent): # <<<<<<<<<<<<<<
30621  * memcpy(dst_data, src_data, itemsize)
30622  * src_data += src_stride
30623  */
30624  /*else*/ {
30625  __pyx_t_4 = __pyx_v_dst_extent;
30626  __pyx_t_5 = __pyx_t_4;
30627  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
30628  __pyx_v_i = __pyx_t_6;
30629 
30630  /* "View.MemoryView":1158
30631  * else:
30632  * for i in range(dst_extent):
30633  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
30634  * src_data += src_stride
30635  * dst_data += dst_stride
30636  */
30637  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
30638 
30639  /* "View.MemoryView":1159
30640  * for i in range(dst_extent):
30641  * memcpy(dst_data, src_data, itemsize)
30642  * src_data += src_stride # <<<<<<<<<<<<<<
30643  * dst_data += dst_stride
30644  * else:
30645  */
30646  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
30647 
30648  /* "View.MemoryView":1160
30649  * memcpy(dst_data, src_data, itemsize)
30650  * src_data += src_stride
30651  * dst_data += dst_stride # <<<<<<<<<<<<<<
30652  * else:
30653  * for i in range(dst_extent):
30654  */
30655  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
30656  }
30657  }
30658  __pyx_L4:;
30659 
30660  /* "View.MemoryView":1152
30661  * cdef Py_ssize_t dst_stride = dst_strides[0]
30662  *
30663  * if ndim == 1: # <<<<<<<<<<<<<<
30664  * if (src_stride > 0 and dst_stride > 0 and
30665  * <size_t> src_stride == itemsize == <size_t> dst_stride):
30666  */
30667  goto __pyx_L3;
30668  }
30669 
30670  /* "View.MemoryView":1162
30671  * dst_data += dst_stride
30672  * else:
30673  * for i in range(dst_extent): # <<<<<<<<<<<<<<
30674  * _copy_strided_to_strided(src_data, src_strides + 1,
30675  * dst_data, dst_strides + 1,
30676  */
30677  /*else*/ {
30678  __pyx_t_4 = __pyx_v_dst_extent;
30679  __pyx_t_5 = __pyx_t_4;
30680  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
30681  __pyx_v_i = __pyx_t_6;
30682 
30683  /* "View.MemoryView":1163
30684  * else:
30685  * for i in range(dst_extent):
30686  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
30687  * dst_data, dst_strides + 1,
30688  * src_shape + 1, dst_shape + 1,
30689  */
30690  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
30691 
30692  /* "View.MemoryView":1167
30693  * src_shape + 1, dst_shape + 1,
30694  * ndim - 1, itemsize)
30695  * src_data += src_stride # <<<<<<<<<<<<<<
30696  * dst_data += dst_stride
30697  *
30698  */
30699  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
30700 
30701  /* "View.MemoryView":1168
30702  * ndim - 1, itemsize)
30703  * src_data += src_stride
30704  * dst_data += dst_stride # <<<<<<<<<<<<<<
30705  *
30706  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
30707  */
30708  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
30709  }
30710  }
30711  __pyx_L3:;
30712 
30713  /* "View.MemoryView":1140
30714  *
30715  * @cython.cdivision(True)
30716  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
30717  * char *dst_data, Py_ssize_t *dst_strides,
30718  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
30719  */
30720 
30721  /* function exit code */
30722 }
30723 
30724 /* "View.MemoryView":1170
30725  * dst_data += dst_stride
30726  *
30727  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
30728  * __Pyx_memviewslice *dst,
30729  * int ndim, size_t itemsize) nogil:
30730  */
30731 
30732 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
30733 
30734  /* "View.MemoryView":1173
30735  * __Pyx_memviewslice *dst,
30736  * int ndim, size_t itemsize) nogil:
30737  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
30738  * src.shape, dst.shape, ndim, itemsize)
30739  *
30740  */
30741  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
30742 
30743  /* "View.MemoryView":1170
30744  * dst_data += dst_stride
30745  *
30746  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
30747  * __Pyx_memviewslice *dst,
30748  * int ndim, size_t itemsize) nogil:
30749  */
30750 
30751  /* function exit code */
30752 }
30753 
30754 /* "View.MemoryView":1177
30755  *
30756  * @cname('__pyx_memoryview_slice_get_size')
30757  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
30758  * "Return the size of the memory occupied by the slice in number of bytes"
30759  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
30760  */
30761 
30762 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
30763  Py_ssize_t __pyx_v_shape;
30764  Py_ssize_t __pyx_v_size;
30765  Py_ssize_t __pyx_r;
30766  Py_ssize_t __pyx_t_1;
30767  Py_ssize_t *__pyx_t_2;
30768  Py_ssize_t *__pyx_t_3;
30769  Py_ssize_t *__pyx_t_4;
30770 
30771  /* "View.MemoryView":1179
30772  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
30773  * "Return the size of the memory occupied by the slice in number of bytes"
30774  * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
30775  *
30776  * for shape in src.shape[:ndim]:
30777  */
30778  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
30779  __pyx_v_size = __pyx_t_1;
30780 
30781  /* "View.MemoryView":1181
30782  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
30783  *
30784  * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
30785  * size *= shape
30786  *
30787  */
30788  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
30789  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
30790  __pyx_t_2 = __pyx_t_4;
30791  __pyx_v_shape = (__pyx_t_2[0]);
30792 
30793  /* "View.MemoryView":1182
30794  *
30795  * for shape in src.shape[:ndim]:
30796  * size *= shape # <<<<<<<<<<<<<<
30797  *
30798  * return size
30799  */
30800  __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
30801  }
30802 
30803  /* "View.MemoryView":1184
30804  * size *= shape
30805  *
30806  * return size # <<<<<<<<<<<<<<
30807  *
30808  * @cname('__pyx_fill_contig_strides_array')
30809  */
30810  __pyx_r = __pyx_v_size;
30811  goto __pyx_L0;
30812 
30813  /* "View.MemoryView":1177
30814  *
30815  * @cname('__pyx_memoryview_slice_get_size')
30816  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
30817  * "Return the size of the memory occupied by the slice in number of bytes"
30818  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
30819  */
30820 
30821  /* function exit code */
30822  __pyx_L0:;
30823  return __pyx_r;
30824 }
30825 
30826 /* "View.MemoryView":1187
30827  *
30828  * @cname('__pyx_fill_contig_strides_array')
30829  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
30830  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
30831  * int ndim, char order) nogil:
30832  */
30833 
30834 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
30835  int __pyx_v_idx;
30836  Py_ssize_t __pyx_r;
30837  int __pyx_t_1;
30838  int __pyx_t_2;
30839  int __pyx_t_3;
30840  int __pyx_t_4;
30841 
30842  /* "View.MemoryView":1196
30843  * cdef int idx
30844  *
30845  * if order == 'F': # <<<<<<<<<<<<<<
30846  * for idx in range(ndim):
30847  * strides[idx] = stride
30848  */
30849  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
30850  if (__pyx_t_1) {
30851 
30852  /* "View.MemoryView":1197
30853  *
30854  * if order == 'F':
30855  * for idx in range(ndim): # <<<<<<<<<<<<<<
30856  * strides[idx] = stride
30857  * stride *= shape[idx]
30858  */
30859  __pyx_t_2 = __pyx_v_ndim;
30860  __pyx_t_3 = __pyx_t_2;
30861  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
30862  __pyx_v_idx = __pyx_t_4;
30863 
30864  /* "View.MemoryView":1198
30865  * if order == 'F':
30866  * for idx in range(ndim):
30867  * strides[idx] = stride # <<<<<<<<<<<<<<
30868  * stride *= shape[idx]
30869  * else:
30870  */
30871  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
30872 
30873  /* "View.MemoryView":1199
30874  * for idx in range(ndim):
30875  * strides[idx] = stride
30876  * stride *= shape[idx] # <<<<<<<<<<<<<<
30877  * else:
30878  * for idx in range(ndim - 1, -1, -1):
30879  */
30880  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
30881  }
30882 
30883  /* "View.MemoryView":1196
30884  * cdef int idx
30885  *
30886  * if order == 'F': # <<<<<<<<<<<<<<
30887  * for idx in range(ndim):
30888  * strides[idx] = stride
30889  */
30890  goto __pyx_L3;
30891  }
30892 
30893  /* "View.MemoryView":1201
30894  * stride *= shape[idx]
30895  * else:
30896  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
30897  * strides[idx] = stride
30898  * stride *= shape[idx]
30899  */
30900  /*else*/ {
30901  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
30902  __pyx_v_idx = __pyx_t_2;
30903 
30904  /* "View.MemoryView":1202
30905  * else:
30906  * for idx in range(ndim - 1, -1, -1):
30907  * strides[idx] = stride # <<<<<<<<<<<<<<
30908  * stride *= shape[idx]
30909  *
30910  */
30911  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
30912 
30913  /* "View.MemoryView":1203
30914  * for idx in range(ndim - 1, -1, -1):
30915  * strides[idx] = stride
30916  * stride *= shape[idx] # <<<<<<<<<<<<<<
30917  *
30918  * return stride
30919  */
30920  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
30921  }
30922  }
30923  __pyx_L3:;
30924 
30925  /* "View.MemoryView":1205
30926  * stride *= shape[idx]
30927  *
30928  * return stride # <<<<<<<<<<<<<<
30929  *
30930  * @cname('__pyx_memoryview_copy_data_to_temp')
30931  */
30932  __pyx_r = __pyx_v_stride;
30933  goto __pyx_L0;
30934 
30935  /* "View.MemoryView":1187
30936  *
30937  * @cname('__pyx_fill_contig_strides_array')
30938  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
30939  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
30940  * int ndim, char order) nogil:
30941  */
30942 
30943  /* function exit code */
30944  __pyx_L0:;
30945  return __pyx_r;
30946 }
30947 
30948 /* "View.MemoryView":1208
30949  *
30950  * @cname('__pyx_memoryview_copy_data_to_temp')
30951  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
30952  * __Pyx_memviewslice *tmpslice,
30953  * char order,
30954  */
30955 
30956 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
30957  int __pyx_v_i;
30958  void *__pyx_v_result;
30959  size_t __pyx_v_itemsize;
30960  size_t __pyx_v_size;
30961  void *__pyx_r;
30962  Py_ssize_t __pyx_t_1;
30963  int __pyx_t_2;
30964  int __pyx_t_3;
30965  struct __pyx_memoryview_obj *__pyx_t_4;
30966  int __pyx_t_5;
30967  int __pyx_t_6;
30968  int __pyx_lineno = 0;
30969  const char *__pyx_filename = NULL;
30970  int __pyx_clineno = 0;
30971 
30972  /* "View.MemoryView":1219
30973  * cdef void *result
30974  *
30975  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
30976  * cdef size_t size = slice_get_size(src, ndim)
30977  *
30978  */
30979  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
30980  __pyx_v_itemsize = __pyx_t_1;
30981 
30982  /* "View.MemoryView":1220
30983  *
30984  * cdef size_t itemsize = src.memview.view.itemsize
30985  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
30986  *
30987  * result = malloc(size)
30988  */
30989  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
30990 
30991  /* "View.MemoryView":1222
30992  * cdef size_t size = slice_get_size(src, ndim)
30993  *
30994  * result = malloc(size) # <<<<<<<<<<<<<<
30995  * if not result:
30996  * _err(MemoryError, NULL)
30997  */
30998  __pyx_v_result = malloc(__pyx_v_size);
30999 
31000  /* "View.MemoryView":1223
31001  *
31002  * result = malloc(size)
31003  * if not result: # <<<<<<<<<<<<<<
31004  * _err(MemoryError, NULL)
31005  *
31006  */
31007  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
31008  if (__pyx_t_2) {
31009 
31010  /* "View.MemoryView":1224
31011  * result = malloc(size)
31012  * if not result:
31013  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
31014  *
31015  *
31016  */
31017  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1224, __pyx_L1_error)
31018 
31019  /* "View.MemoryView":1223
31020  *
31021  * result = malloc(size)
31022  * if not result: # <<<<<<<<<<<<<<
31023  * _err(MemoryError, NULL)
31024  *
31025  */
31026  }
31027 
31028  /* "View.MemoryView":1227
31029  *
31030  *
31031  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
31032  * tmpslice.memview = src.memview
31033  * for i in range(ndim):
31034  */
31035  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
31036 
31037  /* "View.MemoryView":1228
31038  *
31039  * tmpslice.data = <char *> result
31040  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
31041  * for i in range(ndim):
31042  * tmpslice.shape[i] = src.shape[i]
31043  */
31044  __pyx_t_4 = __pyx_v_src->memview;
31045  __pyx_v_tmpslice->memview = __pyx_t_4;
31046 
31047  /* "View.MemoryView":1229
31048  * tmpslice.data = <char *> result
31049  * tmpslice.memview = src.memview
31050  * for i in range(ndim): # <<<<<<<<<<<<<<
31051  * tmpslice.shape[i] = src.shape[i]
31052  * tmpslice.suboffsets[i] = -1
31053  */
31054  __pyx_t_3 = __pyx_v_ndim;
31055  __pyx_t_5 = __pyx_t_3;
31056  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31057  __pyx_v_i = __pyx_t_6;
31058 
31059  /* "View.MemoryView":1230
31060  * tmpslice.memview = src.memview
31061  * for i in range(ndim):
31062  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
31063  * tmpslice.suboffsets[i] = -1
31064  *
31065  */
31066  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
31067 
31068  /* "View.MemoryView":1231
31069  * for i in range(ndim):
31070  * tmpslice.shape[i] = src.shape[i]
31071  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
31072  *
31073  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
31074  */
31075  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
31076  }
31077 
31078  /* "View.MemoryView":1233
31079  * tmpslice.suboffsets[i] = -1
31080  *
31081  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
31082  * ndim, order)
31083  *
31084  */
31085  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
31086 
31087  /* "View.MemoryView":1237
31088  *
31089  *
31090  * for i in range(ndim): # <<<<<<<<<<<<<<
31091  * if tmpslice.shape[i] == 1:
31092  * tmpslice.strides[i] = 0
31093  */
31094  __pyx_t_3 = __pyx_v_ndim;
31095  __pyx_t_5 = __pyx_t_3;
31096  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31097  __pyx_v_i = __pyx_t_6;
31098 
31099  /* "View.MemoryView":1238
31100  *
31101  * for i in range(ndim):
31102  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
31103  * tmpslice.strides[i] = 0
31104  *
31105  */
31106  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
31107  if (__pyx_t_2) {
31108 
31109  /* "View.MemoryView":1239
31110  * for i in range(ndim):
31111  * if tmpslice.shape[i] == 1:
31112  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
31113  *
31114  * if slice_is_contig(src[0], order, ndim):
31115  */
31116  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
31117 
31118  /* "View.MemoryView":1238
31119  *
31120  * for i in range(ndim):
31121  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
31122  * tmpslice.strides[i] = 0
31123  *
31124  */
31125  }
31126  }
31127 
31128  /* "View.MemoryView":1241
31129  * tmpslice.strides[i] = 0
31130  *
31131  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
31132  * memcpy(result, src.data, size)
31133  * else:
31134  */
31135  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
31136  if (__pyx_t_2) {
31137 
31138  /* "View.MemoryView":1242
31139  *
31140  * if slice_is_contig(src[0], order, ndim):
31141  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
31142  * else:
31143  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
31144  */
31145  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
31146 
31147  /* "View.MemoryView":1241
31148  * tmpslice.strides[i] = 0
31149  *
31150  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
31151  * memcpy(result, src.data, size)
31152  * else:
31153  */
31154  goto __pyx_L9;
31155  }
31156 
31157  /* "View.MemoryView":1244
31158  * memcpy(result, src.data, size)
31159  * else:
31160  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
31161  *
31162  * return result
31163  */
31164  /*else*/ {
31165  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
31166  }
31167  __pyx_L9:;
31168 
31169  /* "View.MemoryView":1246
31170  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
31171  *
31172  * return result # <<<<<<<<<<<<<<
31173  *
31174  *
31175  */
31176  __pyx_r = __pyx_v_result;
31177  goto __pyx_L0;
31178 
31179  /* "View.MemoryView":1208
31180  *
31181  * @cname('__pyx_memoryview_copy_data_to_temp')
31182  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31183  * __Pyx_memviewslice *tmpslice,
31184  * char order,
31185  */
31186 
31187  /* function exit code */
31188  __pyx_L1_error:;
31189  {
31190  #ifdef WITH_THREAD
31191  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31192  #endif
31193  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
31194  #ifdef WITH_THREAD
31195  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31196  #endif
31197  }
31198  __pyx_r = NULL;
31199  __pyx_L0:;
31200  return __pyx_r;
31201 }
31202 
31203 /* "View.MemoryView":1251
31204  *
31205  * @cname('__pyx_memoryview_err_extents')
31206  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
31207  * Py_ssize_t extent2) except -1 with gil:
31208  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31209  */
31210 
31211 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
31212  int __pyx_r;
31213  __Pyx_RefNannyDeclarations
31214  PyObject *__pyx_t_1 = NULL;
31215  PyObject *__pyx_t_2 = NULL;
31216  PyObject *__pyx_t_3 = NULL;
31217  PyObject *__pyx_t_4 = NULL;
31218  int __pyx_lineno = 0;
31219  const char *__pyx_filename = NULL;
31220  int __pyx_clineno = 0;
31221  #ifdef WITH_THREAD
31222  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31223  #endif
31224  __Pyx_RefNannySetupContext("_err_extents", 0);
31225 
31226  /* "View.MemoryView":1254
31227  * Py_ssize_t extent2) except -1 with gil:
31228  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31229  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
31230  *
31231  * @cname('__pyx_memoryview_err_dim')
31232  */
31233  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
31234  __Pyx_GOTREF(__pyx_t_1);
31235  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
31236  __Pyx_GOTREF(__pyx_t_2);
31237  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
31238  __Pyx_GOTREF(__pyx_t_3);
31239  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
31240  __Pyx_GOTREF(__pyx_t_4);
31241  __Pyx_GIVEREF(__pyx_t_1);
31242  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
31243  __Pyx_GIVEREF(__pyx_t_2);
31244  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
31245  __Pyx_GIVEREF(__pyx_t_3);
31246  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
31247  __pyx_t_1 = 0;
31248  __pyx_t_2 = 0;
31249  __pyx_t_3 = 0;
31250 
31251  /* "View.MemoryView":1253
31252  * cdef int _err_extents(int i, Py_ssize_t extent1,
31253  * Py_ssize_t extent2) except -1 with gil:
31254  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
31255  * (i, extent1, extent2))
31256  *
31257  */
31258  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
31259  __Pyx_GOTREF(__pyx_t_3);
31260  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31261  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error)
31262  __Pyx_GOTREF(__pyx_t_4);
31263  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31264  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
31265  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31266  __PYX_ERR(0, 1253, __pyx_L1_error)
31267 
31268  /* "View.MemoryView":1251
31269  *
31270  * @cname('__pyx_memoryview_err_extents')
31271  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
31272  * Py_ssize_t extent2) except -1 with gil:
31273  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31274  */
31275 
31276  /* function exit code */
31277  __pyx_L1_error:;
31278  __Pyx_XDECREF(__pyx_t_1);
31279  __Pyx_XDECREF(__pyx_t_2);
31280  __Pyx_XDECREF(__pyx_t_3);
31281  __Pyx_XDECREF(__pyx_t_4);
31282  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
31283  __pyx_r = -1;
31284  __Pyx_RefNannyFinishContext();
31285  #ifdef WITH_THREAD
31286  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31287  #endif
31288  return __pyx_r;
31289 }
31290 
31291 /* "View.MemoryView":1257
31292  *
31293  * @cname('__pyx_memoryview_err_dim')
31294  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
31295  * raise error(msg.decode('ascii') % dim)
31296  *
31297  */
31298 
31299 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
31300  int __pyx_r;
31301  __Pyx_RefNannyDeclarations
31302  PyObject *__pyx_t_1 = NULL;
31303  PyObject *__pyx_t_2 = NULL;
31304  PyObject *__pyx_t_3 = NULL;
31305  PyObject *__pyx_t_4 = NULL;
31306  int __pyx_lineno = 0;
31307  const char *__pyx_filename = NULL;
31308  int __pyx_clineno = 0;
31309  #ifdef WITH_THREAD
31310  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31311  #endif
31312  __Pyx_RefNannySetupContext("_err_dim", 0);
31313  __Pyx_INCREF(__pyx_v_error);
31314 
31315  /* "View.MemoryView":1258
31316  * @cname('__pyx_memoryview_err_dim')
31317  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
31318  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
31319  *
31320  * @cname('__pyx_memoryview_err')
31321  */
31322  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
31323  __Pyx_GOTREF(__pyx_t_2);
31324  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
31325  __Pyx_GOTREF(__pyx_t_3);
31326  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
31327  __Pyx_GOTREF(__pyx_t_4);
31328  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31329  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31330  __Pyx_INCREF(__pyx_v_error);
31331  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
31332  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
31333  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
31334  if (likely(__pyx_t_2)) {
31335  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
31336  __Pyx_INCREF(__pyx_t_2);
31337  __Pyx_INCREF(function);
31338  __Pyx_DECREF_SET(__pyx_t_3, function);
31339  }
31340  }
31341  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
31342  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
31343  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31344  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
31345  __Pyx_GOTREF(__pyx_t_1);
31346  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31347  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
31348  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31349  __PYX_ERR(0, 1258, __pyx_L1_error)
31350 
31351  /* "View.MemoryView":1257
31352  *
31353  * @cname('__pyx_memoryview_err_dim')
31354  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
31355  * raise error(msg.decode('ascii') % dim)
31356  *
31357  */
31358 
31359  /* function exit code */
31360  __pyx_L1_error:;
31361  __Pyx_XDECREF(__pyx_t_1);
31362  __Pyx_XDECREF(__pyx_t_2);
31363  __Pyx_XDECREF(__pyx_t_3);
31364  __Pyx_XDECREF(__pyx_t_4);
31365  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
31366  __pyx_r = -1;
31367  __Pyx_XDECREF(__pyx_v_error);
31368  __Pyx_RefNannyFinishContext();
31369  #ifdef WITH_THREAD
31370  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31371  #endif
31372  return __pyx_r;
31373 }
31374 
31375 /* "View.MemoryView":1261
31376  *
31377  * @cname('__pyx_memoryview_err')
31378  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
31379  * if msg != NULL:
31380  * raise error(msg.decode('ascii'))
31381  */
31382 
31383 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
31384  int __pyx_r;
31385  __Pyx_RefNannyDeclarations
31386  int __pyx_t_1;
31387  PyObject *__pyx_t_2 = NULL;
31388  PyObject *__pyx_t_3 = NULL;
31389  PyObject *__pyx_t_4 = NULL;
31390  PyObject *__pyx_t_5 = NULL;
31391  int __pyx_lineno = 0;
31392  const char *__pyx_filename = NULL;
31393  int __pyx_clineno = 0;
31394  #ifdef WITH_THREAD
31395  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31396  #endif
31397  __Pyx_RefNannySetupContext("_err", 0);
31398  __Pyx_INCREF(__pyx_v_error);
31399 
31400  /* "View.MemoryView":1262
31401  * @cname('__pyx_memoryview_err')
31402  * cdef int _err(object error, char *msg) except -1 with gil:
31403  * if msg != NULL: # <<<<<<<<<<<<<<
31404  * raise error(msg.decode('ascii'))
31405  * else:
31406  */
31407  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
31408  if (unlikely(__pyx_t_1)) {
31409 
31410  /* "View.MemoryView":1263
31411  * cdef int _err(object error, char *msg) except -1 with gil:
31412  * if msg != NULL:
31413  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
31414  * else:
31415  * raise error
31416  */
31417  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
31418  __Pyx_GOTREF(__pyx_t_3);
31419  __Pyx_INCREF(__pyx_v_error);
31420  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
31421  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
31422  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
31423  if (likely(__pyx_t_5)) {
31424  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
31425  __Pyx_INCREF(__pyx_t_5);
31426  __Pyx_INCREF(function);
31427  __Pyx_DECREF_SET(__pyx_t_4, function);
31428  }
31429  }
31430  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
31431  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
31432  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31433  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error)
31434  __Pyx_GOTREF(__pyx_t_2);
31435  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31436  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
31437  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31438  __PYX_ERR(0, 1263, __pyx_L1_error)
31439 
31440  /* "View.MemoryView":1262
31441  * @cname('__pyx_memoryview_err')
31442  * cdef int _err(object error, char *msg) except -1 with gil:
31443  * if msg != NULL: # <<<<<<<<<<<<<<
31444  * raise error(msg.decode('ascii'))
31445  * else:
31446  */
31447  }
31448 
31449  /* "View.MemoryView":1265
31450  * raise error(msg.decode('ascii'))
31451  * else:
31452  * raise error # <<<<<<<<<<<<<<
31453  *
31454  * @cname('__pyx_memoryview_copy_contents')
31455  */
31456  /*else*/ {
31457  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
31458  __PYX_ERR(0, 1265, __pyx_L1_error)
31459  }
31460 
31461  /* "View.MemoryView":1261
31462  *
31463  * @cname('__pyx_memoryview_err')
31464  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
31465  * if msg != NULL:
31466  * raise error(msg.decode('ascii'))
31467  */
31468 
31469  /* function exit code */
31470  __pyx_L1_error:;
31471  __Pyx_XDECREF(__pyx_t_2);
31472  __Pyx_XDECREF(__pyx_t_3);
31473  __Pyx_XDECREF(__pyx_t_4);
31474  __Pyx_XDECREF(__pyx_t_5);
31475  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
31476  __pyx_r = -1;
31477  __Pyx_XDECREF(__pyx_v_error);
31478  __Pyx_RefNannyFinishContext();
31479  #ifdef WITH_THREAD
31480  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31481  #endif
31482  return __pyx_r;
31483 }
31484 
31485 /* "View.MemoryView":1268
31486  *
31487  * @cname('__pyx_memoryview_copy_contents')
31488  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
31489  * __Pyx_memviewslice dst,
31490  * int src_ndim, int dst_ndim,
31491  */
31492 
31493 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
31494  void *__pyx_v_tmpdata;
31495  size_t __pyx_v_itemsize;
31496  int __pyx_v_i;
31497  char __pyx_v_order;
31498  int __pyx_v_broadcasting;
31499  int __pyx_v_direct_copy;
31500  __Pyx_memviewslice __pyx_v_tmp;
31501  int __pyx_v_ndim;
31502  int __pyx_r;
31503  Py_ssize_t __pyx_t_1;
31504  int __pyx_t_2;
31505  int __pyx_t_3;
31506  int __pyx_t_4;
31507  int __pyx_t_5;
31508  int __pyx_t_6;
31509  void *__pyx_t_7;
31510  int __pyx_t_8;
31511  int __pyx_lineno = 0;
31512  const char *__pyx_filename = NULL;
31513  int __pyx_clineno = 0;
31514 
31515  /* "View.MemoryView":1276
31516  * Check for overlapping memory and verify the shapes.
31517  * """
31518  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
31519  * cdef size_t itemsize = src.memview.view.itemsize
31520  * cdef int i
31521  */
31522  __pyx_v_tmpdata = NULL;
31523 
31524  /* "View.MemoryView":1277
31525  * """
31526  * cdef void *tmpdata = NULL
31527  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
31528  * cdef int i
31529  * cdef char order = get_best_order(&src, src_ndim)
31530  */
31531  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
31532  __pyx_v_itemsize = __pyx_t_1;
31533 
31534  /* "View.MemoryView":1279
31535  * cdef size_t itemsize = src.memview.view.itemsize
31536  * cdef int i
31537  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
31538  * cdef bint broadcasting = False
31539  * cdef bint direct_copy = False
31540  */
31541  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
31542 
31543  /* "View.MemoryView":1280
31544  * cdef int i
31545  * cdef char order = get_best_order(&src, src_ndim)
31546  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
31547  * cdef bint direct_copy = False
31548  * cdef __Pyx_memviewslice tmp
31549  */
31550  __pyx_v_broadcasting = 0;
31551 
31552  /* "View.MemoryView":1281
31553  * cdef char order = get_best_order(&src, src_ndim)
31554  * cdef bint broadcasting = False
31555  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
31556  * cdef __Pyx_memviewslice tmp
31557  *
31558  */
31559  __pyx_v_direct_copy = 0;
31560 
31561  /* "View.MemoryView":1284
31562  * cdef __Pyx_memviewslice tmp
31563  *
31564  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
31565  * broadcast_leading(&src, src_ndim, dst_ndim)
31566  * elif dst_ndim < src_ndim:
31567  */
31568  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
31569  if (__pyx_t_2) {
31570 
31571  /* "View.MemoryView":1285
31572  *
31573  * if src_ndim < dst_ndim:
31574  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
31575  * elif dst_ndim < src_ndim:
31576  * broadcast_leading(&dst, dst_ndim, src_ndim)
31577  */
31578  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
31579 
31580  /* "View.MemoryView":1284
31581  * cdef __Pyx_memviewslice tmp
31582  *
31583  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
31584  * broadcast_leading(&src, src_ndim, dst_ndim)
31585  * elif dst_ndim < src_ndim:
31586  */
31587  goto __pyx_L3;
31588  }
31589 
31590  /* "View.MemoryView":1286
31591  * if src_ndim < dst_ndim:
31592  * broadcast_leading(&src, src_ndim, dst_ndim)
31593  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
31594  * broadcast_leading(&dst, dst_ndim, src_ndim)
31595  *
31596  */
31597  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
31598  if (__pyx_t_2) {
31599 
31600  /* "View.MemoryView":1287
31601  * broadcast_leading(&src, src_ndim, dst_ndim)
31602  * elif dst_ndim < src_ndim:
31603  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
31604  *
31605  * cdef int ndim = max(src_ndim, dst_ndim)
31606  */
31607  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
31608 
31609  /* "View.MemoryView":1286
31610  * if src_ndim < dst_ndim:
31611  * broadcast_leading(&src, src_ndim, dst_ndim)
31612  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
31613  * broadcast_leading(&dst, dst_ndim, src_ndim)
31614  *
31615  */
31616  }
31617  __pyx_L3:;
31618 
31619  /* "View.MemoryView":1289
31620  * broadcast_leading(&dst, dst_ndim, src_ndim)
31621  *
31622  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
31623  *
31624  * for i in range(ndim):
31625  */
31626  __pyx_t_3 = __pyx_v_dst_ndim;
31627  __pyx_t_4 = __pyx_v_src_ndim;
31628  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
31629  __pyx_t_5 = __pyx_t_3;
31630  } else {
31631  __pyx_t_5 = __pyx_t_4;
31632  }
31633  __pyx_v_ndim = __pyx_t_5;
31634 
31635  /* "View.MemoryView":1291
31636  * cdef int ndim = max(src_ndim, dst_ndim)
31637  *
31638  * for i in range(ndim): # <<<<<<<<<<<<<<
31639  * if src.shape[i] != dst.shape[i]:
31640  * if src.shape[i] == 1:
31641  */
31642  __pyx_t_5 = __pyx_v_ndim;
31643  __pyx_t_3 = __pyx_t_5;
31644  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31645  __pyx_v_i = __pyx_t_4;
31646 
31647  /* "View.MemoryView":1292
31648  *
31649  * for i in range(ndim):
31650  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
31651  * if src.shape[i] == 1:
31652  * broadcasting = True
31653  */
31654  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
31655  if (__pyx_t_2) {
31656 
31657  /* "View.MemoryView":1293
31658  * for i in range(ndim):
31659  * if src.shape[i] != dst.shape[i]:
31660  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
31661  * broadcasting = True
31662  * src.strides[i] = 0
31663  */
31664  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
31665  if (__pyx_t_2) {
31666 
31667  /* "View.MemoryView":1294
31668  * if src.shape[i] != dst.shape[i]:
31669  * if src.shape[i] == 1:
31670  * broadcasting = True # <<<<<<<<<<<<<<
31671  * src.strides[i] = 0
31672  * else:
31673  */
31674  __pyx_v_broadcasting = 1;
31675 
31676  /* "View.MemoryView":1295
31677  * if src.shape[i] == 1:
31678  * broadcasting = True
31679  * src.strides[i] = 0 # <<<<<<<<<<<<<<
31680  * else:
31681  * _err_extents(i, dst.shape[i], src.shape[i])
31682  */
31683  (__pyx_v_src.strides[__pyx_v_i]) = 0;
31684 
31685  /* "View.MemoryView":1293
31686  * for i in range(ndim):
31687  * if src.shape[i] != dst.shape[i]:
31688  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
31689  * broadcasting = True
31690  * src.strides[i] = 0
31691  */
31692  goto __pyx_L7;
31693  }
31694 
31695  /* "View.MemoryView":1297
31696  * src.strides[i] = 0
31697  * else:
31698  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
31699  *
31700  * if src.suboffsets[i] >= 0:
31701  */
31702  /*else*/ {
31703  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error)
31704  }
31705  __pyx_L7:;
31706 
31707  /* "View.MemoryView":1292
31708  *
31709  * for i in range(ndim):
31710  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
31711  * if src.shape[i] == 1:
31712  * broadcasting = True
31713  */
31714  }
31715 
31716  /* "View.MemoryView":1299
31717  * _err_extents(i, dst.shape[i], src.shape[i])
31718  *
31719  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
31720  * _err_dim(ValueError, "Dimension %d is not direct", i)
31721  *
31722  */
31723  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
31724  if (__pyx_t_2) {
31725 
31726  /* "View.MemoryView":1300
31727  *
31728  * if src.suboffsets[i] >= 0:
31729  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
31730  *
31731  * if slices_overlap(&src, &dst, ndim, itemsize):
31732  */
31733  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1300, __pyx_L1_error)
31734 
31735  /* "View.MemoryView":1299
31736  * _err_extents(i, dst.shape[i], src.shape[i])
31737  *
31738  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
31739  * _err_dim(ValueError, "Dimension %d is not direct", i)
31740  *
31741  */
31742  }
31743  }
31744 
31745  /* "View.MemoryView":1302
31746  * _err_dim(ValueError, "Dimension %d is not direct", i)
31747  *
31748  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
31749  *
31750  * if not slice_is_contig(src, order, ndim):
31751  */
31752  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
31753  if (__pyx_t_2) {
31754 
31755  /* "View.MemoryView":1304
31756  * if slices_overlap(&src, &dst, ndim, itemsize):
31757  *
31758  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
31759  * order = get_best_order(&dst, ndim)
31760  *
31761  */
31762  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
31763  if (__pyx_t_2) {
31764 
31765  /* "View.MemoryView":1305
31766  *
31767  * if not slice_is_contig(src, order, ndim):
31768  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
31769  *
31770  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
31771  */
31772  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
31773 
31774  /* "View.MemoryView":1304
31775  * if slices_overlap(&src, &dst, ndim, itemsize):
31776  *
31777  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
31778  * order = get_best_order(&dst, ndim)
31779  *
31780  */
31781  }
31782 
31783  /* "View.MemoryView":1307
31784  * order = get_best_order(&dst, ndim)
31785  *
31786  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
31787  * src = tmp
31788  *
31789  */
31790  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1307, __pyx_L1_error)
31791  __pyx_v_tmpdata = __pyx_t_7;
31792 
31793  /* "View.MemoryView":1308
31794  *
31795  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
31796  * src = tmp # <<<<<<<<<<<<<<
31797  *
31798  * if not broadcasting:
31799  */
31800  __pyx_v_src = __pyx_v_tmp;
31801 
31802  /* "View.MemoryView":1302
31803  * _err_dim(ValueError, "Dimension %d is not direct", i)
31804  *
31805  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
31806  *
31807  * if not slice_is_contig(src, order, ndim):
31808  */
31809  }
31810 
31811  /* "View.MemoryView":1310
31812  * src = tmp
31813  *
31814  * if not broadcasting: # <<<<<<<<<<<<<<
31815  *
31816  *
31817  */
31818  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
31819  if (__pyx_t_2) {
31820 
31821  /* "View.MemoryView":1313
31822  *
31823  *
31824  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
31825  * direct_copy = slice_is_contig(dst, 'C', ndim)
31826  * elif slice_is_contig(src, 'F', ndim):
31827  */
31828  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
31829  if (__pyx_t_2) {
31830 
31831  /* "View.MemoryView":1314
31832  *
31833  * if slice_is_contig(src, 'C', ndim):
31834  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
31835  * elif slice_is_contig(src, 'F', ndim):
31836  * direct_copy = slice_is_contig(dst, 'F', ndim)
31837  */
31838  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
31839 
31840  /* "View.MemoryView":1313
31841  *
31842  *
31843  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
31844  * direct_copy = slice_is_contig(dst, 'C', ndim)
31845  * elif slice_is_contig(src, 'F', ndim):
31846  */
31847  goto __pyx_L12;
31848  }
31849 
31850  /* "View.MemoryView":1315
31851  * if slice_is_contig(src, 'C', ndim):
31852  * direct_copy = slice_is_contig(dst, 'C', ndim)
31853  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
31854  * direct_copy = slice_is_contig(dst, 'F', ndim)
31855  *
31856  */
31857  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
31858  if (__pyx_t_2) {
31859 
31860  /* "View.MemoryView":1316
31861  * direct_copy = slice_is_contig(dst, 'C', ndim)
31862  * elif slice_is_contig(src, 'F', ndim):
31863  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
31864  *
31865  * if direct_copy:
31866  */
31867  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
31868 
31869  /* "View.MemoryView":1315
31870  * if slice_is_contig(src, 'C', ndim):
31871  * direct_copy = slice_is_contig(dst, 'C', ndim)
31872  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
31873  * direct_copy = slice_is_contig(dst, 'F', ndim)
31874  *
31875  */
31876  }
31877  __pyx_L12:;
31878 
31879  /* "View.MemoryView":1318
31880  * direct_copy = slice_is_contig(dst, 'F', ndim)
31881  *
31882  * if direct_copy: # <<<<<<<<<<<<<<
31883  *
31884  * refcount_copying(&dst, dtype_is_object, ndim, False)
31885  */
31886  __pyx_t_2 = (__pyx_v_direct_copy != 0);
31887  if (__pyx_t_2) {
31888 
31889  /* "View.MemoryView":1320
31890  * if direct_copy:
31891  *
31892  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
31893  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
31894  * refcount_copying(&dst, dtype_is_object, ndim, True)
31895  */
31896  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
31897 
31898  /* "View.MemoryView":1321
31899  *
31900  * refcount_copying(&dst, dtype_is_object, ndim, False)
31901  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
31902  * refcount_copying(&dst, dtype_is_object, ndim, True)
31903  * free(tmpdata)
31904  */
31905  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
31906 
31907  /* "View.MemoryView":1322
31908  * refcount_copying(&dst, dtype_is_object, ndim, False)
31909  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
31910  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
31911  * free(tmpdata)
31912  * return 0
31913  */
31914  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
31915 
31916  /* "View.MemoryView":1323
31917  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
31918  * refcount_copying(&dst, dtype_is_object, ndim, True)
31919  * free(tmpdata) # <<<<<<<<<<<<<<
31920  * return 0
31921  *
31922  */
31923  free(__pyx_v_tmpdata);
31924 
31925  /* "View.MemoryView":1324
31926  * refcount_copying(&dst, dtype_is_object, ndim, True)
31927  * free(tmpdata)
31928  * return 0 # <<<<<<<<<<<<<<
31929  *
31930  * if order == 'F' == get_best_order(&dst, ndim):
31931  */
31932  __pyx_r = 0;
31933  goto __pyx_L0;
31934 
31935  /* "View.MemoryView":1318
31936  * direct_copy = slice_is_contig(dst, 'F', ndim)
31937  *
31938  * if direct_copy: # <<<<<<<<<<<<<<
31939  *
31940  * refcount_copying(&dst, dtype_is_object, ndim, False)
31941  */
31942  }
31943 
31944  /* "View.MemoryView":1310
31945  * src = tmp
31946  *
31947  * if not broadcasting: # <<<<<<<<<<<<<<
31948  *
31949  *
31950  */
31951  }
31952 
31953  /* "View.MemoryView":1326
31954  * return 0
31955  *
31956  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
31957  *
31958  *
31959  */
31960  __pyx_t_2 = (__pyx_v_order == 'F');
31961  if (__pyx_t_2) {
31962  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
31963  }
31964  __pyx_t_8 = (__pyx_t_2 != 0);
31965  if (__pyx_t_8) {
31966 
31967  /* "View.MemoryView":1329
31968  *
31969  *
31970  * transpose_memslice(&src) # <<<<<<<<<<<<<<
31971  * transpose_memslice(&dst)
31972  *
31973  */
31974  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1329, __pyx_L1_error)
31975 
31976  /* "View.MemoryView":1330
31977  *
31978  * transpose_memslice(&src)
31979  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
31980  *
31981  * refcount_copying(&dst, dtype_is_object, ndim, False)
31982  */
31983  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1330, __pyx_L1_error)
31984 
31985  /* "View.MemoryView":1326
31986  * return 0
31987  *
31988  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
31989  *
31990  *
31991  */
31992  }
31993 
31994  /* "View.MemoryView":1332
31995  * transpose_memslice(&dst)
31996  *
31997  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
31998  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
31999  * refcount_copying(&dst, dtype_is_object, ndim, True)
32000  */
32001  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32002 
32003  /* "View.MemoryView":1333
32004  *
32005  * refcount_copying(&dst, dtype_is_object, ndim, False)
32006  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
32007  * refcount_copying(&dst, dtype_is_object, ndim, True)
32008  *
32009  */
32010  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
32011 
32012  /* "View.MemoryView":1334
32013  * refcount_copying(&dst, dtype_is_object, ndim, False)
32014  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
32015  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32016  *
32017  * free(tmpdata)
32018  */
32019  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32020 
32021  /* "View.MemoryView":1336
32022  * refcount_copying(&dst, dtype_is_object, ndim, True)
32023  *
32024  * free(tmpdata) # <<<<<<<<<<<<<<
32025  * return 0
32026  *
32027  */
32028  free(__pyx_v_tmpdata);
32029 
32030  /* "View.MemoryView":1337
32031  *
32032  * free(tmpdata)
32033  * return 0 # <<<<<<<<<<<<<<
32034  *
32035  * @cname('__pyx_memoryview_broadcast_leading')
32036  */
32037  __pyx_r = 0;
32038  goto __pyx_L0;
32039 
32040  /* "View.MemoryView":1268
32041  *
32042  * @cname('__pyx_memoryview_copy_contents')
32043  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
32044  * __Pyx_memviewslice dst,
32045  * int src_ndim, int dst_ndim,
32046  */
32047 
32048  /* function exit code */
32049  __pyx_L1_error:;
32050  {
32051  #ifdef WITH_THREAD
32052  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
32053  #endif
32054  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
32055  #ifdef WITH_THREAD
32056  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32057  #endif
32058  }
32059  __pyx_r = -1;
32060  __pyx_L0:;
32061  return __pyx_r;
32062 }
32063 
32064 /* "View.MemoryView":1340
32065  *
32066  * @cname('__pyx_memoryview_broadcast_leading')
32067  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
32068  * int ndim,
32069  * int ndim_other) nogil:
32070  */
32071 
32072 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
32073  int __pyx_v_i;
32074  int __pyx_v_offset;
32075  int __pyx_t_1;
32076  int __pyx_t_2;
32077  int __pyx_t_3;
32078 
32079  /* "View.MemoryView":1344
32080  * int ndim_other) nogil:
32081  * cdef int i
32082  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
32083  *
32084  * for i in range(ndim - 1, -1, -1):
32085  */
32086  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
32087 
32088  /* "View.MemoryView":1346
32089  * cdef int offset = ndim_other - ndim
32090  *
32091  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
32092  * mslice.shape[i + offset] = mslice.shape[i]
32093  * mslice.strides[i + offset] = mslice.strides[i]
32094  */
32095  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
32096  __pyx_v_i = __pyx_t_1;
32097 
32098  /* "View.MemoryView":1347
32099  *
32100  * for i in range(ndim - 1, -1, -1):
32101  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
32102  * mslice.strides[i + offset] = mslice.strides[i]
32103  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32104  */
32105  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
32106 
32107  /* "View.MemoryView":1348
32108  * for i in range(ndim - 1, -1, -1):
32109  * mslice.shape[i + offset] = mslice.shape[i]
32110  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
32111  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32112  *
32113  */
32114  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
32115 
32116  /* "View.MemoryView":1349
32117  * mslice.shape[i + offset] = mslice.shape[i]
32118  * mslice.strides[i + offset] = mslice.strides[i]
32119  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
32120  *
32121  * for i in range(offset):
32122  */
32123  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
32124  }
32125 
32126  /* "View.MemoryView":1351
32127  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32128  *
32129  * for i in range(offset): # <<<<<<<<<<<<<<
32130  * mslice.shape[i] = 1
32131  * mslice.strides[i] = mslice.strides[0]
32132  */
32133  __pyx_t_1 = __pyx_v_offset;
32134  __pyx_t_2 = __pyx_t_1;
32135  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
32136  __pyx_v_i = __pyx_t_3;
32137 
32138  /* "View.MemoryView":1352
32139  *
32140  * for i in range(offset):
32141  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
32142  * mslice.strides[i] = mslice.strides[0]
32143  * mslice.suboffsets[i] = -1
32144  */
32145  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
32146 
32147  /* "View.MemoryView":1353
32148  * for i in range(offset):
32149  * mslice.shape[i] = 1
32150  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
32151  * mslice.suboffsets[i] = -1
32152  *
32153  */
32154  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
32155 
32156  /* "View.MemoryView":1354
32157  * mslice.shape[i] = 1
32158  * mslice.strides[i] = mslice.strides[0]
32159  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
32160  *
32161  *
32162  */
32163  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
32164  }
32165 
32166  /* "View.MemoryView":1340
32167  *
32168  * @cname('__pyx_memoryview_broadcast_leading')
32169  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
32170  * int ndim,
32171  * int ndim_other) nogil:
32172  */
32173 
32174  /* function exit code */
32175 }
32176 
32177 /* "View.MemoryView":1362
32178  *
32179  * @cname('__pyx_memoryview_refcount_copying')
32180  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
32181  * int ndim, bint inc) nogil:
32182  *
32183  */
32184 
32185 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
32186  int __pyx_t_1;
32187 
32188  /* "View.MemoryView":1366
32189  *
32190  *
32191  * if dtype_is_object: # <<<<<<<<<<<<<<
32192  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
32193  * dst.strides, ndim, inc)
32194  */
32195  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
32196  if (__pyx_t_1) {
32197 
32198  /* "View.MemoryView":1367
32199  *
32200  * if dtype_is_object:
32201  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
32202  * dst.strides, ndim, inc)
32203  *
32204  */
32205  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
32206 
32207  /* "View.MemoryView":1366
32208  *
32209  *
32210  * if dtype_is_object: # <<<<<<<<<<<<<<
32211  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
32212  * dst.strides, ndim, inc)
32213  */
32214  }
32215 
32216  /* "View.MemoryView":1362
32217  *
32218  * @cname('__pyx_memoryview_refcount_copying')
32219  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
32220  * int ndim, bint inc) nogil:
32221  *
32222  */
32223 
32224  /* function exit code */
32225 }
32226 
32227 /* "View.MemoryView":1371
32228  *
32229  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
32230  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32231  * Py_ssize_t *strides, int ndim,
32232  * bint inc) with gil:
32233  */
32234 
32235 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
32236  __Pyx_RefNannyDeclarations
32237  #ifdef WITH_THREAD
32238  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
32239  #endif
32240  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
32241 
32242  /* "View.MemoryView":1374
32243  * Py_ssize_t *strides, int ndim,
32244  * bint inc) with gil:
32245  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
32246  *
32247  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32248  */
32249  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
32250 
32251  /* "View.MemoryView":1371
32252  *
32253  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
32254  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32255  * Py_ssize_t *strides, int ndim,
32256  * bint inc) with gil:
32257  */
32258 
32259  /* function exit code */
32260  __Pyx_RefNannyFinishContext();
32261  #ifdef WITH_THREAD
32262  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32263  #endif
32264 }
32265 
32266 /* "View.MemoryView":1377
32267  *
32268  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32269  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32270  * Py_ssize_t *strides, int ndim, bint inc):
32271  * cdef Py_ssize_t i
32272  */
32273 
32274 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
32275  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
32276  __Pyx_RefNannyDeclarations
32277  Py_ssize_t __pyx_t_1;
32278  Py_ssize_t __pyx_t_2;
32279  Py_ssize_t __pyx_t_3;
32280  int __pyx_t_4;
32281  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
32282 
32283  /* "View.MemoryView":1381
32284  * cdef Py_ssize_t i
32285  *
32286  * for i in range(shape[0]): # <<<<<<<<<<<<<<
32287  * if ndim == 1:
32288  * if inc:
32289  */
32290  __pyx_t_1 = (__pyx_v_shape[0]);
32291  __pyx_t_2 = __pyx_t_1;
32292  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
32293  __pyx_v_i = __pyx_t_3;
32294 
32295  /* "View.MemoryView":1382
32296  *
32297  * for i in range(shape[0]):
32298  * if ndim == 1: # <<<<<<<<<<<<<<
32299  * if inc:
32300  * Py_INCREF((<PyObject **> data)[0])
32301  */
32302  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
32303  if (__pyx_t_4) {
32304 
32305  /* "View.MemoryView":1383
32306  * for i in range(shape[0]):
32307  * if ndim == 1:
32308  * if inc: # <<<<<<<<<<<<<<
32309  * Py_INCREF((<PyObject **> data)[0])
32310  * else:
32311  */
32312  __pyx_t_4 = (__pyx_v_inc != 0);
32313  if (__pyx_t_4) {
32314 
32315  /* "View.MemoryView":1384
32316  * if ndim == 1:
32317  * if inc:
32318  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
32319  * else:
32320  * Py_DECREF((<PyObject **> data)[0])
32321  */
32322  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
32323 
32324  /* "View.MemoryView":1383
32325  * for i in range(shape[0]):
32326  * if ndim == 1:
32327  * if inc: # <<<<<<<<<<<<<<
32328  * Py_INCREF((<PyObject **> data)[0])
32329  * else:
32330  */
32331  goto __pyx_L6;
32332  }
32333 
32334  /* "View.MemoryView":1386
32335  * Py_INCREF((<PyObject **> data)[0])
32336  * else:
32337  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
32338  * else:
32339  * refcount_objects_in_slice(data, shape + 1, strides + 1,
32340  */
32341  /*else*/ {
32342  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
32343  }
32344  __pyx_L6:;
32345 
32346  /* "View.MemoryView":1382
32347  *
32348  * for i in range(shape[0]):
32349  * if ndim == 1: # <<<<<<<<<<<<<<
32350  * if inc:
32351  * Py_INCREF((<PyObject **> data)[0])
32352  */
32353  goto __pyx_L5;
32354  }
32355 
32356  /* "View.MemoryView":1388
32357  * Py_DECREF((<PyObject **> data)[0])
32358  * else:
32359  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
32360  * ndim - 1, inc)
32361  *
32362  */
32363  /*else*/ {
32364 
32365  /* "View.MemoryView":1389
32366  * else:
32367  * refcount_objects_in_slice(data, shape + 1, strides + 1,
32368  * ndim - 1, inc) # <<<<<<<<<<<<<<
32369  *
32370  * data += strides[0]
32371  */
32372  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
32373  }
32374  __pyx_L5:;
32375 
32376  /* "View.MemoryView":1391
32377  * ndim - 1, inc)
32378  *
32379  * data += strides[0] # <<<<<<<<<<<<<<
32380  *
32381  *
32382  */
32383  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
32384  }
32385 
32386  /* "View.MemoryView":1377
32387  *
32388  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32389  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32390  * Py_ssize_t *strides, int ndim, bint inc):
32391  * cdef Py_ssize_t i
32392  */
32393 
32394  /* function exit code */
32395  __Pyx_RefNannyFinishContext();
32396 }
32397 
32398 /* "View.MemoryView":1397
32399  *
32400  * @cname('__pyx_memoryview_slice_assign_scalar')
32401  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
32402  * size_t itemsize, void *item,
32403  * bint dtype_is_object) nogil:
32404  */
32405 
32406 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
32407 
32408  /* "View.MemoryView":1400
32409  * size_t itemsize, void *item,
32410  * bint dtype_is_object) nogil:
32411  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
32412  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
32413  * itemsize, item)
32414  */
32415  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32416 
32417  /* "View.MemoryView":1401
32418  * bint dtype_is_object) nogil:
32419  * refcount_copying(dst, dtype_is_object, ndim, False)
32420  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
32421  * itemsize, item)
32422  * refcount_copying(dst, dtype_is_object, ndim, True)
32423  */
32424  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
32425 
32426  /* "View.MemoryView":1403
32427  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
32428  * itemsize, item)
32429  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32430  *
32431  *
32432  */
32433  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32434 
32435  /* "View.MemoryView":1397
32436  *
32437  * @cname('__pyx_memoryview_slice_assign_scalar')
32438  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
32439  * size_t itemsize, void *item,
32440  * bint dtype_is_object) nogil:
32441  */
32442 
32443  /* function exit code */
32444 }
32445 
32446 /* "View.MemoryView":1407
32447  *
32448  * @cname('__pyx_memoryview__slice_assign_scalar')
32449  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32450  * Py_ssize_t *strides, int ndim,
32451  * size_t itemsize, void *item) nogil:
32452  */
32453 
32454 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
32455  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
32456  Py_ssize_t __pyx_v_stride;
32457  Py_ssize_t __pyx_v_extent;
32458  int __pyx_t_1;
32459  Py_ssize_t __pyx_t_2;
32460  Py_ssize_t __pyx_t_3;
32461  Py_ssize_t __pyx_t_4;
32462 
32463  /* "View.MemoryView":1411
32464  * size_t itemsize, void *item) nogil:
32465  * cdef Py_ssize_t i
32466  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
32467  * cdef Py_ssize_t extent = shape[0]
32468  *
32469  */
32470  __pyx_v_stride = (__pyx_v_strides[0]);
32471 
32472  /* "View.MemoryView":1412
32473  * cdef Py_ssize_t i
32474  * cdef Py_ssize_t stride = strides[0]
32475  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
32476  *
32477  * if ndim == 1:
32478  */
32479  __pyx_v_extent = (__pyx_v_shape[0]);
32480 
32481  /* "View.MemoryView":1414
32482  * cdef Py_ssize_t extent = shape[0]
32483  *
32484  * if ndim == 1: # <<<<<<<<<<<<<<
32485  * for i in range(extent):
32486  * memcpy(data, item, itemsize)
32487  */
32488  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
32489  if (__pyx_t_1) {
32490 
32491  /* "View.MemoryView":1415
32492  *
32493  * if ndim == 1:
32494  * for i in range(extent): # <<<<<<<<<<<<<<
32495  * memcpy(data, item, itemsize)
32496  * data += stride
32497  */
32498  __pyx_t_2 = __pyx_v_extent;
32499  __pyx_t_3 = __pyx_t_2;
32500  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
32501  __pyx_v_i = __pyx_t_4;
32502 
32503  /* "View.MemoryView":1416
32504  * if ndim == 1:
32505  * for i in range(extent):
32506  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
32507  * data += stride
32508  * else:
32509  */
32510  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
32511 
32512  /* "View.MemoryView":1417
32513  * for i in range(extent):
32514  * memcpy(data, item, itemsize)
32515  * data += stride # <<<<<<<<<<<<<<
32516  * else:
32517  * for i in range(extent):
32518  */
32519  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
32520  }
32521 
32522  /* "View.MemoryView":1414
32523  * cdef Py_ssize_t extent = shape[0]
32524  *
32525  * if ndim == 1: # <<<<<<<<<<<<<<
32526  * for i in range(extent):
32527  * memcpy(data, item, itemsize)
32528  */
32529  goto __pyx_L3;
32530  }
32531 
32532  /* "View.MemoryView":1419
32533  * data += stride
32534  * else:
32535  * for i in range(extent): # <<<<<<<<<<<<<<
32536  * _slice_assign_scalar(data, shape + 1, strides + 1,
32537  * ndim - 1, itemsize, item)
32538  */
32539  /*else*/ {
32540  __pyx_t_2 = __pyx_v_extent;
32541  __pyx_t_3 = __pyx_t_2;
32542  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
32543  __pyx_v_i = __pyx_t_4;
32544 
32545  /* "View.MemoryView":1420
32546  * else:
32547  * for i in range(extent):
32548  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
32549  * ndim - 1, itemsize, item)
32550  * data += stride
32551  */
32552  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
32553 
32554  /* "View.MemoryView":1422
32555  * _slice_assign_scalar(data, shape + 1, strides + 1,
32556  * ndim - 1, itemsize, item)
32557  * data += stride # <<<<<<<<<<<<<<
32558  *
32559  *
32560  */
32561  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
32562  }
32563  }
32564  __pyx_L3:;
32565 
32566  /* "View.MemoryView":1407
32567  *
32568  * @cname('__pyx_memoryview__slice_assign_scalar')
32569  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32570  * Py_ssize_t *strides, int ndim,
32571  * size_t itemsize, void *item) nogil:
32572  */
32573 
32574  /* function exit code */
32575 }
32576 
32577 /* "(tree fragment)":1
32578  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
32579  * cdef object __pyx_PickleError
32580  * cdef object __pyx_result
32581  */
32582 
32583 /* Python wrapper */
32584 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32585 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
32586 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32587  PyObject *__pyx_v___pyx_type = 0;
32588  long __pyx_v___pyx_checksum;
32589  PyObject *__pyx_v___pyx_state = 0;
32590  int __pyx_lineno = 0;
32591  const char *__pyx_filename = NULL;
32592  int __pyx_clineno = 0;
32593  PyObject *__pyx_r = 0;
32594  __Pyx_RefNannyDeclarations
32595  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
32596  {
32597  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
32598  PyObject* values[3] = {0,0,0};
32599  if (unlikely(__pyx_kwds)) {
32600  Py_ssize_t kw_args;
32601  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32602  switch (pos_args) {
32603  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32604  CYTHON_FALLTHROUGH;
32605  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32606  CYTHON_FALLTHROUGH;
32607  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32608  CYTHON_FALLTHROUGH;
32609  case 0: break;
32610  default: goto __pyx_L5_argtuple_error;
32611  }
32612  kw_args = PyDict_Size(__pyx_kwds);
32613  switch (pos_args) {
32614  case 0:
32615  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
32616  else goto __pyx_L5_argtuple_error;
32617  CYTHON_FALLTHROUGH;
32618  case 1:
32619  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
32620  else {
32621  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error)
32622  }
32623  CYTHON_FALLTHROUGH;
32624  case 2:
32625  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
32626  else {
32627  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error)
32628  }
32629  }
32630  if (unlikely(kw_args > 0)) {
32631  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(0, 1, __pyx_L3_error)
32632  }
32633  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
32634  goto __pyx_L5_argtuple_error;
32635  } else {
32636  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32637  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32638  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32639  }
32640  __pyx_v___pyx_type = values[0];
32641  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error)
32642  __pyx_v___pyx_state = values[2];
32643  }
32644  goto __pyx_L4_argument_unpacking_done;
32645  __pyx_L5_argtuple_error:;
32646  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1, __pyx_L3_error)
32647  __pyx_L3_error:;
32648  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
32649  __Pyx_RefNannyFinishContext();
32650  return NULL;
32651  __pyx_L4_argument_unpacking_done:;
32652  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
32653 
32654  /* function exit code */
32655  __Pyx_RefNannyFinishContext();
32656  return __pyx_r;
32657 }
32658 
32659 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) {
32660  PyObject *__pyx_v___pyx_PickleError = 0;
32661  PyObject *__pyx_v___pyx_result = 0;
32662  PyObject *__pyx_r = NULL;
32663  __Pyx_RefNannyDeclarations
32664  PyObject *__pyx_t_1 = NULL;
32665  int __pyx_t_2;
32666  int __pyx_t_3;
32667  PyObject *__pyx_t_4 = NULL;
32668  PyObject *__pyx_t_5 = NULL;
32669  PyObject *__pyx_t_6 = NULL;
32670  int __pyx_lineno = 0;
32671  const char *__pyx_filename = NULL;
32672  int __pyx_clineno = 0;
32673  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
32674 
32675  /* "(tree fragment)":4
32676  * cdef object __pyx_PickleError
32677  * cdef object __pyx_result
32678  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
32679  * from pickle import PickleError as __pyx_PickleError
32680  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
32681  */
32682  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
32683  __Pyx_GOTREF(__pyx_t_1);
32684  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__26, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4, __pyx_L1_error)
32685  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32686  __pyx_t_3 = (__pyx_t_2 != 0);
32687  if (__pyx_t_3) {
32688 
32689  /* "(tree fragment)":5
32690  * cdef object __pyx_result
32691  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
32692  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
32693  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
32694  * __pyx_result = Enum.__new__(__pyx_type)
32695  */
32696  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
32697  __Pyx_GOTREF(__pyx_t_1);
32698  __Pyx_INCREF(__pyx_n_s_PickleError);
32699  __Pyx_GIVEREF(__pyx_n_s_PickleError);
32700  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
32701  __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error)
32702  __Pyx_GOTREF(__pyx_t_4);
32703  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32704  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
32705  __Pyx_GOTREF(__pyx_t_1);
32706  __Pyx_INCREF(__pyx_t_1);
32707  __pyx_v___pyx_PickleError = __pyx_t_1;
32708  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32709  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32710 
32711  /* "(tree fragment)":6
32712  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
32713  * from pickle import PickleError as __pyx_PickleError
32714  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
32715  * __pyx_result = Enum.__new__(__pyx_type)
32716  * if __pyx_state is not None:
32717  */
32718  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
32719  __Pyx_GOTREF(__pyx_t_1);
32720  __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(0, 6, __pyx_L1_error)
32721  __Pyx_GOTREF(__pyx_t_5);
32722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32723  __Pyx_INCREF(__pyx_v___pyx_PickleError);
32724  __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
32725  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
32726  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
32727  if (likely(__pyx_t_6)) {
32728  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
32729  __Pyx_INCREF(__pyx_t_6);
32730  __Pyx_INCREF(function);
32731  __Pyx_DECREF_SET(__pyx_t_1, function);
32732  }
32733  }
32734  __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);
32735  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
32736  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
32737  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
32738  __Pyx_GOTREF(__pyx_t_4);
32739  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32740  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
32741  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32742  __PYX_ERR(0, 6, __pyx_L1_error)
32743 
32744  /* "(tree fragment)":4
32745  * cdef object __pyx_PickleError
32746  * cdef object __pyx_result
32747  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
32748  * from pickle import PickleError as __pyx_PickleError
32749  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
32750  */
32751  }
32752 
32753  /* "(tree fragment)":7
32754  * from pickle import PickleError as __pyx_PickleError
32755  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
32756  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
32757  * if __pyx_state is not None:
32758  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
32759  */
32760  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
32761  __Pyx_GOTREF(__pyx_t_1);
32762  __pyx_t_5 = NULL;
32763  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
32764  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
32765  if (likely(__pyx_t_5)) {
32766  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
32767  __Pyx_INCREF(__pyx_t_5);
32768  __Pyx_INCREF(function);
32769  __Pyx_DECREF_SET(__pyx_t_1, function);
32770  }
32771  }
32772  __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);
32773  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
32774  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7, __pyx_L1_error)
32775  __Pyx_GOTREF(__pyx_t_4);
32776  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32777  __pyx_v___pyx_result = __pyx_t_4;
32778  __pyx_t_4 = 0;
32779 
32780  /* "(tree fragment)":8
32781  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
32782  * __pyx_result = Enum.__new__(__pyx_type)
32783  * if __pyx_state is not None: # <<<<<<<<<<<<<<
32784  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
32785  * return __pyx_result
32786  */
32787  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
32788  __pyx_t_2 = (__pyx_t_3 != 0);
32789  if (__pyx_t_2) {
32790 
32791  /* "(tree fragment)":9
32792  * __pyx_result = Enum.__new__(__pyx_type)
32793  * if __pyx_state is not None:
32794  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
32795  * return __pyx_result
32796  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
32797  */
32798  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(0, 9, __pyx_L1_error)
32799  __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error)
32800  __Pyx_GOTREF(__pyx_t_4);
32801  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32802 
32803  /* "(tree fragment)":8
32804  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
32805  * __pyx_result = Enum.__new__(__pyx_type)
32806  * if __pyx_state is not None: # <<<<<<<<<<<<<<
32807  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
32808  * return __pyx_result
32809  */
32810  }
32811 
32812  /* "(tree fragment)":10
32813  * if __pyx_state is not None:
32814  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
32815  * return __pyx_result # <<<<<<<<<<<<<<
32816  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
32817  * __pyx_result.name = __pyx_state[0]
32818  */
32819  __Pyx_XDECREF(__pyx_r);
32820  __Pyx_INCREF(__pyx_v___pyx_result);
32821  __pyx_r = __pyx_v___pyx_result;
32822  goto __pyx_L0;
32823 
32824  /* "(tree fragment)":1
32825  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
32826  * cdef object __pyx_PickleError
32827  * cdef object __pyx_result
32828  */
32829 
32830  /* function exit code */
32831  __pyx_L1_error:;
32832  __Pyx_XDECREF(__pyx_t_1);
32833  __Pyx_XDECREF(__pyx_t_4);
32834  __Pyx_XDECREF(__pyx_t_5);
32835  __Pyx_XDECREF(__pyx_t_6);
32836  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
32837  __pyx_r = NULL;
32838  __pyx_L0:;
32839  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
32840  __Pyx_XDECREF(__pyx_v___pyx_result);
32841  __Pyx_XGIVEREF(__pyx_r);
32842  __Pyx_RefNannyFinishContext();
32843  return __pyx_r;
32844 }
32845 
32846 /* "(tree fragment)":11
32847  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
32848  * return __pyx_result
32849  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
32850  * __pyx_result.name = __pyx_state[0]
32851  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
32852  */
32853 
32854 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
32855  PyObject *__pyx_r = NULL;
32856  __Pyx_RefNannyDeclarations
32857  PyObject *__pyx_t_1 = NULL;
32858  int __pyx_t_2;
32859  Py_ssize_t __pyx_t_3;
32860  int __pyx_t_4;
32861  int __pyx_t_5;
32862  PyObject *__pyx_t_6 = NULL;
32863  PyObject *__pyx_t_7 = NULL;
32864  PyObject *__pyx_t_8 = NULL;
32865  int __pyx_lineno = 0;
32866  const char *__pyx_filename = NULL;
32867  int __pyx_clineno = 0;
32868  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
32869 
32870  /* "(tree fragment)":12
32871  * return __pyx_result
32872  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
32873  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
32874  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
32875  * __pyx_result.__dict__.update(__pyx_state[1])
32876  */
32877  if (unlikely(__pyx_v___pyx_state == Py_None)) {
32878  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
32879  __PYX_ERR(0, 12, __pyx_L1_error)
32880  }
32881  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
32882  __Pyx_GOTREF(__pyx_t_1);
32883  __Pyx_GIVEREF(__pyx_t_1);
32884  __Pyx_GOTREF(__pyx_v___pyx_result->name);
32885  __Pyx_DECREF(__pyx_v___pyx_result->name);
32886  __pyx_v___pyx_result->name = __pyx_t_1;
32887  __pyx_t_1 = 0;
32888 
32889  /* "(tree fragment)":13
32890  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
32891  * __pyx_result.name = __pyx_state[0]
32892  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
32893  * __pyx_result.__dict__.update(__pyx_state[1])
32894  */
32895  if (unlikely(__pyx_v___pyx_state == Py_None)) {
32896  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
32897  __PYX_ERR(0, 13, __pyx_L1_error)
32898  }
32899  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
32900  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
32901  if (__pyx_t_4) {
32902  } else {
32903  __pyx_t_2 = __pyx_t_4;
32904  goto __pyx_L4_bool_binop_done;
32905  }
32906  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
32907  __pyx_t_5 = (__pyx_t_4 != 0);
32908  __pyx_t_2 = __pyx_t_5;
32909  __pyx_L4_bool_binop_done:;
32910  if (__pyx_t_2) {
32911 
32912  /* "(tree fragment)":14
32913  * __pyx_result.name = __pyx_state[0]
32914  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
32915  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
32916  */
32917  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
32918  __Pyx_GOTREF(__pyx_t_6);
32919  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14, __pyx_L1_error)
32920  __Pyx_GOTREF(__pyx_t_7);
32921  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32922  if (unlikely(__pyx_v___pyx_state == Py_None)) {
32923  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
32924  __PYX_ERR(0, 14, __pyx_L1_error)
32925  }
32926  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
32927  __Pyx_GOTREF(__pyx_t_6);
32928  __pyx_t_8 = NULL;
32929  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
32930  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
32931  if (likely(__pyx_t_8)) {
32932  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
32933  __Pyx_INCREF(__pyx_t_8);
32934  __Pyx_INCREF(function);
32935  __Pyx_DECREF_SET(__pyx_t_7, function);
32936  }
32937  }
32938  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
32939  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
32940  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32941  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
32942  __Pyx_GOTREF(__pyx_t_1);
32943  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32944  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32945 
32946  /* "(tree fragment)":13
32947  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
32948  * __pyx_result.name = __pyx_state[0]
32949  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
32950  * __pyx_result.__dict__.update(__pyx_state[1])
32951  */
32952  }
32953 
32954  /* "(tree fragment)":11
32955  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
32956  * return __pyx_result
32957  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
32958  * __pyx_result.name = __pyx_state[0]
32959  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
32960  */
32961 
32962  /* function exit code */
32963  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32964  goto __pyx_L0;
32965  __pyx_L1_error:;
32966  __Pyx_XDECREF(__pyx_t_1);
32967  __Pyx_XDECREF(__pyx_t_6);
32968  __Pyx_XDECREF(__pyx_t_7);
32969  __Pyx_XDECREF(__pyx_t_8);
32970  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
32971  __pyx_r = 0;
32972  __pyx_L0:;
32973  __Pyx_XGIVEREF(__pyx_r);
32974  __Pyx_RefNannyFinishContext();
32975  return __pyx_r;
32976 }
32977 
32978 /* "BufferFormatFromTypeInfo":1463
32979  *
32980  * @cname('__pyx_format_from_typeinfo')
32981  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
32982  * cdef __Pyx_StructField *field
32983  * cdef __pyx_typeinfo_string fmt
32984  */
32985 
32986 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) {
32987  __Pyx_StructField *__pyx_v_field;
32988  struct __pyx_typeinfo_string __pyx_v_fmt;
32989  PyObject *__pyx_v_part = 0;
32990  PyObject *__pyx_v_result = 0;
32991  PyObject *__pyx_v_alignment = NULL;
32992  PyObject *__pyx_v_parts = NULL;
32993  PyObject *__pyx_v_extents = NULL;
32994  int __pyx_v_i;
32995  PyObject *__pyx_r = NULL;
32996  __Pyx_RefNannyDeclarations
32997  int __pyx_t_1;
32998  PyObject *__pyx_t_2 = NULL;
32999  __Pyx_StructField *__pyx_t_3;
33000  PyObject *__pyx_t_4 = NULL;
33001  PyObject *__pyx_t_5 = NULL;
33002  int __pyx_t_6;
33003  int __pyx_t_7;
33004  int __pyx_t_8;
33005  int __pyx_t_9;
33006  int __pyx_lineno = 0;
33007  const char *__pyx_filename = NULL;
33008  int __pyx_clineno = 0;
33009  __Pyx_RefNannySetupContext("format_from_typeinfo", 0);
33010 
33011  /* "BufferFormatFromTypeInfo":1468
33012  * cdef bytes part, result
33013  *
33014  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
33015  * assert type.fields != NULL
33016  * assert type.fields.type != NULL
33017  */
33018  __pyx_t_1 = ((__pyx_v_type->typegroup == 'S') != 0);
33019  if (__pyx_t_1) {
33020 
33021  /* "BufferFormatFromTypeInfo":1469
33022  *
33023  * if type.typegroup == 'S':
33024  * assert type.fields != NULL # <<<<<<<<<<<<<<
33025  * assert type.fields.type != NULL
33026  *
33027  */
33028  #ifndef CYTHON_WITHOUT_ASSERTIONS
33029  if (unlikely(!Py_OptimizeFlag)) {
33030  if (unlikely(!((__pyx_v_type->fields != NULL) != 0))) {
33031  PyErr_SetNone(PyExc_AssertionError);
33032  __PYX_ERR(0, 1469, __pyx_L1_error)
33033  }
33034  }
33035  #endif
33036 
33037  /* "BufferFormatFromTypeInfo":1470
33038  * if type.typegroup == 'S':
33039  * assert type.fields != NULL
33040  * assert type.fields.type != NULL # <<<<<<<<<<<<<<
33041  *
33042  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
33043  */
33044  #ifndef CYTHON_WITHOUT_ASSERTIONS
33045  if (unlikely(!Py_OptimizeFlag)) {
33046  if (unlikely(!((__pyx_v_type->fields->type != NULL) != 0))) {
33047  PyErr_SetNone(PyExc_AssertionError);
33048  __PYX_ERR(0, 1470, __pyx_L1_error)
33049  }
33050  }
33051  #endif
33052 
33053  /* "BufferFormatFromTypeInfo":1472
33054  * assert type.fields.type != NULL
33055  *
33056  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
33057  * alignment = b'^'
33058  * else:
33059  */
33060  __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0);
33061  if (__pyx_t_1) {
33062 
33063  /* "BufferFormatFromTypeInfo":1473
33064  *
33065  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
33066  * alignment = b'^' # <<<<<<<<<<<<<<
33067  * else:
33068  * alignment = b''
33069  */
33070  __Pyx_INCREF(__pyx_kp_b__27);
33071  __pyx_v_alignment = __pyx_kp_b__27;
33072 
33073  /* "BufferFormatFromTypeInfo":1472
33074  * assert type.fields.type != NULL
33075  *
33076  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
33077  * alignment = b'^'
33078  * else:
33079  */
33080  goto __pyx_L4;
33081  }
33082 
33083  /* "BufferFormatFromTypeInfo":1475
33084  * alignment = b'^'
33085  * else:
33086  * alignment = b'' # <<<<<<<<<<<<<<
33087  *
33088  * parts = [b"T{"]
33089  */
33090  /*else*/ {
33091  __Pyx_INCREF(__pyx_kp_b__28);
33092  __pyx_v_alignment = __pyx_kp_b__28;
33093  }
33094  __pyx_L4:;
33095 
33096  /* "BufferFormatFromTypeInfo":1477
33097  * alignment = b''
33098  *
33099  * parts = [b"T{"] # <<<<<<<<<<<<<<
33100  * field = type.fields
33101  *
33102  */
33103  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
33104  __Pyx_GOTREF(__pyx_t_2);
33105  __Pyx_INCREF(__pyx_kp_b_T);
33106  __Pyx_GIVEREF(__pyx_kp_b_T);
33107  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_b_T);
33108  __pyx_v_parts = ((PyObject*)__pyx_t_2);
33109  __pyx_t_2 = 0;
33110 
33111  /* "BufferFormatFromTypeInfo":1478
33112  *
33113  * parts = [b"T{"]
33114  * field = type.fields # <<<<<<<<<<<<<<
33115  *
33116  * while field.type:
33117  */
33118  __pyx_t_3 = __pyx_v_type->fields;
33119  __pyx_v_field = __pyx_t_3;
33120 
33121  /* "BufferFormatFromTypeInfo":1480
33122  * field = type.fields
33123  *
33124  * while field.type: # <<<<<<<<<<<<<<
33125  * part = format_from_typeinfo(field.type)
33126  * parts.append(part + b':' + field.name + b':')
33127  */
33128  while (1) {
33129  __pyx_t_1 = (__pyx_v_field->type != 0);
33130  if (!__pyx_t_1) break;
33131 
33132  /* "BufferFormatFromTypeInfo":1481
33133  *
33134  * while field.type:
33135  * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<<
33136  * parts.append(part + b':' + field.name + b':')
33137  * field += 1
33138  */
33139  __pyx_t_2 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L1_error)
33140  __Pyx_GOTREF(__pyx_t_2);
33141  __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_2));
33142  __pyx_t_2 = 0;
33143 
33144  /* "BufferFormatFromTypeInfo":1482
33145  * while field.type:
33146  * part = format_from_typeinfo(field.type)
33147  * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<<
33148  * field += 1
33149  *
33150  */
33151  __pyx_t_2 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__29); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
33152  __Pyx_GOTREF(__pyx_t_2);
33153  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L1_error)
33154  __Pyx_GOTREF(__pyx_t_4);
33155  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1482, __pyx_L1_error)
33156  __Pyx_GOTREF(__pyx_t_5);
33157  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33158  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33159  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__29); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1482, __pyx_L1_error)
33160  __Pyx_GOTREF(__pyx_t_4);
33161  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33162  __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1482, __pyx_L1_error)
33163  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33164 
33165  /* "BufferFormatFromTypeInfo":1483
33166  * part = format_from_typeinfo(field.type)
33167  * parts.append(part + b':' + field.name + b':')
33168  * field += 1 # <<<<<<<<<<<<<<
33169  *
33170  * result = alignment.join(parts) + b'}'
33171  */
33172  __pyx_v_field = (__pyx_v_field + 1);
33173  }
33174 
33175  /* "BufferFormatFromTypeInfo":1485
33176  * field += 1
33177  *
33178  * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<<
33179  * else:
33180  * fmt = __Pyx_TypeInfoToFormat(type)
33181  */
33182  __pyx_t_4 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L1_error)
33183  __Pyx_GOTREF(__pyx_t_4);
33184  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_b__30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __pyx_L1_error)
33185  __Pyx_GOTREF(__pyx_t_5);
33186  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33187  if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1485, __pyx_L1_error)
33188  __pyx_v_result = ((PyObject*)__pyx_t_5);
33189  __pyx_t_5 = 0;
33190 
33191  /* "BufferFormatFromTypeInfo":1468
33192  * cdef bytes part, result
33193  *
33194  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
33195  * assert type.fields != NULL
33196  * assert type.fields.type != NULL
33197  */
33198  goto __pyx_L3;
33199  }
33200 
33201  /* "BufferFormatFromTypeInfo":1487
33202  * result = alignment.join(parts) + b'}'
33203  * else:
33204  * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<<
33205  * if type.arraysize[0]:
33206  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33207  */
33208  /*else*/ {
33209  __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type);
33210 
33211  /* "BufferFormatFromTypeInfo":1488
33212  * else:
33213  * fmt = __Pyx_TypeInfoToFormat(type)
33214  * if type.arraysize[0]: # <<<<<<<<<<<<<<
33215  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33216  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33217  */
33218  __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0);
33219  if (__pyx_t_1) {
33220 
33221  /* "BufferFormatFromTypeInfo":1489
33222  * fmt = __Pyx_TypeInfoToFormat(type)
33223  * if type.arraysize[0]:
33224  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] # <<<<<<<<<<<<<<
33225  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33226  * else:
33227  */
33228  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1489, __pyx_L1_error)
33229  __Pyx_GOTREF(__pyx_t_5);
33230  __pyx_t_7 = __pyx_v_type->ndim;
33231  __pyx_t_8 = __pyx_t_7;
33232  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
33233  __pyx_v_i = __pyx_t_9;
33234  __pyx_t_4 = __Pyx_PyInt_FromSize_t((__pyx_v_type->arraysize[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1489, __pyx_L1_error)
33235  __Pyx_GOTREF(__pyx_t_4);
33236  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
33237  __Pyx_GOTREF(__pyx_t_2);
33238  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33239  if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1489, __pyx_L1_error)
33240  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33241  }
33242  __pyx_v_extents = ((PyObject*)__pyx_t_5);
33243  __pyx_t_5 = 0;
33244 
33245  /* "BufferFormatFromTypeInfo":1490
33246  * if type.arraysize[0]:
33247  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33248  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string # <<<<<<<<<<<<<<
33249  * else:
33250  * result = fmt.string
33251  */
33252  __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__31, __pyx_v_extents); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
33253  __Pyx_GOTREF(__pyx_t_5);
33254  __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
33255  __Pyx_GOTREF(__pyx_t_2);
33256  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33257  __pyx_t_5 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
33258  __Pyx_GOTREF(__pyx_t_5);
33259  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33260  __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
33261  __Pyx_GOTREF(__pyx_t_2);
33262  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
33263  __Pyx_GOTREF(__pyx_t_4);
33264  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33265  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33266  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1490, __pyx_L1_error)
33267  __pyx_v_result = ((PyObject*)__pyx_t_4);
33268  __pyx_t_4 = 0;
33269 
33270  /* "BufferFormatFromTypeInfo":1488
33271  * else:
33272  * fmt = __Pyx_TypeInfoToFormat(type)
33273  * if type.arraysize[0]: # <<<<<<<<<<<<<<
33274  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33275  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33276  */
33277  goto __pyx_L7;
33278  }
33279 
33280  /* "BufferFormatFromTypeInfo":1492
33281  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33282  * else:
33283  * result = fmt.string # <<<<<<<<<<<<<<
33284  *
33285  * return result
33286  */
33287  /*else*/ {
33288  __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1492, __pyx_L1_error)
33289  __Pyx_GOTREF(__pyx_t_4);
33290  __pyx_v_result = ((PyObject*)__pyx_t_4);
33291  __pyx_t_4 = 0;
33292  }
33293  __pyx_L7:;
33294  }
33295  __pyx_L3:;
33296 
33297  /* "BufferFormatFromTypeInfo":1494
33298  * result = fmt.string
33299  *
33300  * return result # <<<<<<<<<<<<<<
33301  */
33302  __Pyx_XDECREF(__pyx_r);
33303  __Pyx_INCREF(__pyx_v_result);
33304  __pyx_r = __pyx_v_result;
33305  goto __pyx_L0;
33306 
33307  /* "BufferFormatFromTypeInfo":1463
33308  *
33309  * @cname('__pyx_format_from_typeinfo')
33310  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
33311  * cdef __Pyx_StructField *field
33312  * cdef __pyx_typeinfo_string fmt
33313  */
33314 
33315  /* function exit code */
33316  __pyx_L1_error:;
33317  __Pyx_XDECREF(__pyx_t_2);
33318  __Pyx_XDECREF(__pyx_t_4);
33319  __Pyx_XDECREF(__pyx_t_5);
33320  __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
33321  __pyx_r = 0;
33322  __pyx_L0:;
33323  __Pyx_XDECREF(__pyx_v_part);
33324  __Pyx_XDECREF(__pyx_v_result);
33325  __Pyx_XDECREF(__pyx_v_alignment);
33326  __Pyx_XDECREF(__pyx_v_parts);
33327  __Pyx_XDECREF(__pyx_v_extents);
33328  __Pyx_XGIVEREF(__pyx_r);
33329  __Pyx_RefNannyFinishContext();
33330  return __pyx_r;
33331 }
33332 
33333 static PyObject *__pyx_tp_new_10cmeshTools_CMesh(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
33334  struct __pyx_obj_10cmeshTools_CMesh *p;
33335  PyObject *o;
33336  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
33337  o = (*t->tp_alloc)(t, 0);
33338  } else {
33339  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
33340  }
33341  if (unlikely(!o)) return 0;
33342  p = ((struct __pyx_obj_10cmeshTools_CMesh *)o);
33343  p->elementNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33344  p->nodeElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33345  p->nodeElementOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33346  p->elementNeighborsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33347  p->elementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33348  p->elementBoundaryNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33349  p->elementBoundaryElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33350  p->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33351  p->interiorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33352  p->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33353  p->edgeNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33354  p->nodeStarArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33355  p->nodeStarOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33356  p->elementMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33357  p->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33358  p->nodeMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33359  p->nodeArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33360  p->elementIJK = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33361  p->weights = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33362  p->U_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33363  p->V_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33364  p->W_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33365  p->elementDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33366  p->elementInnerDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33367  p->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33368  p->elementBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33369  p->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33370  p->nodeDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33371  p->nodeSupportArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33372  return o;
33373 }
33374 
33375 static void __pyx_tp_dealloc_10cmeshTools_CMesh(PyObject *o) {
33376  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33377  #if CYTHON_USE_TP_FINALIZE
33378  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
33379  if (PyObject_CallFinalizerFromDealloc(o)) return;
33380  }
33381  #endif
33382  PyObject_GC_UnTrack(o);
33383  Py_CLEAR(p->elementNodesArray);
33384  Py_CLEAR(p->nodeElementsArray);
33385  Py_CLEAR(p->nodeElementOffsets);
33386  Py_CLEAR(p->elementNeighborsArray);
33387  Py_CLEAR(p->elementBoundariesArray);
33388  Py_CLEAR(p->elementBoundaryNodesArray);
33389  Py_CLEAR(p->elementBoundaryElementsArray);
33390  Py_CLEAR(p->elementBoundaryLocalElementBoundariesArray);
33391  Py_CLEAR(p->interiorElementBoundariesArray);
33392  Py_CLEAR(p->exteriorElementBoundariesArray);
33393  Py_CLEAR(p->edgeNodesArray);
33394  Py_CLEAR(p->nodeStarArray);
33395  Py_CLEAR(p->nodeStarOffsets);
33396  Py_CLEAR(p->elementMaterialTypes);
33397  Py_CLEAR(p->elementBoundaryMaterialTypes);
33398  Py_CLEAR(p->nodeMaterialTypes);
33399  Py_CLEAR(p->nodeArray);
33400  Py_CLEAR(p->elementIJK);
33401  Py_CLEAR(p->weights);
33402  Py_CLEAR(p->U_KNOT);
33403  Py_CLEAR(p->V_KNOT);
33404  Py_CLEAR(p->W_KNOT);
33405  Py_CLEAR(p->elementDiametersArray);
33406  Py_CLEAR(p->elementInnerDiametersArray);
33407  Py_CLEAR(p->elementBoundaryDiametersArray);
33408  Py_CLEAR(p->elementBarycentersArray);
33409  Py_CLEAR(p->elementBoundaryBarycentersArray);
33410  Py_CLEAR(p->nodeDiametersArray);
33411  Py_CLEAR(p->nodeSupportArray);
33412  (*Py_TYPE(o)->tp_free)(o);
33413 }
33414 
33415 static int __pyx_tp_traverse_10cmeshTools_CMesh(PyObject *o, visitproc v, void *a) {
33416  int e;
33417  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33418  if (p->elementNodesArray) {
33419  e = (*v)(((PyObject *)p->elementNodesArray), a); if (e) return e;
33420  }
33421  if (p->nodeElementsArray) {
33422  e = (*v)(((PyObject *)p->nodeElementsArray), a); if (e) return e;
33423  }
33424  if (p->nodeElementOffsets) {
33425  e = (*v)(((PyObject *)p->nodeElementOffsets), a); if (e) return e;
33426  }
33427  if (p->elementNeighborsArray) {
33428  e = (*v)(((PyObject *)p->elementNeighborsArray), a); if (e) return e;
33429  }
33430  if (p->elementBoundariesArray) {
33431  e = (*v)(((PyObject *)p->elementBoundariesArray), a); if (e) return e;
33432  }
33433  if (p->elementBoundaryNodesArray) {
33434  e = (*v)(((PyObject *)p->elementBoundaryNodesArray), a); if (e) return e;
33435  }
33436  if (p->elementBoundaryElementsArray) {
33437  e = (*v)(((PyObject *)p->elementBoundaryElementsArray), a); if (e) return e;
33438  }
33439  if (p->elementBoundaryLocalElementBoundariesArray) {
33440  e = (*v)(((PyObject *)p->elementBoundaryLocalElementBoundariesArray), a); if (e) return e;
33441  }
33442  if (p->interiorElementBoundariesArray) {
33443  e = (*v)(((PyObject *)p->interiorElementBoundariesArray), a); if (e) return e;
33444  }
33445  if (p->exteriorElementBoundariesArray) {
33446  e = (*v)(((PyObject *)p->exteriorElementBoundariesArray), a); if (e) return e;
33447  }
33448  if (p->edgeNodesArray) {
33449  e = (*v)(((PyObject *)p->edgeNodesArray), a); if (e) return e;
33450  }
33451  if (p->nodeStarArray) {
33452  e = (*v)(((PyObject *)p->nodeStarArray), a); if (e) return e;
33453  }
33454  if (p->nodeStarOffsets) {
33455  e = (*v)(((PyObject *)p->nodeStarOffsets), a); if (e) return e;
33456  }
33457  if (p->elementMaterialTypes) {
33458  e = (*v)(((PyObject *)p->elementMaterialTypes), a); if (e) return e;
33459  }
33460  if (p->elementBoundaryMaterialTypes) {
33461  e = (*v)(((PyObject *)p->elementBoundaryMaterialTypes), a); if (e) return e;
33462  }
33463  if (p->nodeMaterialTypes) {
33464  e = (*v)(((PyObject *)p->nodeMaterialTypes), a); if (e) return e;
33465  }
33466  if (p->nodeArray) {
33467  e = (*v)(((PyObject *)p->nodeArray), a); if (e) return e;
33468  }
33469  if (p->elementIJK) {
33470  e = (*v)(((PyObject *)p->elementIJK), a); if (e) return e;
33471  }
33472  if (p->weights) {
33473  e = (*v)(((PyObject *)p->weights), a); if (e) return e;
33474  }
33475  if (p->U_KNOT) {
33476  e = (*v)(((PyObject *)p->U_KNOT), a); if (e) return e;
33477  }
33478  if (p->V_KNOT) {
33479  e = (*v)(((PyObject *)p->V_KNOT), a); if (e) return e;
33480  }
33481  if (p->W_KNOT) {
33482  e = (*v)(((PyObject *)p->W_KNOT), a); if (e) return e;
33483  }
33484  if (p->elementDiametersArray) {
33485  e = (*v)(((PyObject *)p->elementDiametersArray), a); if (e) return e;
33486  }
33487  if (p->elementInnerDiametersArray) {
33488  e = (*v)(((PyObject *)p->elementInnerDiametersArray), a); if (e) return e;
33489  }
33490  if (p->elementBoundaryDiametersArray) {
33491  e = (*v)(((PyObject *)p->elementBoundaryDiametersArray), a); if (e) return e;
33492  }
33493  if (p->elementBarycentersArray) {
33494  e = (*v)(((PyObject *)p->elementBarycentersArray), a); if (e) return e;
33495  }
33496  if (p->elementBoundaryBarycentersArray) {
33497  e = (*v)(((PyObject *)p->elementBoundaryBarycentersArray), a); if (e) return e;
33498  }
33499  if (p->nodeDiametersArray) {
33500  e = (*v)(((PyObject *)p->nodeDiametersArray), a); if (e) return e;
33501  }
33502  if (p->nodeSupportArray) {
33503  e = (*v)(((PyObject *)p->nodeSupportArray), a); if (e) return e;
33504  }
33505  return 0;
33506 }
33507 
33508 static int __pyx_tp_clear_10cmeshTools_CMesh(PyObject *o) {
33509  PyObject* tmp;
33510  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33511  tmp = ((PyObject*)p->elementNodesArray);
33512  p->elementNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33513  Py_XDECREF(tmp);
33514  tmp = ((PyObject*)p->nodeElementsArray);
33515  p->nodeElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33516  Py_XDECREF(tmp);
33517  tmp = ((PyObject*)p->nodeElementOffsets);
33518  p->nodeElementOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33519  Py_XDECREF(tmp);
33520  tmp = ((PyObject*)p->elementNeighborsArray);
33521  p->elementNeighborsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33522  Py_XDECREF(tmp);
33523  tmp = ((PyObject*)p->elementBoundariesArray);
33524  p->elementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33525  Py_XDECREF(tmp);
33526  tmp = ((PyObject*)p->elementBoundaryNodesArray);
33527  p->elementBoundaryNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33528  Py_XDECREF(tmp);
33529  tmp = ((PyObject*)p->elementBoundaryElementsArray);
33530  p->elementBoundaryElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33531  Py_XDECREF(tmp);
33532  tmp = ((PyObject*)p->elementBoundaryLocalElementBoundariesArray);
33533  p->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33534  Py_XDECREF(tmp);
33535  tmp = ((PyObject*)p->interiorElementBoundariesArray);
33536  p->interiorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33537  Py_XDECREF(tmp);
33538  tmp = ((PyObject*)p->exteriorElementBoundariesArray);
33539  p->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33540  Py_XDECREF(tmp);
33541  tmp = ((PyObject*)p->edgeNodesArray);
33542  p->edgeNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33543  Py_XDECREF(tmp);
33544  tmp = ((PyObject*)p->nodeStarArray);
33545  p->nodeStarArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33546  Py_XDECREF(tmp);
33547  tmp = ((PyObject*)p->nodeStarOffsets);
33548  p->nodeStarOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33549  Py_XDECREF(tmp);
33550  tmp = ((PyObject*)p->elementMaterialTypes);
33551  p->elementMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33552  Py_XDECREF(tmp);
33553  tmp = ((PyObject*)p->elementBoundaryMaterialTypes);
33554  p->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33555  Py_XDECREF(tmp);
33556  tmp = ((PyObject*)p->nodeMaterialTypes);
33557  p->nodeMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33558  Py_XDECREF(tmp);
33559  tmp = ((PyObject*)p->nodeArray);
33560  p->nodeArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33561  Py_XDECREF(tmp);
33562  tmp = ((PyObject*)p->elementIJK);
33563  p->elementIJK = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33564  Py_XDECREF(tmp);
33565  tmp = ((PyObject*)p->weights);
33566  p->weights = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33567  Py_XDECREF(tmp);
33568  tmp = ((PyObject*)p->U_KNOT);
33569  p->U_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33570  Py_XDECREF(tmp);
33571  tmp = ((PyObject*)p->V_KNOT);
33572  p->V_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33573  Py_XDECREF(tmp);
33574  tmp = ((PyObject*)p->W_KNOT);
33575  p->W_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33576  Py_XDECREF(tmp);
33577  tmp = ((PyObject*)p->elementDiametersArray);
33578  p->elementDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33579  Py_XDECREF(tmp);
33580  tmp = ((PyObject*)p->elementInnerDiametersArray);
33581  p->elementInnerDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33582  Py_XDECREF(tmp);
33583  tmp = ((PyObject*)p->elementBoundaryDiametersArray);
33584  p->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33585  Py_XDECREF(tmp);
33586  tmp = ((PyObject*)p->elementBarycentersArray);
33587  p->elementBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33588  Py_XDECREF(tmp);
33589  tmp = ((PyObject*)p->elementBoundaryBarycentersArray);
33590  p->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33591  Py_XDECREF(tmp);
33592  tmp = ((PyObject*)p->nodeDiametersArray);
33593  p->nodeDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33594  Py_XDECREF(tmp);
33595  tmp = ((PyObject*)p->nodeSupportArray);
33596  p->nodeSupportArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33597  Py_XDECREF(tmp);
33598  return 0;
33599 }
33600 
33601 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElements_global(PyObject *o, CYTHON_UNUSED void *x) {
33602  return __pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(o);
33603 }
33604 
33605 static int __pyx_setprop_10cmeshTools_5CMesh_nElements_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33606  if (v) {
33607  return __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(o, v);
33608  }
33609  else {
33610  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33611  return -1;
33612  }
33613 }
33614 
33615 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_global(PyObject *o, CYTHON_UNUSED void *x) {
33616  return __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(o);
33617 }
33618 
33619 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33620  if (v) {
33621  return __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(o, v);
33622  }
33623  else {
33624  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33625  return -1;
33626  }
33627 }
33628 
33629 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_element(PyObject *o, CYTHON_UNUSED void *x) {
33630  return __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(o);
33631 }
33632 
33633 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_element(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33634  if (v) {
33635  return __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(o, v);
33636  }
33637  else {
33638  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33639  return -1;
33640  }
33641 }
33642 
33643 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_elementBoundary(PyObject *o, CYTHON_UNUSED void *x) {
33644  return __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(o);
33645 }
33646 
33647 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_elementBoundary(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33648  if (v) {
33649  return __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(o, v);
33650  }
33651  else {
33652  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33653  return -1;
33654  }
33655 }
33656 
33657 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_element(PyObject *o, CYTHON_UNUSED void *x) {
33658  return __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(o);
33659 }
33660 
33661 static int __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_element(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33662  if (v) {
33663  return __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(o, v);
33664  }
33665  else {
33666  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33667  return -1;
33668  }
33669 }
33670 
33671 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
33672  return __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(o);
33673 }
33674 
33675 static int __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33676  if (v) {
33677  return __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(o, v);
33678  }
33679  else {
33680  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33681  return -1;
33682  }
33683 }
33684 
33685 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
33686  return __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(o);
33687 }
33688 
33689 static int __pyx_setprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33690  if (v) {
33691  return __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(o, v);
33692  }
33693  else {
33694  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33695  return -1;
33696  }
33697 }
33698 
33699 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
33700  return __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(o);
33701 }
33702 
33703 static int __pyx_setprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33704  if (v) {
33705  return __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(o, v);
33706  }
33707  else {
33708  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33709  return -1;
33710  }
33711 }
33712 
33713 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_max_nElements_node(PyObject *o, CYTHON_UNUSED void *x) {
33714  return __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(o);
33715 }
33716 
33717 static int __pyx_setprop_10cmeshTools_5CMesh_max_nElements_node(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33718  if (v) {
33719  return __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(o, v);
33720  }
33721  else {
33722  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33723  return -1;
33724  }
33725 }
33726 
33727 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nEdges_global(PyObject *o, CYTHON_UNUSED void *x) {
33728  return __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(o);
33729 }
33730 
33731 static int __pyx_setprop_10cmeshTools_5CMesh_nEdges_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33732  if (v) {
33733  return __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(o, v);
33734  }
33735  else {
33736  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33737  return -1;
33738  }
33739 }
33740 
33741 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node(PyObject *o, CYTHON_UNUSED void *x) {
33742  return __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(o);
33743 }
33744 
33745 static int __pyx_setprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33746  if (v) {
33747  return __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(o, v);
33748  }
33749  else {
33750  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33751  return -1;
33752  }
33753 }
33754 
33755 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
33756  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(o);
33757 }
33758 
33759 static int __pyx_setprop_10cmeshTools_5CMesh_elementNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33760  if (v) {
33761  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(o, v);
33762  }
33763  else {
33764  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(o);
33765  }
33766 }
33767 
33768 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeElementsArray(PyObject *o, CYTHON_UNUSED void *x) {
33769  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(o);
33770 }
33771 
33772 static int __pyx_setprop_10cmeshTools_5CMesh_nodeElementsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33773  if (v) {
33774  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(o, v);
33775  }
33776  else {
33777  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(o);
33778  }
33779 }
33780 
33781 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeElementOffsets(PyObject *o, CYTHON_UNUSED void *x) {
33782  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(o);
33783 }
33784 
33785 static int __pyx_setprop_10cmeshTools_5CMesh_nodeElementOffsets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33786  if (v) {
33787  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(o, v);
33788  }
33789  else {
33790  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(o);
33791  }
33792 }
33793 
33794 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementNeighborsArray(PyObject *o, CYTHON_UNUSED void *x) {
33795  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(o);
33796 }
33797 
33798 static int __pyx_setprop_10cmeshTools_5CMesh_elementNeighborsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33799  if (v) {
33800  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(o, v);
33801  }
33802  else {
33803  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(o);
33804  }
33805 }
33806 
33807 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
33808  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(o);
33809 }
33810 
33811 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33812  if (v) {
33813  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(o, v);
33814  }
33815  else {
33816  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(o);
33817  }
33818 }
33819 
33820 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
33821  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(o);
33822 }
33823 
33824 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33825  if (v) {
33826  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(o, v);
33827  }
33828  else {
33829  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(o);
33830  }
33831 }
33832 
33833 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryElementsArray(PyObject *o, CYTHON_UNUSED void *x) {
33834  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(o);
33835 }
33836 
33837 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryElementsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33838  if (v) {
33839  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(o, v);
33840  }
33841  else {
33842  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(o);
33843  }
33844 }
33845 
33846 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
33847  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(o);
33848 }
33849 
33850 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33851  if (v) {
33852  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(o, v);
33853  }
33854  else {
33855  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(o);
33856  }
33857 }
33858 
33859 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_interiorElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
33860  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(o);
33861 }
33862 
33863 static int __pyx_setprop_10cmeshTools_5CMesh_interiorElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33864  if (v) {
33865  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(o, v);
33866  }
33867  else {
33868  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(o);
33869  }
33870 }
33871 
33872 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
33873  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(o);
33874 }
33875 
33876 static int __pyx_setprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33877  if (v) {
33878  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(o, v);
33879  }
33880  else {
33881  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(o);
33882  }
33883 }
33884 
33885 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_edgeNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
33886  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(o);
33887 }
33888 
33889 static int __pyx_setprop_10cmeshTools_5CMesh_edgeNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33890  if (v) {
33891  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(o, v);
33892  }
33893  else {
33894  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(o);
33895  }
33896 }
33897 
33898 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeStarArray(PyObject *o, CYTHON_UNUSED void *x) {
33899  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(o);
33900 }
33901 
33902 static int __pyx_setprop_10cmeshTools_5CMesh_nodeStarArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33903  if (v) {
33904  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(o, v);
33905  }
33906  else {
33907  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(o);
33908  }
33909 }
33910 
33911 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeStarOffsets(PyObject *o, CYTHON_UNUSED void *x) {
33912  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(o);
33913 }
33914 
33915 static int __pyx_setprop_10cmeshTools_5CMesh_nodeStarOffsets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33916  if (v) {
33917  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(o, v);
33918  }
33919  else {
33920  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(o);
33921  }
33922 }
33923 
33924 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
33925  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(o);
33926 }
33927 
33928 static int __pyx_setprop_10cmeshTools_5CMesh_elementMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33929  if (v) {
33930  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(o, v);
33931  }
33932  else {
33933  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(o);
33934  }
33935 }
33936 
33937 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
33938  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(o);
33939 }
33940 
33941 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33942  if (v) {
33943  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(o, v);
33944  }
33945  else {
33946  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(o);
33947  }
33948 }
33949 
33950 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
33951  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(o);
33952 }
33953 
33954 static int __pyx_setprop_10cmeshTools_5CMesh_nodeMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33955  if (v) {
33956  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(o, v);
33957  }
33958  else {
33959  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(o);
33960  }
33961 }
33962 
33963 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeArray(PyObject *o, CYTHON_UNUSED void *x) {
33964  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(o);
33965 }
33966 
33967 static int __pyx_setprop_10cmeshTools_5CMesh_nodeArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33968  if (v) {
33969  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(o, v);
33970  }
33971  else {
33972  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(o);
33973  }
33974 }
33975 
33976 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nx(PyObject *o, CYTHON_UNUSED void *x) {
33977  return __pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(o);
33978 }
33979 
33980 static int __pyx_setprop_10cmeshTools_5CMesh_nx(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33981  if (v) {
33982  return __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(o, v);
33983  }
33984  else {
33985  PyErr_SetString(PyExc_NotImplementedError, "__del__");
33986  return -1;
33987  }
33988 }
33989 
33990 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_ny(PyObject *o, CYTHON_UNUSED void *x) {
33991  return __pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(o);
33992 }
33993 
33994 static int __pyx_setprop_10cmeshTools_5CMesh_ny(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
33995  if (v) {
33996  return __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(o, v);
33997  }
33998  else {
33999  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34000  return -1;
34001  }
34002 }
34003 
34004 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nz(PyObject *o, CYTHON_UNUSED void *x) {
34005  return __pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(o);
34006 }
34007 
34008 static int __pyx_setprop_10cmeshTools_5CMesh_nz(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34009  if (v) {
34010  return __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(o, v);
34011  }
34012  else {
34013  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34014  return -1;
34015  }
34016 }
34017 
34018 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_px(PyObject *o, CYTHON_UNUSED void *x) {
34019  return __pyx_pw_10cmeshTools_5CMesh_2px_1__get__(o);
34020 }
34021 
34022 static int __pyx_setprop_10cmeshTools_5CMesh_px(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34023  if (v) {
34024  return __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(o, v);
34025  }
34026  else {
34027  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34028  return -1;
34029  }
34030 }
34031 
34032 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_py(PyObject *o, CYTHON_UNUSED void *x) {
34033  return __pyx_pw_10cmeshTools_5CMesh_2py_1__get__(o);
34034 }
34035 
34036 static int __pyx_setprop_10cmeshTools_5CMesh_py(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34037  if (v) {
34038  return __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(o, v);
34039  }
34040  else {
34041  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34042  return -1;
34043  }
34044 }
34045 
34046 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_pz(PyObject *o, CYTHON_UNUSED void *x) {
34047  return __pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(o);
34048 }
34049 
34050 static int __pyx_setprop_10cmeshTools_5CMesh_pz(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34051  if (v) {
34052  return __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(o, v);
34053  }
34054  else {
34055  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34056  return -1;
34057  }
34058 }
34059 
34060 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementIJK(PyObject *o, CYTHON_UNUSED void *x) {
34061  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(o);
34062 }
34063 
34064 static int __pyx_setprop_10cmeshTools_5CMesh_elementIJK(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34065  if (v) {
34066  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(o, v);
34067  }
34068  else {
34069  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(o);
34070  }
34071 }
34072 
34073 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_weights(PyObject *o, CYTHON_UNUSED void *x) {
34074  return __pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(o);
34075 }
34076 
34077 static int __pyx_setprop_10cmeshTools_5CMesh_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34078  if (v) {
34079  return __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(o, v);
34080  }
34081  else {
34082  return __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(o);
34083  }
34084 }
34085 
34086 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_U_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34087  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(o);
34088 }
34089 
34090 static int __pyx_setprop_10cmeshTools_5CMesh_U_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34091  if (v) {
34092  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(o, v);
34093  }
34094  else {
34095  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(o);
34096  }
34097 }
34098 
34099 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_V_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34100  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(o);
34101 }
34102 
34103 static int __pyx_setprop_10cmeshTools_5CMesh_V_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34104  if (v) {
34105  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(o, v);
34106  }
34107  else {
34108  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(o);
34109  }
34110 }
34111 
34112 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_W_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34113  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(o);
34114 }
34115 
34116 static int __pyx_setprop_10cmeshTools_5CMesh_W_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34117  if (v) {
34118  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(o, v);
34119  }
34120  else {
34121  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(o);
34122  }
34123 }
34124 
34125 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34126  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(o);
34127 }
34128 
34129 static int __pyx_setprop_10cmeshTools_5CMesh_elementDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34130  if (v) {
34131  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(o, v);
34132  }
34133  else {
34134  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(o);
34135  }
34136 }
34137 
34138 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementInnerDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34139  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(o);
34140 }
34141 
34142 static int __pyx_setprop_10cmeshTools_5CMesh_elementInnerDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34143  if (v) {
34144  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(o, v);
34145  }
34146  else {
34147  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(o);
34148  }
34149 }
34150 
34151 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34152  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(o);
34153 }
34154 
34155 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34156  if (v) {
34157  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(o, v);
34158  }
34159  else {
34160  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(o);
34161  }
34162 }
34163 
34164 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBarycentersArray(PyObject *o, CYTHON_UNUSED void *x) {
34165  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(o);
34166 }
34167 
34168 static int __pyx_setprop_10cmeshTools_5CMesh_elementBarycentersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34169  if (v) {
34170  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(o, v);
34171  }
34172  else {
34173  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(o);
34174  }
34175 }
34176 
34177 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray(PyObject *o, CYTHON_UNUSED void *x) {
34178  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(o);
34179 }
34180 
34181 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34182  if (v) {
34183  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(o, v);
34184  }
34185  else {
34186  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(o);
34187  }
34188 }
34189 
34190 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34191  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(o);
34192 }
34193 
34194 static int __pyx_setprop_10cmeshTools_5CMesh_nodeDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34195  if (v) {
34196  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(o, v);
34197  }
34198  else {
34199  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(o);
34200  }
34201 }
34202 
34203 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeSupportArray(PyObject *o, CYTHON_UNUSED void *x) {
34204  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(o);
34205 }
34206 
34207 static int __pyx_setprop_10cmeshTools_5CMesh_nodeSupportArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34208  if (v) {
34209  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(o, v);
34210  }
34211  else {
34212  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(o);
34213  }
34214 }
34215 
34216 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_h(PyObject *o, CYTHON_UNUSED void *x) {
34217  return __pyx_pw_10cmeshTools_5CMesh_1h_1__get__(o);
34218 }
34219 
34220 static int __pyx_setprop_10cmeshTools_5CMesh_h(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34221  if (v) {
34222  return __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(o, v);
34223  }
34224  else {
34225  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34226  return -1;
34227  }
34228 }
34229 
34230 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_hMin(PyObject *o, CYTHON_UNUSED void *x) {
34231  return __pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(o);
34232 }
34233 
34234 static int __pyx_setprop_10cmeshTools_5CMesh_hMin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34235  if (v) {
34236  return __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(o, v);
34237  }
34238  else {
34239  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34240  return -1;
34241  }
34242 }
34243 
34244 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_sigmaMax(PyObject *o, CYTHON_UNUSED void *x) {
34245  return __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(o);
34246 }
34247 
34248 static int __pyx_setprop_10cmeshTools_5CMesh_sigmaMax(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34249  if (v) {
34250  return __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(o, v);
34251  }
34252  else {
34253  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34254  return -1;
34255  }
34256 }
34257 
34258 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_volume(PyObject *o, CYTHON_UNUSED void *x) {
34259  return __pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(o);
34260 }
34261 
34262 static int __pyx_setprop_10cmeshTools_5CMesh_volume(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34263  if (v) {
34264  return __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(o, v);
34265  }
34266  else {
34267  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34268  return -1;
34269  }
34270 }
34271 
34272 static PyMethodDef __pyx_methods_10cmeshTools_CMesh[] = {
34273  {"deleteCMesh", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_3deleteCMesh, METH_NOARGS, 0},
34274  {"buildPythonMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterface, METH_NOARGS, 0},
34275  {"buildPythonMeshInterfaceNoArrays", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_7buildPythonMeshInterfaceNoArrays, METH_NOARGS, 0},
34276  {"__reduce_cython__", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_9__reduce_cython__, METH_NOARGS, 0},
34277  {"__setstate_cython__", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_11__setstate_cython__, METH_O, 0},
34278  {0, 0, 0, 0}
34279 };
34280 
34281 static struct PyGetSetDef __pyx_getsets_10cmeshTools_CMesh[] = {
34282  {(char *)"nElements_global", __pyx_getprop_10cmeshTools_5CMesh_nElements_global, __pyx_setprop_10cmeshTools_5CMesh_nElements_global, (char *)0, 0},
34283  {(char *)"nNodes_global", __pyx_getprop_10cmeshTools_5CMesh_nNodes_global, __pyx_setprop_10cmeshTools_5CMesh_nNodes_global, (char *)0, 0},
34284  {(char *)"nNodes_element", __pyx_getprop_10cmeshTools_5CMesh_nNodes_element, __pyx_setprop_10cmeshTools_5CMesh_nNodes_element, (char *)0, 0},
34285  {(char *)"nNodes_elementBoundary", __pyx_getprop_10cmeshTools_5CMesh_nNodes_elementBoundary, __pyx_setprop_10cmeshTools_5CMesh_nNodes_elementBoundary, (char *)0, 0},
34286  {(char *)"nElementBoundaries_element", __pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_element, __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_element, (char *)0, 0},
34287  {(char *)"nElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_global, (char *)0, 0},
34288  {(char *)"nInteriorElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global, (char *)0, 0},
34289  {(char *)"nExteriorElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global, (char *)0, 0},
34290  {(char *)"max_nElements_node", __pyx_getprop_10cmeshTools_5CMesh_max_nElements_node, __pyx_setprop_10cmeshTools_5CMesh_max_nElements_node, (char *)0, 0},
34291  {(char *)"nEdges_global", __pyx_getprop_10cmeshTools_5CMesh_nEdges_global, __pyx_setprop_10cmeshTools_5CMesh_nEdges_global, (char *)0, 0},
34292  {(char *)"max_nNodeNeighbors_node", __pyx_getprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node, __pyx_setprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node, (char *)0, 0},
34293  {(char *)"elementNodesArray", __pyx_getprop_10cmeshTools_5CMesh_elementNodesArray, __pyx_setprop_10cmeshTools_5CMesh_elementNodesArray, (char *)0, 0},
34294  {(char *)"nodeElementsArray", __pyx_getprop_10cmeshTools_5CMesh_nodeElementsArray, __pyx_setprop_10cmeshTools_5CMesh_nodeElementsArray, (char *)0, 0},
34295  {(char *)"nodeElementOffsets", __pyx_getprop_10cmeshTools_5CMesh_nodeElementOffsets, __pyx_setprop_10cmeshTools_5CMesh_nodeElementOffsets, (char *)0, 0},
34296  {(char *)"elementNeighborsArray", __pyx_getprop_10cmeshTools_5CMesh_elementNeighborsArray, __pyx_setprop_10cmeshTools_5CMesh_elementNeighborsArray, (char *)0, 0},
34297  {(char *)"elementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundariesArray, (char *)0, 0},
34298  {(char *)"elementBoundaryNodesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryNodesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryNodesArray, (char *)0, 0},
34299  {(char *)"elementBoundaryElementsArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryElementsArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryElementsArray, (char *)0, 0},
34300  {(char *)"elementBoundaryLocalElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray, (char *)0, 0},
34301  {(char *)"interiorElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_interiorElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_interiorElementBoundariesArray, (char *)0, 0},
34302  {(char *)"exteriorElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray, (char *)0, 0},
34303  {(char *)"edgeNodesArray", __pyx_getprop_10cmeshTools_5CMesh_edgeNodesArray, __pyx_setprop_10cmeshTools_5CMesh_edgeNodesArray, (char *)0, 0},
34304  {(char *)"nodeStarArray", __pyx_getprop_10cmeshTools_5CMesh_nodeStarArray, __pyx_setprop_10cmeshTools_5CMesh_nodeStarArray, (char *)0, 0},
34305  {(char *)"nodeStarOffsets", __pyx_getprop_10cmeshTools_5CMesh_nodeStarOffsets, __pyx_setprop_10cmeshTools_5CMesh_nodeStarOffsets, (char *)0, 0},
34306  {(char *)"elementMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_elementMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_elementMaterialTypes, (char *)0, 0},
34307  {(char *)"elementBoundaryMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes, (char *)0, 0},
34308  {(char *)"nodeMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_nodeMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_nodeMaterialTypes, (char *)0, 0},
34309  {(char *)"nodeArray", __pyx_getprop_10cmeshTools_5CMesh_nodeArray, __pyx_setprop_10cmeshTools_5CMesh_nodeArray, (char *)0, 0},
34310  {(char *)"nx", __pyx_getprop_10cmeshTools_5CMesh_nx, __pyx_setprop_10cmeshTools_5CMesh_nx, (char *)0, 0},
34311  {(char *)"ny", __pyx_getprop_10cmeshTools_5CMesh_ny, __pyx_setprop_10cmeshTools_5CMesh_ny, (char *)0, 0},
34312  {(char *)"nz", __pyx_getprop_10cmeshTools_5CMesh_nz, __pyx_setprop_10cmeshTools_5CMesh_nz, (char *)0, 0},
34313  {(char *)"px", __pyx_getprop_10cmeshTools_5CMesh_px, __pyx_setprop_10cmeshTools_5CMesh_px, (char *)0, 0},
34314  {(char *)"py", __pyx_getprop_10cmeshTools_5CMesh_py, __pyx_setprop_10cmeshTools_5CMesh_py, (char *)0, 0},
34315  {(char *)"pz", __pyx_getprop_10cmeshTools_5CMesh_pz, __pyx_setprop_10cmeshTools_5CMesh_pz, (char *)0, 0},
34316  {(char *)"elementIJK", __pyx_getprop_10cmeshTools_5CMesh_elementIJK, __pyx_setprop_10cmeshTools_5CMesh_elementIJK, (char *)0, 0},
34317  {(char *)"weights", __pyx_getprop_10cmeshTools_5CMesh_weights, __pyx_setprop_10cmeshTools_5CMesh_weights, (char *)0, 0},
34318  {(char *)"U_KNOT", __pyx_getprop_10cmeshTools_5CMesh_U_KNOT, __pyx_setprop_10cmeshTools_5CMesh_U_KNOT, (char *)0, 0},
34319  {(char *)"V_KNOT", __pyx_getprop_10cmeshTools_5CMesh_V_KNOT, __pyx_setprop_10cmeshTools_5CMesh_V_KNOT, (char *)0, 0},
34320  {(char *)"W_KNOT", __pyx_getprop_10cmeshTools_5CMesh_W_KNOT, __pyx_setprop_10cmeshTools_5CMesh_W_KNOT, (char *)0, 0},
34321  {(char *)"elementDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementDiametersArray, (char *)0, 0},
34322  {(char *)"elementInnerDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementInnerDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementInnerDiametersArray, (char *)0, 0},
34323  {(char *)"elementBoundaryDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray, (char *)0, 0},
34324  {(char *)"elementBarycentersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBarycentersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBarycentersArray, (char *)0, 0},
34325  {(char *)"elementBoundaryBarycentersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray, (char *)0, 0},
34326  {(char *)"nodeDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_nodeDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_nodeDiametersArray, (char *)0, 0},
34327  {(char *)"nodeSupportArray", __pyx_getprop_10cmeshTools_5CMesh_nodeSupportArray, __pyx_setprop_10cmeshTools_5CMesh_nodeSupportArray, (char *)0, 0},
34328  {(char *)"h", __pyx_getprop_10cmeshTools_5CMesh_h, __pyx_setprop_10cmeshTools_5CMesh_h, (char *)0, 0},
34329  {(char *)"hMin", __pyx_getprop_10cmeshTools_5CMesh_hMin, __pyx_setprop_10cmeshTools_5CMesh_hMin, (char *)0, 0},
34330  {(char *)"sigmaMax", __pyx_getprop_10cmeshTools_5CMesh_sigmaMax, __pyx_setprop_10cmeshTools_5CMesh_sigmaMax, (char *)0, 0},
34331  {(char *)"volume", __pyx_getprop_10cmeshTools_5CMesh_volume, __pyx_setprop_10cmeshTools_5CMesh_volume, (char *)0, 0},
34332  {0, 0, 0, 0, 0}
34333 };
34334 
34335 static PyTypeObject __pyx_type_10cmeshTools_CMesh = {
34336  PyVarObject_HEAD_INIT(0, 0)
34337  "cmeshTools.CMesh", /*tp_name*/
34338  sizeof(struct __pyx_obj_10cmeshTools_CMesh), /*tp_basicsize*/
34339  0, /*tp_itemsize*/
34340  __pyx_tp_dealloc_10cmeshTools_CMesh, /*tp_dealloc*/
34341  #if PY_VERSION_HEX < 0x030800b4
34342  0, /*tp_print*/
34343  #endif
34344  #if PY_VERSION_HEX >= 0x030800b4
34345  0, /*tp_vectorcall_offset*/
34346  #endif
34347  0, /*tp_getattr*/
34348  0, /*tp_setattr*/
34349  #if PY_MAJOR_VERSION < 3
34350  0, /*tp_compare*/
34351  #endif
34352  #if PY_MAJOR_VERSION >= 3
34353  0, /*tp_as_async*/
34354  #endif
34355  0, /*tp_repr*/
34356  0, /*tp_as_number*/
34357  0, /*tp_as_sequence*/
34358  0, /*tp_as_mapping*/
34359  0, /*tp_hash*/
34360  0, /*tp_call*/
34361  0, /*tp_str*/
34362  0, /*tp_getattro*/
34363  0, /*tp_setattro*/
34364  0, /*tp_as_buffer*/
34365  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34366  0, /*tp_doc*/
34367  __pyx_tp_traverse_10cmeshTools_CMesh, /*tp_traverse*/
34368  __pyx_tp_clear_10cmeshTools_CMesh, /*tp_clear*/
34369  0, /*tp_richcompare*/
34370  0, /*tp_weaklistoffset*/
34371  0, /*tp_iter*/
34372  0, /*tp_iternext*/
34373  __pyx_methods_10cmeshTools_CMesh, /*tp_methods*/
34374  0, /*tp_members*/
34375  __pyx_getsets_10cmeshTools_CMesh, /*tp_getset*/
34376  0, /*tp_base*/
34377  0, /*tp_dict*/
34378  0, /*tp_descr_get*/
34379  0, /*tp_descr_set*/
34380  0, /*tp_dictoffset*/
34381  __pyx_pw_10cmeshTools_5CMesh_1__init__, /*tp_init*/
34382  0, /*tp_alloc*/
34383  __pyx_tp_new_10cmeshTools_CMesh, /*tp_new*/
34384  0, /*tp_free*/
34385  0, /*tp_is_gc*/
34386  0, /*tp_bases*/
34387  0, /*tp_mro*/
34388  0, /*tp_cache*/
34389  0, /*tp_subclasses*/
34390  0, /*tp_weaklist*/
34391  0, /*tp_del*/
34392  0, /*tp_version_tag*/
34393  #if PY_VERSION_HEX >= 0x030400a1
34394  0, /*tp_finalize*/
34395  #endif
34396  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
34397  0, /*tp_vectorcall*/
34398  #endif
34399  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34400  0, /*tp_print*/
34401  #endif
34402  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
34403  0, /*tp_pypy_flags*/
34404  #endif
34405 };
34406 
34407 static PyObject *__pyx_tp_new_10cmeshTools_CMultilevelMesh(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34408  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p;
34409  PyObject *o;
34410  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34411  o = (*t->tp_alloc)(t, 0);
34412  } else {
34413  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34414  }
34415  if (unlikely(!o)) return 0;
34416  p = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o);
34417  p->cmeshList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34418  p->elementParentsArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34419  p->elementChildrenArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34420  p->elementChildrenOffsetsList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34421  return o;
34422 }
34423 
34424 static void __pyx_tp_dealloc_10cmeshTools_CMultilevelMesh(PyObject *o) {
34425  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34426  #if CYTHON_USE_TP_FINALIZE
34427  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34428  if (PyObject_CallFinalizerFromDealloc(o)) return;
34429  }
34430  #endif
34431  PyObject_GC_UnTrack(o);
34432  Py_CLEAR(p->cmeshList);
34433  Py_CLEAR(p->elementParentsArrayList);
34434  Py_CLEAR(p->elementChildrenArrayList);
34435  Py_CLEAR(p->elementChildrenOffsetsList);
34436  (*Py_TYPE(o)->tp_free)(o);
34437 }
34438 
34439 static int __pyx_tp_traverse_10cmeshTools_CMultilevelMesh(PyObject *o, visitproc v, void *a) {
34440  int e;
34441  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34442  if (p->cmeshList) {
34443  e = (*v)(p->cmeshList, a); if (e) return e;
34444  }
34445  if (p->elementParentsArrayList) {
34446  e = (*v)(p->elementParentsArrayList, a); if (e) return e;
34447  }
34448  if (p->elementChildrenArrayList) {
34449  e = (*v)(p->elementChildrenArrayList, a); if (e) return e;
34450  }
34451  if (p->elementChildrenOffsetsList) {
34452  e = (*v)(p->elementChildrenOffsetsList, a); if (e) return e;
34453  }
34454  return 0;
34455 }
34456 
34457 static int __pyx_tp_clear_10cmeshTools_CMultilevelMesh(PyObject *o) {
34458  PyObject* tmp;
34459  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34460  tmp = ((PyObject*)p->cmeshList);
34461  p->cmeshList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34462  Py_XDECREF(tmp);
34463  tmp = ((PyObject*)p->elementParentsArrayList);
34464  p->elementParentsArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34465  Py_XDECREF(tmp);
34466  tmp = ((PyObject*)p->elementChildrenArrayList);
34467  p->elementChildrenArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34468  Py_XDECREF(tmp);
34469  tmp = ((PyObject*)p->elementChildrenOffsetsList);
34470  p->elementChildrenOffsetsList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34471  Py_XDECREF(tmp);
34472  return 0;
34473 }
34474 
34475 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_nLevels(PyObject *o, CYTHON_UNUSED void *x) {
34476  return __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(o);
34477 }
34478 
34479 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_nLevels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34480  if (v) {
34481  return __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(o, v);
34482  }
34483  else {
34484  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34485  return -1;
34486  }
34487 }
34488 
34489 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_cmeshList(PyObject *o, CYTHON_UNUSED void *x) {
34490  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(o);
34491 }
34492 
34493 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_cmeshList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34494  if (v) {
34495  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(o, v);
34496  }
34497  else {
34498  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(o);
34499  }
34500 }
34501 
34502 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList(PyObject *o, CYTHON_UNUSED void *x) {
34503  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(o);
34504 }
34505 
34506 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34507  if (v) {
34508  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(o, v);
34509  }
34510  else {
34511  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(o);
34512  }
34513 }
34514 
34515 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList(PyObject *o, CYTHON_UNUSED void *x) {
34516  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(o);
34517 }
34518 
34519 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34520  if (v) {
34521  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(o, v);
34522  }
34523  else {
34524  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(o);
34525  }
34526 }
34527 
34528 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList(PyObject *o, CYTHON_UNUSED void *x) {
34529  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(o);
34530 }
34531 
34532 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34533  if (v) {
34534  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(o, v);
34535  }
34536  else {
34537  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(o);
34538  }
34539 }
34540 
34541 static PyMethodDef __pyx_methods_10cmeshTools_CMultilevelMesh[] = {
34542  {"buildPythonMultilevelMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface, METH_NOARGS, 0},
34543  {"__reduce_cython__", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__, METH_NOARGS, 0},
34544  {"__setstate_cython__", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__, METH_O, 0},
34545  {0, 0, 0, 0}
34546 };
34547 
34548 static struct PyGetSetDef __pyx_getsets_10cmeshTools_CMultilevelMesh[] = {
34549  {(char *)"nLevels", __pyx_getprop_10cmeshTools_15CMultilevelMesh_nLevels, __pyx_setprop_10cmeshTools_15CMultilevelMesh_nLevels, (char *)0, 0},
34550  {(char *)"cmeshList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_cmeshList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_cmeshList, (char *)0, 0},
34551  {(char *)"elementParentsArrayList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList, (char *)0, 0},
34552  {(char *)"elementChildrenArrayList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList, (char *)0, 0},
34553  {(char *)"elementChildrenOffsetsList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList, (char *)0, 0},
34554  {0, 0, 0, 0, 0}
34555 };
34556 
34557 static PyTypeObject __pyx_type_10cmeshTools_CMultilevelMesh = {
34558  PyVarObject_HEAD_INIT(0, 0)
34559  "cmeshTools.CMultilevelMesh", /*tp_name*/
34560  sizeof(struct __pyx_obj_10cmeshTools_CMultilevelMesh), /*tp_basicsize*/
34561  0, /*tp_itemsize*/
34562  __pyx_tp_dealloc_10cmeshTools_CMultilevelMesh, /*tp_dealloc*/
34563  #if PY_VERSION_HEX < 0x030800b4
34564  0, /*tp_print*/
34565  #endif
34566  #if PY_VERSION_HEX >= 0x030800b4
34567  0, /*tp_vectorcall_offset*/
34568  #endif
34569  0, /*tp_getattr*/
34570  0, /*tp_setattr*/
34571  #if PY_MAJOR_VERSION < 3
34572  0, /*tp_compare*/
34573  #endif
34574  #if PY_MAJOR_VERSION >= 3
34575  0, /*tp_as_async*/
34576  #endif
34577  0, /*tp_repr*/
34578  0, /*tp_as_number*/
34579  0, /*tp_as_sequence*/
34580  0, /*tp_as_mapping*/
34581  0, /*tp_hash*/
34582  0, /*tp_call*/
34583  0, /*tp_str*/
34584  0, /*tp_getattro*/
34585  0, /*tp_setattro*/
34586  0, /*tp_as_buffer*/
34587  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34588  0, /*tp_doc*/
34589  __pyx_tp_traverse_10cmeshTools_CMultilevelMesh, /*tp_traverse*/
34590  __pyx_tp_clear_10cmeshTools_CMultilevelMesh, /*tp_clear*/
34591  0, /*tp_richcompare*/
34592  0, /*tp_weaklistoffset*/
34593  0, /*tp_iter*/
34594  0, /*tp_iternext*/
34595  __pyx_methods_10cmeshTools_CMultilevelMesh, /*tp_methods*/
34596  0, /*tp_members*/
34597  __pyx_getsets_10cmeshTools_CMultilevelMesh, /*tp_getset*/
34598  0, /*tp_base*/
34599  0, /*tp_dict*/
34600  0, /*tp_descr_get*/
34601  0, /*tp_descr_set*/
34602  0, /*tp_dictoffset*/
34603  __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__, /*tp_init*/
34604  0, /*tp_alloc*/
34605  __pyx_tp_new_10cmeshTools_CMultilevelMesh, /*tp_new*/
34606  0, /*tp_free*/
34607  0, /*tp_is_gc*/
34608  0, /*tp_bases*/
34609  0, /*tp_mro*/
34610  0, /*tp_cache*/
34611  0, /*tp_subclasses*/
34612  0, /*tp_weaklist*/
34613  0, /*tp_del*/
34614  0, /*tp_version_tag*/
34615  #if PY_VERSION_HEX >= 0x030400a1
34616  0, /*tp_finalize*/
34617  #endif
34618  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
34619  0, /*tp_vectorcall*/
34620  #endif
34621  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34622  0, /*tp_print*/
34623  #endif
34624  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
34625  0, /*tp_pypy_flags*/
34626  #endif
34627 };
34628 static struct __pyx_vtabstruct_array __pyx_vtable_array;
34629 
34630 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
34631  struct __pyx_array_obj *p;
34632  PyObject *o;
34633  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34634  o = (*t->tp_alloc)(t, 0);
34635  } else {
34636  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34637  }
34638  if (unlikely(!o)) return 0;
34639  p = ((struct __pyx_array_obj *)o);
34640  p->__pyx_vtab = __pyx_vtabptr_array;
34641  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
34642  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
34643  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
34644  return o;
34645  bad:
34646  Py_DECREF(o); o = 0;
34647  return NULL;
34648 }
34649 
34650 static void __pyx_tp_dealloc_array(PyObject *o) {
34651  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
34652  #if CYTHON_USE_TP_FINALIZE
34653  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
34654  if (PyObject_CallFinalizerFromDealloc(o)) return;
34655  }
34656  #endif
34657  {
34658  PyObject *etype, *eval, *etb;
34659  PyErr_Fetch(&etype, &eval, &etb);
34660  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
34661  __pyx_array___dealloc__(o);
34662  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
34663  PyErr_Restore(etype, eval, etb);
34664  }
34665  Py_CLEAR(p->mode);
34666  Py_CLEAR(p->_format);
34667  (*Py_TYPE(o)->tp_free)(o);
34668 }
34669 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
34670  PyObject *r;
34671  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
34672  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
34673  Py_DECREF(x);
34674  return r;
34675 }
34676 
34677 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
34678  if (v) {
34679  return __pyx_array___setitem__(o, i, v);
34680  }
34681  else {
34682  PyErr_Format(PyExc_NotImplementedError,
34683  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
34684  return -1;
34685  }
34686 }
34687 
34688 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
34689  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
34690  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
34691  PyErr_Clear();
34692  v = __pyx_array___getattr__(o, n);
34693  }
34694  return v;
34695 }
34696 
34697 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
34698  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
34699 }
34700 
34701 static PyMethodDef __pyx_methods_array[] = {
34702  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
34703  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
34704  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
34705  {0, 0, 0, 0}
34706 };
34707 
34708 static struct PyGetSetDef __pyx_getsets_array[] = {
34709  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
34710  {0, 0, 0, 0, 0}
34711 };
34712 
34713 static PySequenceMethods __pyx_tp_as_sequence_array = {
34714  __pyx_array___len__, /*sq_length*/
34715  0, /*sq_concat*/
34716  0, /*sq_repeat*/
34717  __pyx_sq_item_array, /*sq_item*/
34718  0, /*sq_slice*/
34719  0, /*sq_ass_item*/
34720  0, /*sq_ass_slice*/
34721  0, /*sq_contains*/
34722  0, /*sq_inplace_concat*/
34723  0, /*sq_inplace_repeat*/
34724 };
34725 
34726 static PyMappingMethods __pyx_tp_as_mapping_array = {
34727  __pyx_array___len__, /*mp_length*/
34728  __pyx_array___getitem__, /*mp_subscript*/
34729  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
34730 };
34731 
34732 static PyBufferProcs __pyx_tp_as_buffer_array = {
34733  #if PY_MAJOR_VERSION < 3
34734  0, /*bf_getreadbuffer*/
34735  #endif
34736  #if PY_MAJOR_VERSION < 3
34737  0, /*bf_getwritebuffer*/
34738  #endif
34739  #if PY_MAJOR_VERSION < 3
34740  0, /*bf_getsegcount*/
34741  #endif
34742  #if PY_MAJOR_VERSION < 3
34743  0, /*bf_getcharbuffer*/
34744  #endif
34745  __pyx_array_getbuffer, /*bf_getbuffer*/
34746  0, /*bf_releasebuffer*/
34747 };
34748 
34749 static PyTypeObject __pyx_type___pyx_array = {
34750  PyVarObject_HEAD_INIT(0, 0)
34751  "cmeshTools.array", /*tp_name*/
34752  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
34753  0, /*tp_itemsize*/
34754  __pyx_tp_dealloc_array, /*tp_dealloc*/
34755  #if PY_VERSION_HEX < 0x030800b4
34756  0, /*tp_print*/
34757  #endif
34758  #if PY_VERSION_HEX >= 0x030800b4
34759  0, /*tp_vectorcall_offset*/
34760  #endif
34761  0, /*tp_getattr*/
34762  0, /*tp_setattr*/
34763  #if PY_MAJOR_VERSION < 3
34764  0, /*tp_compare*/
34765  #endif
34766  #if PY_MAJOR_VERSION >= 3
34767  0, /*tp_as_async*/
34768  #endif
34769  0, /*tp_repr*/
34770  0, /*tp_as_number*/
34771  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
34772  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
34773  0, /*tp_hash*/
34774  0, /*tp_call*/
34775  0, /*tp_str*/
34776  __pyx_tp_getattro_array, /*tp_getattro*/
34777  0, /*tp_setattro*/
34778  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
34779  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
34780  0, /*tp_doc*/
34781  0, /*tp_traverse*/
34782  0, /*tp_clear*/
34783  0, /*tp_richcompare*/
34784  0, /*tp_weaklistoffset*/
34785  0, /*tp_iter*/
34786  0, /*tp_iternext*/
34787  __pyx_methods_array, /*tp_methods*/
34788  0, /*tp_members*/
34789  __pyx_getsets_array, /*tp_getset*/
34790  0, /*tp_base*/
34791  0, /*tp_dict*/
34792  0, /*tp_descr_get*/
34793  0, /*tp_descr_set*/
34794  0, /*tp_dictoffset*/
34795  0, /*tp_init*/
34796  0, /*tp_alloc*/
34797  __pyx_tp_new_array, /*tp_new*/
34798  0, /*tp_free*/
34799  0, /*tp_is_gc*/
34800  0, /*tp_bases*/
34801  0, /*tp_mro*/
34802  0, /*tp_cache*/
34803  0, /*tp_subclasses*/
34804  0, /*tp_weaklist*/
34805  0, /*tp_del*/
34806  0, /*tp_version_tag*/
34807  #if PY_VERSION_HEX >= 0x030400a1
34808  0, /*tp_finalize*/
34809  #endif
34810  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
34811  0, /*tp_vectorcall*/
34812  #endif
34813  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34814  0, /*tp_print*/
34815  #endif
34816  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
34817  0, /*tp_pypy_flags*/
34818  #endif
34819 };
34820 
34821 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34822  struct __pyx_MemviewEnum_obj *p;
34823  PyObject *o;
34824  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34825  o = (*t->tp_alloc)(t, 0);
34826  } else {
34827  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34828  }
34829  if (unlikely(!o)) return 0;
34830  p = ((struct __pyx_MemviewEnum_obj *)o);
34831  p->name = Py_None; Py_INCREF(Py_None);
34832  return o;
34833 }
34834 
34835 static void __pyx_tp_dealloc_Enum(PyObject *o) {
34836  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
34837  #if CYTHON_USE_TP_FINALIZE
34838  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34839  if (PyObject_CallFinalizerFromDealloc(o)) return;
34840  }
34841  #endif
34842  PyObject_GC_UnTrack(o);
34843  Py_CLEAR(p->name);
34844  (*Py_TYPE(o)->tp_free)(o);
34845 }
34846 
34847 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
34848  int e;
34849  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
34850  if (p->name) {
34851  e = (*v)(p->name, a); if (e) return e;
34852  }
34853  return 0;
34854 }
34855 
34856 static int __pyx_tp_clear_Enum(PyObject *o) {
34857  PyObject* tmp;
34858  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
34859  tmp = ((PyObject*)p->name);
34860  p->name = Py_None; Py_INCREF(Py_None);
34861  Py_XDECREF(tmp);
34862  return 0;
34863 }
34864 
34865 static PyMethodDef __pyx_methods_Enum[] = {
34866  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
34867  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
34868  {0, 0, 0, 0}
34869 };
34870 
34871 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
34872  PyVarObject_HEAD_INIT(0, 0)
34873  "cmeshTools.Enum", /*tp_name*/
34874  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
34875  0, /*tp_itemsize*/
34876  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
34877  #if PY_VERSION_HEX < 0x030800b4
34878  0, /*tp_print*/
34879  #endif
34880  #if PY_VERSION_HEX >= 0x030800b4
34881  0, /*tp_vectorcall_offset*/
34882  #endif
34883  0, /*tp_getattr*/
34884  0, /*tp_setattr*/
34885  #if PY_MAJOR_VERSION < 3
34886  0, /*tp_compare*/
34887  #endif
34888  #if PY_MAJOR_VERSION >= 3
34889  0, /*tp_as_async*/
34890  #endif
34891  __pyx_MemviewEnum___repr__, /*tp_repr*/
34892  0, /*tp_as_number*/
34893  0, /*tp_as_sequence*/
34894  0, /*tp_as_mapping*/
34895  0, /*tp_hash*/
34896  0, /*tp_call*/
34897  0, /*tp_str*/
34898  0, /*tp_getattro*/
34899  0, /*tp_setattro*/
34900  0, /*tp_as_buffer*/
34901  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34902  0, /*tp_doc*/
34903  __pyx_tp_traverse_Enum, /*tp_traverse*/
34904  __pyx_tp_clear_Enum, /*tp_clear*/
34905  0, /*tp_richcompare*/
34906  0, /*tp_weaklistoffset*/
34907  0, /*tp_iter*/
34908  0, /*tp_iternext*/
34909  __pyx_methods_Enum, /*tp_methods*/
34910  0, /*tp_members*/
34911  0, /*tp_getset*/
34912  0, /*tp_base*/
34913  0, /*tp_dict*/
34914  0, /*tp_descr_get*/
34915  0, /*tp_descr_set*/
34916  0, /*tp_dictoffset*/
34917  __pyx_MemviewEnum___init__, /*tp_init*/
34918  0, /*tp_alloc*/
34919  __pyx_tp_new_Enum, /*tp_new*/
34920  0, /*tp_free*/
34921  0, /*tp_is_gc*/
34922  0, /*tp_bases*/
34923  0, /*tp_mro*/
34924  0, /*tp_cache*/
34925  0, /*tp_subclasses*/
34926  0, /*tp_weaklist*/
34927  0, /*tp_del*/
34928  0, /*tp_version_tag*/
34929  #if PY_VERSION_HEX >= 0x030400a1
34930  0, /*tp_finalize*/
34931  #endif
34932  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
34933  0, /*tp_vectorcall*/
34934  #endif
34935  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34936  0, /*tp_print*/
34937  #endif
34938  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
34939  0, /*tp_pypy_flags*/
34940  #endif
34941 };
34942 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
34943 
34944 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
34945  struct __pyx_memoryview_obj *p;
34946  PyObject *o;
34947  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34948  o = (*t->tp_alloc)(t, 0);
34949  } else {
34950  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34951  }
34952  if (unlikely(!o)) return 0;
34953  p = ((struct __pyx_memoryview_obj *)o);
34954  p->__pyx_vtab = __pyx_vtabptr_memoryview;
34955  p->obj = Py_None; Py_INCREF(Py_None);
34956  p->_size = Py_None; Py_INCREF(Py_None);
34957  p->_array_interface = Py_None; Py_INCREF(Py_None);
34958  p->view.obj = NULL;
34959  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
34960  return o;
34961  bad:
34962  Py_DECREF(o); o = 0;
34963  return NULL;
34964 }
34965 
34966 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
34967  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
34968  #if CYTHON_USE_TP_FINALIZE
34969  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34970  if (PyObject_CallFinalizerFromDealloc(o)) return;
34971  }
34972  #endif
34973  PyObject_GC_UnTrack(o);
34974  {
34975  PyObject *etype, *eval, *etb;
34976  PyErr_Fetch(&etype, &eval, &etb);
34977  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
34978  __pyx_memoryview___dealloc__(o);
34979  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
34980  PyErr_Restore(etype, eval, etb);
34981  }
34982  Py_CLEAR(p->obj);
34983  Py_CLEAR(p->_size);
34984  Py_CLEAR(p->_array_interface);
34985  (*Py_TYPE(o)->tp_free)(o);
34986 }
34987 
34988 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
34989  int e;
34990  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
34991  if (p->obj) {
34992  e = (*v)(p->obj, a); if (e) return e;
34993  }
34994  if (p->_size) {
34995  e = (*v)(p->_size, a); if (e) return e;
34996  }
34997  if (p->_array_interface) {
34998  e = (*v)(p->_array_interface, a); if (e) return e;
34999  }
35000  if (p->view.obj) {
35001  e = (*v)(p->view.obj, a); if (e) return e;
35002  }
35003  return 0;
35004 }
35005 
35006 static int __pyx_tp_clear_memoryview(PyObject *o) {
35007  PyObject* tmp;
35008  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35009  tmp = ((PyObject*)p->obj);
35010  p->obj = Py_None; Py_INCREF(Py_None);
35011  Py_XDECREF(tmp);
35012  tmp = ((PyObject*)p->_size);
35013  p->_size = Py_None; Py_INCREF(Py_None);
35014  Py_XDECREF(tmp);
35015  tmp = ((PyObject*)p->_array_interface);
35016  p->_array_interface = Py_None; Py_INCREF(Py_None);
35017  Py_XDECREF(tmp);
35018  Py_CLEAR(p->view.obj);
35019  return 0;
35020 }
35021 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
35022  PyObject *r;
35023  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
35024  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
35025  Py_DECREF(x);
35026  return r;
35027 }
35028 
35029 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
35030  if (v) {
35031  return __pyx_memoryview___setitem__(o, i, v);
35032  }
35033  else {
35034  PyErr_Format(PyExc_NotImplementedError,
35035  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
35036  return -1;
35037  }
35038 }
35039 
35040 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
35041  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
35042 }
35043 
35044 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
35045  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
35046 }
35047 
35048 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
35049  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
35050 }
35051 
35052 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
35053  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
35054 }
35055 
35056 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
35057  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
35058 }
35059 
35060 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
35061  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
35062 }
35063 
35064 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
35065  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
35066 }
35067 
35068 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
35069  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
35070 }
35071 
35072 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
35073  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
35074 }
35075 
35076 static PyMethodDef __pyx_methods_memoryview[] = {
35077  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
35078  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
35079  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
35080  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
35081  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
35082  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
35083  {0, 0, 0, 0}
35084 };
35085 
35086 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
35087  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
35088  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
35089  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
35090  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
35091  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
35092  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
35093  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
35094  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
35095  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
35096  {0, 0, 0, 0, 0}
35097 };
35098 
35099 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
35100  __pyx_memoryview___len__, /*sq_length*/
35101  0, /*sq_concat*/
35102  0, /*sq_repeat*/
35103  __pyx_sq_item_memoryview, /*sq_item*/
35104  0, /*sq_slice*/
35105  0, /*sq_ass_item*/
35106  0, /*sq_ass_slice*/
35107  0, /*sq_contains*/
35108  0, /*sq_inplace_concat*/
35109  0, /*sq_inplace_repeat*/
35110 };
35111 
35112 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
35113  __pyx_memoryview___len__, /*mp_length*/
35114  __pyx_memoryview___getitem__, /*mp_subscript*/
35115  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
35116 };
35117 
35118 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
35119  #if PY_MAJOR_VERSION < 3
35120  0, /*bf_getreadbuffer*/
35121  #endif
35122  #if PY_MAJOR_VERSION < 3
35123  0, /*bf_getwritebuffer*/
35124  #endif
35125  #if PY_MAJOR_VERSION < 3
35126  0, /*bf_getsegcount*/
35127  #endif
35128  #if PY_MAJOR_VERSION < 3
35129  0, /*bf_getcharbuffer*/
35130  #endif
35131  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
35132  0, /*bf_releasebuffer*/
35133 };
35134 
35135 static PyTypeObject __pyx_type___pyx_memoryview = {
35136  PyVarObject_HEAD_INIT(0, 0)
35137  "cmeshTools.memoryview", /*tp_name*/
35138  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
35139  0, /*tp_itemsize*/
35140  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
35141  #if PY_VERSION_HEX < 0x030800b4
35142  0, /*tp_print*/
35143  #endif
35144  #if PY_VERSION_HEX >= 0x030800b4
35145  0, /*tp_vectorcall_offset*/
35146  #endif
35147  0, /*tp_getattr*/
35148  0, /*tp_setattr*/
35149  #if PY_MAJOR_VERSION < 3
35150  0, /*tp_compare*/
35151  #endif
35152  #if PY_MAJOR_VERSION >= 3
35153  0, /*tp_as_async*/
35154  #endif
35155  __pyx_memoryview___repr__, /*tp_repr*/
35156  0, /*tp_as_number*/
35157  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
35158  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
35159  0, /*tp_hash*/
35160  0, /*tp_call*/
35161  __pyx_memoryview___str__, /*tp_str*/
35162  0, /*tp_getattro*/
35163  0, /*tp_setattro*/
35164  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
35165  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35166  0, /*tp_doc*/
35167  __pyx_tp_traverse_memoryview, /*tp_traverse*/
35168  __pyx_tp_clear_memoryview, /*tp_clear*/
35169  0, /*tp_richcompare*/
35170  0, /*tp_weaklistoffset*/
35171  0, /*tp_iter*/
35172  0, /*tp_iternext*/
35173  __pyx_methods_memoryview, /*tp_methods*/
35174  0, /*tp_members*/
35175  __pyx_getsets_memoryview, /*tp_getset*/
35176  0, /*tp_base*/
35177  0, /*tp_dict*/
35178  0, /*tp_descr_get*/
35179  0, /*tp_descr_set*/
35180  0, /*tp_dictoffset*/
35181  0, /*tp_init*/
35182  0, /*tp_alloc*/
35183  __pyx_tp_new_memoryview, /*tp_new*/
35184  0, /*tp_free*/
35185  0, /*tp_is_gc*/
35186  0, /*tp_bases*/
35187  0, /*tp_mro*/
35188  0, /*tp_cache*/
35189  0, /*tp_subclasses*/
35190  0, /*tp_weaklist*/
35191  0, /*tp_del*/
35192  0, /*tp_version_tag*/
35193  #if PY_VERSION_HEX >= 0x030400a1
35194  0, /*tp_finalize*/
35195  #endif
35196  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
35197  0, /*tp_vectorcall*/
35198  #endif
35199  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35200  0, /*tp_print*/
35201  #endif
35202  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
35203  0, /*tp_pypy_flags*/
35204  #endif
35205 };
35206 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
35207 
35208 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
35209  struct __pyx_memoryviewslice_obj *p;
35210  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
35211  if (unlikely(!o)) return 0;
35212  p = ((struct __pyx_memoryviewslice_obj *)o);
35213  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
35214  p->from_object = Py_None; Py_INCREF(Py_None);
35215  p->from_slice.memview = NULL;
35216  return o;
35217 }
35218 
35219 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
35220  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35221  #if CYTHON_USE_TP_FINALIZE
35222  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35223  if (PyObject_CallFinalizerFromDealloc(o)) return;
35224  }
35225  #endif
35226  PyObject_GC_UnTrack(o);
35227  {
35228  PyObject *etype, *eval, *etb;
35229  PyErr_Fetch(&etype, &eval, &etb);
35230  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
35231  __pyx_memoryviewslice___dealloc__(o);
35232  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
35233  PyErr_Restore(etype, eval, etb);
35234  }
35235  Py_CLEAR(p->from_object);
35236  PyObject_GC_Track(o);
35237  __pyx_tp_dealloc_memoryview(o);
35238 }
35239 
35240 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
35241  int e;
35242  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35243  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
35244  if (p->from_object) {
35245  e = (*v)(p->from_object, a); if (e) return e;
35246  }
35247  return 0;
35248 }
35249 
35250 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
35251  PyObject* tmp;
35252  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35253  __pyx_tp_clear_memoryview(o);
35254  tmp = ((PyObject*)p->from_object);
35255  p->from_object = Py_None; Py_INCREF(Py_None);
35256  Py_XDECREF(tmp);
35257  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
35258  return 0;
35259 }
35260 
35261 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
35262  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
35263 }
35264 
35265 static PyMethodDef __pyx_methods__memoryviewslice[] = {
35266  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
35267  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
35268  {0, 0, 0, 0}
35269 };
35270 
35271 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
35272  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
35273  {0, 0, 0, 0, 0}
35274 };
35275 
35276 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
35277  PyVarObject_HEAD_INIT(0, 0)
35278  "cmeshTools._memoryviewslice", /*tp_name*/
35279  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
35280  0, /*tp_itemsize*/
35281  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
35282  #if PY_VERSION_HEX < 0x030800b4
35283  0, /*tp_print*/
35284  #endif
35285  #if PY_VERSION_HEX >= 0x030800b4
35286  0, /*tp_vectorcall_offset*/
35287  #endif
35288  0, /*tp_getattr*/
35289  0, /*tp_setattr*/
35290  #if PY_MAJOR_VERSION < 3
35291  0, /*tp_compare*/
35292  #endif
35293  #if PY_MAJOR_VERSION >= 3
35294  0, /*tp_as_async*/
35295  #endif
35296  #if CYTHON_COMPILING_IN_PYPY
35297  __pyx_memoryview___repr__, /*tp_repr*/
35298  #else
35299  0, /*tp_repr*/
35300  #endif
35301  0, /*tp_as_number*/
35302  0, /*tp_as_sequence*/
35303  0, /*tp_as_mapping*/
35304  0, /*tp_hash*/
35305  0, /*tp_call*/
35306  #if CYTHON_COMPILING_IN_PYPY
35307  __pyx_memoryview___str__, /*tp_str*/
35308  #else
35309  0, /*tp_str*/
35310  #endif
35311  0, /*tp_getattro*/
35312  0, /*tp_setattro*/
35313  0, /*tp_as_buffer*/
35314  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35315  "Internal class for passing memoryview slices to Python", /*tp_doc*/
35316  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
35317  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
35318  0, /*tp_richcompare*/
35319  0, /*tp_weaklistoffset*/
35320  0, /*tp_iter*/
35321  0, /*tp_iternext*/
35322  __pyx_methods__memoryviewslice, /*tp_methods*/
35323  0, /*tp_members*/
35324  __pyx_getsets__memoryviewslice, /*tp_getset*/
35325  0, /*tp_base*/
35326  0, /*tp_dict*/
35327  0, /*tp_descr_get*/
35328  0, /*tp_descr_set*/
35329  0, /*tp_dictoffset*/
35330  0, /*tp_init*/
35331  0, /*tp_alloc*/
35332  __pyx_tp_new__memoryviewslice, /*tp_new*/
35333  0, /*tp_free*/
35334  0, /*tp_is_gc*/
35335  0, /*tp_bases*/
35336  0, /*tp_mro*/
35337  0, /*tp_cache*/
35338  0, /*tp_subclasses*/
35339  0, /*tp_weaklist*/
35340  0, /*tp_del*/
35341  0, /*tp_version_tag*/
35342  #if PY_VERSION_HEX >= 0x030400a1
35343  0, /*tp_finalize*/
35344  #endif
35345  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
35346  0, /*tp_vectorcall*/
35347  #endif
35348  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
35349  0, /*tp_print*/
35350  #endif
35351  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
35352  0, /*tp_pypy_flags*/
35353  #endif
35354 };
35355 
35356 static PyMethodDef __pyx_methods[] = {
35357  {"generateTetrahedralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35358  {"cmeshToolsComputeGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron, METH_O, 0},
35359  {"generateFromTriangleFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_11generateFromTriangleFiles, METH_VARARGS|METH_KEYWORDS, 0},
35360  {"writeTriangleFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_13writeTriangleFiles, METH_VARARGS|METH_KEYWORDS, 0},
35361  {"generateFromTetgenFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_15generateFromTetgenFiles, METH_VARARGS|METH_KEYWORDS, 0},
35362  {"generateFromTetgenFilesParallel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel, METH_VARARGS|METH_KEYWORDS, 0},
35363  {"writeTetgenFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_19writeTetgenFiles, METH_VARARGS|METH_KEYWORDS, 0},
35364  {"write3dmFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_21write3dmFiles, METH_VARARGS|METH_KEYWORDS, 0},
35365  {"write2dmFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_23write2dmFiles, METH_VARARGS|METH_KEYWORDS, 0},
35366  {"generateFromHexFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_25generateFromHexFile, METH_VARARGS|METH_KEYWORDS, 0},
35367  {"generateFrom3DMFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_27generateFrom3DMFile, METH_VARARGS|METH_KEYWORDS, 0},
35368  {"generateFrom2DMFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_29generateFrom2DMFile, METH_VARARGS|METH_KEYWORDS, 0},
35369  {"computeGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron, METH_O, 0},
35370  {"allocateGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron, METH_O, 0},
35371  {"allocateNodeAndElementNodeDataStructures", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures, METH_VARARGS|METH_KEYWORDS, 0},
35372  {"constructElementBoundaryElementsArray", (PyCFunction)__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray, METH_O, 0},
35373  {"generateTriangularMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35374  {"generateHexahedralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35375  {"generateQuadrilateralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35376  {"computeGeometricInfo_triangle", (PyCFunction)__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle, METH_O, 0},
35377  {"allocateGeometricInfo_triangle", (PyCFunction)__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle, METH_O, 0},
35378  {"generateEdgeMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35379  {"computeGeometricInfo_edge", (PyCFunction)__pyx_pw_10cmeshTools_51computeGeometricInfo_edge, METH_O, 0},
35380  {"allocateGeometricInfo_edge", (PyCFunction)__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge, METH_O, 0},
35381  {"computeGeometricInfo_hexahedron", (PyCFunction)__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron, METH_O, 0},
35382  {"computeGeometricInfo_quadrilateral", (PyCFunction)__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral, METH_O, 0},
35383  {"allocateGeometricInfo_hexahedron", (PyCFunction)__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron, METH_O, 0},
35384  {"allocateGeometricInfo_quadrilateral", (PyCFunction)__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral, METH_O, 0},
35385  {"computeGeometricInfo_NURBS", (PyCFunction)__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS, METH_O, 0},
35386  {"allocateGeometricInfo_NURBS", (PyCFunction)__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS, METH_O, 0},
35387  {0, 0, 0, 0}
35388 };
35389 
35390 #if PY_MAJOR_VERSION >= 3
35391 #if CYTHON_PEP489_MULTI_PHASE_INIT
35392 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
35393 static int __pyx_pymod_exec_cmeshTools(PyObject* module); /*proto*/
35394 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
35395  {Py_mod_create, (void*)__pyx_pymod_create},
35396  {Py_mod_exec, (void*)__pyx_pymod_exec_cmeshTools},
35397  {0, NULL}
35398 };
35399 #endif
35400 
35401 static struct PyModuleDef __pyx_moduledef = {
35402  PyModuleDef_HEAD_INIT,
35403  "cmeshTools",
35404  0, /* m_doc */
35405  #if CYTHON_PEP489_MULTI_PHASE_INIT
35406  0, /* m_size */
35407  #else
35408  -1, /* m_size */
35409  #endif
35410  __pyx_methods /* m_methods */,
35411  #if CYTHON_PEP489_MULTI_PHASE_INIT
35412  __pyx_moduledef_slots, /* m_slots */
35413  #else
35414  NULL, /* m_reload */
35415  #endif
35416  NULL, /* m_traverse */
35417  NULL, /* m_clear */
35418  NULL /* m_free */
35419 };
35420 #endif
35421 #ifndef CYTHON_SMALL_CODE
35422 #if defined(__clang__)
35423  #define CYTHON_SMALL_CODE
35424 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
35425  #define CYTHON_SMALL_CODE __attribute__((cold))
35426 #else
35427  #define CYTHON_SMALL_CODE
35428 #endif
35429 #endif
35430 
35431 static __Pyx_StringTabEntry __pyx_string_tab[] = {
35432  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
35433  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
35434  {&__pyx_n_s_CMesh, __pyx_k_CMesh, sizeof(__pyx_k_CMesh), 0, 0, 1, 1},
35435  {&__pyx_n_s_CMultilevelMesh, __pyx_k_CMultilevelMesh, sizeof(__pyx_k_CMultilevelMesh), 0, 0, 1, 1},
35436  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
35437  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
35438  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
35439  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
35440  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
35441  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
35442  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
35443  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
35444  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
35445  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
35446  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
35447  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
35448  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
35449  {&__pyx_n_s_Lx, __pyx_k_Lx, sizeof(__pyx_k_Lx), 0, 0, 1, 1},
35450  {&__pyx_n_s_Ly, __pyx_k_Ly, sizeof(__pyx_k_Ly), 0, 0, 1, 1},
35451  {&__pyx_n_s_Lz, __pyx_k_Lz, sizeof(__pyx_k_Lz), 0, 0, 1, 1},
35452  {&__pyx_n_s_MPI, __pyx_k_MPI, sizeof(__pyx_k_MPI), 0, 0, 1, 1},
35453  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
35454  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
35455  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
35456  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
35457  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
35458  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
35459  {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0},
35460  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
35461  {&__pyx_n_s_U_KNOT, __pyx_k_U_KNOT, sizeof(__pyx_k_U_KNOT), 0, 0, 1, 1},
35462  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
35463  {&__pyx_n_s_V_KNOT, __pyx_k_V_KNOT, sizeof(__pyx_k_V_KNOT), 0, 0, 1, 1},
35464  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
35465  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
35466  {&__pyx_n_s_W_KNOT, __pyx_k_W_KNOT, sizeof(__pyx_k_W_KNOT), 0, 0, 1, 1},
35467  {&__pyx_kp_b__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 0, 0},
35468  {&__pyx_kp_b__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 0, 0},
35469  {&__pyx_kp_b__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 0, 0},
35470  {&__pyx_kp_b__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 0, 0},
35471  {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0},
35472  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
35473  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
35474  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
35475  {&__pyx_n_s_buildPythonMeshInterface, __pyx_k_buildPythonMeshInterface, sizeof(__pyx_k_buildPythonMeshInterface), 0, 0, 1, 1},
35476  {&__pyx_n_s_buildPythonMeshInterfaceNoArrays, __pyx_k_buildPythonMeshInterfaceNoArrays, sizeof(__pyx_k_buildPythonMeshInterfaceNoArrays), 0, 0, 1, 1},
35477  {&__pyx_n_s_buildPythonMultilevelMeshInterfa, __pyx_k_buildPythonMultilevelMeshInterfa, sizeof(__pyx_k_buildPythonMultilevelMeshInterfa), 0, 0, 1, 1},
35478  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
35479  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
35480  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
35481  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
35482  {&__pyx_n_s_cmesh, __pyx_k_cmesh, sizeof(__pyx_k_cmesh), 0, 0, 1, 1},
35483  {&__pyx_n_s_cmeshList, __pyx_k_cmeshList, sizeof(__pyx_k_cmeshList), 0, 0, 1, 1},
35484  {&__pyx_n_s_cmeshTools, __pyx_k_cmeshTools, sizeof(__pyx_k_cmeshTools), 0, 0, 1, 1},
35485  {&__pyx_n_s_cmultilevelMesh, __pyx_k_cmultilevelMesh, sizeof(__pyx_k_cmultilevelMesh), 0, 0, 1, 1},
35486  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
35487  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
35488  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
35489  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
35490  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
35491  {&__pyx_n_s_edgeNodesArray, __pyx_k_edgeNodesArray, sizeof(__pyx_k_edgeNodesArray), 0, 0, 1, 1},
35492  {&__pyx_n_s_elementBarycentersArray, __pyx_k_elementBarycentersArray, sizeof(__pyx_k_elementBarycentersArray), 0, 0, 1, 1},
35493  {&__pyx_n_s_elementBoundariesArray, __pyx_k_elementBoundariesArray, sizeof(__pyx_k_elementBoundariesArray), 0, 0, 1, 1},
35494  {&__pyx_n_s_elementBoundaryBarycentersArray, __pyx_k_elementBoundaryBarycentersArray, sizeof(__pyx_k_elementBoundaryBarycentersArray), 0, 0, 1, 1},
35495  {&__pyx_n_s_elementBoundaryDiametersArray, __pyx_k_elementBoundaryDiametersArray, sizeof(__pyx_k_elementBoundaryDiametersArray), 0, 0, 1, 1},
35496  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
35497  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
35498  {&__pyx_n_s_elementBoundaryMaterialTypes, __pyx_k_elementBoundaryMaterialTypes, sizeof(__pyx_k_elementBoundaryMaterialTypes), 0, 0, 1, 1},
35499  {&__pyx_n_s_elementBoundaryNodesArray, __pyx_k_elementBoundaryNodesArray, sizeof(__pyx_k_elementBoundaryNodesArray), 0, 0, 1, 1},
35500  {&__pyx_n_s_elementChildrenArrayList, __pyx_k_elementChildrenArrayList, sizeof(__pyx_k_elementChildrenArrayList), 0, 0, 1, 1},
35501  {&__pyx_n_s_elementChildrenOffsetsList, __pyx_k_elementChildrenOffsetsList, sizeof(__pyx_k_elementChildrenOffsetsList), 0, 0, 1, 1},
35502  {&__pyx_n_s_elementDiametersArray, __pyx_k_elementDiametersArray, sizeof(__pyx_k_elementDiametersArray), 0, 0, 1, 1},
35503  {&__pyx_n_s_elementIJK, __pyx_k_elementIJK, sizeof(__pyx_k_elementIJK), 0, 0, 1, 1},
35504  {&__pyx_n_s_elementInnerDiametersArray, __pyx_k_elementInnerDiametersArray, sizeof(__pyx_k_elementInnerDiametersArray), 0, 0, 1, 1},
35505  {&__pyx_n_s_elementMaterialTypes, __pyx_k_elementMaterialTypes, sizeof(__pyx_k_elementMaterialTypes), 0, 0, 1, 1},
35506  {&__pyx_n_s_elementNeighborsArray, __pyx_k_elementNeighborsArray, sizeof(__pyx_k_elementNeighborsArray), 0, 0, 1, 1},
35507  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
35508  {&__pyx_n_s_elementParentsArrayList, __pyx_k_elementParentsArrayList, sizeof(__pyx_k_elementParentsArrayList), 0, 0, 1, 1},
35509  {&__pyx_n_s_elementTagArray, __pyx_k_elementTagArray, sizeof(__pyx_k_elementTagArray), 0, 0, 1, 1},
35510  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
35511  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
35512  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
35513  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
35514  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
35515  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
35516  {&__pyx_n_s_failed, __pyx_k_failed, sizeof(__pyx_k_failed), 0, 0, 1, 1},
35517  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
35518  {&__pyx_n_s_filebase, __pyx_k_filebase, sizeof(__pyx_k_filebase), 0, 0, 1, 1},
35519  {&__pyx_n_s_finestLevel, __pyx_k_finestLevel, sizeof(__pyx_k_finestLevel), 0, 0, 1, 1},
35520  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
35521  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
35522  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
35523  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
35524  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
35525  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
35526  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
35527  {&__pyx_n_s_hMin, __pyx_k_hMin, sizeof(__pyx_k_hMin), 0, 0, 1, 1},
35528  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
35529  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
35530  {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
35531  {&__pyx_n_s_interiorElementBoundariesArray, __pyx_k_interiorElementBoundariesArray, sizeof(__pyx_k_interiorElementBoundariesArray), 0, 0, 1, 1},
35532  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
35533  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
35534  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
35535  {&__pyx_n_s_locallyRefineMultilevelMesh, __pyx_k_locallyRefineMultilevelMesh, sizeof(__pyx_k_locallyRefineMultilevelMesh), 0, 0, 1, 1},
35536  {&__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp, __pyx_k_locallyRefine_nSpace_0_d_not_imp, sizeof(__pyx_k_locallyRefine_nSpace_0_d_not_imp), 0, 0, 1, 0},
35537  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
35538  {&__pyx_n_s_max_nElements_node, __pyx_k_max_nElements_node, sizeof(__pyx_k_max_nElements_node), 0, 0, 1, 1},
35539  {&__pyx_n_s_max_nNodeNeighbors_node, __pyx_k_max_nNodeNeighbors_node, sizeof(__pyx_k_max_nNodeNeighbors_node), 0, 0, 1, 1},
35540  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
35541  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
35542  {&__pyx_n_s_mpi4py, __pyx_k_mpi4py, sizeof(__pyx_k_mpi4py), 0, 0, 1, 1},
35543  {&__pyx_n_s_nEdges_global, __pyx_k_nEdges_global, sizeof(__pyx_k_nEdges_global), 0, 0, 1, 1},
35544  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
35545  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
35546  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
35547  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
35548  {&__pyx_n_s_nInteriorElementBoundaries_globa, __pyx_k_nInteriorElementBoundaries_globa, sizeof(__pyx_k_nInteriorElementBoundaries_globa), 0, 0, 1, 1},
35549  {&__pyx_n_s_nLevels, __pyx_k_nLevels, sizeof(__pyx_k_nLevels), 0, 0, 1, 1},
35550  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
35551  {&__pyx_n_s_nNodes_elementBoundary, __pyx_k_nNodes_elementBoundary, sizeof(__pyx_k_nNodes_elementBoundary), 0, 0, 1, 1},
35552  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
35553  {&__pyx_n_s_nSpace, __pyx_k_nSpace, sizeof(__pyx_k_nSpace), 0, 0, 1, 1},
35554  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
35555  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
35556  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
35557  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
35558  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
35559  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
35560  {&__pyx_n_s_nodeDiametersArray, __pyx_k_nodeDiametersArray, sizeof(__pyx_k_nodeDiametersArray), 0, 0, 1, 1},
35561  {&__pyx_n_s_nodeElementOffsets, __pyx_k_nodeElementOffsets, sizeof(__pyx_k_nodeElementOffsets), 0, 0, 1, 1},
35562  {&__pyx_n_s_nodeElementsArray, __pyx_k_nodeElementsArray, sizeof(__pyx_k_nodeElementsArray), 0, 0, 1, 1},
35563  {&__pyx_n_s_nodeMaterialTypes, __pyx_k_nodeMaterialTypes, sizeof(__pyx_k_nodeMaterialTypes), 0, 0, 1, 1},
35564  {&__pyx_n_s_nodeStarArray, __pyx_k_nodeStarArray, sizeof(__pyx_k_nodeStarArray), 0, 0, 1, 1},
35565  {&__pyx_n_s_nodeStarOffsets, __pyx_k_nodeStarOffsets, sizeof(__pyx_k_nodeStarOffsets), 0, 0, 1, 1},
35566  {&__pyx_n_s_nodeSupportArray, __pyx_k_nodeSupportArray, sizeof(__pyx_k_nodeSupportArray), 0, 0, 1, 1},
35567  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
35568  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
35569  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
35570  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
35571  {&__pyx_n_s_nx, __pyx_k_nx, sizeof(__pyx_k_nx), 0, 0, 1, 1},
35572  {&__pyx_n_s_ny, __pyx_k_ny, sizeof(__pyx_k_ny), 0, 0, 1, 1},
35573  {&__pyx_n_s_nz, __pyx_k_nz, sizeof(__pyx_k_nz), 0, 0, 1, 1},
35574  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
35575  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
35576  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
35577  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
35578  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
35579  {&__pyx_kp_s_proteus_cmeshTools_pyx, __pyx_k_proteus_cmeshTools_pyx, sizeof(__pyx_k_proteus_cmeshTools_pyx), 0, 0, 1, 0},
35580  {&__pyx_n_s_px, __pyx_k_px, sizeof(__pyx_k_px), 0, 0, 1, 1},
35581  {&__pyx_n_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 1},
35582  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
35583  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
35584  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
35585  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
35586  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
35587  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
35588  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
35589  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
35590  {&__pyx_n_s_pz, __pyx_k_pz, sizeof(__pyx_k_pz), 0, 0, 1, 1},
35591  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
35592  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
35593  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
35594  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
35595  {&__pyx_n_s_refineTypeFlag, __pyx_k_refineTypeFlag, sizeof(__pyx_k_refineTypeFlag), 0, 0, 1, 1},
35596  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
35597  {&__pyx_kp_s_self_mesh_cannot_be_converted_to, __pyx_k_self_mesh_cannot_be_converted_to, sizeof(__pyx_k_self_mesh_cannot_be_converted_to), 0, 0, 1, 0},
35598  {&__pyx_kp_s_self_multilevelMesh_cannot_be_co, __pyx_k_self_multilevelMesh_cannot_be_co, sizeof(__pyx_k_self_multilevelMesh_cannot_be_co), 0, 0, 1, 0},
35599  {&__pyx_n_s_setNewestNodeBases, __pyx_k_setNewestNodeBases, sizeof(__pyx_k_setNewestNodeBases), 0, 0, 1, 1},
35600  {&__pyx_kp_s_setNewestNodeBases_0_d_not_imple, __pyx_k_setNewestNodeBases_0_d_not_imple, sizeof(__pyx_k_setNewestNodeBases_0_d_not_imple), 0, 0, 1, 0},
35601  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
35602  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
35603  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
35604  {&__pyx_n_s_sigmaMax, __pyx_k_sigmaMax, sizeof(__pyx_k_sigmaMax), 0, 0, 1, 1},
35605  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
35606  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
35607  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
35608  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
35609  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
35610  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
35611  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
35612  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
35613  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
35614  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
35615  {&__pyx_n_s_triangleFlag, __pyx_k_triangleFlag, sizeof(__pyx_k_triangleFlag), 0, 0, 1, 1},
35616  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
35617  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
35618  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
35619  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
35620  {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1},
35621  {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
35622  {&__pyx_kp_s_wrong_nLevels, __pyx_k_wrong_nLevels, sizeof(__pyx_k_wrong_nLevels), 0, 0, 1, 0},
35623  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
35624  {0, 0, 0, 0, 0, 0, 0}
35625 };
35626 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
35627  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
35628  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 217, __pyx_L1_error)
35629  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 945, __pyx_L1_error)
35630  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 133, __pyx_L1_error)
35631  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 148, __pyx_L1_error)
35632  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 151, __pyx_L1_error)
35633  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 404, __pyx_L1_error)
35634  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 613, __pyx_L1_error)
35635  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 832, __pyx_L1_error)
35636  return 0;
35637  __pyx_L1_error:;
35638  return -1;
35639 }
35640 
35641 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
35642  __Pyx_RefNannyDeclarations
35643  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
35644 
35645  /* "cmeshTools.pyx":37
35646  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
35647  * else:
35648  * self.nodeElementsArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
35649  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
35650  *
35651  */
35652  __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 37, __pyx_L1_error)
35653  __Pyx_GOTREF(__pyx_tuple_);
35654  __Pyx_GIVEREF(__pyx_tuple_);
35655 
35656  /* "(tree fragment)":2
35657  * def __reduce_cython__(self):
35658  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
35659  * def __setstate_cython__(self, __pyx_state):
35660  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
35661  */
35662  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_mesh_cannot_be_converted_to); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2, __pyx_L1_error)
35663  __Pyx_GOTREF(__pyx_tuple__2);
35664  __Pyx_GIVEREF(__pyx_tuple__2);
35665 
35666  /* "(tree fragment)":4
35667  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
35668  * def __setstate_cython__(self, __pyx_state):
35669  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
35670  */
35671  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_mesh_cannot_be_converted_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 4, __pyx_L1_error)
35672  __Pyx_GOTREF(__pyx_tuple__3);
35673  __Pyx_GIVEREF(__pyx_tuple__3);
35674 
35675  /* "(tree fragment)":2
35676  * def __reduce_cython__(self):
35677  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
35678  * def __setstate_cython__(self, __pyx_state):
35679  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
35680  */
35681  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_multilevelMesh_cannot_be_co); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 2, __pyx_L1_error)
35682  __Pyx_GOTREF(__pyx_tuple__4);
35683  __Pyx_GIVEREF(__pyx_tuple__4);
35684 
35685  /* "(tree fragment)":4
35686  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
35687  * def __setstate_cython__(self, __pyx_state):
35688  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
35689  */
35690  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_multilevelMesh_cannot_be_co); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 4, __pyx_L1_error)
35691  __Pyx_GOTREF(__pyx_tuple__5);
35692  __Pyx_GIVEREF(__pyx_tuple__5);
35693 
35694  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
35695  * __pyx_import_array()
35696  * except Exception:
35697  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
35698  *
35699  * cdef inline int import_umath() except -1:
35700  */
35701  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(3, 945, __pyx_L1_error)
35702  __Pyx_GOTREF(__pyx_tuple__6);
35703  __Pyx_GIVEREF(__pyx_tuple__6);
35704 
35705  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
35706  * _import_umath()
35707  * except Exception:
35708  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
35709  *
35710  * cdef inline int import_ufunc() except -1:
35711  */
35712  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(3, 951, __pyx_L1_error)
35713  __Pyx_GOTREF(__pyx_tuple__7);
35714  __Pyx_GIVEREF(__pyx_tuple__7);
35715 
35716  /* "View.MemoryView":133
35717  *
35718  * if not self.ndim:
35719  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
35720  *
35721  * if itemsize <= 0:
35722  */
35723  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 133, __pyx_L1_error)
35724  __Pyx_GOTREF(__pyx_tuple__8);
35725  __Pyx_GIVEREF(__pyx_tuple__8);
35726 
35727  /* "View.MemoryView":136
35728  *
35729  * if itemsize <= 0:
35730  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
35731  *
35732  * if not isinstance(format, bytes):
35733  */
35734  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 136, __pyx_L1_error)
35735  __Pyx_GOTREF(__pyx_tuple__9);
35736  __Pyx_GIVEREF(__pyx_tuple__9);
35737 
35738  /* "View.MemoryView":148
35739  *
35740  * if not self._shape:
35741  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
35742  *
35743  *
35744  */
35745  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 148, __pyx_L1_error)
35746  __Pyx_GOTREF(__pyx_tuple__10);
35747  __Pyx_GIVEREF(__pyx_tuple__10);
35748 
35749  /* "View.MemoryView":176
35750  * self.data = <char *>malloc(self.len)
35751  * if not self.data:
35752  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
35753  *
35754  * if self.dtype_is_object:
35755  */
35756  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 176, __pyx_L1_error)
35757  __Pyx_GOTREF(__pyx_tuple__11);
35758  __Pyx_GIVEREF(__pyx_tuple__11);
35759 
35760  /* "View.MemoryView":192
35761  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
35762  * if not (flags & bufmode):
35763  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
35764  * info.buf = self.data
35765  * info.len = self.len
35766  */
35767  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 192, __pyx_L1_error)
35768  __Pyx_GOTREF(__pyx_tuple__12);
35769  __Pyx_GIVEREF(__pyx_tuple__12);
35770 
35771  /* "(tree fragment)":2
35772  * def __reduce_cython__(self):
35773  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
35774  * def __setstate_cython__(self, __pyx_state):
35775  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
35776  */
35777  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2, __pyx_L1_error)
35778  __Pyx_GOTREF(__pyx_tuple__13);
35779  __Pyx_GIVEREF(__pyx_tuple__13);
35780 
35781  /* "(tree fragment)":4
35782  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
35783  * def __setstate_cython__(self, __pyx_state):
35784  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
35785  */
35786  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 4, __pyx_L1_error)
35787  __Pyx_GOTREF(__pyx_tuple__14);
35788  __Pyx_GIVEREF(__pyx_tuple__14);
35789 
35790  /* "View.MemoryView":418
35791  * def __setitem__(memoryview self, object index, object value):
35792  * if self.view.readonly:
35793  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
35794  *
35795  * have_slices, index = _unellipsify(index, self.view.ndim)
35796  */
35797  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 418, __pyx_L1_error)
35798  __Pyx_GOTREF(__pyx_tuple__15);
35799  __Pyx_GIVEREF(__pyx_tuple__15);
35800 
35801  /* "View.MemoryView":495
35802  * result = struct.unpack(self.view.format, bytesitem)
35803  * except struct.error:
35804  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
35805  * else:
35806  * if len(self.view.format) == 1:
35807  */
35808  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 495, __pyx_L1_error)
35809  __Pyx_GOTREF(__pyx_tuple__16);
35810  __Pyx_GIVEREF(__pyx_tuple__16);
35811 
35812  /* "View.MemoryView":520
35813  * def __getbuffer__(self, Py_buffer *info, int flags):
35814  * if flags & PyBUF_WRITABLE and self.view.readonly:
35815  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
35816  *
35817  * if flags & PyBUF_ND:
35818  */
35819  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 520, __pyx_L1_error)
35820  __Pyx_GOTREF(__pyx_tuple__17);
35821  __Pyx_GIVEREF(__pyx_tuple__17);
35822 
35823  /* "View.MemoryView":570
35824  * if self.view.strides == NULL:
35825  *
35826  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
35827  *
35828  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
35829  */
35830  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 570, __pyx_L1_error)
35831  __Pyx_GOTREF(__pyx_tuple__18);
35832  __Pyx_GIVEREF(__pyx_tuple__18);
35833 
35834  /* "View.MemoryView":577
35835  * def suboffsets(self):
35836  * if self.view.suboffsets == NULL:
35837  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
35838  *
35839  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
35840  */
35841  __pyx_tuple__19 = PyTuple_New(1); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 577, __pyx_L1_error)
35842  __Pyx_GOTREF(__pyx_tuple__19);
35843  __Pyx_INCREF(__pyx_int_neg_1);
35844  __Pyx_GIVEREF(__pyx_int_neg_1);
35845  PyTuple_SET_ITEM(__pyx_tuple__19, 0, __pyx_int_neg_1);
35846  __Pyx_GIVEREF(__pyx_tuple__19);
35847 
35848  /* "(tree fragment)":2
35849  * def __reduce_cython__(self):
35850  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
35851  * def __setstate_cython__(self, __pyx_state):
35852  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
35853  */
35854  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 2, __pyx_L1_error)
35855  __Pyx_GOTREF(__pyx_tuple__20);
35856  __Pyx_GIVEREF(__pyx_tuple__20);
35857 
35858  /* "(tree fragment)":4
35859  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
35860  * def __setstate_cython__(self, __pyx_state):
35861  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
35862  */
35863  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 4, __pyx_L1_error)
35864  __Pyx_GOTREF(__pyx_tuple__21);
35865  __Pyx_GIVEREF(__pyx_tuple__21);
35866 
35867  /* "View.MemoryView":682
35868  * if item is Ellipsis:
35869  * if not seen_ellipsis:
35870  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
35871  * seen_ellipsis = True
35872  * else:
35873  */
35874  __pyx_slice__22 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) __PYX_ERR(0, 682, __pyx_L1_error)
35875  __Pyx_GOTREF(__pyx_slice__22);
35876  __Pyx_GIVEREF(__pyx_slice__22);
35877 
35878  /* "View.MemoryView":703
35879  * for suboffset in suboffsets[:ndim]:
35880  * if suboffset >= 0:
35881  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
35882  *
35883  *
35884  */
35885  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 703, __pyx_L1_error)
35886  __Pyx_GOTREF(__pyx_tuple__23);
35887  __Pyx_GIVEREF(__pyx_tuple__23);
35888 
35889  /* "(tree fragment)":2
35890  * def __reduce_cython__(self):
35891  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
35892  * def __setstate_cython__(self, __pyx_state):
35893  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
35894  */
35895  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 2, __pyx_L1_error)
35896  __Pyx_GOTREF(__pyx_tuple__24);
35897  __Pyx_GIVEREF(__pyx_tuple__24);
35898 
35899  /* "(tree fragment)":4
35900  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
35901  * def __setstate_cython__(self, __pyx_state):
35902  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
35903  */
35904  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 4, __pyx_L1_error)
35905  __Pyx_GOTREF(__pyx_tuple__25);
35906  __Pyx_GIVEREF(__pyx_tuple__25);
35907  __pyx_tuple__26 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 4, __pyx_L1_error)
35908  __Pyx_GOTREF(__pyx_tuple__26);
35909  __Pyx_GIVEREF(__pyx_tuple__26);
35910 
35911  /* "cmeshTools.pyx":120
35912  * self.volume = self.mesh.volume
35913  *
35914  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
35915  * """
35916  * function to be conform to old module, and to calls from MeshTools
35917  */
35918  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_cmesh); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 120, __pyx_L1_error)
35919  __Pyx_GOTREF(__pyx_tuple__32);
35920  __Pyx_GIVEREF(__pyx_tuple__32);
35921  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMeshInterface, 120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 120, __pyx_L1_error)
35922 
35923  /* "cmeshTools.pyx":176
35924  * cmesh.volume)
35925  *
35926  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
35927  * """
35928  * function to be conform to old module, and to calls from MeshTools
35929  */
35930  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_cmesh); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 176, __pyx_L1_error)
35931  __Pyx_GOTREF(__pyx_tuple__34);
35932  __Pyx_GIVEREF(__pyx_tuple__34);
35933  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMeshInterfaceNoArrays, 176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 176, __pyx_L1_error)
35934 
35935  /* "cmeshTools.pyx":300
35936  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
35937  *
35938  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
35939  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
35940  * return (cmultilevelMesh.nLevels,
35941  */
35942  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_cmultilevelMesh); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 300, __pyx_L1_error)
35943  __Pyx_GOTREF(__pyx_tuple__36);
35944  __Pyx_GIVEREF(__pyx_tuple__36);
35945  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMultilevelMeshInterfa, 300, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 300, __pyx_L1_error)
35946 
35947  /* "cmeshTools.pyx":495
35948  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
35949  *
35950  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
35951  * CMultilevelMesh cmultilevelMesh,
35952  * np.ndarray elementTagArray,
35953  */
35954  __pyx_tuple__38 = PyTuple_Pack(6, __pyx_n_s_nSpace, __pyx_n_s_cmultilevelMesh, __pyx_n_s_elementTagArray, __pyx_n_s_refineTypeFlag, __pyx_n_s_failed, __pyx_n_s_finestLevel); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 495, __pyx_L1_error)
35955  __Pyx_GOTREF(__pyx_tuple__38);
35956  __Pyx_GIVEREF(__pyx_tuple__38);
35957  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_locallyRefineMultilevelMesh, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(1, 495, __pyx_L1_error)
35958 
35959  /* "cmeshTools.pyx":533
35960  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
35961  *
35962  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
35963  * if nSpace == 2:
35964  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
35965  */
35966  __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_nSpace, __pyx_n_s_cmultilevelMesh, __pyx_n_s_failed); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 533, __pyx_L1_error)
35967  __Pyx_GOTREF(__pyx_tuple__40);
35968  __Pyx_GIVEREF(__pyx_tuple__40);
35969  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_setNewestNodeBases, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(1, 533, __pyx_L1_error)
35970 
35971  /* "View.MemoryView":286
35972  * return self.name
35973  *
35974  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
35975  * cdef strided = Enum("<strided and direct>") # default
35976  * cdef indirect = Enum("<strided and indirect>")
35977  */
35978  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 286, __pyx_L1_error)
35979  __Pyx_GOTREF(__pyx_tuple__42);
35980  __Pyx_GIVEREF(__pyx_tuple__42);
35981 
35982  /* "View.MemoryView":287
35983  *
35984  * cdef generic = Enum("<strided and direct or indirect>")
35985  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
35986  * cdef indirect = Enum("<strided and indirect>")
35987  *
35988  */
35989  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 287, __pyx_L1_error)
35990  __Pyx_GOTREF(__pyx_tuple__43);
35991  __Pyx_GIVEREF(__pyx_tuple__43);
35992 
35993  /* "View.MemoryView":288
35994  * cdef generic = Enum("<strided and direct or indirect>")
35995  * cdef strided = Enum("<strided and direct>") # default
35996  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
35997  *
35998  *
35999  */
36000  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 288, __pyx_L1_error)
36001  __Pyx_GOTREF(__pyx_tuple__44);
36002  __Pyx_GIVEREF(__pyx_tuple__44);
36003 
36004  /* "View.MemoryView":291
36005  *
36006  *
36007  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
36008  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
36009  *
36010  */
36011  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 291, __pyx_L1_error)
36012  __Pyx_GOTREF(__pyx_tuple__45);
36013  __Pyx_GIVEREF(__pyx_tuple__45);
36014 
36015  /* "View.MemoryView":292
36016  *
36017  * cdef contiguous = Enum("<contiguous and direct>")
36018  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
36019  *
36020  *
36021  */
36022  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 292, __pyx_L1_error)
36023  __Pyx_GOTREF(__pyx_tuple__46);
36024  __Pyx_GIVEREF(__pyx_tuple__46);
36025 
36026  /* "(tree fragment)":1
36027  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
36028  * cdef object __pyx_PickleError
36029  * cdef object __pyx_result
36030  */
36031  __pyx_tuple__47 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1, __pyx_L1_error)
36032  __Pyx_GOTREF(__pyx_tuple__47);
36033  __Pyx_GIVEREF(__pyx_tuple__47);
36034  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1, __pyx_L1_error)
36035  __Pyx_RefNannyFinishContext();
36036  return 0;
36037  __pyx_L1_error:;
36038  __Pyx_RefNannyFinishContext();
36039  return -1;
36040 }
36041 
36042 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
36043  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
36044  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
36045  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36046  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(1, 1, __pyx_L1_error)
36047  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(1, 1, __pyx_L1_error)
36048  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(1, 1, __pyx_L1_error)
36049  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36050  return 0;
36051  __pyx_L1_error:;
36052  return -1;
36053 }
36054 
36055 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
36056 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
36057 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
36058 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
36059 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
36060 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
36061 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
36062 
36063 static int __Pyx_modinit_global_init_code(void) {
36064  __Pyx_RefNannyDeclarations
36065  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
36066  /*--- Global init code ---*/
36067  generic = Py_None; Py_INCREF(Py_None);
36068  strided = Py_None; Py_INCREF(Py_None);
36069  indirect = Py_None; Py_INCREF(Py_None);
36070  contiguous = Py_None; Py_INCREF(Py_None);
36071  indirect_contiguous = Py_None; Py_INCREF(Py_None);
36072  __Pyx_RefNannyFinishContext();
36073  return 0;
36074 }
36075 
36076 static int __Pyx_modinit_variable_export_code(void) {
36077  __Pyx_RefNannyDeclarations
36078  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
36079  /*--- Variable export code ---*/
36080  __Pyx_RefNannyFinishContext();
36081  return 0;
36082 }
36083 
36084 static int __Pyx_modinit_function_export_code(void) {
36085  __Pyx_RefNannyDeclarations
36086  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
36087  /*--- Function export code ---*/
36088  __Pyx_RefNannyFinishContext();
36089  return 0;
36090 }
36091 
36092 static int __Pyx_modinit_type_init_code(void) {
36093  __Pyx_RefNannyDeclarations
36094  int __pyx_lineno = 0;
36095  const char *__pyx_filename = NULL;
36096  int __pyx_clineno = 0;
36097  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
36098  /*--- Type init code ---*/
36099  if (PyType_Ready(&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36100  #if PY_VERSION_HEX < 0x030800B1
36101  __pyx_type_10cmeshTools_CMesh.tp_print = 0;
36102  #endif
36103  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10cmeshTools_CMesh.tp_dictoffset && __pyx_type_10cmeshTools_CMesh.tp_getattro == PyObject_GenericGetAttr)) {
36104  __pyx_type_10cmeshTools_CMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36105  }
36106  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CMesh, (PyObject *)&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36107  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36108  __pyx_ptype_10cmeshTools_CMesh = &__pyx_type_10cmeshTools_CMesh;
36109  if (PyType_Ready(&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 202, __pyx_L1_error)
36110  #if PY_VERSION_HEX < 0x030800B1
36111  __pyx_type_10cmeshTools_CMultilevelMesh.tp_print = 0;
36112  #endif
36113  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10cmeshTools_CMultilevelMesh.tp_dictoffset && __pyx_type_10cmeshTools_CMultilevelMesh.tp_getattro == PyObject_GenericGetAttr)) {
36114  __pyx_type_10cmeshTools_CMultilevelMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36115  }
36116  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CMultilevelMesh, (PyObject *)&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 202, __pyx_L1_error)
36117  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 202, __pyx_L1_error)
36118  __pyx_ptype_10cmeshTools_CMultilevelMesh = &__pyx_type_10cmeshTools_CMultilevelMesh;
36119  __pyx_vtabptr_array = &__pyx_vtable_array;
36120  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
36121  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36122  #if PY_VERSION_HEX < 0x030800B1
36123  __pyx_type___pyx_array.tp_print = 0;
36124  #endif
36125  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36126  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36127  __pyx_array_type = &__pyx_type___pyx_array;
36128  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
36129  #if PY_VERSION_HEX < 0x030800B1
36130  __pyx_type___pyx_MemviewEnum.tp_print = 0;
36131  #endif
36132  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
36133  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36134  }
36135  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
36136  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
36137  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
36138  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
36139  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
36140  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
36141  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
36142  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
36143  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
36144  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
36145  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36146  #if PY_VERSION_HEX < 0x030800B1
36147  __pyx_type___pyx_memoryview.tp_print = 0;
36148  #endif
36149  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
36150  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36151  }
36152  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36153  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36154  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
36155  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
36156  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
36157  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
36158  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
36159  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
36160  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
36161  #if PY_VERSION_HEX < 0x030800B1
36162  __pyx_type___pyx_memoryviewslice.tp_print = 0;
36163  #endif
36164  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
36165  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36166  }
36167  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
36168  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
36169  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
36170  __Pyx_RefNannyFinishContext();
36171  return 0;
36172  __pyx_L1_error:;
36173  __Pyx_RefNannyFinishContext();
36174  return -1;
36175 }
36176 
36177 static int __Pyx_modinit_type_import_code(void) {
36178  __Pyx_RefNannyDeclarations
36179  PyObject *__pyx_t_1 = NULL;
36180  int __pyx_lineno = 0;
36181  const char *__pyx_filename = NULL;
36182  int __pyx_clineno = 0;
36183  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
36184  /*--- Type import code ---*/
36185  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
36186  __Pyx_GOTREF(__pyx_t_1);
36187  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
36188  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
36189  sizeof(PyTypeObject),
36190  #else
36191  sizeof(PyHeapTypeObject),
36192  #endif
36193  __Pyx_ImportType_CheckSize_Warn);
36194  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
36195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36196  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 200, __pyx_L1_error)
36197  __Pyx_GOTREF(__pyx_t_1);
36198  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
36199  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 200, __pyx_L1_error)
36200  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
36201  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 223, __pyx_L1_error)
36202  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
36203  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 227, __pyx_L1_error)
36204  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
36205  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 239, __pyx_L1_error)
36206  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36207  if (!__pyx_ptype_5numpy_generic) __PYX_ERR(3, 771, __pyx_L1_error)
36208  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36209  if (!__pyx_ptype_5numpy_number) __PYX_ERR(3, 773, __pyx_L1_error)
36210  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36211  if (!__pyx_ptype_5numpy_integer) __PYX_ERR(3, 775, __pyx_L1_error)
36212  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36213  if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(3, 777, __pyx_L1_error)
36214  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36215  if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(3, 779, __pyx_L1_error)
36216  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36217  if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(3, 781, __pyx_L1_error)
36218  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36219  if (!__pyx_ptype_5numpy_floating) __PYX_ERR(3, 783, __pyx_L1_error)
36220  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36221  if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(3, 785, __pyx_L1_error)
36222  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36223  if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(3, 787, __pyx_L1_error)
36224  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
36225  if (!__pyx_ptype_5numpy_character) __PYX_ERR(3, 789, __pyx_L1_error)
36226  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
36227  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 827, __pyx_L1_error)
36228  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36229  __Pyx_RefNannyFinishContext();
36230  return 0;
36231  __pyx_L1_error:;
36232  __Pyx_XDECREF(__pyx_t_1);
36233  __Pyx_RefNannyFinishContext();
36234  return -1;
36235 }
36236 
36237 static int __Pyx_modinit_variable_import_code(void) {
36238  __Pyx_RefNannyDeclarations
36239  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
36240  /*--- Variable import code ---*/
36241  __Pyx_RefNannyFinishContext();
36242  return 0;
36243 }
36244 
36245 static int __Pyx_modinit_function_import_code(void) {
36246  __Pyx_RefNannyDeclarations
36247  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
36248  /*--- Function import code ---*/
36249  __Pyx_RefNannyFinishContext();
36250  return 0;
36251 }
36252 
36253 
36254 #ifndef CYTHON_NO_PYINIT_EXPORT
36255 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36256 #elif PY_MAJOR_VERSION < 3
36257 #ifdef __cplusplus
36258 #define __Pyx_PyMODINIT_FUNC extern "C" void
36259 #else
36260 #define __Pyx_PyMODINIT_FUNC void
36261 #endif
36262 #else
36263 #ifdef __cplusplus
36264 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
36265 #else
36266 #define __Pyx_PyMODINIT_FUNC PyObject *
36267 #endif
36268 #endif
36269 
36270 
36271 #if PY_MAJOR_VERSION < 3
36272 __Pyx_PyMODINIT_FUNC initcmeshTools(void) CYTHON_SMALL_CODE; /*proto*/
36273 __Pyx_PyMODINIT_FUNC initcmeshTools(void)
36274 #else
36275 __Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void) CYTHON_SMALL_CODE; /*proto*/
36276 __Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void)
36277 #if CYTHON_PEP489_MULTI_PHASE_INIT
36278 {
36279  return PyModuleDef_Init(&__pyx_moduledef);
36280 }
36281 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
36282  #if PY_VERSION_HEX >= 0x030700A1
36283  static PY_INT64_T main_interpreter_id = -1;
36284  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
36285  if (main_interpreter_id == -1) {
36286  main_interpreter_id = current_id;
36287  return (unlikely(current_id == -1)) ? -1 : 0;
36288  } else if (unlikely(main_interpreter_id != current_id))
36289  #else
36290  static PyInterpreterState *main_interpreter = NULL;
36291  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
36292  if (!main_interpreter) {
36293  main_interpreter = current_interpreter;
36294  } else if (unlikely(main_interpreter != current_interpreter))
36295  #endif
36296  {
36297  PyErr_SetString(
36298  PyExc_ImportError,
36299  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
36300  return -1;
36301  }
36302  return 0;
36303 }
36304 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
36305  PyObject *value = PyObject_GetAttrString(spec, from_name);
36306  int result = 0;
36307  if (likely(value)) {
36308  if (allow_none || value != Py_None) {
36309  result = PyDict_SetItemString(moddict, to_name, value);
36310  }
36311  Py_DECREF(value);
36312  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
36313  PyErr_Clear();
36314  } else {
36315  result = -1;
36316  }
36317  return result;
36318 }
36319 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
36320  PyObject *module = NULL, *moddict, *modname;
36321  if (__Pyx_check_single_interpreter())
36322  return NULL;
36323  if (__pyx_m)
36324  return __Pyx_NewRef(__pyx_m);
36325  modname = PyObject_GetAttrString(spec, "name");
36326  if (unlikely(!modname)) goto bad;
36327  module = PyModule_NewObject(modname);
36328  Py_DECREF(modname);
36329  if (unlikely(!module)) goto bad;
36330  moddict = PyModule_GetDict(module);
36331  if (unlikely(!moddict)) goto bad;
36332  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
36333  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
36334  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
36335  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
36336  return module;
36337 bad:
36338  Py_XDECREF(module);
36339  return NULL;
36340 }
36341 
36342 
36343 static CYTHON_SMALL_CODE int __pyx_pymod_exec_cmeshTools(PyObject *__pyx_pyinit_module)
36344 #endif
36345 #endif
36346 {
36347  PyObject *__pyx_t_1 = NULL;
36348  PyObject *__pyx_t_2 = NULL;
36349  static PyThread_type_lock __pyx_t_3[8];
36350  int __pyx_lineno = 0;
36351  const char *__pyx_filename = NULL;
36352  int __pyx_clineno = 0;
36353  __Pyx_RefNannyDeclarations
36354  #if CYTHON_PEP489_MULTI_PHASE_INIT
36355  if (__pyx_m) {
36356  if (__pyx_m == __pyx_pyinit_module) return 0;
36357  PyErr_SetString(PyExc_RuntimeError, "Module 'cmeshTools' has already been imported. Re-initialisation is not supported.");
36358  return -1;
36359  }
36360  #elif PY_MAJOR_VERSION >= 3
36361  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
36362  #endif
36363  #if CYTHON_REFNANNY
36364 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
36365 if (!__Pyx_RefNanny) {
36366  PyErr_Clear();
36367  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
36368  if (!__Pyx_RefNanny)
36369  Py_FatalError("failed to import 'refnanny' module");
36370 }
36371 #endif
36372  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void)", 0);
36373  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36374  #ifdef __Pxy_PyFrame_Initialize_Offsets
36375  __Pxy_PyFrame_Initialize_Offsets();
36376  #endif
36377  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
36378  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
36379  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
36380  #ifdef __Pyx_CyFunction_USED
36381  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36382  #endif
36383  #ifdef __Pyx_FusedFunction_USED
36384  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36385  #endif
36386  #ifdef __Pyx_Coroutine_USED
36387  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36388  #endif
36389  #ifdef __Pyx_Generator_USED
36390  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36391  #endif
36392  #ifdef __Pyx_AsyncGen_USED
36393  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36394  #endif
36395  #ifdef __Pyx_StopAsyncIteration_USED
36396  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36397  #endif
36398  /*--- Library function declarations ---*/
36399  /*--- Threads initialization code ---*/
36400  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
36401  PyEval_InitThreads();
36402  #endif
36403  /*--- Module creation code ---*/
36404  #if CYTHON_PEP489_MULTI_PHASE_INIT
36405  __pyx_m = __pyx_pyinit_module;
36406  Py_INCREF(__pyx_m);
36407  #else
36408  #if PY_MAJOR_VERSION < 3
36409  __pyx_m = Py_InitModule4("cmeshTools", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
36410  #else
36411  __pyx_m = PyModule_Create(&__pyx_moduledef);
36412  #endif
36413  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
36414  #endif
36415  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
36416  Py_INCREF(__pyx_d);
36417  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
36418  Py_INCREF(__pyx_b);
36419  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
36420  Py_INCREF(__pyx_cython_runtime);
36421  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
36422  /*--- Initialize various global constants etc. ---*/
36423  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36424  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
36425  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36426  #endif
36427  if (__pyx_module_is_main_cmeshTools) {
36428  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36429  }
36430  #if PY_MAJOR_VERSION >= 3
36431  {
36432  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
36433  if (!PyDict_GetItemString(modules, "cmeshTools")) {
36434  if (unlikely(PyDict_SetItemString(modules, "cmeshTools", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
36435  }
36436  }
36437  #endif
36438  /*--- Builtin init code ---*/
36439  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36440  /*--- Constants init code ---*/
36441  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36442  /*--- Global type/function init code ---*/
36443  (void)__Pyx_modinit_global_init_code();
36444  (void)__Pyx_modinit_variable_export_code();
36445  (void)__Pyx_modinit_function_export_code();
36446  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
36447  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
36448  (void)__Pyx_modinit_variable_import_code();
36449  (void)__Pyx_modinit_function_import_code();
36450  /*--- Execution code ---*/
36451  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
36452  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36453  #endif
36454 
36455  /* "cmeshTools.pyx":4
36456  * import cython
36457  * cimport cython
36458  * import numpy as np # <<<<<<<<<<<<<<
36459  * cimport numpy as np
36460  * from libcpp cimport bool
36461  */
36462  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
36463  __Pyx_GOTREF(__pyx_t_1);
36464  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(1, 4, __pyx_L1_error)
36465  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36466 
36467  /* "cmeshTools.pyx":7
36468  * cimport numpy as np
36469  * from libcpp cimport bool
36470  * from mpi4py import MPI # <<<<<<<<<<<<<<
36471  * cimport mesh as cppm
36472  * from proteus import Comm
36473  */
36474  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
36475  __Pyx_GOTREF(__pyx_t_1);
36476  __Pyx_INCREF(__pyx_n_s_MPI);
36477  __Pyx_GIVEREF(__pyx_n_s_MPI);
36478  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MPI);
36479  __pyx_t_2 = __Pyx_Import(__pyx_n_s_mpi4py, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
36480  __Pyx_GOTREF(__pyx_t_2);
36481  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36482  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
36483  __Pyx_GOTREF(__pyx_t_1);
36484  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPI, __pyx_t_1) < 0) __PYX_ERR(1, 7, __pyx_L1_error)
36485  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36486  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36487 
36488  /* "cmeshTools.pyx":9
36489  * from mpi4py import MPI
36490  * cimport mesh as cppm
36491  * from proteus import Comm # <<<<<<<<<<<<<<
36492  *
36493  * cdef class CMesh:
36494  */
36495  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
36496  __Pyx_GOTREF(__pyx_t_2);
36497  __Pyx_INCREF(__pyx_n_s_Comm);
36498  __Pyx_GIVEREF(__pyx_n_s_Comm);
36499  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Comm);
36500  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
36501  __Pyx_GOTREF(__pyx_t_1);
36502  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36503  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
36504  __Pyx_GOTREF(__pyx_t_2);
36505  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comm, __pyx_t_2) < 0) __PYX_ERR(1, 9, __pyx_L1_error)
36506  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36507  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36508 
36509  /* "cmeshTools.pyx":120
36510  * self.volume = self.mesh.volume
36511  *
36512  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
36513  * """
36514  * function to be conform to old module, and to calls from MeshTools
36515  */
36516  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_1buildPythonMeshInterface, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 120, __pyx_L1_error)
36517  __Pyx_GOTREF(__pyx_t_1);
36518  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMeshInterface, __pyx_t_1) < 0) __PYX_ERR(1, 120, __pyx_L1_error)
36519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36520 
36521  /* "cmeshTools.pyx":176
36522  * cmesh.volume)
36523  *
36524  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
36525  * """
36526  * function to be conform to old module, and to calls from MeshTools
36527  */
36528  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_3buildPythonMeshInterfaceNoArrays, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 176, __pyx_L1_error)
36529  __Pyx_GOTREF(__pyx_t_1);
36530  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMeshInterfaceNoArrays, __pyx_t_1) < 0) __PYX_ERR(1, 176, __pyx_L1_error)
36531  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36532 
36533  /* "cmeshTools.pyx":300
36534  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
36535  *
36536  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
36537  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
36538  * return (cmultilevelMesh.nLevels,
36539  */
36540  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_5buildPythonMultilevelMeshInterface, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 300, __pyx_L1_error)
36541  __Pyx_GOTREF(__pyx_t_1);
36542  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMultilevelMeshInterfa, __pyx_t_1) < 0) __PYX_ERR(1, 300, __pyx_L1_error)
36543  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36544 
36545  /* "cmeshTools.pyx":495
36546  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
36547  *
36548  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
36549  * CMultilevelMesh cmultilevelMesh,
36550  * np.ndarray elementTagArray,
36551  */
36552  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_67locallyRefineMultilevelMesh, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
36553  __Pyx_GOTREF(__pyx_t_1);
36554  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locallyRefineMultilevelMesh, __pyx_t_1) < 0) __PYX_ERR(1, 495, __pyx_L1_error)
36555  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36556 
36557  /* "cmeshTools.pyx":533
36558  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
36559  *
36560  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
36561  * if nSpace == 2:
36562  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
36563  */
36564  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_69setNewestNodeBases, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 533, __pyx_L1_error)
36565  __Pyx_GOTREF(__pyx_t_1);
36566  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setNewestNodeBases, __pyx_t_1) < 0) __PYX_ERR(1, 533, __pyx_L1_error)
36567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36568 
36569  /* "cmeshTools.pyx":1
36570  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
36571  * import cython
36572  * cimport cython
36573  */
36574  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36575  __Pyx_GOTREF(__pyx_t_1);
36576  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36577  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36578 
36579  /* "View.MemoryView":209
36580  * info.obj = self
36581  *
36582  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
36583  *
36584  * def __dealloc__(array self):
36585  */
36586  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
36587  __Pyx_GOTREF(__pyx_t_1);
36588  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
36589  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36590  PyType_Modified(__pyx_array_type);
36591 
36592  /* "View.MemoryView":286
36593  * return self.name
36594  *
36595  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
36596  * cdef strided = Enum("<strided and direct>") # default
36597  * cdef indirect = Enum("<strided and indirect>")
36598  */
36599  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
36600  __Pyx_GOTREF(__pyx_t_1);
36601  __Pyx_XGOTREF(generic);
36602  __Pyx_DECREF_SET(generic, __pyx_t_1);
36603  __Pyx_GIVEREF(__pyx_t_1);
36604  __pyx_t_1 = 0;
36605 
36606  /* "View.MemoryView":287
36607  *
36608  * cdef generic = Enum("<strided and direct or indirect>")
36609  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
36610  * cdef indirect = Enum("<strided and indirect>")
36611  *
36612  */
36613  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
36614  __Pyx_GOTREF(__pyx_t_1);
36615  __Pyx_XGOTREF(strided);
36616  __Pyx_DECREF_SET(strided, __pyx_t_1);
36617  __Pyx_GIVEREF(__pyx_t_1);
36618  __pyx_t_1 = 0;
36619 
36620  /* "View.MemoryView":288
36621  * cdef generic = Enum("<strided and direct or indirect>")
36622  * cdef strided = Enum("<strided and direct>") # default
36623  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
36624  *
36625  *
36626  */
36627  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
36628  __Pyx_GOTREF(__pyx_t_1);
36629  __Pyx_XGOTREF(indirect);
36630  __Pyx_DECREF_SET(indirect, __pyx_t_1);
36631  __Pyx_GIVEREF(__pyx_t_1);
36632  __pyx_t_1 = 0;
36633 
36634  /* "View.MemoryView":291
36635  *
36636  *
36637  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
36638  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
36639  *
36640  */
36641  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
36642  __Pyx_GOTREF(__pyx_t_1);
36643  __Pyx_XGOTREF(contiguous);
36644  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
36645  __Pyx_GIVEREF(__pyx_t_1);
36646  __pyx_t_1 = 0;
36647 
36648  /* "View.MemoryView":292
36649  *
36650  * cdef contiguous = Enum("<contiguous and direct>")
36651  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
36652  *
36653  *
36654  */
36655  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
36656  __Pyx_GOTREF(__pyx_t_1);
36657  __Pyx_XGOTREF(indirect_contiguous);
36658  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
36659  __Pyx_GIVEREF(__pyx_t_1);
36660  __pyx_t_1 = 0;
36661 
36662  /* "View.MemoryView":316
36663  *
36664  * DEF THREAD_LOCKS_PREALLOCATED = 8
36665  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
36666  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
36667  * PyThread_allocate_lock(),
36668  */
36669  __pyx_memoryview_thread_locks_used = 0;
36670 
36671  /* "View.MemoryView":317
36672  * DEF THREAD_LOCKS_PREALLOCATED = 8
36673  * cdef int __pyx_memoryview_thread_locks_used = 0
36674  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
36675  * PyThread_allocate_lock(),
36676  * PyThread_allocate_lock(),
36677  */
36678  __pyx_t_3[0] = PyThread_allocate_lock();
36679  __pyx_t_3[1] = PyThread_allocate_lock();
36680  __pyx_t_3[2] = PyThread_allocate_lock();
36681  __pyx_t_3[3] = PyThread_allocate_lock();
36682  __pyx_t_3[4] = PyThread_allocate_lock();
36683  __pyx_t_3[5] = PyThread_allocate_lock();
36684  __pyx_t_3[6] = PyThread_allocate_lock();
36685  __pyx_t_3[7] = PyThread_allocate_lock();
36686  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_3, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
36687 
36688  /* "View.MemoryView":549
36689  * info.obj = self
36690  *
36691  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
36692  *
36693  *
36694  */
36695  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
36696  __Pyx_GOTREF(__pyx_t_1);
36697  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
36698  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36699  PyType_Modified(__pyx_memoryview_type);
36700 
36701  /* "View.MemoryView":995
36702  * return self.from_object
36703  *
36704  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
36705  *
36706  *
36707  */
36708  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
36709  __Pyx_GOTREF(__pyx_t_1);
36710  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 995, __pyx_L1_error)
36711  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36712  PyType_Modified(__pyx_memoryviewslice_type);
36713 
36714  /* "(tree fragment)":1
36715  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
36716  * cdef object __pyx_PickleError
36717  * cdef object __pyx_result
36718  */
36719  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
36720  __Pyx_GOTREF(__pyx_t_1);
36721  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36723 
36724  /* "BufferFormatFromTypeInfo":1463
36725  *
36726  * @cname('__pyx_format_from_typeinfo')
36727  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
36728  * cdef __Pyx_StructField *field
36729  * cdef __pyx_typeinfo_string fmt
36730  */
36731 
36732  /*--- Wrapped vars code ---*/
36733 
36734  goto __pyx_L0;
36735  __pyx_L1_error:;
36736  __Pyx_XDECREF(__pyx_t_1);
36737  __Pyx_XDECREF(__pyx_t_2);
36738  if (__pyx_m) {
36739  if (__pyx_d) {
36740  __Pyx_AddTraceback("init cmeshTools", __pyx_clineno, __pyx_lineno, __pyx_filename);
36741  }
36742  Py_CLEAR(__pyx_m);
36743  } else if (!PyErr_Occurred()) {
36744  PyErr_SetString(PyExc_ImportError, "init cmeshTools");
36745  }
36746  __pyx_L0:;
36747  __Pyx_RefNannyFinishContext();
36748  #if CYTHON_PEP489_MULTI_PHASE_INIT
36749  return (__pyx_m != NULL) ? 0 : -1;
36750  #elif PY_MAJOR_VERSION >= 3
36751  return __pyx_m;
36752  #else
36753  return;
36754  #endif
36755 }
36756 
36757 /* --- Runtime support code --- */
36758 /* Refnanny */
36759 #if CYTHON_REFNANNY
36760 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
36761  PyObject *m = NULL, *p = NULL;
36762  void *r = NULL;
36763  m = PyImport_ImportModule(modname);
36764  if (!m) goto end;
36765  p = PyObject_GetAttrString(m, "RefNannyAPI");
36766  if (!p) goto end;
36767  r = PyLong_AsVoidPtr(p);
36768 end:
36769  Py_XDECREF(p);
36770  Py_XDECREF(m);
36771  return (__Pyx_RefNannyAPIStruct *)r;
36772 }
36773 #endif
36774 
36775 /* PyObjectGetAttrStr */
36776 #if CYTHON_USE_TYPE_SLOTS
36777 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
36778  PyTypeObject* tp = Py_TYPE(obj);
36779  if (likely(tp->tp_getattro))
36780  return tp->tp_getattro(obj, attr_name);
36781 #if PY_MAJOR_VERSION < 3
36782  if (likely(tp->tp_getattr))
36783  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
36784 #endif
36785  return PyObject_GetAttr(obj, attr_name);
36786 }
36787 #endif
36788 
36789 /* GetBuiltinName */
36790 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
36791  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
36792  if (unlikely(!result)) {
36793  PyErr_Format(PyExc_NameError,
36794 #if PY_MAJOR_VERSION >= 3
36795  "name '%U' is not defined", name);
36796 #else
36797  "name '%.200s' is not defined", PyString_AS_STRING(name));
36798 #endif
36799  }
36800  return result;
36801 }
36802 
36803 /* RaiseArgTupleInvalid */
36804 static void __Pyx_RaiseArgtupleInvalid(
36805  const char* func_name,
36806  int exact,
36807  Py_ssize_t num_min,
36808  Py_ssize_t num_max,
36809  Py_ssize_t num_found)
36810 {
36811  Py_ssize_t num_expected;
36812  const char *more_or_less;
36813  if (num_found < num_min) {
36814  num_expected = num_min;
36815  more_or_less = "at least";
36816  } else {
36817  num_expected = num_max;
36818  more_or_less = "at most";
36819  }
36820  if (exact) {
36821  more_or_less = "exactly";
36822  }
36823  PyErr_Format(PyExc_TypeError,
36824  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
36825  func_name, more_or_less, num_expected,
36826  (num_expected == 1) ? "" : "s", num_found);
36827 }
36828 
36829 /* KeywordStringCheck */
36830 static int __Pyx_CheckKeywordStrings(
36831  PyObject *kwdict,
36832  const char* function_name,
36833  int kw_allowed)
36834 {
36835  PyObject* key = 0;
36836  Py_ssize_t pos = 0;
36837 #if CYTHON_COMPILING_IN_PYPY
36838  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
36839  goto invalid_keyword;
36840  return 1;
36841 #else
36842  while (PyDict_Next(kwdict, &pos, &key, 0)) {
36843  #if PY_MAJOR_VERSION < 3
36844  if (unlikely(!PyString_Check(key)))
36845  #endif
36846  if (unlikely(!PyUnicode_Check(key)))
36847  goto invalid_keyword_type;
36848  }
36849  if ((!kw_allowed) && unlikely(key))
36850  goto invalid_keyword;
36851  return 1;
36852 invalid_keyword_type:
36853  PyErr_Format(PyExc_TypeError,
36854  "%.200s() keywords must be strings", function_name);
36855  return 0;
36856 #endif
36857 invalid_keyword:
36858  PyErr_Format(PyExc_TypeError,
36859  #if PY_MAJOR_VERSION < 3
36860  "%.200s() got an unexpected keyword argument '%.200s'",
36861  function_name, PyString_AsString(key));
36862  #else
36863  "%s() got an unexpected keyword argument '%U'",
36864  function_name, key);
36865  #endif
36866  return 0;
36867 }
36868 
36869 /* PyDictVersioning */
36870 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
36871 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
36872  PyObject *dict = Py_TYPE(obj)->tp_dict;
36873  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
36874 }
36875 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
36876  PyObject **dictptr = NULL;
36877  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
36878  if (offset) {
36879 #if CYTHON_COMPILING_IN_CPYTHON
36880  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
36881 #else
36882  dictptr = _PyObject_GetDictPtr(obj);
36883 #endif
36884  }
36885  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
36886 }
36887 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
36888  PyObject *dict = Py_TYPE(obj)->tp_dict;
36889  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
36890  return 0;
36891  return obj_dict_version == __Pyx_get_object_dict_version(obj);
36892 }
36893 #endif
36894 
36895 /* GetModuleGlobalName */
36896 #if CYTHON_USE_DICT_VERSIONS
36897 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
36898 #else
36899 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
36900 #endif
36901 {
36902  PyObject *result;
36903 #if !CYTHON_AVOID_BORROWED_REFS
36904 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
36905  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
36906  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
36907  if (likely(result)) {
36908  return __Pyx_NewRef(result);
36909  } else if (unlikely(PyErr_Occurred())) {
36910  return NULL;
36911  }
36912 #else
36913  result = PyDict_GetItem(__pyx_d, name);
36914  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
36915  if (likely(result)) {
36916  return __Pyx_NewRef(result);
36917  }
36918 #endif
36919 #else
36920  result = PyObject_GetItem(__pyx_d, name);
36921  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
36922  if (likely(result)) {
36923  return __Pyx_NewRef(result);
36924  }
36925  PyErr_Clear();
36926 #endif
36927  return __Pyx_GetBuiltinName(name);
36928 }
36929 
36930 /* PyCFunctionFastCall */
36931 #if CYTHON_FAST_PYCCALL
36932 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
36933  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
36934  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
36935  PyObject *self = PyCFunction_GET_SELF(func);
36936  int flags = PyCFunction_GET_FLAGS(func);
36937  assert(PyCFunction_Check(func));
36938  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
36939  assert(nargs >= 0);
36940  assert(nargs == 0 || args != NULL);
36941  /* _PyCFunction_FastCallDict() must not be called with an exception set,
36942  because it may clear it (directly or indirectly) and so the
36943  caller loses its exception */
36944  assert(!PyErr_Occurred());
36945  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
36946  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
36947  } else {
36948  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
36949  }
36950 }
36951 #endif
36952 
36953 /* PyFunctionFastCall */
36954 #if CYTHON_FAST_PYCALL
36955 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
36956  PyObject *globals) {
36957  PyFrameObject *f;
36958  PyThreadState *tstate = __Pyx_PyThreadState_Current;
36959  PyObject **fastlocals;
36960  Py_ssize_t i;
36961  PyObject *result;
36962  assert(globals != NULL);
36963  /* XXX Perhaps we should create a specialized
36964  PyFrame_New() that doesn't take locals, but does
36965  take builtins without sanity checking them.
36966  */
36967  assert(tstate != NULL);
36968  f = PyFrame_New(tstate, co, globals, NULL);
36969  if (f == NULL) {
36970  return NULL;
36971  }
36972  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
36973  for (i = 0; i < na; i++) {
36974  Py_INCREF(*args);
36975  fastlocals[i] = *args++;
36976  }
36977  result = PyEval_EvalFrameEx(f,0);
36978  ++tstate->recursion_depth;
36979  Py_DECREF(f);
36980  --tstate->recursion_depth;
36981  return result;
36982 }
36983 #if 1 || PY_VERSION_HEX < 0x030600B1
36984 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
36985  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
36986  PyObject *globals = PyFunction_GET_GLOBALS(func);
36987  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
36988  PyObject *closure;
36989 #if PY_MAJOR_VERSION >= 3
36990  PyObject *kwdefs;
36991 #endif
36992  PyObject *kwtuple, **k;
36993  PyObject **d;
36994  Py_ssize_t nd;
36995  Py_ssize_t nk;
36996  PyObject *result;
36997  assert(kwargs == NULL || PyDict_Check(kwargs));
36998  nk = kwargs ? PyDict_Size(kwargs) : 0;
36999  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
37000  return NULL;
37001  }
37002  if (
37003 #if PY_MAJOR_VERSION >= 3
37004  co->co_kwonlyargcount == 0 &&
37005 #endif
37006  likely(kwargs == NULL || nk == 0) &&
37007  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
37008  if (argdefs == NULL && co->co_argcount == nargs) {
37009  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
37010  goto done;
37011  }
37012  else if (nargs == 0 && argdefs != NULL
37013  && co->co_argcount == Py_SIZE(argdefs)) {
37014  /* function called with no arguments, but all parameters have
37015  a default value: use default values as arguments .*/
37016  args = &PyTuple_GET_ITEM(argdefs, 0);
37017  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
37018  goto done;
37019  }
37020  }
37021  if (kwargs != NULL) {
37022  Py_ssize_t pos, i;
37023  kwtuple = PyTuple_New(2 * nk);
37024  if (kwtuple == NULL) {
37025  result = NULL;
37026  goto done;
37027  }
37028  k = &PyTuple_GET_ITEM(kwtuple, 0);
37029  pos = i = 0;
37030  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
37031  Py_INCREF(k[i]);
37032  Py_INCREF(k[i+1]);
37033  i += 2;
37034  }
37035  nk = i / 2;
37036  }
37037  else {
37038  kwtuple = NULL;
37039  k = NULL;
37040  }
37041  closure = PyFunction_GET_CLOSURE(func);
37042 #if PY_MAJOR_VERSION >= 3
37043  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
37044 #endif
37045  if (argdefs != NULL) {
37046  d = &PyTuple_GET_ITEM(argdefs, 0);
37047  nd = Py_SIZE(argdefs);
37048  }
37049  else {
37050  d = NULL;
37051  nd = 0;
37052  }
37053 #if PY_MAJOR_VERSION >= 3
37054  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
37055  args, (int)nargs,
37056  k, (int)nk,
37057  d, (int)nd, kwdefs, closure);
37058 #else
37059  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
37060  args, (int)nargs,
37061  k, (int)nk,
37062  d, (int)nd, closure);
37063 #endif
37064  Py_XDECREF(kwtuple);
37065 done:
37066  Py_LeaveRecursiveCall();
37067  return result;
37068 }
37069 #endif
37070 #endif
37071 
37072 /* PyObjectCall */
37073 #if CYTHON_COMPILING_IN_CPYTHON
37074 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
37075  PyObject *result;
37076  ternaryfunc call = Py_TYPE(func)->tp_call;
37077  if (unlikely(!call))
37078  return PyObject_Call(func, arg, kw);
37079  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
37080  return NULL;
37081  result = (*call)(func, arg, kw);
37082  Py_LeaveRecursiveCall();
37083  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
37084  PyErr_SetString(
37085  PyExc_SystemError,
37086  "NULL result without error in PyObject_Call");
37087  }
37088  return result;
37089 }
37090 #endif
37091 
37092 /* PyObjectCall2Args */
37093 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
37094  PyObject *args, *result = NULL;
37095  #if CYTHON_FAST_PYCALL
37096  if (PyFunction_Check(function)) {
37097  PyObject *args[2] = {arg1, arg2};
37098  return __Pyx_PyFunction_FastCall(function, args, 2);
37099  }
37100  #endif
37101  #if CYTHON_FAST_PYCCALL
37102  if (__Pyx_PyFastCFunction_Check(function)) {
37103  PyObject *args[2] = {arg1, arg2};
37104  return __Pyx_PyCFunction_FastCall(function, args, 2);
37105  }
37106  #endif
37107  args = PyTuple_New(2);
37108  if (unlikely(!args)) goto done;
37109  Py_INCREF(arg1);
37110  PyTuple_SET_ITEM(args, 0, arg1);
37111  Py_INCREF(arg2);
37112  PyTuple_SET_ITEM(args, 1, arg2);
37113  Py_INCREF(function);
37114  result = __Pyx_PyObject_Call(function, args, NULL);
37115  Py_DECREF(args);
37116  Py_DECREF(function);
37117 done:
37118  return result;
37119 }
37120 
37121 /* PyObjectCallMethO */
37122 #if CYTHON_COMPILING_IN_CPYTHON
37123 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
37124  PyObject *self, *result;
37125  PyCFunction cfunc;
37126  cfunc = PyCFunction_GET_FUNCTION(func);
37127  self = PyCFunction_GET_SELF(func);
37128  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
37129  return NULL;
37130  result = cfunc(self, arg);
37131  Py_LeaveRecursiveCall();
37132  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
37133  PyErr_SetString(
37134  PyExc_SystemError,
37135  "NULL result without error in PyObject_Call");
37136  }
37137  return result;
37138 }
37139 #endif
37140 
37141 /* PyObjectCallOneArg */
37142 #if CYTHON_COMPILING_IN_CPYTHON
37143 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37144  PyObject *result;
37145  PyObject *args = PyTuple_New(1);
37146  if (unlikely(!args)) return NULL;
37147  Py_INCREF(arg);
37148  PyTuple_SET_ITEM(args, 0, arg);
37149  result = __Pyx_PyObject_Call(func, args, NULL);
37150  Py_DECREF(args);
37151  return result;
37152 }
37153 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37154 #if CYTHON_FAST_PYCALL
37155  if (PyFunction_Check(func)) {
37156  return __Pyx_PyFunction_FastCall(func, &arg, 1);
37157  }
37158 #endif
37159  if (likely(PyCFunction_Check(func))) {
37160  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
37161  return __Pyx_PyObject_CallMethO(func, arg);
37162 #if CYTHON_FAST_PYCCALL
37163  } else if (__Pyx_PyFastCFunction_Check(func)) {
37164  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
37165 #endif
37166  }
37167  }
37168  return __Pyx__PyObject_CallOneArg(func, arg);
37169 }
37170 #else
37171 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37172  PyObject *result;
37173  PyObject *args = PyTuple_Pack(1, arg);
37174  if (unlikely(!args)) return NULL;
37175  result = __Pyx_PyObject_Call(func, args, NULL);
37176  Py_DECREF(args);
37177  return result;
37178 }
37179 #endif
37180 
37181 /* ExtTypeTest */
37182 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
37183  if (unlikely(!type)) {
37184  PyErr_SetString(PyExc_SystemError, "Missing type object");
37185  return 0;
37186  }
37187  if (likely(__Pyx_TypeCheck(obj, type)))
37188  return 1;
37189  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
37190  Py_TYPE(obj)->tp_name, type->tp_name);
37191  return 0;
37192 }
37193 
37194 /* PyErrFetchRestore */
37195 #if CYTHON_FAST_THREAD_STATE
37196 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
37197  PyObject *tmp_type, *tmp_value, *tmp_tb;
37198  tmp_type = tstate->curexc_type;
37199  tmp_value = tstate->curexc_value;
37200  tmp_tb = tstate->curexc_traceback;
37201  tstate->curexc_type = type;
37202  tstate->curexc_value = value;
37203  tstate->curexc_traceback = tb;
37204  Py_XDECREF(tmp_type);
37205  Py_XDECREF(tmp_value);
37206  Py_XDECREF(tmp_tb);
37207 }
37208 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
37209  *type = tstate->curexc_type;
37210  *value = tstate->curexc_value;
37211  *tb = tstate->curexc_traceback;
37212  tstate->curexc_type = 0;
37213  tstate->curexc_value = 0;
37214  tstate->curexc_traceback = 0;
37215 }
37216 #endif
37217 
37218 /* RaiseException */
37219 #if PY_MAJOR_VERSION < 3
37220 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
37221  CYTHON_UNUSED PyObject *cause) {
37222  __Pyx_PyThreadState_declare
37223  Py_XINCREF(type);
37224  if (!value || value == Py_None)
37225  value = NULL;
37226  else
37227  Py_INCREF(value);
37228  if (!tb || tb == Py_None)
37229  tb = NULL;
37230  else {
37231  Py_INCREF(tb);
37232  if (!PyTraceBack_Check(tb)) {
37233  PyErr_SetString(PyExc_TypeError,
37234  "raise: arg 3 must be a traceback or None");
37235  goto raise_error;
37236  }
37237  }
37238  if (PyType_Check(type)) {
37239 #if CYTHON_COMPILING_IN_PYPY
37240  if (!value) {
37241  Py_INCREF(Py_None);
37242  value = Py_None;
37243  }
37244 #endif
37245  PyErr_NormalizeException(&type, &value, &tb);
37246  } else {
37247  if (value) {
37248  PyErr_SetString(PyExc_TypeError,
37249  "instance exception may not have a separate value");
37250  goto raise_error;
37251  }
37252  value = type;
37253  type = (PyObject*) Py_TYPE(type);
37254  Py_INCREF(type);
37255  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
37256  PyErr_SetString(PyExc_TypeError,
37257  "raise: exception class must be a subclass of BaseException");
37258  goto raise_error;
37259  }
37260  }
37261  __Pyx_PyThreadState_assign
37262  __Pyx_ErrRestore(type, value, tb);
37263  return;
37264 raise_error:
37265  Py_XDECREF(value);
37266  Py_XDECREF(type);
37267  Py_XDECREF(tb);
37268  return;
37269 }
37270 #else
37271 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
37272  PyObject* owned_instance = NULL;
37273  if (tb == Py_None) {
37274  tb = 0;
37275  } else if (tb && !PyTraceBack_Check(tb)) {
37276  PyErr_SetString(PyExc_TypeError,
37277  "raise: arg 3 must be a traceback or None");
37278  goto bad;
37279  }
37280  if (value == Py_None)
37281  value = 0;
37282  if (PyExceptionInstance_Check(type)) {
37283  if (value) {
37284  PyErr_SetString(PyExc_TypeError,
37285  "instance exception may not have a separate value");
37286  goto bad;
37287  }
37288  value = type;
37289  type = (PyObject*) Py_TYPE(value);
37290  } else if (PyExceptionClass_Check(type)) {
37291  PyObject *instance_class = NULL;
37292  if (value && PyExceptionInstance_Check(value)) {
37293  instance_class = (PyObject*) Py_TYPE(value);
37294  if (instance_class != type) {
37295  int is_subclass = PyObject_IsSubclass(instance_class, type);
37296  if (!is_subclass) {
37297  instance_class = NULL;
37298  } else if (unlikely(is_subclass == -1)) {
37299  goto bad;
37300  } else {
37301  type = instance_class;
37302  }
37303  }
37304  }
37305  if (!instance_class) {
37306  PyObject *args;
37307  if (!value)
37308  args = PyTuple_New(0);
37309  else if (PyTuple_Check(value)) {
37310  Py_INCREF(value);
37311  args = value;
37312  } else
37313  args = PyTuple_Pack(1, value);
37314  if (!args)
37315  goto bad;
37316  owned_instance = PyObject_Call(type, args, NULL);
37317  Py_DECREF(args);
37318  if (!owned_instance)
37319  goto bad;
37320  value = owned_instance;
37321  if (!PyExceptionInstance_Check(value)) {
37322  PyErr_Format(PyExc_TypeError,
37323  "calling %R should have returned an instance of "
37324  "BaseException, not %R",
37325  type, Py_TYPE(value));
37326  goto bad;
37327  }
37328  }
37329  } else {
37330  PyErr_SetString(PyExc_TypeError,
37331  "raise: exception class must be a subclass of BaseException");
37332  goto bad;
37333  }
37334  if (cause) {
37335  PyObject *fixed_cause;
37336  if (cause == Py_None) {
37337  fixed_cause = NULL;
37338  } else if (PyExceptionClass_Check(cause)) {
37339  fixed_cause = PyObject_CallObject(cause, NULL);
37340  if (fixed_cause == NULL)
37341  goto bad;
37342  } else if (PyExceptionInstance_Check(cause)) {
37343  fixed_cause = cause;
37344  Py_INCREF(fixed_cause);
37345  } else {
37346  PyErr_SetString(PyExc_TypeError,
37347  "exception causes must derive from "
37348  "BaseException");
37349  goto bad;
37350  }
37351  PyException_SetCause(value, fixed_cause);
37352  }
37353  PyErr_SetObject(type, value);
37354  if (tb) {
37355 #if CYTHON_COMPILING_IN_PYPY
37356  PyObject *tmp_type, *tmp_value, *tmp_tb;
37357  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
37358  Py_INCREF(tb);
37359  PyErr_Restore(tmp_type, tmp_value, tb);
37360  Py_XDECREF(tmp_tb);
37361 #else
37362  PyThreadState *tstate = __Pyx_PyThreadState_Current;
37363  PyObject* tmp_tb = tstate->curexc_traceback;
37364  if (tb != tmp_tb) {
37365  Py_INCREF(tb);
37366  tstate->curexc_traceback = tb;
37367  Py_XDECREF(tmp_tb);
37368  }
37369 #endif
37370  }
37371 bad:
37372  Py_XDECREF(owned_instance);
37373  return;
37374 }
37375 #endif
37376 
37377 /* PyObjectCallNoArg */
37378 #if CYTHON_COMPILING_IN_CPYTHON
37379 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
37380 #if CYTHON_FAST_PYCALL
37381  if (PyFunction_Check(func)) {
37382  return __Pyx_PyFunction_FastCall(func, NULL, 0);
37383  }
37384 #endif
37385 #ifdef __Pyx_CyFunction_USED
37386  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
37387 #else
37388  if (likely(PyCFunction_Check(func)))
37389 #endif
37390  {
37391  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
37392  return __Pyx_PyObject_CallMethO(func, NULL);
37393  }
37394  }
37395  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
37396 }
37397 #endif
37398 
37399 /* RaiseDoubleKeywords */
37400 static void __Pyx_RaiseDoubleKeywordsError(
37401  const char* func_name,
37402  PyObject* kw_name)
37403 {
37404  PyErr_Format(PyExc_TypeError,
37405  #if PY_MAJOR_VERSION >= 3
37406  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
37407  #else
37408  "%s() got multiple values for keyword argument '%s'", func_name,
37409  PyString_AsString(kw_name));
37410  #endif
37411 }
37412 
37413 /* ParseKeywords */
37414 static int __Pyx_ParseOptionalKeywords(
37415  PyObject *kwds,
37416  PyObject **argnames[],
37417  PyObject *kwds2,
37418  PyObject *values[],
37419  Py_ssize_t num_pos_args,
37420  const char* function_name)
37421 {
37422  PyObject *key = 0, *value = 0;
37423  Py_ssize_t pos = 0;
37424  PyObject*** name;
37425  PyObject*** first_kw_arg = argnames + num_pos_args;
37426  while (PyDict_Next(kwds, &pos, &key, &value)) {
37427  name = first_kw_arg;
37428  while (*name && (**name != key)) name++;
37429  if (*name) {
37430  values[name-argnames] = value;
37431  continue;
37432  }
37433  name = first_kw_arg;
37434  #if PY_MAJOR_VERSION < 3
37435  if (likely(PyString_Check(key))) {
37436  while (*name) {
37437  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
37438  && _PyString_Eq(**name, key)) {
37439  values[name-argnames] = value;
37440  break;
37441  }
37442  name++;
37443  }
37444  if (*name) continue;
37445  else {
37446  PyObject*** argname = argnames;
37447  while (argname != first_kw_arg) {
37448  if ((**argname == key) || (
37449  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
37450  && _PyString_Eq(**argname, key))) {
37451  goto arg_passed_twice;
37452  }
37453  argname++;
37454  }
37455  }
37456  } else
37457  #endif
37458  if (likely(PyUnicode_Check(key))) {
37459  while (*name) {
37460  int cmp = (**name == key) ? 0 :
37461  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
37462  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
37463  #endif
37464  PyUnicode_Compare(**name, key);
37465  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
37466  if (cmp == 0) {
37467  values[name-argnames] = value;
37468  break;
37469  }
37470  name++;
37471  }
37472  if (*name) continue;
37473  else {
37474  PyObject*** argname = argnames;
37475  while (argname != first_kw_arg) {
37476  int cmp = (**argname == key) ? 0 :
37477  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
37478  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
37479  #endif
37480  PyUnicode_Compare(**argname, key);
37481  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
37482  if (cmp == 0) goto arg_passed_twice;
37483  argname++;
37484  }
37485  }
37486  } else
37487  goto invalid_keyword_type;
37488  if (kwds2) {
37489  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
37490  } else {
37491  goto invalid_keyword;
37492  }
37493  }
37494  return 0;
37495 arg_passed_twice:
37496  __Pyx_RaiseDoubleKeywordsError(function_name, key);
37497  goto bad;
37498 invalid_keyword_type:
37499  PyErr_Format(PyExc_TypeError,
37500  "%.200s() keywords must be strings", function_name);
37501  goto bad;
37502 invalid_keyword:
37503  PyErr_Format(PyExc_TypeError,
37504  #if PY_MAJOR_VERSION < 3
37505  "%.200s() got an unexpected keyword argument '%.200s'",
37506  function_name, PyString_AsString(key));
37507  #else
37508  "%s() got an unexpected keyword argument '%U'",
37509  function_name, key);
37510  #endif
37511 bad:
37512  return -1;
37513 }
37514 
37515 /* ArgTypeTest */
37516 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
37517 {
37518  if (unlikely(!type)) {
37519  PyErr_SetString(PyExc_SystemError, "Missing type object");
37520  return 0;
37521  }
37522  else if (exact) {
37523  #if PY_MAJOR_VERSION == 2
37524  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
37525  #endif
37526  }
37527  else {
37528  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
37529  }
37530  PyErr_Format(PyExc_TypeError,
37531  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
37532  name, type->tp_name, Py_TYPE(obj)->tp_name);
37533  return 0;
37534 }
37535 
37536 /* PyIntBinop */
37537 #if !CYTHON_COMPILING_IN_PYPY
37538 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
37539  (void)inplace;
37540  (void)zerodivision_check;
37541  #if PY_MAJOR_VERSION < 3
37542  if (likely(PyInt_CheckExact(op1))) {
37543  const long b = intval;
37544  long x;
37545  long a = PyInt_AS_LONG(op1);
37546  x = (long)((unsigned long)a - b);
37547  if (likely((x^a) >= 0 || (x^~b) >= 0))
37548  return PyInt_FromLong(x);
37549  return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
37550  }
37551  #endif
37552  #if CYTHON_USE_PYLONG_INTERNALS
37553  if (likely(PyLong_CheckExact(op1))) {
37554  const long b = intval;
37555  long a, x;
37556 #ifdef HAVE_LONG_LONG
37557  const PY_LONG_LONG llb = intval;
37558  PY_LONG_LONG lla, llx;
37559 #endif
37560  const digit* digits = ((PyLongObject*)op1)->ob_digit;
37561  const Py_ssize_t size = Py_SIZE(op1);
37562  if (likely(__Pyx_sst_abs(size) <= 1)) {
37563  a = likely(size) ? digits[0] : 0;
37564  if (size == -1) a = -a;
37565  } else {
37566  switch (size) {
37567  case -2:
37568  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37569  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37570  break;
37571 #ifdef HAVE_LONG_LONG
37572  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37573  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37574  goto long_long;
37575 #endif
37576  }
37577  CYTHON_FALLTHROUGH;
37578  case 2:
37579  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37580  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37581  break;
37582 #ifdef HAVE_LONG_LONG
37583  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37584  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37585  goto long_long;
37586 #endif
37587  }
37588  CYTHON_FALLTHROUGH;
37589  case -3:
37590  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
37591  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37592  break;
37593 #ifdef HAVE_LONG_LONG
37594  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
37595  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37596  goto long_long;
37597 #endif
37598  }
37599  CYTHON_FALLTHROUGH;
37600  case 3:
37601  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
37602  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37603  break;
37604 #ifdef HAVE_LONG_LONG
37605  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
37606  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37607  goto long_long;
37608 #endif
37609  }
37610  CYTHON_FALLTHROUGH;
37611  case -4:
37612  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
37613  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37614  break;
37615 #ifdef HAVE_LONG_LONG
37616  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
37617  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37618  goto long_long;
37619 #endif
37620  }
37621  CYTHON_FALLTHROUGH;
37622  case 4:
37623  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
37624  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37625  break;
37626 #ifdef HAVE_LONG_LONG
37627  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
37628  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37629  goto long_long;
37630 #endif
37631  }
37632  CYTHON_FALLTHROUGH;
37633  default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
37634  }
37635  }
37636  x = a - b;
37637  return PyLong_FromLong(x);
37638 #ifdef HAVE_LONG_LONG
37639  long_long:
37640  llx = lla - llb;
37641  return PyLong_FromLongLong(llx);
37642 #endif
37643 
37644 
37645  }
37646  #endif
37647  if (PyFloat_CheckExact(op1)) {
37648  const long b = intval;
37649  double a = PyFloat_AS_DOUBLE(op1);
37650  double result;
37651  PyFPE_START_PROTECT("subtract", return NULL)
37652  result = ((double)a) - (double)b;
37653  PyFPE_END_PROTECT(result)
37654  return PyFloat_FromDouble(result);
37655  }
37656  return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
37657 }
37658 #endif
37659 
37660 /* PyIntCompare */
37661 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
37662  if (op1 == op2) {
37663  Py_RETURN_TRUE;
37664  }
37665  #if PY_MAJOR_VERSION < 3
37666  if (likely(PyInt_CheckExact(op1))) {
37667  const long b = intval;
37668  long a = PyInt_AS_LONG(op1);
37669  if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
37670  }
37671  #endif
37672  #if CYTHON_USE_PYLONG_INTERNALS
37673  if (likely(PyLong_CheckExact(op1))) {
37674  int unequal;
37675  unsigned long uintval;
37676  Py_ssize_t size = Py_SIZE(op1);
37677  const digit* digits = ((PyLongObject*)op1)->ob_digit;
37678  if (intval == 0) {
37679  if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
37680  } else if (intval < 0) {
37681  if (size >= 0)
37682  Py_RETURN_FALSE;
37683  intval = -intval;
37684  size = -size;
37685  } else {
37686  if (size <= 0)
37687  Py_RETURN_FALSE;
37688  }
37689  uintval = (unsigned long) intval;
37690 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
37691  if (uintval >> (PyLong_SHIFT * 4)) {
37692  unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
37693  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
37694  } else
37695 #endif
37696 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
37697  if (uintval >> (PyLong_SHIFT * 3)) {
37698  unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
37699  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
37700  } else
37701 #endif
37702 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
37703  if (uintval >> (PyLong_SHIFT * 2)) {
37704  unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
37705  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
37706  } else
37707 #endif
37708 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
37709  if (uintval >> (PyLong_SHIFT * 1)) {
37710  unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
37711  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
37712  } else
37713 #endif
37714  unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
37715  if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
37716  }
37717  #endif
37718  if (PyFloat_CheckExact(op1)) {
37719  const long b = intval;
37720  double a = PyFloat_AS_DOUBLE(op1);
37721  if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
37722  }
37723  return (
37724  PyObject_RichCompare(op1, op2, Py_EQ));
37725 }
37726 
37727 /* WriteUnraisableException */
37728 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
37729  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
37730  int full_traceback, CYTHON_UNUSED int nogil) {
37731  PyObject *old_exc, *old_val, *old_tb;
37732  PyObject *ctx;
37733  __Pyx_PyThreadState_declare
37734 #ifdef WITH_THREAD
37735  PyGILState_STATE state;
37736  if (nogil)
37737  state = PyGILState_Ensure();
37738 #ifdef _MSC_VER
37739  else state = (PyGILState_STATE)-1;
37740 #endif
37741 #endif
37742  __Pyx_PyThreadState_assign
37743  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
37744  if (full_traceback) {
37745  Py_XINCREF(old_exc);
37746  Py_XINCREF(old_val);
37747  Py_XINCREF(old_tb);
37748  __Pyx_ErrRestore(old_exc, old_val, old_tb);
37749  PyErr_PrintEx(1);
37750  }
37751  #if PY_MAJOR_VERSION < 3
37752  ctx = PyString_FromString(name);
37753  #else
37754  ctx = PyUnicode_FromString(name);
37755  #endif
37756  __Pyx_ErrRestore(old_exc, old_val, old_tb);
37757  if (!ctx) {
37758  PyErr_WriteUnraisable(Py_None);
37759  } else {
37760  PyErr_WriteUnraisable(ctx);
37761  Py_DECREF(ctx);
37762  }
37763 #ifdef WITH_THREAD
37764  if (nogil)
37765  PyGILState_Release(state);
37766 #endif
37767 }
37768 
37769 /* GetTopmostException */
37770 #if CYTHON_USE_EXC_INFO_STACK
37771 static _PyErr_StackItem *
37772 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
37773 {
37774  _PyErr_StackItem *exc_info = tstate->exc_info;
37775  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
37776  exc_info->previous_item != NULL)
37777  {
37778  exc_info = exc_info->previous_item;
37779  }
37780  return exc_info;
37781 }
37782 #endif
37783 
37784 /* SaveResetException */
37785 #if CYTHON_FAST_THREAD_STATE
37786 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
37787  #if CYTHON_USE_EXC_INFO_STACK
37788  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
37789  *type = exc_info->exc_type;
37790  *value = exc_info->exc_value;
37791  *tb = exc_info->exc_traceback;
37792  #else
37793  *type = tstate->exc_type;
37794  *value = tstate->exc_value;
37795  *tb = tstate->exc_traceback;
37796  #endif
37797  Py_XINCREF(*type);
37798  Py_XINCREF(*value);
37799  Py_XINCREF(*tb);
37800 }
37801 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
37802  PyObject *tmp_type, *tmp_value, *tmp_tb;
37803  #if CYTHON_USE_EXC_INFO_STACK
37804  _PyErr_StackItem *exc_info = tstate->exc_info;
37805  tmp_type = exc_info->exc_type;
37806  tmp_value = exc_info->exc_value;
37807  tmp_tb = exc_info->exc_traceback;
37808  exc_info->exc_type = type;
37809  exc_info->exc_value = value;
37810  exc_info->exc_traceback = tb;
37811  #else
37812  tmp_type = tstate->exc_type;
37813  tmp_value = tstate->exc_value;
37814  tmp_tb = tstate->exc_traceback;
37815  tstate->exc_type = type;
37816  tstate->exc_value = value;
37817  tstate->exc_traceback = tb;
37818  #endif
37819  Py_XDECREF(tmp_type);
37820  Py_XDECREF(tmp_value);
37821  Py_XDECREF(tmp_tb);
37822 }
37823 #endif
37824 
37825 /* PyErrExceptionMatches */
37826 #if CYTHON_FAST_THREAD_STATE
37827 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
37828  Py_ssize_t i, n;
37829  n = PyTuple_GET_SIZE(tuple);
37830 #if PY_MAJOR_VERSION >= 3
37831  for (i=0; i<n; i++) {
37832  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
37833  }
37834 #endif
37835  for (i=0; i<n; i++) {
37836  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
37837  }
37838  return 0;
37839 }
37840 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
37841  PyObject *exc_type = tstate->curexc_type;
37842  if (exc_type == err) return 1;
37843  if (unlikely(!exc_type)) return 0;
37844  if (unlikely(PyTuple_Check(err)))
37845  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
37846  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
37847 }
37848 #endif
37849 
37850 /* GetException */
37851 #if CYTHON_FAST_THREAD_STATE
37852 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
37853 #else
37854 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
37855 #endif
37856 {
37857  PyObject *local_type, *local_value, *local_tb;
37858 #if CYTHON_FAST_THREAD_STATE
37859  PyObject *tmp_type, *tmp_value, *tmp_tb;
37860  local_type = tstate->curexc_type;
37861  local_value = tstate->curexc_value;
37862  local_tb = tstate->curexc_traceback;
37863  tstate->curexc_type = 0;
37864  tstate->curexc_value = 0;
37865  tstate->curexc_traceback = 0;
37866 #else
37867  PyErr_Fetch(&local_type, &local_value, &local_tb);
37868 #endif
37869  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
37870 #if CYTHON_FAST_THREAD_STATE
37871  if (unlikely(tstate->curexc_type))
37872 #else
37873  if (unlikely(PyErr_Occurred()))
37874 #endif
37875  goto bad;
37876  #if PY_MAJOR_VERSION >= 3
37877  if (local_tb) {
37878  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
37879  goto bad;
37880  }
37881  #endif
37882  Py_XINCREF(local_tb);
37883  Py_XINCREF(local_type);
37884  Py_XINCREF(local_value);
37885  *type = local_type;
37886  *value = local_value;
37887  *tb = local_tb;
37888 #if CYTHON_FAST_THREAD_STATE
37889  #if CYTHON_USE_EXC_INFO_STACK
37890  {
37891  _PyErr_StackItem *exc_info = tstate->exc_info;
37892  tmp_type = exc_info->exc_type;
37893  tmp_value = exc_info->exc_value;
37894  tmp_tb = exc_info->exc_traceback;
37895  exc_info->exc_type = local_type;
37896  exc_info->exc_value = local_value;
37897  exc_info->exc_traceback = local_tb;
37898  }
37899  #else
37900  tmp_type = tstate->exc_type;
37901  tmp_value = tstate->exc_value;
37902  tmp_tb = tstate->exc_traceback;
37903  tstate->exc_type = local_type;
37904  tstate->exc_value = local_value;
37905  tstate->exc_traceback = local_tb;
37906  #endif
37907  Py_XDECREF(tmp_type);
37908  Py_XDECREF(tmp_value);
37909  Py_XDECREF(tmp_tb);
37910 #else
37911  PyErr_SetExcInfo(local_type, local_value, local_tb);
37912 #endif
37913  return 0;
37914 bad:
37915  *type = 0;
37916  *value = 0;
37917  *tb = 0;
37918  Py_XDECREF(local_type);
37919  Py_XDECREF(local_value);
37920  Py_XDECREF(local_tb);
37921  return -1;
37922 }
37923 
37924 /* BytesEquals */
37925 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
37926 #if CYTHON_COMPILING_IN_PYPY
37927  return PyObject_RichCompareBool(s1, s2, equals);
37928 #else
37929  if (s1 == s2) {
37930  return (equals == Py_EQ);
37931  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
37932  const char *ps1, *ps2;
37933  Py_ssize_t length = PyBytes_GET_SIZE(s1);
37934  if (length != PyBytes_GET_SIZE(s2))
37935  return (equals == Py_NE);
37936  ps1 = PyBytes_AS_STRING(s1);
37937  ps2 = PyBytes_AS_STRING(s2);
37938  if (ps1[0] != ps2[0]) {
37939  return (equals == Py_NE);
37940  } else if (length == 1) {
37941  return (equals == Py_EQ);
37942  } else {
37943  int result;
37944 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
37945  Py_hash_t hash1, hash2;
37946  hash1 = ((PyBytesObject*)s1)->ob_shash;
37947  hash2 = ((PyBytesObject*)s2)->ob_shash;
37948  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
37949  return (equals == Py_NE);
37950  }
37951 #endif
37952  result = memcmp(ps1, ps2, (size_t)length);
37953  return (equals == Py_EQ) ? (result == 0) : (result != 0);
37954  }
37955  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
37956  return (equals == Py_NE);
37957  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
37958  return (equals == Py_NE);
37959  } else {
37960  int result;
37961  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
37962  if (!py_result)
37963  return -1;
37964  result = __Pyx_PyObject_IsTrue(py_result);
37965  Py_DECREF(py_result);
37966  return result;
37967  }
37968 #endif
37969 }
37970 
37971 /* UnicodeEquals */
37972 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
37973 #if CYTHON_COMPILING_IN_PYPY
37974  return PyObject_RichCompareBool(s1, s2, equals);
37975 #else
37976 #if PY_MAJOR_VERSION < 3
37977  PyObject* owned_ref = NULL;
37978 #endif
37979  int s1_is_unicode, s2_is_unicode;
37980  if (s1 == s2) {
37981  goto return_eq;
37982  }
37983  s1_is_unicode = PyUnicode_CheckExact(s1);
37984  s2_is_unicode = PyUnicode_CheckExact(s2);
37985 #if PY_MAJOR_VERSION < 3
37986  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
37987  owned_ref = PyUnicode_FromObject(s2);
37988  if (unlikely(!owned_ref))
37989  return -1;
37990  s2 = owned_ref;
37991  s2_is_unicode = 1;
37992  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
37993  owned_ref = PyUnicode_FromObject(s1);
37994  if (unlikely(!owned_ref))
37995  return -1;
37996  s1 = owned_ref;
37997  s1_is_unicode = 1;
37998  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
37999  return __Pyx_PyBytes_Equals(s1, s2, equals);
38000  }
38001 #endif
38002  if (s1_is_unicode & s2_is_unicode) {
38003  Py_ssize_t length;
38004  int kind;
38005  void *data1, *data2;
38006  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
38007  return -1;
38008  length = __Pyx_PyUnicode_GET_LENGTH(s1);
38009  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
38010  goto return_ne;
38011  }
38012 #if CYTHON_USE_UNICODE_INTERNALS
38013  {
38014  Py_hash_t hash1, hash2;
38015  #if CYTHON_PEP393_ENABLED
38016  hash1 = ((PyASCIIObject*)s1)->hash;
38017  hash2 = ((PyASCIIObject*)s2)->hash;
38018  #else
38019  hash1 = ((PyUnicodeObject*)s1)->hash;
38020  hash2 = ((PyUnicodeObject*)s2)->hash;
38021  #endif
38022  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38023  goto return_ne;
38024  }
38025  }
38026 #endif
38027  kind = __Pyx_PyUnicode_KIND(s1);
38028  if (kind != __Pyx_PyUnicode_KIND(s2)) {
38029  goto return_ne;
38030  }
38031  data1 = __Pyx_PyUnicode_DATA(s1);
38032  data2 = __Pyx_PyUnicode_DATA(s2);
38033  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
38034  goto return_ne;
38035  } else if (length == 1) {
38036  goto return_eq;
38037  } else {
38038  int result = memcmp(data1, data2, (size_t)(length * kind));
38039  #if PY_MAJOR_VERSION < 3
38040  Py_XDECREF(owned_ref);
38041  #endif
38042  return (equals == Py_EQ) ? (result == 0) : (result != 0);
38043  }
38044  } else if ((s1 == Py_None) & s2_is_unicode) {
38045  goto return_ne;
38046  } else if ((s2 == Py_None) & s1_is_unicode) {
38047  goto return_ne;
38048  } else {
38049  int result;
38050  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38051  #if PY_MAJOR_VERSION < 3
38052  Py_XDECREF(owned_ref);
38053  #endif
38054  if (!py_result)
38055  return -1;
38056  result = __Pyx_PyObject_IsTrue(py_result);
38057  Py_DECREF(py_result);
38058  return result;
38059  }
38060 return_eq:
38061  #if PY_MAJOR_VERSION < 3
38062  Py_XDECREF(owned_ref);
38063  #endif
38064  return (equals == Py_EQ);
38065 return_ne:
38066  #if PY_MAJOR_VERSION < 3
38067  Py_XDECREF(owned_ref);
38068  #endif
38069  return (equals == Py_NE);
38070 #endif
38071 }
38072 
38073 /* DivInt[Py_ssize_t] */
38074 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
38075  Py_ssize_t q = a / b;
38076  Py_ssize_t r = a - q*b;
38077  q -= ((r != 0) & ((r ^ b) < 0));
38078  return q;
38079 }
38080 
38081 /* GetAttr */
38082 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
38083 #if CYTHON_USE_TYPE_SLOTS
38084 #if PY_MAJOR_VERSION >= 3
38085  if (likely(PyUnicode_Check(n)))
38086 #else
38087  if (likely(PyString_Check(n)))
38088 #endif
38089  return __Pyx_PyObject_GetAttrStr(o, n);
38090 #endif
38091  return PyObject_GetAttr(o, n);
38092 }
38093 
38094 /* GetItemInt */
38095 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
38096  PyObject *r;
38097  if (!j) return NULL;
38098  r = PyObject_GetItem(o, j);
38099  Py_DECREF(j);
38100  return r;
38101 }
38102 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
38103  CYTHON_NCP_UNUSED int wraparound,
38104  CYTHON_NCP_UNUSED int boundscheck) {
38105 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38106  Py_ssize_t wrapped_i = i;
38107  if (wraparound & unlikely(i < 0)) {
38108  wrapped_i += PyList_GET_SIZE(o);
38109  }
38110  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
38111  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
38112  Py_INCREF(r);
38113  return r;
38114  }
38115  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38116 #else
38117  return PySequence_GetItem(o, i);
38118 #endif
38119 }
38120 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
38121  CYTHON_NCP_UNUSED int wraparound,
38122  CYTHON_NCP_UNUSED int boundscheck) {
38123 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38124  Py_ssize_t wrapped_i = i;
38125  if (wraparound & unlikely(i < 0)) {
38126  wrapped_i += PyTuple_GET_SIZE(o);
38127  }
38128  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
38129  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
38130  Py_INCREF(r);
38131  return r;
38132  }
38133  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38134 #else
38135  return PySequence_GetItem(o, i);
38136 #endif
38137 }
38138 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
38139  CYTHON_NCP_UNUSED int wraparound,
38140  CYTHON_NCP_UNUSED int boundscheck) {
38141 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
38142  if (is_list || PyList_CheckExact(o)) {
38143  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
38144  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
38145  PyObject *r = PyList_GET_ITEM(o, n);
38146  Py_INCREF(r);
38147  return r;
38148  }
38149  }
38150  else if (PyTuple_CheckExact(o)) {
38151  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
38152  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
38153  PyObject *r = PyTuple_GET_ITEM(o, n);
38154  Py_INCREF(r);
38155  return r;
38156  }
38157  } else {
38158  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
38159  if (likely(m && m->sq_item)) {
38160  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
38161  Py_ssize_t l = m->sq_length(o);
38162  if (likely(l >= 0)) {
38163  i += l;
38164  } else {
38165  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
38166  return NULL;
38167  PyErr_Clear();
38168  }
38169  }
38170  return m->sq_item(o, i);
38171  }
38172  }
38173 #else
38174  if (is_list || PySequence_Check(o)) {
38175  return PySequence_GetItem(o, i);
38176  }
38177 #endif
38178  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38179 }
38180 
38181 /* ObjectGetItem */
38182 #if CYTHON_USE_TYPE_SLOTS
38183 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
38184  PyObject *runerr;
38185  Py_ssize_t key_value;
38186  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
38187  if (unlikely(!(m && m->sq_item))) {
38188  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
38189  return NULL;
38190  }
38191  key_value = __Pyx_PyIndex_AsSsize_t(index);
38192  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
38193  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
38194  }
38195  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
38196  PyErr_Clear();
38197  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
38198  }
38199  return NULL;
38200 }
38201 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
38202  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
38203  if (likely(m && m->mp_subscript)) {
38204  return m->mp_subscript(obj, key);
38205  }
38206  return __Pyx_PyObject_GetIndex(obj, key);
38207 }
38208 #endif
38209 
38210 /* decode_c_string */
38211 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
38212  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
38213  const char* encoding, const char* errors,
38214  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
38215  Py_ssize_t length;
38216  if (unlikely((start < 0) | (stop < 0))) {
38217  size_t slen = strlen(cstring);
38218  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
38219  PyErr_SetString(PyExc_OverflowError,
38220  "c-string too long to convert to Python");
38221  return NULL;
38222  }
38223  length = (Py_ssize_t) slen;
38224  if (start < 0) {
38225  start += length;
38226  if (start < 0)
38227  start = 0;
38228  }
38229  if (stop < 0)
38230  stop += length;
38231  }
38232  if (unlikely(stop <= start))
38233  return __Pyx_NewRef(__pyx_empty_unicode);
38234  length = stop - start;
38235  cstring += start;
38236  if (decode_func) {
38237  return decode_func(cstring, length, errors);
38238  } else {
38239  return PyUnicode_Decode(cstring, length, encoding, errors);
38240  }
38241 }
38242 
38243 /* GetAttr3 */
38244 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
38245  __Pyx_PyThreadState_declare
38246  __Pyx_PyThreadState_assign
38247  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
38248  return NULL;
38249  __Pyx_PyErr_Clear();
38250  Py_INCREF(d);
38251  return d;
38252 }
38253 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
38254  PyObject *r = __Pyx_GetAttr(o, n);
38255  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
38256 }
38257 
38258 /* RaiseTooManyValuesToUnpack */
38259 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
38260  PyErr_Format(PyExc_ValueError,
38261  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
38262 }
38263 
38264 /* RaiseNeedMoreValuesToUnpack */
38265 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
38266  PyErr_Format(PyExc_ValueError,
38267  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
38268  index, (index == 1) ? "" : "s");
38269 }
38270 
38271 /* RaiseNoneIterError */
38272 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
38273  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
38274 }
38275 
38276 /* SwapException */
38277 #if CYTHON_FAST_THREAD_STATE
38278 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38279  PyObject *tmp_type, *tmp_value, *tmp_tb;
38280  #if CYTHON_USE_EXC_INFO_STACK
38281  _PyErr_StackItem *exc_info = tstate->exc_info;
38282  tmp_type = exc_info->exc_type;
38283  tmp_value = exc_info->exc_value;
38284  tmp_tb = exc_info->exc_traceback;
38285  exc_info->exc_type = *type;
38286  exc_info->exc_value = *value;
38287  exc_info->exc_traceback = *tb;
38288  #else
38289  tmp_type = tstate->exc_type;
38290  tmp_value = tstate->exc_value;
38291  tmp_tb = tstate->exc_traceback;
38292  tstate->exc_type = *type;
38293  tstate->exc_value = *value;
38294  tstate->exc_traceback = *tb;
38295  #endif
38296  *type = tmp_type;
38297  *value = tmp_value;
38298  *tb = tmp_tb;
38299 }
38300 #else
38301 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
38302  PyObject *tmp_type, *tmp_value, *tmp_tb;
38303  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
38304  PyErr_SetExcInfo(*type, *value, *tb);
38305  *type = tmp_type;
38306  *value = tmp_value;
38307  *tb = tmp_tb;
38308 }
38309 #endif
38310 
38311 /* Import */
38312 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
38313  PyObject *empty_list = 0;
38314  PyObject *module = 0;
38315  PyObject *global_dict = 0;
38316  PyObject *empty_dict = 0;
38317  PyObject *list;
38318  #if PY_MAJOR_VERSION < 3
38319  PyObject *py_import;
38320  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
38321  if (!py_import)
38322  goto bad;
38323  #endif
38324  if (from_list)
38325  list = from_list;
38326  else {
38327  empty_list = PyList_New(0);
38328  if (!empty_list)
38329  goto bad;
38330  list = empty_list;
38331  }
38332  global_dict = PyModule_GetDict(__pyx_m);
38333  if (!global_dict)
38334  goto bad;
38335  empty_dict = PyDict_New();
38336  if (!empty_dict)
38337  goto bad;
38338  {
38339  #if PY_MAJOR_VERSION >= 3
38340  if (level == -1) {
38341  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
38342  module = PyImport_ImportModuleLevelObject(
38343  name, global_dict, empty_dict, list, 1);
38344  if (!module) {
38345  if (!PyErr_ExceptionMatches(PyExc_ImportError))
38346  goto bad;
38347  PyErr_Clear();
38348  }
38349  }
38350  level = 0;
38351  }
38352  #endif
38353  if (!module) {
38354  #if PY_MAJOR_VERSION < 3
38355  PyObject *py_level = PyInt_FromLong(level);
38356  if (!py_level)
38357  goto bad;
38358  module = PyObject_CallFunctionObjArgs(py_import,
38359  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
38360  Py_DECREF(py_level);
38361  #else
38362  module = PyImport_ImportModuleLevelObject(
38363  name, global_dict, empty_dict, list, level);
38364  #endif
38365  }
38366  }
38367 bad:
38368  #if PY_MAJOR_VERSION < 3
38369  Py_XDECREF(py_import);
38370  #endif
38371  Py_XDECREF(empty_list);
38372  Py_XDECREF(empty_dict);
38373  return module;
38374 }
38375 
38376 /* FastTypeChecks */
38377 #if CYTHON_COMPILING_IN_CPYTHON
38378 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
38379  while (a) {
38380  a = a->tp_base;
38381  if (a == b)
38382  return 1;
38383  }
38384  return b == &PyBaseObject_Type;
38385 }
38386 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
38387  PyObject *mro;
38388  if (a == b) return 1;
38389  mro = a->tp_mro;
38390  if (likely(mro)) {
38391  Py_ssize_t i, n;
38392  n = PyTuple_GET_SIZE(mro);
38393  for (i = 0; i < n; i++) {
38394  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
38395  return 1;
38396  }
38397  return 0;
38398  }
38399  return __Pyx_InBases(a, b);
38400 }
38401 #if PY_MAJOR_VERSION == 2
38402 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
38403  PyObject *exception, *value, *tb;
38404  int res;
38405  __Pyx_PyThreadState_declare
38406  __Pyx_PyThreadState_assign
38407  __Pyx_ErrFetch(&exception, &value, &tb);
38408  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
38409  if (unlikely(res == -1)) {
38410  PyErr_WriteUnraisable(err);
38411  res = 0;
38412  }
38413  if (!res) {
38414  res = PyObject_IsSubclass(err, exc_type2);
38415  if (unlikely(res == -1)) {
38416  PyErr_WriteUnraisable(err);
38417  res = 0;
38418  }
38419  }
38420  __Pyx_ErrRestore(exception, value, tb);
38421  return res;
38422 }
38423 #else
38424 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
38425  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
38426  if (!res) {
38427  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
38428  }
38429  return res;
38430 }
38431 #endif
38432 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
38433  Py_ssize_t i, n;
38434  assert(PyExceptionClass_Check(exc_type));
38435  n = PyTuple_GET_SIZE(tuple);
38436 #if PY_MAJOR_VERSION >= 3
38437  for (i=0; i<n; i++) {
38438  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
38439  }
38440 #endif
38441  for (i=0; i<n; i++) {
38442  PyObject *t = PyTuple_GET_ITEM(tuple, i);
38443  #if PY_MAJOR_VERSION < 3
38444  if (likely(exc_type == t)) return 1;
38445  #endif
38446  if (likely(PyExceptionClass_Check(t))) {
38447  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
38448  } else {
38449  }
38450  }
38451  return 0;
38452 }
38453 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
38454  if (likely(err == exc_type)) return 1;
38455  if (likely(PyExceptionClass_Check(err))) {
38456  if (likely(PyExceptionClass_Check(exc_type))) {
38457  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
38458  } else if (likely(PyTuple_Check(exc_type))) {
38459  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
38460  } else {
38461  }
38462  }
38463  return PyErr_GivenExceptionMatches(err, exc_type);
38464 }
38465 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
38466  assert(PyExceptionClass_Check(exc_type1));
38467  assert(PyExceptionClass_Check(exc_type2));
38468  if (likely(err == exc_type1 || err == exc_type2)) return 1;
38469  if (likely(PyExceptionClass_Check(err))) {
38470  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
38471  }
38472  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
38473 }
38474 #endif
38475 
38476 /* PyIntBinop */
38477 #if !CYTHON_COMPILING_IN_PYPY
38478 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
38479  (void)inplace;
38480  (void)zerodivision_check;
38481  #if PY_MAJOR_VERSION < 3
38482  if (likely(PyInt_CheckExact(op1))) {
38483  const long b = intval;
38484  long x;
38485  long a = PyInt_AS_LONG(op1);
38486  x = (long)((unsigned long)a + b);
38487  if (likely((x^a) >= 0 || (x^b) >= 0))
38488  return PyInt_FromLong(x);
38489  return PyLong_Type.tp_as_number->nb_add(op1, op2);
38490  }
38491  #endif
38492  #if CYTHON_USE_PYLONG_INTERNALS
38493  if (likely(PyLong_CheckExact(op1))) {
38494  const long b = intval;
38495  long a, x;
38496 #ifdef HAVE_LONG_LONG
38497  const PY_LONG_LONG llb = intval;
38498  PY_LONG_LONG lla, llx;
38499 #endif
38500  const digit* digits = ((PyLongObject*)op1)->ob_digit;
38501  const Py_ssize_t size = Py_SIZE(op1);
38502  if (likely(__Pyx_sst_abs(size) <= 1)) {
38503  a = likely(size) ? digits[0] : 0;
38504  if (size == -1) a = -a;
38505  } else {
38506  switch (size) {
38507  case -2:
38508  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
38509  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38510  break;
38511 #ifdef HAVE_LONG_LONG
38512  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
38513  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38514  goto long_long;
38515 #endif
38516  }
38517  CYTHON_FALLTHROUGH;
38518  case 2:
38519  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
38520  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38521  break;
38522 #ifdef HAVE_LONG_LONG
38523  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
38524  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38525  goto long_long;
38526 #endif
38527  }
38528  CYTHON_FALLTHROUGH;
38529  case -3:
38530  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38531  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38532  break;
38533 #ifdef HAVE_LONG_LONG
38534  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38535  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38536  goto long_long;
38537 #endif
38538  }
38539  CYTHON_FALLTHROUGH;
38540  case 3:
38541  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38542  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38543  break;
38544 #ifdef HAVE_LONG_LONG
38545  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38546  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38547  goto long_long;
38548 #endif
38549  }
38550  CYTHON_FALLTHROUGH;
38551  case -4:
38552  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38553  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38554  break;
38555 #ifdef HAVE_LONG_LONG
38556  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38557  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38558  goto long_long;
38559 #endif
38560  }
38561  CYTHON_FALLTHROUGH;
38562  case 4:
38563  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38564  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38565  break;
38566 #ifdef HAVE_LONG_LONG
38567  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38568  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38569  goto long_long;
38570 #endif
38571  }
38572  CYTHON_FALLTHROUGH;
38573  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
38574  }
38575  }
38576  x = a + b;
38577  return PyLong_FromLong(x);
38578 #ifdef HAVE_LONG_LONG
38579  long_long:
38580  llx = lla + llb;
38581  return PyLong_FromLongLong(llx);
38582 #endif
38583 
38584 
38585  }
38586  #endif
38587  if (PyFloat_CheckExact(op1)) {
38588  const long b = intval;
38589  double a = PyFloat_AS_DOUBLE(op1);
38590  double result;
38591  PyFPE_START_PROTECT("add", return NULL)
38592  result = ((double)a) + (double)b;
38593  PyFPE_END_PROTECT(result)
38594  return PyFloat_FromDouble(result);
38595  }
38596  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
38597 }
38598 #endif
38599 
38600 /* None */
38601 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
38602  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
38603 }
38604 
38605 /* DivInt[long] */
38606 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
38607  long q = a / b;
38608  long r = a - q*b;
38609  q -= ((r != 0) & ((r ^ b) < 0));
38610  return q;
38611 }
38612 
38613 /* ImportFrom */
38614 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
38615  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
38616  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
38617  PyErr_Format(PyExc_ImportError,
38618  #if PY_MAJOR_VERSION < 3
38619  "cannot import name %.230s", PyString_AS_STRING(name));
38620  #else
38621  "cannot import name %S", name);
38622  #endif
38623  }
38624  return value;
38625 }
38626 
38627 /* HasAttr */
38628 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
38629  PyObject *r;
38630  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
38631  PyErr_SetString(PyExc_TypeError,
38632  "hasattr(): attribute name must be string");
38633  return -1;
38634  }
38635  r = __Pyx_GetAttr(o, n);
38636  if (unlikely(!r)) {
38637  PyErr_Clear();
38638  return 0;
38639  } else {
38640  Py_DECREF(r);
38641  return 1;
38642  }
38643 }
38644 
38645 /* StringJoin */
38646 #if !CYTHON_COMPILING_IN_CPYTHON
38647 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
38648  return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
38649 }
38650 #endif
38651 
38652 /* PyObject_GenericGetAttrNoDict */
38653 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
38654 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
38655  PyErr_Format(PyExc_AttributeError,
38656 #if PY_MAJOR_VERSION >= 3
38657  "'%.50s' object has no attribute '%U'",
38658  tp->tp_name, attr_name);
38659 #else
38660  "'%.50s' object has no attribute '%.400s'",
38661  tp->tp_name, PyString_AS_STRING(attr_name));
38662 #endif
38663  return NULL;
38664 }
38665 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
38666  PyObject *descr;
38667  PyTypeObject *tp = Py_TYPE(obj);
38668  if (unlikely(!PyString_Check(attr_name))) {
38669  return PyObject_GenericGetAttr(obj, attr_name);
38670  }
38671  assert(!tp->tp_dictoffset);
38672  descr = _PyType_Lookup(tp, attr_name);
38673  if (unlikely(!descr)) {
38674  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
38675  }
38676  Py_INCREF(descr);
38677  #if PY_MAJOR_VERSION < 3
38678  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
38679  #endif
38680  {
38681  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
38682  if (unlikely(f)) {
38683  PyObject *res = f(descr, obj, (PyObject *)tp);
38684  Py_DECREF(descr);
38685  return res;
38686  }
38687  }
38688  return descr;
38689 }
38690 #endif
38691 
38692 /* PyObject_GenericGetAttr */
38693 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
38694 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
38695  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
38696  return PyObject_GenericGetAttr(obj, attr_name);
38697  }
38698  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
38699 }
38700 #endif
38701 
38702 /* PyObjectGetAttrStrNoError */
38703 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
38704  __Pyx_PyThreadState_declare
38705  __Pyx_PyThreadState_assign
38706  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
38707  __Pyx_PyErr_Clear();
38708 }
38709 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
38710  PyObject *result;
38711 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
38712  PyTypeObject* tp = Py_TYPE(obj);
38713  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
38714  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
38715  }
38716 #endif
38717  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
38718  if (unlikely(!result)) {
38719  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
38720  }
38721  return result;
38722 }
38723 
38724 /* SetupReduce */
38725 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
38726  int ret;
38727  PyObject *name_attr;
38728  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
38729  if (likely(name_attr)) {
38730  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
38731  } else {
38732  ret = -1;
38733  }
38734  if (unlikely(ret < 0)) {
38735  PyErr_Clear();
38736  ret = 0;
38737  }
38738  Py_XDECREF(name_attr);
38739  return ret;
38740 }
38741 static int __Pyx_setup_reduce(PyObject* type_obj) {
38742  int ret = 0;
38743  PyObject *object_reduce = NULL;
38744  PyObject *object_getstate = NULL;
38745  PyObject *object_reduce_ex = NULL;
38746  PyObject *reduce = NULL;
38747  PyObject *reduce_ex = NULL;
38748  PyObject *reduce_cython = NULL;
38749  PyObject *setstate = NULL;
38750  PyObject *setstate_cython = NULL;
38751  PyObject *getstate = NULL;
38752 #if CYTHON_USE_PYTYPE_LOOKUP
38753  getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
38754 #else
38755  getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
38756  if (!getstate && PyErr_Occurred()) {
38757  goto __PYX_BAD;
38758  }
38759 #endif
38760  if (getstate) {
38761 #if CYTHON_USE_PYTYPE_LOOKUP
38762  object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
38763 #else
38764  object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
38765  if (!object_getstate && PyErr_Occurred()) {
38766  goto __PYX_BAD;
38767  }
38768 #endif
38769  if (object_getstate != getstate) {
38770  goto __PYX_GOOD;
38771  }
38772  }
38773 #if CYTHON_USE_PYTYPE_LOOKUP
38774  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
38775 #else
38776  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
38777 #endif
38778  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
38779  if (reduce_ex == object_reduce_ex) {
38780 #if CYTHON_USE_PYTYPE_LOOKUP
38781  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
38782 #else
38783  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
38784 #endif
38785  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
38786  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
38787  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
38788  if (likely(reduce_cython)) {
38789  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
38790  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
38791  } else if (reduce == object_reduce || PyErr_Occurred()) {
38792  goto __PYX_BAD;
38793  }
38794  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
38795  if (!setstate) PyErr_Clear();
38796  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
38797  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
38798  if (likely(setstate_cython)) {
38799  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
38800  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
38801  } else if (!setstate || PyErr_Occurred()) {
38802  goto __PYX_BAD;
38803  }
38804  }
38805  PyType_Modified((PyTypeObject*)type_obj);
38806  }
38807  }
38808  goto __PYX_GOOD;
38809 __PYX_BAD:
38810  if (!PyErr_Occurred())
38811  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
38812  ret = -1;
38813 __PYX_GOOD:
38814 #if !CYTHON_USE_PYTYPE_LOOKUP
38815  Py_XDECREF(object_reduce);
38816  Py_XDECREF(object_reduce_ex);
38817  Py_XDECREF(object_getstate);
38818  Py_XDECREF(getstate);
38819 #endif
38820  Py_XDECREF(reduce);
38821  Py_XDECREF(reduce_ex);
38822  Py_XDECREF(reduce_cython);
38823  Py_XDECREF(setstate);
38824  Py_XDECREF(setstate_cython);
38825  return ret;
38826 }
38827 
38828 /* SetVTable */
38829 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
38830 #if PY_VERSION_HEX >= 0x02070000
38831  PyObject *ob = PyCapsule_New(vtable, 0, 0);
38832 #else
38833  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
38834 #endif
38835  if (!ob)
38836  goto bad;
38837  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
38838  goto bad;
38839  Py_DECREF(ob);
38840  return 0;
38841 bad:
38842  Py_XDECREF(ob);
38843  return -1;
38844 }
38845 
38846 /* TypeImport */
38847 #ifndef __PYX_HAVE_RT_ImportType
38848 #define __PYX_HAVE_RT_ImportType
38849 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
38850  size_t size, enum __Pyx_ImportType_CheckSize check_size)
38851 {
38852  PyObject *result = 0;
38853  char warning[200];
38854  Py_ssize_t basicsize;
38855 #ifdef Py_LIMITED_API
38856  PyObject *py_basicsize;
38857 #endif
38858  result = PyObject_GetAttrString(module, class_name);
38859  if (!result)
38860  goto bad;
38861  if (!PyType_Check(result)) {
38862  PyErr_Format(PyExc_TypeError,
38863  "%.200s.%.200s is not a type object",
38864  module_name, class_name);
38865  goto bad;
38866  }
38867 #ifndef Py_LIMITED_API
38868  basicsize = ((PyTypeObject *)result)->tp_basicsize;
38869 #else
38870  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
38871  if (!py_basicsize)
38872  goto bad;
38873  basicsize = PyLong_AsSsize_t(py_basicsize);
38874  Py_DECREF(py_basicsize);
38875  py_basicsize = 0;
38876  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
38877  goto bad;
38878 #endif
38879  if ((size_t)basicsize < size) {
38880  PyErr_Format(PyExc_ValueError,
38881  "%.200s.%.200s size changed, may indicate binary incompatibility. "
38882  "Expected %zd from C header, got %zd from PyObject",
38883  module_name, class_name, size, basicsize);
38884  goto bad;
38885  }
38886  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
38887  PyErr_Format(PyExc_ValueError,
38888  "%.200s.%.200s size changed, may indicate binary incompatibility. "
38889  "Expected %zd from C header, got %zd from PyObject",
38890  module_name, class_name, size, basicsize);
38891  goto bad;
38892  }
38893  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
38894  PyOS_snprintf(warning, sizeof(warning),
38895  "%s.%s size changed, may indicate binary incompatibility. "
38896  "Expected %zd from C header, got %zd from PyObject",
38897  module_name, class_name, size, basicsize);
38898  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
38899  }
38900  return (PyTypeObject *)result;
38901 bad:
38902  Py_XDECREF(result);
38903  return NULL;
38904 }
38905 #endif
38906 
38907 /* CLineInTraceback */
38908 #ifndef CYTHON_CLINE_IN_TRACEBACK
38909 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
38910  PyObject *use_cline;
38911  PyObject *ptype, *pvalue, *ptraceback;
38912 #if CYTHON_COMPILING_IN_CPYTHON
38913  PyObject **cython_runtime_dict;
38914 #endif
38915  if (unlikely(!__pyx_cython_runtime)) {
38916  return c_line;
38917  }
38918  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
38919 #if CYTHON_COMPILING_IN_CPYTHON
38920  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
38921  if (likely(cython_runtime_dict)) {
38922  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
38923  use_cline, *cython_runtime_dict,
38924  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
38925  } else
38926 #endif
38927  {
38928  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
38929  if (use_cline_obj) {
38930  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
38931  Py_DECREF(use_cline_obj);
38932  } else {
38933  PyErr_Clear();
38934  use_cline = NULL;
38935  }
38936  }
38937  if (!use_cline) {
38938  c_line = 0;
38939  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
38940  }
38941  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
38942  c_line = 0;
38943  }
38944  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
38945  return c_line;
38946 }
38947 #endif
38948 
38949 /* CodeObjectCache */
38950 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
38951  int start = 0, mid = 0, end = count - 1;
38952  if (end >= 0 && code_line > entries[end].code_line) {
38953  return count;
38954  }
38955  while (start < end) {
38956  mid = start + (end - start) / 2;
38957  if (code_line < entries[mid].code_line) {
38958  end = mid;
38959  } else if (code_line > entries[mid].code_line) {
38960  start = mid + 1;
38961  } else {
38962  return mid;
38963  }
38964  }
38965  if (code_line <= entries[mid].code_line) {
38966  return mid;
38967  } else {
38968  return mid + 1;
38969  }
38970 }
38971 static PyCodeObject *__pyx_find_code_object(int code_line) {
38972  PyCodeObject* code_object;
38973  int pos;
38974  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
38975  return NULL;
38976  }
38977  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
38978  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
38979  return NULL;
38980  }
38981  code_object = __pyx_code_cache.entries[pos].code_object;
38982  Py_INCREF(code_object);
38983  return code_object;
38984 }
38985 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
38986  int pos, i;
38987  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
38988  if (unlikely(!code_line)) {
38989  return;
38990  }
38991  if (unlikely(!entries)) {
38992  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
38993  if (likely(entries)) {
38994  __pyx_code_cache.entries = entries;
38995  __pyx_code_cache.max_count = 64;
38996  __pyx_code_cache.count = 1;
38997  entries[0].code_line = code_line;
38998  entries[0].code_object = code_object;
38999  Py_INCREF(code_object);
39000  }
39001  return;
39002  }
39003  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
39004  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
39005  PyCodeObject* tmp = entries[pos].code_object;
39006  entries[pos].code_object = code_object;
39007  Py_DECREF(tmp);
39008  return;
39009  }
39010  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
39011  int new_max = __pyx_code_cache.max_count + 64;
39012  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
39013  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
39014  if (unlikely(!entries)) {
39015  return;
39016  }
39017  __pyx_code_cache.entries = entries;
39018  __pyx_code_cache.max_count = new_max;
39019  }
39020  for (i=__pyx_code_cache.count; i>pos; i--) {
39021  entries[i] = entries[i-1];
39022  }
39023  entries[pos].code_line = code_line;
39024  entries[pos].code_object = code_object;
39025  __pyx_code_cache.count++;
39026  Py_INCREF(code_object);
39027 }
39028 
39029 /* AddTraceback */
39030 #include "compile.h"
39031 #include "frameobject.h"
39032 #include "traceback.h"
39033 #if PY_VERSION_HEX >= 0x030b00a6
39034  #ifndef Py_BUILD_CORE
39035  #define Py_BUILD_CORE 1
39036  #endif
39037  #include "internal/pycore_frame.h"
39038 #endif
39039 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
39040  const char *funcname, int c_line,
39041  int py_line, const char *filename) {
39042  PyCodeObject *py_code = NULL;
39043  PyObject *py_funcname = NULL;
39044  #if PY_MAJOR_VERSION < 3
39045  PyObject *py_srcfile = NULL;
39046  py_srcfile = PyString_FromString(filename);
39047  if (!py_srcfile) goto bad;
39048  #endif
39049  if (c_line) {
39050  #if PY_MAJOR_VERSION < 3
39051  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
39052  if (!py_funcname) goto bad;
39053  #else
39054  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
39055  if (!py_funcname) goto bad;
39056  funcname = PyUnicode_AsUTF8(py_funcname);
39057  if (!funcname) goto bad;
39058  #endif
39059  }
39060  else {
39061  #if PY_MAJOR_VERSION < 3
39062  py_funcname = PyString_FromString(funcname);
39063  if (!py_funcname) goto bad;
39064  #endif
39065  }
39066  #if PY_MAJOR_VERSION < 3
39067  py_code = __Pyx_PyCode_New(
39068  0,
39069  0,
39070  0,
39071  0,
39072  0,
39073  __pyx_empty_bytes, /*PyObject *code,*/
39074  __pyx_empty_tuple, /*PyObject *consts,*/
39075  __pyx_empty_tuple, /*PyObject *names,*/
39076  __pyx_empty_tuple, /*PyObject *varnames,*/
39077  __pyx_empty_tuple, /*PyObject *freevars,*/
39078  __pyx_empty_tuple, /*PyObject *cellvars,*/
39079  py_srcfile, /*PyObject *filename,*/
39080  py_funcname, /*PyObject *name,*/
39081  py_line,
39082  __pyx_empty_bytes /*PyObject *lnotab*/
39083  );
39084  Py_DECREF(py_srcfile);
39085  #else
39086  py_code = PyCode_NewEmpty(filename, funcname, py_line);
39087  #endif
39088  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
39089  return py_code;
39090 bad:
39091  Py_XDECREF(py_funcname);
39092  #if PY_MAJOR_VERSION < 3
39093  Py_XDECREF(py_srcfile);
39094  #endif
39095  return NULL;
39096 }
39097 static void __Pyx_AddTraceback(const char *funcname, int c_line,
39098  int py_line, const char *filename) {
39099  PyCodeObject *py_code = 0;
39100  PyFrameObject *py_frame = 0;
39101  PyThreadState *tstate = __Pyx_PyThreadState_Current;
39102  PyObject *ptype, *pvalue, *ptraceback;
39103  if (c_line) {
39104  c_line = __Pyx_CLineForTraceback(tstate, c_line);
39105  }
39106  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
39107  if (!py_code) {
39108  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
39109  py_code = __Pyx_CreateCodeObjectForTraceback(
39110  funcname, c_line, py_line, filename);
39111  if (!py_code) {
39112  /* If the code object creation fails, then we should clear the
39113  fetched exception references and propagate the new exception */
39114  Py_XDECREF(ptype);
39115  Py_XDECREF(pvalue);
39116  Py_XDECREF(ptraceback);
39117  goto bad;
39118  }
39119  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
39120  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
39121  }
39122  py_frame = PyFrame_New(
39123  tstate, /*PyThreadState *tstate,*/
39124  py_code, /*PyCodeObject *code,*/
39125  __pyx_d, /*PyObject *globals,*/
39126  0 /*PyObject *locals*/
39127  );
39128  if (!py_frame) goto bad;
39129  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
39130  PyTraceBack_Here(py_frame);
39131 bad:
39132  Py_XDECREF(py_code);
39133  Py_XDECREF(py_frame);
39134 }
39135 
39136 /* CIntFromPyVerify */
39137 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
39138  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
39139 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
39140  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
39141 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
39142  {\
39143  func_type value = func_value;\
39144  if (sizeof(target_type) < sizeof(func_type)) {\
39145  if (unlikely(value != (func_type) (target_type) value)) {\
39146  func_type zero = 0;\
39147  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
39148  return (target_type) -1;\
39149  if (is_unsigned && unlikely(value < zero))\
39150  goto raise_neg_overflow;\
39151  else\
39152  goto raise_overflow;\
39153  }\
39154  }\
39155  return (target_type) value;\
39156  }
39157 
39158 /* MemviewDtypeToObject */
39159 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) {
39160  return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp);
39161 }
39162 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) {
39163  int value = __Pyx_PyInt_As_int(obj);
39164  if ((value == (int)-1) && PyErr_Occurred())
39165  return 0;
39166  *(int *) itemp = value;
39167  return 1;
39168 }
39169 
39170 /* MemviewDtypeToObject */
39171 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
39172  return (PyObject *) PyFloat_FromDouble(*(double *) itemp);
39173 }
39174 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) {
39175  double value = __pyx_PyFloat_AsDouble(obj);
39176  if ((value == (double)-1) && PyErr_Occurred())
39177  return 0;
39178  *(double *) itemp = value;
39179  return 1;
39180 }
39181 
39182 /* Print */
39183 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
39184 static PyObject *__Pyx_GetStdout(void) {
39185  PyObject *f = PySys_GetObject((char *)"stdout");
39186  if (!f) {
39187  PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
39188  }
39189  return f;
39190 }
39191 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
39192  int i;
39193  if (!f) {
39194  if (!(f = __Pyx_GetStdout()))
39195  return -1;
39196  }
39197  Py_INCREF(f);
39198  for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
39199  PyObject* v;
39200  if (PyFile_SoftSpace(f, 1)) {
39201  if (PyFile_WriteString(" ", f) < 0)
39202  goto error;
39203  }
39204  v = PyTuple_GET_ITEM(arg_tuple, i);
39205  if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
39206  goto error;
39207  if (PyString_Check(v)) {
39208  char *s = PyString_AsString(v);
39209  Py_ssize_t len = PyString_Size(v);
39210  if (len > 0) {
39211  switch (s[len-1]) {
39212  case ' ': break;
39213  case '\f': case '\r': case '\n': case '\t': case '\v':
39214  PyFile_SoftSpace(f, 0);
39215  break;
39216  default: break;
39217  }
39218  }
39219  }
39220  }
39221  if (newline) {
39222  if (PyFile_WriteString("\n", f) < 0)
39223  goto error;
39224  PyFile_SoftSpace(f, 0);
39225  }
39226  Py_DECREF(f);
39227  return 0;
39228 error:
39229  Py_DECREF(f);
39230  return -1;
39231 }
39232 #else
39233 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
39234  PyObject* kwargs = 0;
39235  PyObject* result = 0;
39236  PyObject* end_string;
39237  if (unlikely(!__pyx_print)) {
39238  __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
39239  if (!__pyx_print)
39240  return -1;
39241  }
39242  if (stream) {
39243  kwargs = PyDict_New();
39244  if (unlikely(!kwargs))
39245  return -1;
39246  if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
39247  goto bad;
39248  if (!newline) {
39249  end_string = PyUnicode_FromStringAndSize(" ", 1);
39250  if (unlikely(!end_string))
39251  goto bad;
39252  if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
39253  Py_DECREF(end_string);
39254  goto bad;
39255  }
39256  Py_DECREF(end_string);
39257  }
39258  } else if (!newline) {
39259  if (unlikely(!__pyx_print_kwargs)) {
39260  __pyx_print_kwargs = PyDict_New();
39261  if (unlikely(!__pyx_print_kwargs))
39262  return -1;
39263  end_string = PyUnicode_FromStringAndSize(" ", 1);
39264  if (unlikely(!end_string))
39265  return -1;
39266  if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
39267  Py_DECREF(end_string);
39268  return -1;
39269  }
39270  Py_DECREF(end_string);
39271  }
39272  kwargs = __pyx_print_kwargs;
39273  }
39274  result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
39275  if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
39276  Py_DECREF(kwargs);
39277  if (!result)
39278  return -1;
39279  Py_DECREF(result);
39280  return 0;
39281 bad:
39282  if (kwargs != __pyx_print_kwargs)
39283  Py_XDECREF(kwargs);
39284  return -1;
39285 }
39286 #endif
39287 
39288 /* Declarations */
39289 #if CYTHON_CCOMPLEX
39290  #ifdef __cplusplus
39291  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39292  return ::std::complex< float >(x, y);
39293  }
39294  #else
39295  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39296  return x + y*(__pyx_t_float_complex)_Complex_I;
39297  }
39298  #endif
39299 #else
39300  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39301  __pyx_t_float_complex z;
39302  z.real = x;
39303  z.imag = y;
39304  return z;
39305  }
39306 #endif
39307 
39308 /* Arithmetic */
39309 #if CYTHON_CCOMPLEX
39310 #else
39311  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39312  return (a.real == b.real) && (a.imag == b.imag);
39313  }
39314  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39315  __pyx_t_float_complex z;
39316  z.real = a.real + b.real;
39317  z.imag = a.imag + b.imag;
39318  return z;
39319  }
39320  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39321  __pyx_t_float_complex z;
39322  z.real = a.real - b.real;
39323  z.imag = a.imag - b.imag;
39324  return z;
39325  }
39326  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39327  __pyx_t_float_complex z;
39328  z.real = a.real * b.real - a.imag * b.imag;
39329  z.imag = a.real * b.imag + a.imag * b.real;
39330  return z;
39331  }
39332  #if 1
39333  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39334  if (b.imag == 0) {
39335  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39336  } else if (fabsf(b.real) >= fabsf(b.imag)) {
39337  if (b.real == 0 && b.imag == 0) {
39338  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
39339  } else {
39340  float r = b.imag / b.real;
39341  float s = (float)(1.0) / (b.real + b.imag * r);
39342  return __pyx_t_float_complex_from_parts(
39343  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39344  }
39345  } else {
39346  float r = b.real / b.imag;
39347  float s = (float)(1.0) / (b.imag + b.real * r);
39348  return __pyx_t_float_complex_from_parts(
39349  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39350  }
39351  }
39352  #else
39353  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39354  if (b.imag == 0) {
39355  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39356  } else {
39357  float denom = b.real * b.real + b.imag * b.imag;
39358  return __pyx_t_float_complex_from_parts(
39359  (a.real * b.real + a.imag * b.imag) / denom,
39360  (a.imag * b.real - a.real * b.imag) / denom);
39361  }
39362  }
39363  #endif
39364  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
39365  __pyx_t_float_complex z;
39366  z.real = -a.real;
39367  z.imag = -a.imag;
39368  return z;
39369  }
39370  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
39371  return (a.real == 0) && (a.imag == 0);
39372  }
39373  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
39374  __pyx_t_float_complex z;
39375  z.real = a.real;
39376  z.imag = -a.imag;
39377  return z;
39378  }
39379  #if 1
39380  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
39381  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39382  return sqrtf(z.real*z.real + z.imag*z.imag);
39383  #else
39384  return hypotf(z.real, z.imag);
39385  #endif
39386  }
39387  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39388  __pyx_t_float_complex z;
39389  float r, lnr, theta, z_r, z_theta;
39390  if (b.imag == 0 && b.real == (int)b.real) {
39391  if (b.real < 0) {
39392  float denom = a.real * a.real + a.imag * a.imag;
39393  a.real = a.real / denom;
39394  a.imag = -a.imag / denom;
39395  b.real = -b.real;
39396  }
39397  switch ((int)b.real) {
39398  case 0:
39399  z.real = 1;
39400  z.imag = 0;
39401  return z;
39402  case 1:
39403  return a;
39404  case 2:
39405  return __Pyx_c_prod_float(a, a);
39406  case 3:
39407  z = __Pyx_c_prod_float(a, a);
39408  return __Pyx_c_prod_float(z, a);
39409  case 4:
39410  z = __Pyx_c_prod_float(a, a);
39411  return __Pyx_c_prod_float(z, z);
39412  }
39413  }
39414  if (a.imag == 0) {
39415  if (a.real == 0) {
39416  return a;
39417  } else if (b.imag == 0) {
39418  z.real = powf(a.real, b.real);
39419  z.imag = 0;
39420  return z;
39421  } else if (a.real > 0) {
39422  r = a.real;
39423  theta = 0;
39424  } else {
39425  r = -a.real;
39426  theta = atan2f(0.0, -1.0);
39427  }
39428  } else {
39429  r = __Pyx_c_abs_float(a);
39430  theta = atan2f(a.imag, a.real);
39431  }
39432  lnr = logf(r);
39433  z_r = expf(lnr * b.real - theta * b.imag);
39434  z_theta = theta * b.real + lnr * b.imag;
39435  z.real = z_r * cosf(z_theta);
39436  z.imag = z_r * sinf(z_theta);
39437  return z;
39438  }
39439  #endif
39440 #endif
39441 
39442 /* Declarations */
39443 #if CYTHON_CCOMPLEX
39444  #ifdef __cplusplus
39445  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39446  return ::std::complex< double >(x, y);
39447  }
39448  #else
39449  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39450  return x + y*(__pyx_t_double_complex)_Complex_I;
39451  }
39452  #endif
39453 #else
39454  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39455  __pyx_t_double_complex z;
39456  z.real = x;
39457  z.imag = y;
39458  return z;
39459  }
39460 #endif
39461 
39462 /* Arithmetic */
39463 #if CYTHON_CCOMPLEX
39464 #else
39465  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39466  return (a.real == b.real) && (a.imag == b.imag);
39467  }
39468  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39469  __pyx_t_double_complex z;
39470  z.real = a.real + b.real;
39471  z.imag = a.imag + b.imag;
39472  return z;
39473  }
39474  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39475  __pyx_t_double_complex z;
39476  z.real = a.real - b.real;
39477  z.imag = a.imag - b.imag;
39478  return z;
39479  }
39480  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39481  __pyx_t_double_complex z;
39482  z.real = a.real * b.real - a.imag * b.imag;
39483  z.imag = a.real * b.imag + a.imag * b.real;
39484  return z;
39485  }
39486  #if 1
39487  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39488  if (b.imag == 0) {
39489  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39490  } else if (fabs(b.real) >= fabs(b.imag)) {
39491  if (b.real == 0 && b.imag == 0) {
39492  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
39493  } else {
39494  double r = b.imag / b.real;
39495  double s = (double)(1.0) / (b.real + b.imag * r);
39496  return __pyx_t_double_complex_from_parts(
39497  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39498  }
39499  } else {
39500  double r = b.real / b.imag;
39501  double s = (double)(1.0) / (b.imag + b.real * r);
39502  return __pyx_t_double_complex_from_parts(
39503  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39504  }
39505  }
39506  #else
39507  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39508  if (b.imag == 0) {
39509  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39510  } else {
39511  double denom = b.real * b.real + b.imag * b.imag;
39512  return __pyx_t_double_complex_from_parts(
39513  (a.real * b.real + a.imag * b.imag) / denom,
39514  (a.imag * b.real - a.real * b.imag) / denom);
39515  }
39516  }
39517  #endif
39518  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
39519  __pyx_t_double_complex z;
39520  z.real = -a.real;
39521  z.imag = -a.imag;
39522  return z;
39523  }
39524  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
39525  return (a.real == 0) && (a.imag == 0);
39526  }
39527  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
39528  __pyx_t_double_complex z;
39529  z.real = a.real;
39530  z.imag = -a.imag;
39531  return z;
39532  }
39533  #if 1
39534  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
39535  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39536  return sqrt(z.real*z.real + z.imag*z.imag);
39537  #else
39538  return hypot(z.real, z.imag);
39539  #endif
39540  }
39541  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39542  __pyx_t_double_complex z;
39543  double r, lnr, theta, z_r, z_theta;
39544  if (b.imag == 0 && b.real == (int)b.real) {
39545  if (b.real < 0) {
39546  double denom = a.real * a.real + a.imag * a.imag;
39547  a.real = a.real / denom;
39548  a.imag = -a.imag / denom;
39549  b.real = -b.real;
39550  }
39551  switch ((int)b.real) {
39552  case 0:
39553  z.real = 1;
39554  z.imag = 0;
39555  return z;
39556  case 1:
39557  return a;
39558  case 2:
39559  return __Pyx_c_prod_double(a, a);
39560  case 3:
39561  z = __Pyx_c_prod_double(a, a);
39562  return __Pyx_c_prod_double(z, a);
39563  case 4:
39564  z = __Pyx_c_prod_double(a, a);
39565  return __Pyx_c_prod_double(z, z);
39566  }
39567  }
39568  if (a.imag == 0) {
39569  if (a.real == 0) {
39570  return a;
39571  } else if (b.imag == 0) {
39572  z.real = pow(a.real, b.real);
39573  z.imag = 0;
39574  return z;
39575  } else if (a.real > 0) {
39576  r = a.real;
39577  theta = 0;
39578  } else {
39579  r = -a.real;
39580  theta = atan2(0.0, -1.0);
39581  }
39582  } else {
39583  r = __Pyx_c_abs_double(a);
39584  theta = atan2(a.imag, a.real);
39585  }
39586  lnr = log(r);
39587  z_r = exp(lnr * b.real - theta * b.imag);
39588  z_theta = theta * b.real + lnr * b.imag;
39589  z.real = z_r * cos(z_theta);
39590  z.imag = z_r * sin(z_theta);
39591  return z;
39592  }
39593  #endif
39594 #endif
39595 
39596 #if PY_MAJOR_VERSION < 3
39597 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
39598  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
39599  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
39600  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
39601  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
39602  return -1;
39603 }
39604 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
39605  PyObject *obj = view->obj;
39606  if (!obj) return;
39607  if (PyObject_CheckBuffer(obj)) {
39608  PyBuffer_Release(view);
39609  return;
39610  }
39611  if ((0)) {}
39612  view->obj = NULL;
39613  Py_DECREF(obj);
39614 }
39615 #endif
39616 
39617 
39618 /* MemviewSliceIsContig */
39619 static int
39620 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
39621 {
39622  int i, index, step, start;
39623  Py_ssize_t itemsize = mvs.memview->view.itemsize;
39624  if (order == 'F') {
39625  step = 1;
39626  start = 0;
39627  } else {
39628  step = -1;
39629  start = ndim - 1;
39630  }
39631  for (i = 0; i < ndim; i++) {
39632  index = start + step * i;
39633  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
39634  return 0;
39635  itemsize *= mvs.shape[index];
39636  }
39637  return 1;
39638 }
39639 
39640 /* OverlappingSlices */
39641 static void
39642 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
39643  void **out_start, void **out_end,
39644  int ndim, size_t itemsize)
39645 {
39646  char *start, *end;
39647  int i;
39648  start = end = slice->data;
39649  for (i = 0; i < ndim; i++) {
39650  Py_ssize_t stride = slice->strides[i];
39651  Py_ssize_t extent = slice->shape[i];
39652  if (extent == 0) {
39653  *out_start = *out_end = start;
39654  return;
39655  } else {
39656  if (stride > 0)
39657  end += stride * (extent - 1);
39658  else
39659  start += stride * (extent - 1);
39660  }
39661  }
39662  *out_start = start;
39663  *out_end = end + itemsize;
39664 }
39665 static int
39666 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
39667  __Pyx_memviewslice *slice2,
39668  int ndim, size_t itemsize)
39669 {
39670  void *start1, *end1, *start2, *end2;
39671  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
39672  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
39673  return (start1 < end2) && (start2 < end1);
39674 }
39675 
39676 /* Capsule */
39677 static CYTHON_INLINE PyObject *
39678 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
39679 {
39680  PyObject *cobj;
39681 #if PY_VERSION_HEX >= 0x02070000
39682  cobj = PyCapsule_New(p, sig, NULL);
39683 #else
39684  cobj = PyCObject_FromVoidPtr(p, NULL);
39685 #endif
39686  return cobj;
39687 }
39688 
39689 /* CIntFromPy */
39690 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
39691 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39692 #pragma GCC diagnostic push
39693 #pragma GCC diagnostic ignored "-Wconversion"
39694 #endif
39695  const int neg_one = (int) -1, const_zero = (int) 0;
39696 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39697 #pragma GCC diagnostic pop
39698 #endif
39699  const int is_unsigned = neg_one > const_zero;
39700 #if PY_MAJOR_VERSION < 3
39701  if (likely(PyInt_Check(x))) {
39702  if (sizeof(int) < sizeof(long)) {
39703  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
39704  } else {
39705  long val = PyInt_AS_LONG(x);
39706  if (is_unsigned && unlikely(val < 0)) {
39707  goto raise_neg_overflow;
39708  }
39709  return (int) val;
39710  }
39711  } else
39712 #endif
39713  if (likely(PyLong_Check(x))) {
39714  if (is_unsigned) {
39715 #if CYTHON_USE_PYLONG_INTERNALS
39716  const digit* digits = ((PyLongObject*)x)->ob_digit;
39717  switch (Py_SIZE(x)) {
39718  case 0: return (int) 0;
39719  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
39720  case 2:
39721  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
39722  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39723  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39724  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
39725  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39726  }
39727  }
39728  break;
39729  case 3:
39730  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
39731  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39732  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39733  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
39734  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39735  }
39736  }
39737  break;
39738  case 4:
39739  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
39740  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39741  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39742  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
39743  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
39744  }
39745  }
39746  break;
39747  }
39748 #endif
39749 #if CYTHON_COMPILING_IN_CPYTHON
39750  if (unlikely(Py_SIZE(x) < 0)) {
39751  goto raise_neg_overflow;
39752  }
39753 #else
39754  {
39755  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
39756  if (unlikely(result < 0))
39757  return (int) -1;
39758  if (unlikely(result == 1))
39759  goto raise_neg_overflow;
39760  }
39761 #endif
39762  if (sizeof(int) <= sizeof(unsigned long)) {
39763  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
39764 #ifdef HAVE_LONG_LONG
39765  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
39766  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
39767 #endif
39768  }
39769  } else {
39770 #if CYTHON_USE_PYLONG_INTERNALS
39771  const digit* digits = ((PyLongObject*)x)->ob_digit;
39772  switch (Py_SIZE(x)) {
39773  case 0: return (int) 0;
39774  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
39775  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
39776  case -2:
39777  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
39778  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39779  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39780  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
39781  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39782  }
39783  }
39784  break;
39785  case 2:
39786  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
39787  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
39788  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39789  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
39790  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39791  }
39792  }
39793  break;
39794  case -3:
39795  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
39796  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39797  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39798  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
39799  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39800  }
39801  }
39802  break;
39803  case 3:
39804  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
39805  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
39806  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39807  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
39808  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39809  }
39810  }
39811  break;
39812  case -4:
39813  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
39814  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39815  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39816  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
39817  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39818  }
39819  }
39820  break;
39821  case 4:
39822  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
39823  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
39824  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
39825  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
39826  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
39827  }
39828  }
39829  break;
39830  }
39831 #endif
39832  if (sizeof(int) <= sizeof(long)) {
39833  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
39834 #ifdef HAVE_LONG_LONG
39835  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
39836  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
39837 #endif
39838  }
39839  }
39840  {
39841 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
39842  PyErr_SetString(PyExc_RuntimeError,
39843  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
39844 #else
39845  int val;
39846  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
39847  #if PY_MAJOR_VERSION < 3
39848  if (likely(v) && !PyLong_Check(v)) {
39849  PyObject *tmp = v;
39850  v = PyNumber_Long(tmp);
39851  Py_DECREF(tmp);
39852  }
39853  #endif
39854  if (likely(v)) {
39855  int one = 1; int is_little = (int)*(unsigned char *)&one;
39856  unsigned char *bytes = (unsigned char *)&val;
39857  int ret = _PyLong_AsByteArray((PyLongObject *)v,
39858  bytes, sizeof(val),
39859  is_little, !is_unsigned);
39860  Py_DECREF(v);
39861  if (likely(!ret))
39862  return val;
39863  }
39864 #endif
39865  return (int) -1;
39866  }
39867  } else {
39868  int val;
39869  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
39870  if (!tmp) return (int) -1;
39871  val = __Pyx_PyInt_As_int(tmp);
39872  Py_DECREF(tmp);
39873  return val;
39874  }
39875 raise_overflow:
39876  PyErr_SetString(PyExc_OverflowError,
39877  "value too large to convert to int");
39878  return (int) -1;
39879 raise_neg_overflow:
39880  PyErr_SetString(PyExc_OverflowError,
39881  "can't convert negative value to int");
39882  return (int) -1;
39883 }
39884 
39885 /* CIntToPy */
39886 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
39887 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39888 #pragma GCC diagnostic push
39889 #pragma GCC diagnostic ignored "-Wconversion"
39890 #endif
39891  const int neg_one = (int) -1, const_zero = (int) 0;
39892 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
39893 #pragma GCC diagnostic pop
39894 #endif
39895  const int is_unsigned = neg_one > const_zero;
39896  if (is_unsigned) {
39897  if (sizeof(int) < sizeof(long)) {
39898  return PyInt_FromLong((long) value);
39899  } else if (sizeof(int) <= sizeof(unsigned long)) {
39900  return PyLong_FromUnsignedLong((unsigned long) value);
39901 #ifdef HAVE_LONG_LONG
39902  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
39903  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
39904 #endif
39905  }
39906  } else {
39907  if (sizeof(int) <= sizeof(long)) {
39908  return PyInt_FromLong((long) value);
39909 #ifdef HAVE_LONG_LONG
39910  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
39911  return PyLong_FromLongLong((PY_LONG_LONG) value);
39912 #endif
39913  }
39914  }
39915  {
39916  int one = 1; int little = (int)*(unsigned char *)&one;
39917  unsigned char *bytes = (unsigned char *)&value;
39918  return _PyLong_FromByteArray(bytes, sizeof(int),
39919  little, !is_unsigned);
39920  }
39921 }
39922 
39923 /* TypeInfoToFormat */
39924 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) {
39925  struct __pyx_typeinfo_string result = { {0} };
39926  char *buf = (char *) result.string;
39927  size_t size = type->size;
39928  switch (type->typegroup) {
39929  case 'H':
39930  *buf = 'c';
39931  break;
39932  case 'I':
39933  case 'U':
39934  if (size == 1)
39935  *buf = (type->is_unsigned) ? 'B' : 'b';
39936  else if (size == 2)
39937  *buf = (type->is_unsigned) ? 'H' : 'h';
39938  else if (size == 4)
39939  *buf = (type->is_unsigned) ? 'I' : 'i';
39940  else if (size == 8)
39941  *buf = (type->is_unsigned) ? 'Q' : 'q';
39942  break;
39943  case 'P':
39944  *buf = 'P';
39945  break;
39946  case 'C':
39947  {
39948  __Pyx_TypeInfo complex_type = *type;
39949  complex_type.typegroup = 'R';
39950  complex_type.size /= 2;
39951  *buf++ = 'Z';
39952  *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0];
39953  break;
39954  }
39955  case 'R':
39956  if (size == 4)
39957  *buf = 'f';
39958  else if (size == 8)
39959  *buf = 'd';
39960  else
39961  *buf = 'g';
39962  break;
39963  }
39964  return result;
39965 }
39966 
39967 /* PrintOne */
39968 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
39969 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
39970  if (!f) {
39971  if (!(f = __Pyx_GetStdout()))
39972  return -1;
39973  }
39974  Py_INCREF(f);
39975  if (PyFile_SoftSpace(f, 0)) {
39976  if (PyFile_WriteString(" ", f) < 0)
39977  goto error;
39978  }
39979  if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
39980  goto error;
39981  if (PyFile_WriteString("\n", f) < 0)
39982  goto error;
39983  Py_DECREF(f);
39984  return 0;
39985 error:
39986  Py_DECREF(f);
39987  return -1;
39988  /* the line below is just to avoid C compiler
39989  * warnings about unused functions */
39990  return __Pyx_Print(f, NULL, 0);
39991 }
39992 #else
39993 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
39994  int res;
39995  PyObject* arg_tuple = PyTuple_Pack(1, o);
39996  if (unlikely(!arg_tuple))
39997  return -1;
39998  res = __Pyx_Print(stream, arg_tuple, 1);
39999  Py_DECREF(arg_tuple);
40000  return res;
40001 }
40002 #endif
40003 
40004 /* MemviewSliceCopyTemplate */
40005 static __Pyx_memviewslice
40006 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
40007  const char *mode, int ndim,
40008  size_t sizeof_dtype, int contig_flag,
40009  int dtype_is_object)
40010 {
40011  __Pyx_RefNannyDeclarations
40012  int i;
40013  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
40014  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
40015  Py_buffer *buf = &from_memview->view;
40016  PyObject *shape_tuple = NULL;
40017  PyObject *temp_int = NULL;
40018  struct __pyx_array_obj *array_obj = NULL;
40019  struct __pyx_memoryview_obj *memview_obj = NULL;
40020  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
40021  for (i = 0; i < ndim; i++) {
40022  if (unlikely(from_mvs->suboffsets[i] >= 0)) {
40023  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
40024  "indirect dimensions (axis %d)", i);
40025  goto fail;
40026  }
40027  }
40028  shape_tuple = PyTuple_New(ndim);
40029  if (unlikely(!shape_tuple)) {
40030  goto fail;
40031  }
40032  __Pyx_GOTREF(shape_tuple);
40033  for(i = 0; i < ndim; i++) {
40034  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
40035  if(unlikely(!temp_int)) {
40036  goto fail;
40037  } else {
40038  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
40039  temp_int = NULL;
40040  }
40041  }
40042  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
40043  if (unlikely(!array_obj)) {
40044  goto fail;
40045  }
40046  __Pyx_GOTREF(array_obj);
40047  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
40048  (PyObject *) array_obj, contig_flag,
40049  dtype_is_object,
40050  from_mvs->memview->typeinfo);
40051  if (unlikely(!memview_obj))
40052  goto fail;
40053  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
40054  goto fail;
40055  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
40056  dtype_is_object) < 0))
40057  goto fail;
40058  goto no_fail;
40059 fail:
40060  __Pyx_XDECREF(new_mvs.memview);
40061  new_mvs.memview = NULL;
40062  new_mvs.data = NULL;
40063 no_fail:
40064  __Pyx_XDECREF(shape_tuple);
40065  __Pyx_XDECREF(temp_int);
40066  __Pyx_XDECREF(array_obj);
40067  __Pyx_RefNannyFinishContext();
40068  return new_mvs;
40069 }
40070 
40071 /* MemviewSliceInit */
40072 static int
40073 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
40074  int ndim,
40075  __Pyx_memviewslice *memviewslice,
40076  int memview_is_new_reference)
40077 {
40078  __Pyx_RefNannyDeclarations
40079  int i, retval=-1;
40080  Py_buffer *buf = &memview->view;
40081  __Pyx_RefNannySetupContext("init_memviewslice", 0);
40082  if (unlikely(memviewslice->memview || memviewslice->data)) {
40083  PyErr_SetString(PyExc_ValueError,
40084  "memviewslice is already initialized!");
40085  goto fail;
40086  }
40087  if (buf->strides) {
40088  for (i = 0; i < ndim; i++) {
40089  memviewslice->strides[i] = buf->strides[i];
40090  }
40091  } else {
40092  Py_ssize_t stride = buf->itemsize;
40093  for (i = ndim - 1; i >= 0; i--) {
40094  memviewslice->strides[i] = stride;
40095  stride *= buf->shape[i];
40096  }
40097  }
40098  for (i = 0; i < ndim; i++) {
40099  memviewslice->shape[i] = buf->shape[i];
40100  if (buf->suboffsets) {
40101  memviewslice->suboffsets[i] = buf->suboffsets[i];
40102  } else {
40103  memviewslice->suboffsets[i] = -1;
40104  }
40105  }
40106  memviewslice->memview = memview;
40107  memviewslice->data = (char *)buf->buf;
40108  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
40109  Py_INCREF(memview);
40110  }
40111  retval = 0;
40112  goto no_fail;
40113 fail:
40114  memviewslice->memview = 0;
40115  memviewslice->data = 0;
40116  retval = -1;
40117 no_fail:
40118  __Pyx_RefNannyFinishContext();
40119  return retval;
40120 }
40121 #ifndef Py_NO_RETURN
40122 #define Py_NO_RETURN
40123 #endif
40124 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
40125  va_list vargs;
40126  char msg[200];
40127 #ifdef HAVE_STDARG_PROTOTYPES
40128  va_start(vargs, fmt);
40129 #else
40130  va_start(vargs);
40131 #endif
40132  vsnprintf(msg, 200, fmt, vargs);
40133  va_end(vargs);
40134  Py_FatalError(msg);
40135 }
40136 static CYTHON_INLINE int
40137 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
40138  PyThread_type_lock lock)
40139 {
40140  int result;
40141  PyThread_acquire_lock(lock, 1);
40142  result = (*acquisition_count)++;
40143  PyThread_release_lock(lock);
40144  return result;
40145 }
40146 static CYTHON_INLINE int
40147 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
40148  PyThread_type_lock lock)
40149 {
40150  int result;
40151  PyThread_acquire_lock(lock, 1);
40152  result = (*acquisition_count)--;
40153  PyThread_release_lock(lock);
40154  return result;
40155 }
40156 static CYTHON_INLINE void
40157 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
40158 {
40159  int first_time;
40160  struct __pyx_memoryview_obj *memview = memslice->memview;
40161  if (unlikely(!memview || (PyObject *) memview == Py_None))
40162  return;
40163  if (unlikely(__pyx_get_slice_count(memview) < 0))
40164  __pyx_fatalerror("Acquisition count is %d (line %d)",
40165  __pyx_get_slice_count(memview), lineno);
40166  first_time = __pyx_add_acquisition_count(memview) == 0;
40167  if (unlikely(first_time)) {
40168  if (have_gil) {
40169  Py_INCREF((PyObject *) memview);
40170  } else {
40171  PyGILState_STATE _gilstate = PyGILState_Ensure();
40172  Py_INCREF((PyObject *) memview);
40173  PyGILState_Release(_gilstate);
40174  }
40175  }
40176 }
40177 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
40178  int have_gil, int lineno) {
40179  int last_time;
40180  struct __pyx_memoryview_obj *memview = memslice->memview;
40181  if (unlikely(!memview || (PyObject *) memview == Py_None)) {
40182  memslice->memview = NULL;
40183  return;
40184  }
40185  if (unlikely(__pyx_get_slice_count(memview) <= 0))
40186  __pyx_fatalerror("Acquisition count is %d (line %d)",
40187  __pyx_get_slice_count(memview), lineno);
40188  last_time = __pyx_sub_acquisition_count(memview) == 1;
40189  memslice->data = NULL;
40190  if (unlikely(last_time)) {
40191  if (have_gil) {
40192  Py_CLEAR(memslice->memview);
40193  } else {
40194  PyGILState_STATE _gilstate = PyGILState_Ensure();
40195  Py_CLEAR(memslice->memview);
40196  PyGILState_Release(_gilstate);
40197  }
40198  } else {
40199  memslice->memview = NULL;
40200  }
40201 }
40202 
40203 /* CIntFromPy */
40204 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
40205 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40206 #pragma GCC diagnostic push
40207 #pragma GCC diagnostic ignored "-Wconversion"
40208 #endif
40209  const long neg_one = (long) -1, const_zero = (long) 0;
40210 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40211 #pragma GCC diagnostic pop
40212 #endif
40213  const int is_unsigned = neg_one > const_zero;
40214 #if PY_MAJOR_VERSION < 3
40215  if (likely(PyInt_Check(x))) {
40216  if (sizeof(long) < sizeof(long)) {
40217  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
40218  } else {
40219  long val = PyInt_AS_LONG(x);
40220  if (is_unsigned && unlikely(val < 0)) {
40221  goto raise_neg_overflow;
40222  }
40223  return (long) val;
40224  }
40225  } else
40226 #endif
40227  if (likely(PyLong_Check(x))) {
40228  if (is_unsigned) {
40229 #if CYTHON_USE_PYLONG_INTERNALS
40230  const digit* digits = ((PyLongObject*)x)->ob_digit;
40231  switch (Py_SIZE(x)) {
40232  case 0: return (long) 0;
40233  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
40234  case 2:
40235  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
40236  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40237  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40238  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
40239  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40240  }
40241  }
40242  break;
40243  case 3:
40244  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
40245  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40246  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40247  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
40248  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40249  }
40250  }
40251  break;
40252  case 4:
40253  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
40254  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40255  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40256  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
40257  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40258  }
40259  }
40260  break;
40261  }
40262 #endif
40263 #if CYTHON_COMPILING_IN_CPYTHON
40264  if (unlikely(Py_SIZE(x) < 0)) {
40265  goto raise_neg_overflow;
40266  }
40267 #else
40268  {
40269  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40270  if (unlikely(result < 0))
40271  return (long) -1;
40272  if (unlikely(result == 1))
40273  goto raise_neg_overflow;
40274  }
40275 #endif
40276  if (sizeof(long) <= sizeof(unsigned long)) {
40277  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
40278 #ifdef HAVE_LONG_LONG
40279  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40280  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40281 #endif
40282  }
40283  } else {
40284 #if CYTHON_USE_PYLONG_INTERNALS
40285  const digit* digits = ((PyLongObject*)x)->ob_digit;
40286  switch (Py_SIZE(x)) {
40287  case 0: return (long) 0;
40288  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
40289  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
40290  case -2:
40291  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
40292  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40293  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40294  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40295  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40296  }
40297  }
40298  break;
40299  case 2:
40300  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
40301  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40302  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40303  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40304  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40305  }
40306  }
40307  break;
40308  case -3:
40309  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40310  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40311  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40312  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40313  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40314  }
40315  }
40316  break;
40317  case 3:
40318  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
40319  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40320  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40321  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40322  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40323  }
40324  }
40325  break;
40326  case -4:
40327  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40328  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40329  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40330  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
40331  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40332  }
40333  }
40334  break;
40335  case 4:
40336  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
40337  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40338  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40339  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
40340  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40341  }
40342  }
40343  break;
40344  }
40345 #endif
40346  if (sizeof(long) <= sizeof(long)) {
40347  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
40348 #ifdef HAVE_LONG_LONG
40349  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40350  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
40351 #endif
40352  }
40353  }
40354  {
40355 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40356  PyErr_SetString(PyExc_RuntimeError,
40357  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40358 #else
40359  long val;
40360  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40361  #if PY_MAJOR_VERSION < 3
40362  if (likely(v) && !PyLong_Check(v)) {
40363  PyObject *tmp = v;
40364  v = PyNumber_Long(tmp);
40365  Py_DECREF(tmp);
40366  }
40367  #endif
40368  if (likely(v)) {
40369  int one = 1; int is_little = (int)*(unsigned char *)&one;
40370  unsigned char *bytes = (unsigned char *)&val;
40371  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40372  bytes, sizeof(val),
40373  is_little, !is_unsigned);
40374  Py_DECREF(v);
40375  if (likely(!ret))
40376  return val;
40377  }
40378 #endif
40379  return (long) -1;
40380  }
40381  } else {
40382  long val;
40383  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40384  if (!tmp) return (long) -1;
40385  val = __Pyx_PyInt_As_long(tmp);
40386  Py_DECREF(tmp);
40387  return val;
40388  }
40389 raise_overflow:
40390  PyErr_SetString(PyExc_OverflowError,
40391  "value too large to convert to long");
40392  return (long) -1;
40393 raise_neg_overflow:
40394  PyErr_SetString(PyExc_OverflowError,
40395  "can't convert negative value to long");
40396  return (long) -1;
40397 }
40398 
40399 /* CIntToPy */
40400 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
40401 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40402 #pragma GCC diagnostic push
40403 #pragma GCC diagnostic ignored "-Wconversion"
40404 #endif
40405  const long neg_one = (long) -1, const_zero = (long) 0;
40406 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40407 #pragma GCC diagnostic pop
40408 #endif
40409  const int is_unsigned = neg_one > const_zero;
40410  if (is_unsigned) {
40411  if (sizeof(long) < sizeof(long)) {
40412  return PyInt_FromLong((long) value);
40413  } else if (sizeof(long) <= sizeof(unsigned long)) {
40414  return PyLong_FromUnsignedLong((unsigned long) value);
40415 #ifdef HAVE_LONG_LONG
40416  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40417  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40418 #endif
40419  }
40420  } else {
40421  if (sizeof(long) <= sizeof(long)) {
40422  return PyInt_FromLong((long) value);
40423 #ifdef HAVE_LONG_LONG
40424  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40425  return PyLong_FromLongLong((PY_LONG_LONG) value);
40426 #endif
40427  }
40428  }
40429  {
40430  int one = 1; int little = (int)*(unsigned char *)&one;
40431  unsigned char *bytes = (unsigned char *)&value;
40432  return _PyLong_FromByteArray(bytes, sizeof(long),
40433  little, !is_unsigned);
40434  }
40435 }
40436 
40437 /* CIntFromPy */
40438 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
40439 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40440 #pragma GCC diagnostic push
40441 #pragma GCC diagnostic ignored "-Wconversion"
40442 #endif
40443  const char neg_one = (char) -1, const_zero = (char) 0;
40444 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40445 #pragma GCC diagnostic pop
40446 #endif
40447  const int is_unsigned = neg_one > const_zero;
40448 #if PY_MAJOR_VERSION < 3
40449  if (likely(PyInt_Check(x))) {
40450  if (sizeof(char) < sizeof(long)) {
40451  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
40452  } else {
40453  long val = PyInt_AS_LONG(x);
40454  if (is_unsigned && unlikely(val < 0)) {
40455  goto raise_neg_overflow;
40456  }
40457  return (char) val;
40458  }
40459  } else
40460 #endif
40461  if (likely(PyLong_Check(x))) {
40462  if (is_unsigned) {
40463 #if CYTHON_USE_PYLONG_INTERNALS
40464  const digit* digits = ((PyLongObject*)x)->ob_digit;
40465  switch (Py_SIZE(x)) {
40466  case 0: return (char) 0;
40467  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
40468  case 2:
40469  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
40470  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40471  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40472  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
40473  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40474  }
40475  }
40476  break;
40477  case 3:
40478  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
40479  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40480  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40481  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
40482  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40483  }
40484  }
40485  break;
40486  case 4:
40487  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
40488  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40489  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40490  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
40491  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40492  }
40493  }
40494  break;
40495  }
40496 #endif
40497 #if CYTHON_COMPILING_IN_CPYTHON
40498  if (unlikely(Py_SIZE(x) < 0)) {
40499  goto raise_neg_overflow;
40500  }
40501 #else
40502  {
40503  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40504  if (unlikely(result < 0))
40505  return (char) -1;
40506  if (unlikely(result == 1))
40507  goto raise_neg_overflow;
40508  }
40509 #endif
40510  if (sizeof(char) <= sizeof(unsigned long)) {
40511  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
40512 #ifdef HAVE_LONG_LONG
40513  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
40514  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40515 #endif
40516  }
40517  } else {
40518 #if CYTHON_USE_PYLONG_INTERNALS
40519  const digit* digits = ((PyLongObject*)x)->ob_digit;
40520  switch (Py_SIZE(x)) {
40521  case 0: return (char) 0;
40522  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
40523  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
40524  case -2:
40525  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
40526  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40527  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40528  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40529  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40530  }
40531  }
40532  break;
40533  case 2:
40534  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
40535  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40536  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40537  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40538  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40539  }
40540  }
40541  break;
40542  case -3:
40543  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40544  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40545  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40546  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40547  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40548  }
40549  }
40550  break;
40551  case 3:
40552  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
40553  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40554  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40555  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40556  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40557  }
40558  }
40559  break;
40560  case -4:
40561  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40562  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40563  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40564  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
40565  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40566  }
40567  }
40568  break;
40569  case 4:
40570  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
40571  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40572  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40573  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
40574  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40575  }
40576  }
40577  break;
40578  }
40579 #endif
40580  if (sizeof(char) <= sizeof(long)) {
40581  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
40582 #ifdef HAVE_LONG_LONG
40583  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
40584  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
40585 #endif
40586  }
40587  }
40588  {
40589 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40590  PyErr_SetString(PyExc_RuntimeError,
40591  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40592 #else
40593  char val;
40594  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40595  #if PY_MAJOR_VERSION < 3
40596  if (likely(v) && !PyLong_Check(v)) {
40597  PyObject *tmp = v;
40598  v = PyNumber_Long(tmp);
40599  Py_DECREF(tmp);
40600  }
40601  #endif
40602  if (likely(v)) {
40603  int one = 1; int is_little = (int)*(unsigned char *)&one;
40604  unsigned char *bytes = (unsigned char *)&val;
40605  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40606  bytes, sizeof(val),
40607  is_little, !is_unsigned);
40608  Py_DECREF(v);
40609  if (likely(!ret))
40610  return val;
40611  }
40612 #endif
40613  return (char) -1;
40614  }
40615  } else {
40616  char val;
40617  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40618  if (!tmp) return (char) -1;
40619  val = __Pyx_PyInt_As_char(tmp);
40620  Py_DECREF(tmp);
40621  return val;
40622  }
40623 raise_overflow:
40624  PyErr_SetString(PyExc_OverflowError,
40625  "value too large to convert to char");
40626  return (char) -1;
40627 raise_neg_overflow:
40628  PyErr_SetString(PyExc_OverflowError,
40629  "can't convert negative value to char");
40630  return (char) -1;
40631 }
40632 
40633 /* CheckBinaryVersion */
40634 static int __Pyx_check_binary_version(void) {
40635  char ctversion[5];
40636  int same=1, i, found_dot;
40637  const char* rt_from_call = Py_GetVersion();
40638  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
40639  found_dot = 0;
40640  for (i = 0; i < 4; i++) {
40641  if (!ctversion[i]) {
40642  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
40643  break;
40644  }
40645  if (rt_from_call[i] != ctversion[i]) {
40646  same = 0;
40647  break;
40648  }
40649  }
40650  if (!same) {
40651  char rtversion[5] = {'\0'};
40652  char message[200];
40653  for (i=0; i<4; ++i) {
40654  if (rt_from_call[i] == '.') {
40655  if (found_dot) break;
40656  found_dot = 1;
40657  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
40658  break;
40659  }
40660  rtversion[i] = rt_from_call[i];
40661  }
40662  PyOS_snprintf(message, sizeof(message),
40663  "compiletime version %s of module '%.100s' "
40664  "does not match runtime version %s",
40665  ctversion, __Pyx_MODULE_NAME, rtversion);
40666  return PyErr_WarnEx(NULL, message, 1);
40667  }
40668  return 0;
40669 }
40670 
40671 /* InitStrings */
40672 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
40673  while (t->p) {
40674  #if PY_MAJOR_VERSION < 3
40675  if (t->is_unicode) {
40676  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
40677  } else if (t->intern) {
40678  *t->p = PyString_InternFromString(t->s);
40679  } else {
40680  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
40681  }
40682  #else
40683  if (t->is_unicode | t->is_str) {
40684  if (t->intern) {
40685  *t->p = PyUnicode_InternFromString(t->s);
40686  } else if (t->encoding) {
40687  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
40688  } else {
40689  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
40690  }
40691  } else {
40692  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
40693  }
40694  #endif
40695  if (!*t->p)
40696  return -1;
40697  if (PyObject_Hash(*t->p) == -1)
40698  return -1;
40699  ++t;
40700  }
40701  return 0;
40702 }
40703 
40704 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
40705  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
40706 }
40707 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
40708  Py_ssize_t ignore;
40709  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
40710 }
40711 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
40712 #if !CYTHON_PEP393_ENABLED
40713 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
40714  char* defenc_c;
40715  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
40716  if (!defenc) return NULL;
40717  defenc_c = PyBytes_AS_STRING(defenc);
40718 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
40719  {
40720  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
40721  char* c;
40722  for (c = defenc_c; c < end; c++) {
40723  if ((unsigned char) (*c) >= 128) {
40724  PyUnicode_AsASCIIString(o);
40725  return NULL;
40726  }
40727  }
40728  }
40729 #endif
40730  *length = PyBytes_GET_SIZE(defenc);
40731  return defenc_c;
40732 }
40733 #else
40734 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
40735  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
40736 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
40737  if (likely(PyUnicode_IS_ASCII(o))) {
40738  *length = PyUnicode_GET_LENGTH(o);
40739  return PyUnicode_AsUTF8(o);
40740  } else {
40741  PyUnicode_AsASCIIString(o);
40742  return NULL;
40743  }
40744 #else
40745  return PyUnicode_AsUTF8AndSize(o, length);
40746 #endif
40747 }
40748 #endif
40749 #endif
40750 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
40751 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
40752  if (
40753 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
40754  __Pyx_sys_getdefaultencoding_not_ascii &&
40755 #endif
40756  PyUnicode_Check(o)) {
40757  return __Pyx_PyUnicode_AsStringAndSize(o, length);
40758  } else
40759 #endif
40760 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
40761  if (PyByteArray_Check(o)) {
40762  *length = PyByteArray_GET_SIZE(o);
40763  return PyByteArray_AS_STRING(o);
40764  } else
40765 #endif
40766  {
40767  char* result;
40768  int r = PyBytes_AsStringAndSize(o, &result, length);
40769  if (unlikely(r < 0)) {
40770  return NULL;
40771  } else {
40772  return result;
40773  }
40774  }
40775 }
40776 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
40777  int is_true = x == Py_True;
40778  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
40779  else return PyObject_IsTrue(x);
40780 }
40781 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
40782  int retval;
40783  if (unlikely(!x)) return -1;
40784  retval = __Pyx_PyObject_IsTrue(x);
40785  Py_DECREF(x);
40786  return retval;
40787 }
40788 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
40789 #if PY_MAJOR_VERSION >= 3
40790  if (PyLong_Check(result)) {
40791  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
40792  "__int__ returned non-int (type %.200s). "
40793  "The ability to return an instance of a strict subclass of int "
40794  "is deprecated, and may be removed in a future version of Python.",
40795  Py_TYPE(result)->tp_name)) {
40796  Py_DECREF(result);
40797  return NULL;
40798  }
40799  return result;
40800  }
40801 #endif
40802  PyErr_Format(PyExc_TypeError,
40803  "__%.4s__ returned non-%.4s (type %.200s)",
40804  type_name, type_name, Py_TYPE(result)->tp_name);
40805  Py_DECREF(result);
40806  return NULL;
40807 }
40808 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
40809 #if CYTHON_USE_TYPE_SLOTS
40810  PyNumberMethods *m;
40811 #endif
40812  const char *name = NULL;
40813  PyObject *res = NULL;
40814 #if PY_MAJOR_VERSION < 3
40815  if (likely(PyInt_Check(x) || PyLong_Check(x)))
40816 #else
40817  if (likely(PyLong_Check(x)))
40818 #endif
40819  return __Pyx_NewRef(x);
40820 #if CYTHON_USE_TYPE_SLOTS
40821  m = Py_TYPE(x)->tp_as_number;
40822  #if PY_MAJOR_VERSION < 3
40823  if (m && m->nb_int) {
40824  name = "int";
40825  res = m->nb_int(x);
40826  }
40827  else if (m && m->nb_long) {
40828  name = "long";
40829  res = m->nb_long(x);
40830  }
40831  #else
40832  if (likely(m && m->nb_int)) {
40833  name = "int";
40834  res = m->nb_int(x);
40835  }
40836  #endif
40837 #else
40838  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
40839  res = PyNumber_Int(x);
40840  }
40841 #endif
40842  if (likely(res)) {
40843 #if PY_MAJOR_VERSION < 3
40844  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
40845 #else
40846  if (unlikely(!PyLong_CheckExact(res))) {
40847 #endif
40848  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
40849  }
40850  }
40851  else if (!PyErr_Occurred()) {
40852  PyErr_SetString(PyExc_TypeError,
40853  "an integer is required");
40854  }
40855  return res;
40856 }
40857 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
40858  Py_ssize_t ival;
40859  PyObject *x;
40860 #if PY_MAJOR_VERSION < 3
40861  if (likely(PyInt_CheckExact(b))) {
40862  if (sizeof(Py_ssize_t) >= sizeof(long))
40863  return PyInt_AS_LONG(b);
40864  else
40865  return PyInt_AsSsize_t(b);
40866  }
40867 #endif
40868  if (likely(PyLong_CheckExact(b))) {
40869  #if CYTHON_USE_PYLONG_INTERNALS
40870  const digit* digits = ((PyLongObject*)b)->ob_digit;
40871  const Py_ssize_t size = Py_SIZE(b);
40872  if (likely(__Pyx_sst_abs(size) <= 1)) {
40873  ival = likely(size) ? digits[0] : 0;
40874  if (size == -1) ival = -ival;
40875  return ival;
40876  } else {
40877  switch (size) {
40878  case 2:
40879  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
40880  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
40881  }
40882  break;
40883  case -2:
40884  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
40885  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
40886  }
40887  break;
40888  case 3:
40889  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
40890  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
40891  }
40892  break;
40893  case -3:
40894  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
40895  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
40896  }
40897  break;
40898  case 4:
40899  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
40900  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
40901  }
40902  break;
40903  case -4:
40904  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
40905  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
40906  }
40907  break;
40908  }
40909  }
40910  #endif
40911  return PyLong_AsSsize_t(b);
40912  }
40913  x = PyNumber_Index(b);
40914  if (!x) return -1;
40915  ival = PyInt_AsSsize_t(x);
40916  Py_DECREF(x);
40917  return ival;
40918 }
40919 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
40920  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
40921  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
40922 #if PY_MAJOR_VERSION < 3
40923  } else if (likely(PyInt_CheckExact(o))) {
40924  return PyInt_AS_LONG(o);
40925 #endif
40926  } else {
40927  Py_ssize_t ival;
40928  PyObject *x;
40929  x = PyNumber_Index(o);
40930  if (!x) return -1;
40931  ival = PyInt_AsLong(x);
40932  Py_DECREF(x);
40933  return ival;
40934  }
40935 }
40936 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
40937  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
40938 }
40939 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
40940  return PyInt_FromSize_t(ival);
40941 }
40942 
40943 
40944 #endif /* Py_PYTHON_H */
readTriangleElementBoundaryMaterialTypes
int readTriangleElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:5060
Mesh::nodeDiametersArray
double * nodeDiametersArray
Definition: mesh.h:69
regularHexahedralMeshElements
int regularHexahedralMeshElements(const int &nx, const int &ny, const int &nz, const int &px, const int &py, const int &pz, Mesh &mesh)
Definition: mesh.cpp:470
computeGeometricInfo_edge
int computeGeometricInfo_edge(Mesh &mesh)
Definition: mesh.cpp:3925
Mesh::interiorElementBoundariesArray
int * interiorElementBoundariesArray
Definition: mesh.h:50
Mesh::elementBoundaryNodesArray
int * elementBoundaryNodesArray
Definition: mesh.h:47
write3dmMesh
int write3dmMesh(Mesh &mesh, const char *filebase, int adhIndexBase)
Definition: mesh.cpp:5770
MultilevelMesh
Definition: mesh.h:258
readBC
int readBC(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5732
Mesh::nodeArray
double * nodeArray
Definition: mesh.h:67
regularRectangularToTriangularElementBoundaryMaterials
int regularRectangularToTriangularElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:139
Mesh::nodeElementsArray
int * nodeElementsArray
Definition: mesh.h:43
Mesh::max_nElements_node
int max_nElements_node
Definition: mesh.h:38
Mesh::pz
int pz
Definition: mesh.h:64
regularMeshNodes2D
int regularMeshNodes2D(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:419
constructElementBoundaryElementsArray_triangle
int constructElementBoundaryElementsArray_triangle(Mesh &mesh)
Definition: mesh.cpp:780
locallyRefineEdgeMesh
int locallyRefineEdgeMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:5854
Mesh::nodeElementOffsets
int * nodeElementOffsets
Definition: mesh.h:44
Mesh
Definition: mesh.h:28
Mesh::nEdges_global
int nEdges_global
Definition: mesh.h:39
Mesh::exteriorElementBoundariesArray
int * exteriorElementBoundariesArray
Definition: mesh.h:51
f
Double f
Definition: Headers.h:64
locallyRefineTriangleMesh_4T
int locallyRefineTriangleMesh_4T(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6722
regularHexahedralToTetrahedralElementBoundaryMaterials
int regularHexahedralToTetrahedralElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:268
s
Double s
Definition: Headers.h:84
Mesh::nodeStarOffsets
int * nodeStarOffsets
Definition: mesh.h:54
allocateGeometricInfo_hexahedron
int allocateGeometricInfo_hexahedron(Mesh &mesh)
Definition: mesh.cpp:3638
Mesh::volume
double volume
Definition: mesh.h:70
Mesh::nNodes_elementBoundary
int nNodes_elementBoundary
Definition: mesh.h:33
setNewestNodeBasesToLongestEdge
int setNewestNodeBasesToLongestEdge(MultilevelMesh &multilevelMesh)
Definition: mesh.cpp:6183
Mesh::nElementBoundaries_global
int nElementBoundaries_global
Definition: mesh.h:35
allocateNodeAndElementNodeDataStructures
int allocateNodeAndElementNodeDataStructures(Mesh &mesh, int nElements_global, int nNodes_global, int nNodes_element)
Definition: mesh.cpp:3994
Mesh::hMin
double hMin
Definition: mesh.h:70
L
Double L
Definition: Headers.h:72
n
Int n
Definition: Headers.h:28
q
Double q
Definition: Headers.h:81
locallyRefineTriangleMesh
int locallyRefineTriangleMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6004
computeGeometricInfo_quadrilateral
int computeGeometricInfo_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:3853
deleteMesh
void deleteMesh(Mesh &mesh)
Definition: mesh.h:164
Mesh::nInteriorElementBoundaries_global
int nInteriorElementBoundaries_global
Definition: mesh.h:36
Mesh::ny
int ny
Definition: mesh.h:63
Mesh::nodeStarArray
int * nodeStarArray
Definition: mesh.h:53
assignElementBoundaryMaterialTypesFromParent
int assignElementBoundaryMaterialTypesFromParent(Mesh &parentMesh, Mesh &childMesh, const int *levelElementParentsArray, const int &nSpace_global)
Definition: mesh.cpp:4557
Mesh::h
double h
Definition: mesh.h:70
allocateGeometricInfo_NURBS
int allocateGeometricInfo_NURBS(Mesh &mesh)
Definition: mesh.cpp:3730
globallyRefineQuadrilateralMesh
int globallyRefineQuadrilateralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4234
regularHexahedralToTetrahedralMeshElements
int regularHexahedralToTetrahedralMeshElements(const int &nx, const int &ny, const int &nz, Mesh &mesh)
Definition: mesh.cpp:232
locallyRefineTriangleMesh_redGreen
int locallyRefineTriangleMesh_redGreen(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6211
MultilevelMesh::nLevels
int nLevels
Definition: mesh.h:259
readTetgenMesh
int readTetgenMesh(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5118
globallyRefineHexahedralMesh
int globallyRefineHexahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4538
regularHexahedralMeshElementBoundaryMaterials
int regularHexahedralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:312
Mesh::nNodes_element
int nNodes_element
Definition: mesh.h:32
Mesh::elementBoundaryLocalElementBoundariesArray
int * elementBoundaryLocalElementBoundariesArray
Definition: mesh.h:49
U
Double U
Definition: Headers.h:88
v
Double v
Definition: Headers.h:95
Mesh::elementBoundaryMaterialTypes
int * elementBoundaryMaterialTypes
Definition: mesh.h:56
regularRectangularToTriangularMeshNodes
int regularRectangularToTriangularMeshNodes(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:166
Mesh::elementInnerDiametersArray
double * elementInnerDiametersArray
Definition: mesh.h:67
writeTriangleMesh
int writeTriangleMesh(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:5030
globallyRefineEdgeMesh
int globallyRefineEdgeMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4014
edgeMeshElements
int edgeMeshElements(const int &nx, Mesh &mesh)
Definition: mesh.cpp:59
regularQuadrilateralMeshElementBoundaryMaterials
int regularQuadrilateralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:362
T
Double T
Definition: Headers.h:87
readTriangleMesh
int readTriangleMesh(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:4970
regularQuadrilateralMeshElements
int regularQuadrilateralMeshElements(const int &nx, const int &ny, Mesh &mesh)
Definition: mesh.cpp:513
readTetgenElementBoundaryMaterialTypes
int readTetgenElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5177
Mesh::V_KNOT
double * V_KNOT
Definition: mesh.h:62
computeGeometricInfo_tetrahedron
int computeGeometricInfo_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:3536
constructElementBoundaryElementsArray_tetrahedron
int constructElementBoundaryElementsArray_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:1118
z
Double * z
Definition: Headers.h:49
regularMeshNodes
int regularMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:368
constructElementBoundaryElementsArray_quadrilateral
int constructElementBoundaryElementsArray_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:949
Mesh::elementNodesArray
int * elementNodesArray
Definition: mesh.h:42
constructElementBoundaryElementsArray_edge
int constructElementBoundaryElementsArray_edge(Mesh &mesh)
Definition: mesh.cpp:622
u
Double u
Definition: Headers.h:89
Mesh::elementBoundaryBarycentersArray
double * elementBoundaryBarycentersArray
Definition: mesh.h:68
Mesh::py
int py
Definition: mesh.h:64
Mesh::nz
int nz
Definition: mesh.h:63
Mesh::elementBoundariesArray
int * elementBoundariesArray
Definition: mesh.h:46
Mesh::elementBarycentersArray
double * elementBarycentersArray
Definition: mesh.h:68
c
Double c
Definition: Headers.h:54
Mesh::nElements_global
int nElements_global
Definition: mesh.h:30
mesh.h
Mesh::nodeMaterialTypes
int * nodeMaterialTypes
Definition: mesh.h:57
regularEdgeMeshNodes
int regularEdgeMeshNodes(const int &nx, const double &Lx, Mesh &mesh)
Definition: mesh.cpp:73
computeGeometricInfo_triangle
int computeGeometricInfo_triangle(Mesh &mesh)
Definition: mesh.cpp:3755
Mesh::nElementBoundaries_element
int nElementBoundaries_element
Definition: mesh.h:34
Mesh::elementMaterialTypes
int * elementMaterialTypes
Definition: mesh.h:55
Mesh::elementDiametersArray
double * elementDiametersArray
Definition: mesh.h:67
allocateGeometricInfo_edge
int allocateGeometricInfo_edge(Mesh &mesh)
Definition: mesh.cpp:3913
computeGeometricInfo_hexahedron
int computeGeometricInfo_hexahedron(Mesh &mesh)
Definition: mesh.cpp:3650
initializeMesh
void initializeMesh(Mesh &mesh)
Definition: mesh.h:87
Mesh::nNodes_global
int nNodes_global
Definition: mesh.h:31
writeTetgenMesh
int writeTetgenMesh(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5455
read3DM
int read3DM(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5490
Mesh::nExteriorElementBoundaries_global
int nExteriorElementBoundaries_global
Definition: mesh.h:37
Mesh::px
int px
Definition: mesh.h:64
regularHexahedralToTetrahedralMeshNodes
int regularHexahedralToTetrahedralMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:457
Mesh::W_KNOT
double * W_KNOT
Definition: mesh.h:62
Mesh::elementIJK
int * elementIJK
Definition: mesh.h:60
constructElementBoundaryElementsArray_hexahedron
int constructElementBoundaryElementsArray_hexahedron(Mesh &mesh)
Definition: mesh.cpp:1306
Mesh::max_nNodeNeighbors_node
int max_nNodeNeighbors_node
Definition: mesh.h:40
reorientTetrahedralMesh
int reorientTetrahedralMesh(Mesh &mesh)
Definition: mesh.cpp:225
globallyRefineTetrahedralMesh
int globallyRefineTetrahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4253
Mesh::sigmaMax
double sigmaMax
Definition: mesh.h:70
write2dmMesh
int write2dmMesh(Mesh &mesh, const char *filebase, int adhIndexBase)
Definition: mesh.cpp:5790
Mesh::nodeSupportArray
double * nodeSupportArray
Definition: mesh.h:69
r
Double r
Definition: Headers.h:83
read2DM
int read2DM(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5574
globallyRefineTriangularMesh
int globallyRefineTriangularMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4109
Mesh::weights
double * weights
Definition: mesh.h:61
regularRectangularToTriangularMeshElements
int regularRectangularToTriangularMeshElements(const int &nx, const int &ny, Mesh &mesh, int triangleFlag)
Definition: mesh.cpp:88
allocateGeometricInfo_triangle
int allocateGeometricInfo_triangle(Mesh &mesh)
Definition: mesh.cpp:3743
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8
Mesh::edgeNodesArray
int * edgeNodesArray
Definition: mesh.h:52
Mesh::nx
int nx
Definition: mesh.h:63
Mesh::elementBoundaryDiametersArray
double * elementBoundaryDiametersArray
Definition: mesh.h:67
readHex
int readHex(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5657
allocateGeometricInfo_quadrilateral
int allocateGeometricInfo_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:3843
Mesh::elementBoundaryElementsArray
int * elementBoundaryElementsArray
Definition: mesh.h:48
Mesh::elementNeighborsArray
int * elementNeighborsArray
Definition: mesh.h:45
computeGeometricInfo_NURBS
int computeGeometricInfo_NURBS(Mesh &mesh)
Definition: mesh.cpp:3736
Mesh::U_KNOT
double * U_KNOT
Definition: mesh.h:62
allocateGeometricInfo_tetrahedron
int allocateGeometricInfo_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:3524