proteus  1.8.1
C/C++/Fortran libraries
cMoveMeshMonitor.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__mprans__cMoveMeshMonitor
708 #define __PYX_HAVE_API__mprans__cMoveMeshMonitor
709 /* Early includes */
710 #include <string.h>
711 #include <stdio.h>
712 #include "numpy/arrayobject.h"
713 #include "numpy/ndarrayobject.h"
714 #include "numpy/ndarraytypes.h"
715 #include "numpy/arrayscalars.h"
716 #include "numpy/ufuncobject.h"
717 
718  /* NumPy API declarations from "numpy/__init__.pxd" */
719 
720 #include "pythread.h"
721 #include <stdlib.h>
722 #include "pystate.h"
723 #ifdef _OPENMP
724 #include <omp.h>
725 #endif /* _OPENMP */
726 
727 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
728 #define CYTHON_WITHOUT_ASSERTIONS
729 #endif
730 
731 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
732  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
733 
734 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
736 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
737 #define __PYX_DEFAULT_STRING_ENCODING ""
738 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
739 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
740 #define __Pyx_uchar_cast(c) ((unsigned char)c)
741 #define __Pyx_long_cast(x) ((long)x)
742 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
743  (sizeof(type) < sizeof(Py_ssize_t)) ||\
744  (sizeof(type) > sizeof(Py_ssize_t) &&\
745  likely(v < (type)PY_SSIZE_T_MAX ||\
746  v == (type)PY_SSIZE_T_MAX) &&\
747  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
748  v == (type)PY_SSIZE_T_MIN))) ||\
749  (sizeof(type) == sizeof(Py_ssize_t) &&\
750  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
751  v == (type)PY_SSIZE_T_MAX))) )
752 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
753  return (size_t) i < (size_t) limit;
754 }
755 #if defined (__cplusplus) && __cplusplus >= 201103L
756  #include <cstdlib>
757  #define __Pyx_sst_abs(value) std::abs(value)
758 #elif SIZEOF_INT >= SIZEOF_SIZE_T
759  #define __Pyx_sst_abs(value) abs(value)
760 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
761  #define __Pyx_sst_abs(value) labs(value)
762 #elif defined (_MSC_VER)
763  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
764 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
765  #define __Pyx_sst_abs(value) llabs(value)
766 #elif defined (__GNUC__)
767  #define __Pyx_sst_abs(value) __builtin_llabs(value)
768 #else
769  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
770 #endif
771 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
772 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
773 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
774 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
775 #define __Pyx_PyBytes_FromString PyBytes_FromString
776 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
777 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
778 #if PY_MAJOR_VERSION < 3
779  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
780  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
781 #else
782  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
783  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
784 #endif
785 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
786 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
792 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
797 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
798 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
799 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
800 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
801 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
802  const Py_UNICODE *u_end = u;
803  while (*u_end++) ;
804  return (size_t)(u_end - u - 1);
805 }
806 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
807 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
808 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
809 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
810 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
811 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
812 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
813 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
814 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
815 #define __Pyx_PySequence_Tuple(obj)\
816  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
817 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
818 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
819 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
820 #if CYTHON_ASSUME_SAFE_MACROS
821 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
822 #else
823 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
824 #endif
825 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
826 #if PY_MAJOR_VERSION >= 3
827 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
828 #else
829 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
830 #endif
831 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
832 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
833 static int __Pyx_sys_getdefaultencoding_not_ascii;
834 static int __Pyx_init_sys_getdefaultencoding_params(void) {
835  PyObject* sys;
836  PyObject* default_encoding = NULL;
837  PyObject* ascii_chars_u = NULL;
838  PyObject* ascii_chars_b = NULL;
839  const char* default_encoding_c;
840  sys = PyImport_ImportModule("sys");
841  if (!sys) goto bad;
842  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
843  Py_DECREF(sys);
844  if (!default_encoding) goto bad;
845  default_encoding_c = PyBytes_AsString(default_encoding);
846  if (!default_encoding_c) goto bad;
847  if (strcmp(default_encoding_c, "ascii") == 0) {
848  __Pyx_sys_getdefaultencoding_not_ascii = 0;
849  } else {
850  char ascii_chars[128];
851  int c;
852  for (c = 0; c < 128; c++) {
853  ascii_chars[c] = c;
854  }
855  __Pyx_sys_getdefaultencoding_not_ascii = 1;
856  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
857  if (!ascii_chars_u) goto bad;
858  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
859  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
860  PyErr_Format(
861  PyExc_ValueError,
862  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
863  default_encoding_c);
864  goto bad;
865  }
866  Py_DECREF(ascii_chars_u);
867  Py_DECREF(ascii_chars_b);
868  }
869  Py_DECREF(default_encoding);
870  return 0;
871 bad:
872  Py_XDECREF(default_encoding);
873  Py_XDECREF(ascii_chars_u);
874  Py_XDECREF(ascii_chars_b);
875  return -1;
876 }
877 #endif
878 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
879 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
880 #else
881 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
882 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
883 static char* __PYX_DEFAULT_STRING_ENCODING;
884 static int __Pyx_init_sys_getdefaultencoding_params(void) {
885  PyObject* sys;
886  PyObject* default_encoding = NULL;
887  char* default_encoding_c;
888  sys = PyImport_ImportModule("sys");
889  if (!sys) goto bad;
890  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
891  Py_DECREF(sys);
892  if (!default_encoding) goto bad;
893  default_encoding_c = PyBytes_AsString(default_encoding);
894  if (!default_encoding_c) goto bad;
895  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
896  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
897  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
898  Py_DECREF(default_encoding);
899  return 0;
900 bad:
901  Py_XDECREF(default_encoding);
902  return -1;
903 }
904 #endif
905 #endif
906 
907 
908 /* Test for GCC > 2.95 */
909 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
910  #define likely(x) __builtin_expect(!!(x), 1)
911  #define unlikely(x) __builtin_expect(!!(x), 0)
912 #else /* !__GNUC__ or GCC < 2.95 */
913  #define likely(x) (x)
914  #define unlikely(x) (x)
915 #endif /* __GNUC__ */
916 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
917 
918 static PyObject *__pyx_m = NULL;
919 static PyObject *__pyx_d;
920 static PyObject *__pyx_b;
921 static PyObject *__pyx_cython_runtime = NULL;
922 static PyObject *__pyx_empty_tuple;
923 static PyObject *__pyx_empty_bytes;
924 static PyObject *__pyx_empty_unicode;
925 static int __pyx_lineno;
926 static int __pyx_clineno = 0;
927 static const char * __pyx_cfilenm= __FILE__;
928 static const char *__pyx_filename;
929 
930 /* Header.proto */
931 #if !defined(CYTHON_CCOMPLEX)
932  #if defined(__cplusplus)
933  #define CYTHON_CCOMPLEX 1
934  #elif defined(_Complex_I)
935  #define CYTHON_CCOMPLEX 1
936  #else
937  #define CYTHON_CCOMPLEX 0
938  #endif
939 #endif
940 #if CYTHON_CCOMPLEX
941  #ifdef __cplusplus
942  #include <complex>
943  #else
944  #include <complex.h>
945  #endif
946 #endif
947 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
948  #undef _Complex_I
949  #define _Complex_I 1.0fj
950 #endif
951 
952 
953 static const char *__pyx_f[] = {
954  "proteus/mprans/cMoveMeshMonitor.pyx",
955  "stringsource",
956  "__init__.pxd",
957  "type.pxd",
958 };
959 /* MemviewSliceStruct.proto */
960 struct __pyx_memoryview_obj;
961 typedef struct {
962  struct __pyx_memoryview_obj *memview;
963  char *data;
964  Py_ssize_t shape[8];
965  Py_ssize_t strides[8];
966  Py_ssize_t suboffsets[8];
967 } __Pyx_memviewslice;
968 #define __Pyx_MemoryView_Len(m) (m.shape[0])
969 
970 /* Atomics.proto */
971 #include <pythread.h>
972 #ifndef CYTHON_ATOMICS
973  #define CYTHON_ATOMICS 1
974 #endif
975 #define __pyx_atomic_int_type int
976 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
977  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
978  !defined(__i386__)
979  #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
980  #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
981  #ifdef __PYX_DEBUG_ATOMICS
982  #warning "Using GNU atomics"
983  #endif
984 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
985  #include <Windows.h>
986  #undef __pyx_atomic_int_type
987  #define __pyx_atomic_int_type LONG
988  #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
989  #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
990  #ifdef __PYX_DEBUG_ATOMICS
991  #pragma message ("Using MSVC atomics")
992  #endif
993 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
994  #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
995  #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
996  #ifdef __PYX_DEBUG_ATOMICS
997  #warning "Using Intel atomics"
998  #endif
999 #else
1000  #undef CYTHON_ATOMICS
1001  #define CYTHON_ATOMICS 0
1002  #ifdef __PYX_DEBUG_ATOMICS
1003  #warning "Not using atomics"
1004  #endif
1005 #endif
1006 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1007 #if CYTHON_ATOMICS
1008  #define __pyx_add_acquisition_count(memview)\
1009  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1010  #define __pyx_sub_acquisition_count(memview)\
1011  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1012 #else
1013  #define __pyx_add_acquisition_count(memview)\
1014  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1015  #define __pyx_sub_acquisition_count(memview)\
1016  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1017 #endif
1018 
1019 /* ForceInitThreads.proto */
1020 #ifndef __PYX_FORCE_INIT_THREADS
1021  #define __PYX_FORCE_INIT_THREADS 0
1022 #endif
1023 
1024 /* NoFastGil.proto */
1025 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1026 #define __Pyx_PyGILState_Release PyGILState_Release
1027 #define __Pyx_FastGIL_Remember()
1028 #define __Pyx_FastGIL_Forget()
1029 #define __Pyx_FastGilFuncInit()
1030 
1031 /* BufferFormatStructs.proto */
1032 #define IS_UNSIGNED(type) (((type) -1) > 0)
1033 struct __Pyx_StructField_;
1034 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1035 typedef struct {
1036  const char* name;
1037  struct __Pyx_StructField_* fields;
1038  size_t size;
1039  size_t arraysize[8];
1040  int ndim;
1041  char typegroup;
1042  char is_unsigned;
1043  int flags;
1044 } __Pyx_TypeInfo;
1045 typedef struct __Pyx_StructField_ {
1046  __Pyx_TypeInfo* type;
1047  const char* name;
1048  size_t offset;
1049 } __Pyx_StructField;
1050 typedef struct {
1051  __Pyx_StructField* field;
1052  size_t parent_offset;
1053 } __Pyx_BufFmt_StackElem;
1054 typedef struct {
1055  __Pyx_StructField root;
1056  __Pyx_BufFmt_StackElem* head;
1057  size_t fmt_offset;
1058  size_t new_count, enc_count;
1059  size_t struct_alignment;
1060  int is_complex;
1061  char enc_type;
1062  char new_packmode;
1063  char enc_packmode;
1064  char is_valid_array;
1065 } __Pyx_BufFmt_Context;
1066 
1067 
1068 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1069  * # in Cython to enable them only on the right systems.
1070  *
1071  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1072  * ctypedef npy_int16 int16_t
1073  * ctypedef npy_int32 int32_t
1074  */
1075 typedef npy_int8 __pyx_t_5numpy_int8_t;
1076 
1077 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1078  *
1079  * ctypedef npy_int8 int8_t
1080  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1081  * ctypedef npy_int32 int32_t
1082  * ctypedef npy_int64 int64_t
1083  */
1084 typedef npy_int16 __pyx_t_5numpy_int16_t;
1085 
1086 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1087  * ctypedef npy_int8 int8_t
1088  * ctypedef npy_int16 int16_t
1089  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1090  * ctypedef npy_int64 int64_t
1091  * #ctypedef npy_int96 int96_t
1092  */
1093 typedef npy_int32 __pyx_t_5numpy_int32_t;
1094 
1095 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1096  * ctypedef npy_int16 int16_t
1097  * ctypedef npy_int32 int32_t
1098  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1099  * #ctypedef npy_int96 int96_t
1100  * #ctypedef npy_int128 int128_t
1101  */
1102 typedef npy_int64 __pyx_t_5numpy_int64_t;
1103 
1104 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1105  * #ctypedef npy_int128 int128_t
1106  *
1107  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1108  * ctypedef npy_uint16 uint16_t
1109  * ctypedef npy_uint32 uint32_t
1110  */
1111 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1112 
1113 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1114  *
1115  * ctypedef npy_uint8 uint8_t
1116  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1117  * ctypedef npy_uint32 uint32_t
1118  * ctypedef npy_uint64 uint64_t
1119  */
1120 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1121 
1122 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1123  * ctypedef npy_uint8 uint8_t
1124  * ctypedef npy_uint16 uint16_t
1125  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1126  * ctypedef npy_uint64 uint64_t
1127  * #ctypedef npy_uint96 uint96_t
1128  */
1129 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1130 
1131 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1132  * ctypedef npy_uint16 uint16_t
1133  * ctypedef npy_uint32 uint32_t
1134  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1135  * #ctypedef npy_uint96 uint96_t
1136  * #ctypedef npy_uint128 uint128_t
1137  */
1138 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1139 
1140 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1141  * #ctypedef npy_uint128 uint128_t
1142  *
1143  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1144  * ctypedef npy_float64 float64_t
1145  * #ctypedef npy_float80 float80_t
1146  */
1147 typedef npy_float32 __pyx_t_5numpy_float32_t;
1148 
1149 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1150  *
1151  * ctypedef npy_float32 float32_t
1152  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1153  * #ctypedef npy_float80 float80_t
1154  * #ctypedef npy_float128 float128_t
1155  */
1156 typedef npy_float64 __pyx_t_5numpy_float64_t;
1157 
1158 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1159  * # The int types are mapped a bit surprising --
1160  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1161  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1162  * ctypedef npy_longlong long_t
1163  * ctypedef npy_longlong longlong_t
1164  */
1165 typedef npy_long __pyx_t_5numpy_int_t;
1166 
1167 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1168  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1169  * ctypedef npy_long int_t
1170  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1171  * ctypedef npy_longlong longlong_t
1172  *
1173  */
1174 typedef npy_longlong __pyx_t_5numpy_long_t;
1175 
1176 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1177  * ctypedef npy_long int_t
1178  * ctypedef npy_longlong long_t
1179  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1180  *
1181  * ctypedef npy_ulong uint_t
1182  */
1183 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1184 
1185 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1186  * ctypedef npy_longlong longlong_t
1187  *
1188  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1189  * ctypedef npy_ulonglong ulong_t
1190  * ctypedef npy_ulonglong ulonglong_t
1191  */
1192 typedef npy_ulong __pyx_t_5numpy_uint_t;
1193 
1194 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1195  *
1196  * ctypedef npy_ulong uint_t
1197  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1198  * ctypedef npy_ulonglong ulonglong_t
1199  *
1200  */
1201 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1202 
1203 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1204  * ctypedef npy_ulong uint_t
1205  * ctypedef npy_ulonglong ulong_t
1206  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1207  *
1208  * ctypedef npy_intp intp_t
1209  */
1210 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1211 
1212 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1213  * ctypedef npy_ulonglong ulonglong_t
1214  *
1215  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1216  * ctypedef npy_uintp uintp_t
1217  *
1218  */
1219 typedef npy_intp __pyx_t_5numpy_intp_t;
1220 
1221 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1222  *
1223  * ctypedef npy_intp intp_t
1224  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1225  *
1226  * ctypedef npy_double float_t
1227  */
1228 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1229 
1230 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1231  * ctypedef npy_uintp uintp_t
1232  *
1233  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1234  * ctypedef npy_double double_t
1235  * ctypedef npy_longdouble longdouble_t
1236  */
1237 typedef npy_double __pyx_t_5numpy_float_t;
1238 
1239 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1240  *
1241  * ctypedef npy_double float_t
1242  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1243  * ctypedef npy_longdouble longdouble_t
1244  *
1245  */
1246 typedef npy_double __pyx_t_5numpy_double_t;
1247 
1248 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1249  * ctypedef npy_double float_t
1250  * ctypedef npy_double double_t
1251  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1252  *
1253  * ctypedef npy_cfloat cfloat_t
1254  */
1255 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1256 /* Declarations.proto */
1257 #if CYTHON_CCOMPLEX
1258  #ifdef __cplusplus
1259  typedef ::std::complex< float > __pyx_t_float_complex;
1260  #else
1261  typedef float _Complex __pyx_t_float_complex;
1262  #endif
1263 #else
1264  typedef struct { float real, imag; } __pyx_t_float_complex;
1265 #endif
1266 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1267 
1268 /* Declarations.proto */
1269 #if CYTHON_CCOMPLEX
1270  #ifdef __cplusplus
1271  typedef ::std::complex< double > __pyx_t_double_complex;
1272  #else
1273  typedef double _Complex __pyx_t_double_complex;
1274  #endif
1275 #else
1276  typedef struct { double real, imag; } __pyx_t_double_complex;
1277 #endif
1278 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1279 
1280 
1281 /*--- Type declarations ---*/
1282 struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients;
1283 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel;
1284 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr;
1285 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr;
1286 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr;
1287 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr;
1288 struct __pyx_array_obj;
1289 struct __pyx_MemviewEnum_obj;
1290 struct __pyx_memoryview_obj;
1291 struct __pyx_memoryviewslice_obj;
1292 
1293 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1294  * ctypedef npy_longdouble longdouble_t
1295  *
1296  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1297  * ctypedef npy_cdouble cdouble_t
1298  * ctypedef npy_clongdouble clongdouble_t
1299  */
1300 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1301 
1302 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1303  *
1304  * ctypedef npy_cfloat cfloat_t
1305  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1306  * ctypedef npy_clongdouble clongdouble_t
1307  *
1308  */
1309 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1310 
1311 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1312  * ctypedef npy_cfloat cfloat_t
1313  * ctypedef npy_cdouble cdouble_t
1314  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1315  *
1316  * ctypedef npy_cdouble complex_t
1317  */
1318 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1319 
1320 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1321  * ctypedef npy_clongdouble clongdouble_t
1322  *
1323  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1324  *
1325  * cdef inline object PyArray_MultiIterNew1(a):
1326  */
1327 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1328 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cySmoothNodesLaplace;
1329 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cySmoothNodesCentroid;
1330 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cyUpdateInverseMeanRatioTriangleNodes;
1331 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cyGetInverseMeanRatioSingleTriangle;
1332 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cySmoothNodesQuality;
1333 
1334 /* "MeshSmoothing.pxd":6
1335  * from libcpp cimport bool
1336  *
1337  * cdef void cySmoothNodesLaplace(double[:,:] nodeArray_, # <<<<<<<<<<<<<<
1338  * int[:] nodeStarOffsets,
1339  * int[:] nodeStarArray,
1340  */
1341 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cySmoothNodesLaplace {
1342  int __pyx_n;
1343  bool simultaneous;
1344  bool smoothBoundaries;
1345  __Pyx_memviewslice fixedNodesBoolArray;
1346  double alpha;
1347 };
1348 
1349 /* "MeshSmoothing.pxd":17
1350  * double alpha=*)
1351  *
1352  * cdef void cySmoothNodesCentroid(double[:,:] nodeArray_, # <<<<<<<<<<<<<<
1353  * int[:] nodeElementOffsets,
1354  * int[:] nodeElementsArray,
1355  */
1356 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cySmoothNodesCentroid {
1357  int __pyx_n;
1358  bool simultaneous;
1359  bool smoothBoundaries;
1360  double alpha;
1361 };
1362 
1363 /* "MeshSmoothing.pxd":41
1364  * int nElements)
1365  *
1366  * cdef void cyUpdateInverseMeanRatioTriangleNodes(double[:] IMRNodesArray_, # <<<<<<<<<<<<<<
1367  * double[:,:] nodeArray,
1368  * int[:,:] elementNodesArray,
1369  */
1370 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cyUpdateInverseMeanRatioTriangleNodes {
1371  int __pyx_n;
1372  bool el_average;
1373 };
1374 
1375 /* "MeshSmoothing.pxd":55
1376  * int nElements)
1377  *
1378  * cdef double cyGetInverseMeanRatioSingleTriangle(int node0, # <<<<<<<<<<<<<<
1379  * double[:,:] nodeArray,
1380  * int[:,:] elementNodesArray,
1381  */
1382 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cyGetInverseMeanRatioSingleTriangle {
1383  int __pyx_n;
1384  bool el_average;
1385 };
1386 
1387 /* "MeshSmoothing.pxd":62
1388  * bool el_average=*)
1389  *
1390  * cdef double[:,:] cySmoothNodesQuality(double[:] distortion, # <<<<<<<<<<<<<<
1391  * double[:] dilation,
1392  * double[:,:] nodeArray,
1393  */
1394 struct __pyx_opt_args_7proteus_6mprans_13MeshSmoothing_cySmoothNodesQuality {
1395  int __pyx_n;
1396  bool apply_directly;
1397 };
1398 
1399 /* "mprans/cMoveMeshMonitor.pyx":15
1400  *
1401  *
1402  * cdef class cCoefficients: # <<<<<<<<<<<<<<
1403  * cdef public:
1404  * object pyCoefficients
1405  */
1406 struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients {
1407  PyObject_HEAD
1408  struct __pyx_vtabstruct_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_vtab;
1409  PyObject *pyCoefficients;
1410  double C;
1411 };
1412 
1413 
1414 /* "mprans/cMoveMeshMonitor.pyx":202
1415  * eps=eps)
1416  *
1417  * cdef cppPseudoTimeSteppingParallel(self, # <<<<<<<<<<<<<<
1418  * double[:,:] xx,
1419  * double eps):
1420  */
1421 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel {
1422  PyObject_HEAD
1423  int __pyx_v_comm_size;
1424  __Pyx_memviewslice __pyx_v_coords_2doArray;
1425  __Pyx_memviewslice __pyx_v_counts_in;
1426  __Pyx_memviewslice __pyx_v_displacements_in;
1427 };
1428 
1429 
1430 /* "mprans/cMoveMeshMonitor.pyx":597
1431  * comm.Gatherv(coords_2rank[rank_recv],
1432  * [coords_2doArray,
1433  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
1434  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
1435  * MPI.DOUBLE],
1436  */
1437 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr {
1438  PyObject_HEAD
1439  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *__pyx_outer_scope;
1440  int __pyx_v_i;
1441  int __pyx_t_0;
1442  int __pyx_t_1;
1443  int __pyx_t_2;
1444 };
1445 
1446 
1447 /* "mprans/cMoveMeshMonitor.pyx":598
1448  * [coords_2doArray,
1449  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
1450  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
1451  * MPI.DOUBLE],
1452  * root=rank_recv)
1453  */
1454 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr {
1455  PyObject_HEAD
1456  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *__pyx_outer_scope;
1457  int __pyx_v_i;
1458  int __pyx_t_0;
1459  int __pyx_t_1;
1460  int __pyx_t_2;
1461 };
1462 
1463 
1464 /* "mprans/cMoveMeshMonitor.pyx":793
1465  * comm.Gatherv(coords_2rank[rank_recv],
1466  * [coords_2doArray,
1467  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
1468  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
1469  * MPI.DOUBLE],
1470  */
1471 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr {
1472  PyObject_HEAD
1473  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *__pyx_outer_scope;
1474  int __pyx_v_i;
1475  int __pyx_t_0;
1476  int __pyx_t_1;
1477  int __pyx_t_2;
1478 };
1479 
1480 
1481 /* "mprans/cMoveMeshMonitor.pyx":794
1482  * [coords_2doArray,
1483  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
1484  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
1485  * MPI.DOUBLE],
1486  * root=rank_recv)
1487  */
1488 struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr {
1489  PyObject_HEAD
1490  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *__pyx_outer_scope;
1491  int __pyx_v_i;
1492  int __pyx_t_0;
1493  int __pyx_t_1;
1494  int __pyx_t_2;
1495 };
1496 
1497 
1498 /* "View.MemoryView":105
1499  *
1500  * @cname("__pyx_array")
1501  * cdef class array: # <<<<<<<<<<<<<<
1502  *
1503  * cdef:
1504  */
1505 struct __pyx_array_obj {
1506  PyObject_HEAD
1507  struct __pyx_vtabstruct_array *__pyx_vtab;
1508  char *data;
1509  Py_ssize_t len;
1510  char *format;
1511  int ndim;
1512  Py_ssize_t *_shape;
1513  Py_ssize_t *_strides;
1514  Py_ssize_t itemsize;
1515  PyObject *mode;
1516  PyObject *_format;
1517  void (*callback_free_data)(void *);
1518  int free_data;
1519  int dtype_is_object;
1520 };
1521 
1522 
1523 /* "View.MemoryView":279
1524  *
1525  * @cname('__pyx_MemviewEnum')
1526  * cdef class Enum(object): # <<<<<<<<<<<<<<
1527  * cdef object name
1528  * def __init__(self, name):
1529  */
1530 struct __pyx_MemviewEnum_obj {
1531  PyObject_HEAD
1532  PyObject *name;
1533 };
1534 
1535 
1536 /* "View.MemoryView":330
1537  *
1538  * @cname('__pyx_memoryview')
1539  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1540  *
1541  * cdef object obj
1542  */
1543 struct __pyx_memoryview_obj {
1544  PyObject_HEAD
1545  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1546  PyObject *obj;
1547  PyObject *_size;
1548  PyObject *_array_interface;
1549  PyThread_type_lock lock;
1550  __pyx_atomic_int acquisition_count[2];
1551  __pyx_atomic_int *acquisition_count_aligned_p;
1552  Py_buffer view;
1553  int flags;
1554  int dtype_is_object;
1555  __Pyx_TypeInfo *typeinfo;
1556 };
1557 
1558 
1559 /* "View.MemoryView":965
1560  *
1561  * @cname('__pyx_memoryviewslice')
1562  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1563  * "Internal class for passing memoryview slices to Python"
1564  *
1565  */
1566 struct __pyx_memoryviewslice_obj {
1567  struct __pyx_memoryview_obj __pyx_base;
1568  __Pyx_memviewslice from_slice;
1569  PyObject *from_object;
1570  PyObject *(*to_object_func)(char *);
1571  int (*to_dtype_func)(char *, PyObject *);
1572 };
1573 
1574 
1575 
1576 /* "mprans/cMoveMeshMonitor.pyx":15
1577  *
1578  *
1579  * cdef class cCoefficients: # <<<<<<<<<<<<<<
1580  * cdef public:
1581  * object pyCoefficients
1582  */
1583 
1584 struct __pyx_vtabstruct_6mprans_16cMoveMeshMonitor_cCoefficients {
1585  PyObject *(*cppPreStep)(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int);
1586  PyObject *(*cppPostStep)(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *);
1587  PyObject *(*cppPseudoTimeSteppingParallel)(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *, __Pyx_memviewslice, double);
1588 };
1589 static struct __pyx_vtabstruct_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_vtabptr_6mprans_16cMoveMeshMonitor_cCoefficients;
1590 
1591 
1592 /* "View.MemoryView":105
1593  *
1594  * @cname("__pyx_array")
1595  * cdef class array: # <<<<<<<<<<<<<<
1596  *
1597  * cdef:
1598  */
1599 
1600 struct __pyx_vtabstruct_array {
1601  PyObject *(*get_memview)(struct __pyx_array_obj *);
1602 };
1603 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1604 
1605 
1606 /* "View.MemoryView":330
1607  *
1608  * @cname('__pyx_memoryview')
1609  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1610  *
1611  * cdef object obj
1612  */
1613 
1614 struct __pyx_vtabstruct_memoryview {
1615  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1616  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1617  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1618  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1619  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1620  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1621  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1622 };
1623 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1624 
1625 
1626 /* "View.MemoryView":965
1627  *
1628  * @cname('__pyx_memoryviewslice')
1629  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1630  * "Internal class for passing memoryview slices to Python"
1631  *
1632  */
1633 
1634 struct __pyx_vtabstruct__memoryviewslice {
1635  struct __pyx_vtabstruct_memoryview __pyx_base;
1636 };
1637 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1638 
1639 /* --- Runtime support code (head) --- */
1640 /* Refnanny.proto */
1641 #ifndef CYTHON_REFNANNY
1642  #define CYTHON_REFNANNY 0
1643 #endif
1644 #if CYTHON_REFNANNY
1645  typedef struct {
1646  void (*INCREF)(void*, PyObject*, int);
1647  void (*DECREF)(void*, PyObject*, int);
1648  void (*GOTREF)(void*, PyObject*, int);
1649  void (*GIVEREF)(void*, PyObject*, int);
1650  void* (*SetupContext)(const char*, int, const char*);
1651  void (*FinishContext)(void**);
1652  } __Pyx_RefNannyAPIStruct;
1653  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1654  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1655  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1656 #ifdef WITH_THREAD
1657  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1658  if (acquire_gil) {\
1659  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1660  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1661  PyGILState_Release(__pyx_gilstate_save);\
1662  } else {\
1663  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1664  }
1665 #else
1666  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1667  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1668 #endif
1669  #define __Pyx_RefNannyFinishContext()\
1670  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1671  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1672  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1673  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1674  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1675  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1676  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1677  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1678  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1679 #else
1680  #define __Pyx_RefNannyDeclarations
1681  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1682  #define __Pyx_RefNannyFinishContext()
1683  #define __Pyx_INCREF(r) Py_INCREF(r)
1684  #define __Pyx_DECREF(r) Py_DECREF(r)
1685  #define __Pyx_GOTREF(r)
1686  #define __Pyx_GIVEREF(r)
1687  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1688  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1689  #define __Pyx_XGOTREF(r)
1690  #define __Pyx_XGIVEREF(r)
1691 #endif
1692 #define __Pyx_XDECREF_SET(r, v) do {\
1693  PyObject *tmp = (PyObject *) r;\
1694  r = v; __Pyx_XDECREF(tmp);\
1695  } while (0)
1696 #define __Pyx_DECREF_SET(r, v) do {\
1697  PyObject *tmp = (PyObject *) r;\
1698  r = v; __Pyx_DECREF(tmp);\
1699  } while (0)
1700 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1701 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1702 
1703 /* PyObjectGetAttrStr.proto */
1704 #if CYTHON_USE_TYPE_SLOTS
1705 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1706 #else
1707 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1708 #endif
1709 
1710 /* GetBuiltinName.proto */
1711 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1712 
1713 /* RaiseArgTupleInvalid.proto */
1714 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1715  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1716 
1717 /* KeywordStringCheck.proto */
1718 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1719 
1720 /* DictGetItem.proto */
1721 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1722 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1723 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1724  (likely(PyDict_CheckExact(obj)) ?\
1725  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1726 #else
1727 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1728 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
1729 #endif
1730 
1731 /* GetItemInt.proto */
1732 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1733  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1734  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1735  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1736  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1737 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1738  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1739  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1740  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1741 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1742  int wraparound, int boundscheck);
1743 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1744  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1745  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1746  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1747 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1748  int wraparound, int boundscheck);
1749 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1750 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1751  int is_list, int wraparound, int boundscheck);
1752 
1753 /* ObjectGetItem.proto */
1754 #if CYTHON_USE_TYPE_SLOTS
1755 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1756 #else
1757 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1758 #endif
1759 
1760 /* MemviewSliceInit.proto */
1761 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
1762 #define __Pyx_MEMVIEW_DIRECT 1
1763 #define __Pyx_MEMVIEW_PTR 2
1764 #define __Pyx_MEMVIEW_FULL 4
1765 #define __Pyx_MEMVIEW_CONTIG 8
1766 #define __Pyx_MEMVIEW_STRIDED 16
1767 #define __Pyx_MEMVIEW_FOLLOW 32
1768 #define __Pyx_IS_C_CONTIG 1
1769 #define __Pyx_IS_F_CONTIG 2
1770 static int __Pyx_init_memviewslice(
1771  struct __pyx_memoryview_obj *memview,
1772  int ndim,
1773  __Pyx_memviewslice *memviewslice,
1774  int memview_is_new_reference);
1775 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
1776  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
1777 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
1778  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
1779 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
1780 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
1781 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
1782 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
1783 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
1784 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
1785 
1786 /* PyDictVersioning.proto */
1787 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1788 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1789 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1790 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1791  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1792  (cache_var) = (value);
1793 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1794  static PY_UINT64_T __pyx_dict_version = 0;\
1795  static PyObject *__pyx_dict_cached_value = NULL;\
1796  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1797  (VAR) = __pyx_dict_cached_value;\
1798  } else {\
1799  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1800  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1801  }\
1802 }
1803 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1804 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1805 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1806 #else
1807 #define __PYX_GET_DICT_VERSION(dict) (0)
1808 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1809 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1810 #endif
1811 
1812 /* GetModuleGlobalName.proto */
1813 #if CYTHON_USE_DICT_VERSIONS
1814 #define __Pyx_GetModuleGlobalName(var, name) {\
1815  static PY_UINT64_T __pyx_dict_version = 0;\
1816  static PyObject *__pyx_dict_cached_value = NULL;\
1817  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1818  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1819  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1820 }
1821 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1822  PY_UINT64_T __pyx_dict_version;\
1823  PyObject *__pyx_dict_cached_value;\
1824  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1825 }
1826 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1827 #else
1828 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1829 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1830 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1831 #endif
1832 
1833 /* PyFunctionFastCall.proto */
1834 #if CYTHON_FAST_PYCALL
1835 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1836  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1837 #if 1 || PY_VERSION_HEX < 0x030600B1
1838 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1839 #else
1840 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1841 #endif
1842 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1843  (sizeof(char [1 - 2*!(cond)]) - 1)
1844 #ifndef Py_MEMBER_SIZE
1845 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1846 #endif
1847 #if CYTHON_FAST_PYCALL
1848  static size_t __pyx_pyframe_localsplus_offset = 0;
1849  #include "frameobject.h"
1850 #if PY_VERSION_HEX >= 0x030b00a6
1851  #ifndef Py_BUILD_CORE
1852  #define Py_BUILD_CORE 1
1853  #endif
1854  #include "internal/pycore_frame.h"
1855 #endif
1856  #define __Pxy_PyFrame_Initialize_Offsets()\
1857  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1858  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1859  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1860  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1861 #endif // CYTHON_FAST_PYCALL
1862 #endif
1863 
1864 /* PyObjectCall.proto */
1865 #if CYTHON_COMPILING_IN_CPYTHON
1866 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1867 #else
1868 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1869 #endif
1870 
1871 /* PyObjectCallMethO.proto */
1872 #if CYTHON_COMPILING_IN_CPYTHON
1873 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1874 #endif
1875 
1876 /* PyObjectCallNoArg.proto */
1877 #if CYTHON_COMPILING_IN_CPYTHON
1878 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1879 #else
1880 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1881 #endif
1882 
1883 /* PyCFunctionFastCall.proto */
1884 #if CYTHON_FAST_PYCCALL
1885 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1886 #else
1887 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1888 #endif
1889 
1890 /* PyObjectCallOneArg.proto */
1891 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1892 
1893 /* RaiseDoubleKeywords.proto */
1894 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1895 
1896 /* ParseKeywords.proto */
1897 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1898  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1899  const char* function_name);
1900 
1901 /* PyIntFromDouble.proto */
1902 #if PY_MAJOR_VERSION < 3
1903 static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value);
1904 #else
1905 #define __Pyx_PyInt_FromDouble(value) PyLong_FromDouble(value)
1906 #endif
1907 
1908 /* SliceObject.proto */
1909 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1910  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1911  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1912  int has_cstart, int has_cstop, int wraparound);
1913 
1914 /* PyObjectCall2Args.proto */
1915 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1916 
1917 /* ListCompAppend.proto */
1918 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1919 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1920  PyListObject* L = (PyListObject*) list;
1921  Py_ssize_t len = Py_SIZE(list);
1922  if (likely(L->allocated > len)) {
1923  Py_INCREF(x);
1924  PyList_SET_ITEM(list, len, x);
1925  __Pyx_SET_SIZE(list, len + 1);
1926  return 0;
1927  }
1928  return PyList_Append(list, x);
1929 }
1930 #else
1931 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1932 #endif
1933 
1934 /* PyThreadStateGet.proto */
1935 #if CYTHON_FAST_THREAD_STATE
1936 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1937 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1938 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1939 #else
1940 #define __Pyx_PyThreadState_declare
1941 #define __Pyx_PyThreadState_assign
1942 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1943 #endif
1944 
1945 /* PyErrFetchRestore.proto */
1946 #if CYTHON_FAST_THREAD_STATE
1947 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1948 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1949 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1950 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1951 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1952 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1953 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1954 #if CYTHON_COMPILING_IN_CPYTHON
1955 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1956 #else
1957 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1958 #endif
1959 #else
1960 #define __Pyx_PyErr_Clear() PyErr_Clear()
1961 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1962 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1963 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1964 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1965 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1966 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1967 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1968 #endif
1969 
1970 /* RaiseException.proto */
1971 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1972 
1973 /* GetTopmostException.proto */
1974 #if CYTHON_USE_EXC_INFO_STACK
1975 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1976 #endif
1977 
1978 /* SaveResetException.proto */
1979 #if CYTHON_FAST_THREAD_STATE
1980 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1981 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1982 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1983 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1984 #else
1985 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1986 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1987 #endif
1988 
1989 /* PyErrExceptionMatches.proto */
1990 #if CYTHON_FAST_THREAD_STATE
1991 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1992 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1993 #else
1994 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1995 #endif
1996 
1997 /* GetException.proto */
1998 #if CYTHON_FAST_THREAD_STATE
1999 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2000 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2001 #else
2002 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2003 #endif
2004 
2005 /* PyIntBinop.proto */
2006 #if !CYTHON_COMPILING_IN_PYPY
2007 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2008 #else
2009 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
2010  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
2011 #endif
2012 
2013 /* SliceObject.proto */
2014 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
2015  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
2016 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
2017  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
2018  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2019  int has_cstart, int has_cstop, int wraparound);
2020 
2021 /* PyIntCompare.proto */
2022 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
2023 
2024 /* None.proto */
2025 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2026 
2027 /* PyIntBinop.proto */
2028 #if !CYTHON_COMPILING_IN_PYPY
2029 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2030 #else
2031 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2032  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2033 #endif
2034 
2035 /* SetItemInt.proto */
2036 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2037  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2038  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
2039  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
2040  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
2041 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
2042 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
2043  int is_list, int wraparound, int boundscheck);
2044 
2045 /* ArgTypeTest.proto */
2046 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2047  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2048  __Pyx__ArgTypeTest(obj, type, name, exact))
2049 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2050 
2051 /* IncludeStringH.proto */
2052 #include <string.h>
2053 
2054 /* BytesEquals.proto */
2055 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2056 
2057 /* UnicodeEquals.proto */
2058 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2059 
2060 /* StrEquals.proto */
2061 #if PY_MAJOR_VERSION >= 3
2062 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2063 #else
2064 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2065 #endif
2066 
2067 /* UnaryNegOverflows.proto */
2068 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2069  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2070 
2071 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2072 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2073 /* GetAttr.proto */
2074 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2075 
2076 /* decode_c_string_utf16.proto */
2077 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
2078  int byteorder = 0;
2079  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2080 }
2081 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
2082  int byteorder = -1;
2083  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2084 }
2085 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
2086  int byteorder = 1;
2087  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2088 }
2089 
2090 /* decode_c_string.proto */
2091 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2092  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2093  const char* encoding, const char* errors,
2094  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
2095 
2096 /* GetAttr3.proto */
2097 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2098 
2099 /* RaiseTooManyValuesToUnpack.proto */
2100 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2101 
2102 /* RaiseNeedMoreValuesToUnpack.proto */
2103 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2104 
2105 /* RaiseNoneIterError.proto */
2106 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2107 
2108 /* ExtTypeTest.proto */
2109 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2110 
2111 /* SwapException.proto */
2112 #if CYTHON_FAST_THREAD_STATE
2113 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2114 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2115 #else
2116 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2117 #endif
2118 
2119 /* Import.proto */
2120 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2121 
2122 /* FastTypeChecks.proto */
2123 #if CYTHON_COMPILING_IN_CPYTHON
2124 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2125 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2126 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2127 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2128 #else
2129 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2130 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2131 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2132 #endif
2133 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2134 
2135 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2136 /* ListExtend.proto */
2137 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
2138 #if CYTHON_COMPILING_IN_CPYTHON
2139  PyObject* none = _PyList_Extend((PyListObject*)L, v);
2140  if (unlikely(!none))
2141  return -1;
2142  Py_DECREF(none);
2143  return 0;
2144 #else
2145  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2146 #endif
2147 }
2148 
2149 /* ListAppend.proto */
2150 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2151 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2152  PyListObject* L = (PyListObject*) list;
2153  Py_ssize_t len = Py_SIZE(list);
2154  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2155  Py_INCREF(x);
2156  PyList_SET_ITEM(list, len, x);
2157  __Pyx_SET_SIZE(list, len + 1);
2158  return 0;
2159  }
2160  return PyList_Append(list, x);
2161 }
2162 #else
2163 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2164 #endif
2165 
2166 /* PySequenceContains.proto */
2167 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2168  int result = PySequence_Contains(seq, item);
2169  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2170 }
2171 
2172 /* ImportFrom.proto */
2173 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2174 
2175 /* HasAttr.proto */
2176 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2177 
2178 /* StringJoin.proto */
2179 #if PY_MAJOR_VERSION < 3
2180 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
2181 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
2182 #else
2183 #define __Pyx_PyString_Join PyUnicode_Join
2184 #define __Pyx_PyBaseString_Join PyUnicode_Join
2185 #endif
2186 #if CYTHON_COMPILING_IN_CPYTHON
2187  #if PY_MAJOR_VERSION < 3
2188  #define __Pyx_PyBytes_Join _PyString_Join
2189  #else
2190  #define __Pyx_PyBytes_Join _PyBytes_Join
2191  #endif
2192 #else
2193 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
2194 #endif
2195 
2196 /* PyObject_Unicode.proto */
2197 #if PY_MAJOR_VERSION >= 3
2198 #define __Pyx_PyObject_Unicode(obj)\
2199  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
2200 #else
2201 #define __Pyx_PyObject_Unicode(obj)\
2202  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
2203 #endif
2204 
2205 /* PyObject_GenericGetAttrNoDict.proto */
2206 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2207 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2208 #else
2209 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2210 #endif
2211 
2212 /* PyObject_GenericGetAttr.proto */
2213 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2214 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2215 #else
2216 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2217 #endif
2218 
2219 /* SetVTable.proto */
2220 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2221 
2222 /* PyObjectGetAttrStrNoError.proto */
2223 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2224 
2225 /* SetupReduce.proto */
2226 static int __Pyx_setup_reduce(PyObject* type_obj);
2227 
2228 /* TypeImport.proto */
2229 #ifndef __PYX_HAVE_RT_ImportType_proto
2230 #define __PYX_HAVE_RT_ImportType_proto
2231 enum __Pyx_ImportType_CheckSize {
2232  __Pyx_ImportType_CheckSize_Error = 0,
2233  __Pyx_ImportType_CheckSize_Warn = 1,
2234  __Pyx_ImportType_CheckSize_Ignore = 2
2235 };
2236 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2237 #endif
2238 
2239 /* CLineInTraceback.proto */
2240 #ifdef CYTHON_CLINE_IN_TRACEBACK
2241 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2242 #else
2243 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2244 #endif
2245 
2246 /* CodeObjectCache.proto */
2247 typedef struct {
2248  PyCodeObject* code_object;
2249  int code_line;
2250 } __Pyx_CodeObjectCacheEntry;
2251 struct __Pyx_CodeObjectCache {
2252  int count;
2253  int max_count;
2254  __Pyx_CodeObjectCacheEntry* entries;
2255 };
2256 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2257 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2258 static PyCodeObject *__pyx_find_code_object(int code_line);
2259 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2260 
2261 /* AddTraceback.proto */
2262 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2263  int py_line, const char *filename);
2264 
2265 #if PY_MAJOR_VERSION < 3
2266  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2267  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2268 #else
2269  #define __Pyx_GetBuffer PyObject_GetBuffer
2270  #define __Pyx_ReleaseBuffer PyBuffer_Release
2271 #endif
2272 
2273 
2274 /* BufferStructDeclare.proto */
2275 typedef struct {
2276  Py_ssize_t shape, strides, suboffsets;
2277 } __Pyx_Buf_DimInfo;
2278 typedef struct {
2279  size_t refcount;
2280  Py_buffer pybuffer;
2281 } __Pyx_Buffer;
2282 typedef struct {
2283  __Pyx_Buffer *rcbuffer;
2284  char *data;
2285  __Pyx_Buf_DimInfo diminfo[8];
2286 } __Pyx_LocalBuf_ND;
2287 
2288 /* MemviewSliceIsContig.proto */
2289 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2290 
2291 /* OverlappingSlices.proto */
2292 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2293  __Pyx_memviewslice *slice2,
2294  int ndim, size_t itemsize);
2295 
2296 /* Capsule.proto */
2297 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2298 
2299 /* IsLittleEndian.proto */
2300 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
2301 
2302 /* BufferFormatCheck.proto */
2303 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
2304 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2305  __Pyx_BufFmt_StackElem* stack,
2306  __Pyx_TypeInfo* type);
2307 
2308 /* TypeInfoCompare.proto */
2309 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2310 
2311 /* MemviewSliceValidateAndInit.proto */
2312 static int __Pyx_ValidateAndInit_memviewslice(
2313  int *axes_specs,
2314  int c_or_f_flag,
2315  int buf_flags,
2316  int ndim,
2317  __Pyx_TypeInfo *dtype,
2318  __Pyx_BufFmt_StackElem stack[],
2319  __Pyx_memviewslice *memviewslice,
2320  PyObject *original_obj);
2321 
2322 /* ObjectToMemviewSlice.proto */
2323 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
2324 
2325 /* ObjectToMemviewSlice.proto */
2326 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *, int writable_flag);
2327 
2328 /* GCCDiagnostics.proto */
2329 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2330 #define __Pyx_HAS_GCC_DIAGNOSTIC
2331 #endif
2332 
2333 /* ObjectToMemviewSlice.proto */
2334 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(PyObject *, int writable_flag);
2335 
2336 /* ObjectToMemviewSlice.proto */
2337 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_double(PyObject *, int writable_flag);
2338 
2339 /* MemviewDtypeToObject.proto */
2340 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
2341 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
2342 
2343 /* ObjectToMemviewSlice.proto */
2344 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_int(PyObject *, int writable_flag);
2345 
2346 /* Print.proto */
2347 static int __Pyx_Print(PyObject*, PyObject *, int);
2348 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
2349 static PyObject* __pyx_print = 0;
2350 static PyObject* __pyx_print_kwargs = 0;
2351 #endif
2352 
2353 /* MemviewDtypeToObject.proto */
2354 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
2355 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
2356 
2357 /* RealImag.proto */
2358 #if CYTHON_CCOMPLEX
2359  #ifdef __cplusplus
2360  #define __Pyx_CREAL(z) ((z).real())
2361  #define __Pyx_CIMAG(z) ((z).imag())
2362  #else
2363  #define __Pyx_CREAL(z) (__real__(z))
2364  #define __Pyx_CIMAG(z) (__imag__(z))
2365  #endif
2366 #else
2367  #define __Pyx_CREAL(z) ((z).real)
2368  #define __Pyx_CIMAG(z) ((z).imag)
2369 #endif
2370 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2371  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2372  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2373  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2374 #else
2375  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2376  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2377 #endif
2378 
2379 /* Arithmetic.proto */
2380 #if CYTHON_CCOMPLEX
2381  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2382  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2383  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2384  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2385  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2386  #define __Pyx_c_neg_float(a) (-(a))
2387  #ifdef __cplusplus
2388  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2389  #define __Pyx_c_conj_float(z) (::std::conj(z))
2390  #if 1
2391  #define __Pyx_c_abs_float(z) (::std::abs(z))
2392  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2393  #endif
2394  #else
2395  #define __Pyx_c_is_zero_float(z) ((z)==0)
2396  #define __Pyx_c_conj_float(z) (conjf(z))
2397  #if 1
2398  #define __Pyx_c_abs_float(z) (cabsf(z))
2399  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2400  #endif
2401  #endif
2402 #else
2403  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2404  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2405  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2406  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2407  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2408  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2409  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2410  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2411  #if 1
2412  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2413  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2414  #endif
2415 #endif
2416 
2417 /* Arithmetic.proto */
2418 #if CYTHON_CCOMPLEX
2419  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2420  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2421  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2422  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2423  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2424  #define __Pyx_c_neg_double(a) (-(a))
2425  #ifdef __cplusplus
2426  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2427  #define __Pyx_c_conj_double(z) (::std::conj(z))
2428  #if 1
2429  #define __Pyx_c_abs_double(z) (::std::abs(z))
2430  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2431  #endif
2432  #else
2433  #define __Pyx_c_is_zero_double(z) ((z)==0)
2434  #define __Pyx_c_conj_double(z) (conj(z))
2435  #if 1
2436  #define __Pyx_c_abs_double(z) (cabs(z))
2437  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2438  #endif
2439  #endif
2440 #else
2441  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2442  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2443  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2444  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2445  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2446  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2447  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2448  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2449  #if 1
2450  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2451  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2452  #endif
2453 #endif
2454 
2455 /* MemviewSliceCopyTemplate.proto */
2456 static __Pyx_memviewslice
2457 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2458  const char *mode, int ndim,
2459  size_t sizeof_dtype, int contig_flag,
2460  int dtype_is_object);
2461 
2462 /* CIntFromPy.proto */
2463 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2464 
2465 /* CIntToPy.proto */
2466 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2467 
2468 /* CIntToPy.proto */
2469 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2470 
2471 /* TypeInfoToFormat.proto */
2472 struct __pyx_typeinfo_string {
2473  char string[3];
2474 };
2475 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2476 
2477 /* PrintOne.proto */
2478 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
2479 
2480 /* CIntFromPy.proto */
2481 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2482 
2483 /* CIntFromPy.proto */
2484 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2485 
2486 /* FetchCommonType.proto */
2487 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2488 
2489 /* PyObjectGetMethod.proto */
2490 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
2491 
2492 /* PyObjectCallMethod1.proto */
2493 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
2494 
2495 /* CoroutineBase.proto */
2496 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
2497 #if CYTHON_USE_EXC_INFO_STACK
2498 #define __Pyx_ExcInfoStruct _PyErr_StackItem
2499 #else
2500 typedef struct {
2501  PyObject *exc_type;
2502  PyObject *exc_value;
2503  PyObject *exc_traceback;
2504 } __Pyx_ExcInfoStruct;
2505 #endif
2506 typedef struct {
2507  PyObject_HEAD
2508  __pyx_coroutine_body_t body;
2509  PyObject *closure;
2510  __Pyx_ExcInfoStruct gi_exc_state;
2511  PyObject *gi_weakreflist;
2512  PyObject *classobj;
2513  PyObject *yieldfrom;
2514  PyObject *gi_name;
2515  PyObject *gi_qualname;
2516  PyObject *gi_modulename;
2517  PyObject *gi_code;
2518  PyObject *gi_frame;
2519  int resume_label;
2520  char is_running;
2521 } __pyx_CoroutineObject;
2522 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
2523  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
2524  PyObject *name, PyObject *qualname, PyObject *module_name);
2525 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
2526  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
2527  PyObject *name, PyObject *qualname, PyObject *module_name);
2528 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
2529 static int __Pyx_Coroutine_clear(PyObject *self);
2530 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
2531 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
2532 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
2533 #if CYTHON_USE_EXC_INFO_STACK
2534 #define __Pyx_Coroutine_SwapException(self)
2535 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
2536 #else
2537 #define __Pyx_Coroutine_SwapException(self) {\
2538  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
2539  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
2540  }
2541 #define __Pyx_Coroutine_ResetAndClearException(self) {\
2542  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
2543  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
2544  }
2545 #endif
2546 #if CYTHON_FAST_THREAD_STATE
2547 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
2548  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
2549 #else
2550 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
2551  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
2552 #endif
2553 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
2554 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
2555 
2556 /* PatchModuleWithCoroutine.proto */
2557 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
2558 
2559 /* PatchGeneratorABC.proto */
2560 static int __Pyx_patch_abc(void);
2561 
2562 /* Generator.proto */
2563 #define __Pyx_Generator_USED
2564 static PyTypeObject *__pyx_GeneratorType = 0;
2565 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
2566 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
2567  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
2568 static PyObject *__Pyx_Generator_Next(PyObject *self);
2569 static int __pyx_Generator_init(void);
2570 
2571 /* CheckBinaryVersion.proto */
2572 static int __Pyx_check_binary_version(void);
2573 
2574 /* FunctionImport.proto */
2575 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
2576 
2577 /* InitStrings.proto */
2578 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2579 
2580 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_13cCoefficients_cppPreStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, __Pyx_memviewslice __pyx_v_q_uOfX, __Pyx_memviewslice __pyx_v_q_J, __Pyx_memviewslice __pyx_v_q_weights, __Pyx_memviewslice __pyx_v_areas_, __Pyx_memviewslice __pyx_v_q_rci, __Pyx_memviewslice __pyx_v_q_fci, int __pyx_v_nElements_owned); /* proto*/
2581 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_13cCoefficients_cppPostStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto*/
2582 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_13cCoefficients_cppPseudoTimeSteppingParallel(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, __Pyx_memviewslice __pyx_v_xx, double __pyx_v_eps); /* proto*/
2583 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2584 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2585 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2586 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2587 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*/
2588 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2589 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2590 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2591 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2592 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2593 
2594 /* Module declarations from 'cython.view' */
2595 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2596 
2597 /* Module declarations from 'cython' */
2598 
2599 /* Module declarations from 'cpython.buffer' */
2600 
2601 /* Module declarations from 'libc.string' */
2602 
2603 /* Module declarations from 'libc.stdio' */
2604 
2605 /* Module declarations from '__builtin__' */
2606 
2607 /* Module declarations from 'cpython.type' */
2608 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2609 
2610 /* Module declarations from 'cpython' */
2611 
2612 /* Module declarations from 'cpython.object' */
2613 
2614 /* Module declarations from 'cpython.ref' */
2615 
2616 /* Module declarations from 'cpython.mem' */
2617 
2618 /* Module declarations from 'numpy' */
2619 
2620 /* Module declarations from 'numpy' */
2621 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2622 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2623 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2624 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2625 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2626 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2627 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2628 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2629 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2630 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2631 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2632 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2633 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2634 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2635 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2636 
2637 /* Module declarations from 'libcpp' */
2638 
2639 /* Module declarations from 'proteus.mprans' */
2640 
2641 /* Module declarations from 'proteus.mprans.MeshSmoothing' */
2642 static int (*__pyx_f_7proteus_6mprans_13MeshSmoothing_pyxGetLocalNearestNode)(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2643 static __Pyx_memviewslice (*__pyx_f_7proteus_6mprans_13MeshSmoothing_pyxGetLocalNearestElementIntersection)(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2644 static int (*__pyx_f_7proteus_6mprans_13MeshSmoothing_pyxGetLocalNearestElementAroundNode)(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2645 static void (*__pyx_f_7proteus_6mprans_13MeshSmoothing_pyxUpdateElementBoundaryNormalsTetra)(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2646 static void (*__pyx_f_7proteus_6mprans_13MeshSmoothing_pyxUpdateElementBoundaryNormalsTriangle)(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2647 static __Pyx_memviewslice (*__pyx_f_7proteus_6mprans_13MeshSmoothing_cyCheckOwnedVariable)(int, int, int, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
2648 static __Pyx_memviewslice (*__pyx_f_7proteus_6mprans_13MeshSmoothing_cyGetGlobalVariable)(int, int, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
2649 static int (*__pyx_f_7proteus_6mprans_13MeshSmoothing_cyGetLocalVariable)(int, int, int, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
2650 static void (*__pyx_f_7proteus_6mprans_13MeshSmoothing_cyFindBoundaryDirectionTriangle)(__Pyx_memviewslice, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
2651 
2652 /* Module declarations from 'mprans.cMoveMeshMonitor' */
2653 static PyTypeObject *__pyx_ptype_6mprans_16cMoveMeshMonitor_cCoefficients = 0;
2654 static PyTypeObject *__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel = 0;
2655 static PyTypeObject *__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr = 0;
2656 static PyTypeObject *__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr = 0;
2657 static PyTypeObject *__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr = 0;
2658 static PyTypeObject *__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr = 0;
2659 static PyTypeObject *__pyx_array_type = 0;
2660 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2661 static PyTypeObject *__pyx_memoryview_type = 0;
2662 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2663 static PyObject *generic = 0;
2664 static PyObject *strided = 0;
2665 static PyObject *indirect = 0;
2666 static PyObject *contiguous = 0;
2667 static PyObject *indirect_contiguous = 0;
2668 static int __pyx_memoryview_thread_locks_used;
2669 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2670 static __Pyx_memviewslice __pyx_f_6mprans_16cMoveMeshMonitor_cppRecoveryAtNodes(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
2671 static __Pyx_memviewslice __pyx_f_6mprans_16cMoveMeshMonitor_cppRecoveryAtNodesWeighted(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2672 static __Pyx_memviewslice __pyx_f_6mprans_16cMoveMeshMonitor_cppGradientRecoveryAtNodes(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2673 static __Pyx_memviewslice __pyx_f_6mprans_16cMoveMeshMonitor_cppGradientRecoveryAtNodesWeighted(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2674 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_checkOwnedVariable(int, int, int, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
2675 static __Pyx_memviewslice __pyx_f_6mprans_16cMoveMeshMonitor_findN(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, int, int, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, __Pyx_memviewslice, __Pyx_memviewslice, int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int); /*proto*/
2676 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2677 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2678 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2679 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2680 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2681 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2682 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2683 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*/
2684 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2685 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2686 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2687 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2688 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2689 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2690 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2691 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2692 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2693 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2694 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2695 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2696 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2697 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2698 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2699 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2700 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2701 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2702 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2703 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2704 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2705 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2706 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2707 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2708 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2709 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
2710 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
2711 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2712 #define __Pyx_MODULE_NAME "mprans.cMoveMeshMonitor"
2713 extern int __pyx_module_is_main_mprans__cMoveMeshMonitor;
2714 int __pyx_module_is_main_mprans__cMoveMeshMonitor = 0;
2715 
2716 /* Implementation of 'mprans.cMoveMeshMonitor' */
2717 static PyObject *__pyx_builtin_xrange;
2718 static PyObject *__pyx_builtin_range;
2719 static PyObject *__pyx_builtin_AssertionError;
2720 static PyObject *__pyx_builtin_TypeError;
2721 static PyObject *__pyx_builtin_ImportError;
2722 static PyObject *__pyx_builtin_ValueError;
2723 static PyObject *__pyx_builtin_MemoryError;
2724 static PyObject *__pyx_builtin_enumerate;
2725 static PyObject *__pyx_builtin_Ellipsis;
2726 static PyObject *__pyx_builtin_id;
2727 static PyObject *__pyx_builtin_IndexError;
2728 static const char __pyx_k_C[] = "C";
2729 static const char __pyx_k_O[] = "O";
2730 static const char __pyx_k_T[] = "T{";
2731  static const char __pyx_k_c[] = "c";
2732  static const char __pyx_k_f[] = "f";
2733  static const char __pyx_k_q[] = "q";
2734  static const char __pyx_k_r[] = "r";
2735  static const char __pyx_k_s[] = "(%s)";
2736  static const char __pyx_k_t[] = "t";
2737  static const char __pyx_k_u[] = "u";
2738  static const char __pyx_k_x[] = "x";
2739  static const char __pyx_k_id[] = "id";
2740  static const char __pyx_k_ms[] = "ms";
2741  static const char __pyx_k_nd[] = "nd";
2742  static const char __pyx_k_np[] = "np";
2743  static const char __pyx_k_op[] = "op";
2744  static const char __pyx_k_xx[] = "xx";
2745  static const char __pyx_k_INT[] = "INT";
2746  static const char __pyx_k_MPI[] = "MPI";
2747  static const char __pyx_k_SUM[] = "SUM";
2748  static const char __pyx_k__31[] = "^";
2749  static const char __pyx_k__32[] = "";
2750  static const char __pyx_k__33[] = ":";
2751 static const char __pyx_k__34[] = "}";
2752 static const char __pyx_k__35[] = ",";
2753 static const char __pyx_k_dot[] = "dot: ";
2754 static const char __pyx_k_end[] = "end";
2755 static const char __pyx_k_eps[] = "eps";
2756 static const char __pyx_k_get[] = "get";
2757 static const char __pyx_k_new[] = "__new__";
2758 static const char __pyx_k_obj[] = "obj";
2759 static const char __pyx_k_Comm[] = "Comm";
2760 static const char __pyx_k_args[] = "args";
2761 static const char __pyx_k_axis[] = "axis";
2762 static const char __pyx_k_base[] = "base";
2763 static const char __pyx_k_comm[] = "comm";
2764 static const char __pyx_k_dict[] = "__dict__";
2765 static const char __pyx_k_file[] = "file";
2766 static const char __pyx_k_join[] = "join";
2767 static const char __pyx_k_main[] = "__main__";
2768 static const char __pyx_k_mesh[] = "mesh";
2769 static const char __pyx_k_mode[] = "mode";
2770 static const char __pyx_k_name[] = "name";
2771 static const char __pyx_k_ndim[] = "ndim";
2772 static const char __pyx_k_ones[] = "ones";
2773 static const char __pyx_k_pack[] = "pack";
2774 static const char __pyx_k_rank[] = "rank";
2775 static const char __pyx_k_root[] = "root";
2776 static const char __pyx_k_send[] = "send";
2777 static const char __pyx_k_size[] = "size";
2778 static const char __pyx_k_step[] = "step";
2779 static const char __pyx_k_stop[] = "stop";
2780 static const char __pyx_k_test[] = "__test__";
2781 static const char __pyx_k_ASCII[] = "ASCII";
2782 static const char __pyx_k_Abort[] = "Abort";
2783 static const char __pyx_k_Error[] = "Error: ";
2784 static const char __pyx_k_alpha[] = "alpha";
2785 static const char __pyx_k_areas[] = "areas";
2786 static const char __pyx_k_array[] = "array";
2787 static const char __pyx_k_class[] = "__class__";
2788 static const char __pyx_k_close[] = "close";
2789 static const char __pyx_k_dtype[] = "dtype";
2790 static const char __pyx_k_error[] = "error";
2791 static const char __pyx_k_flags[] = "flags";
2792 static const char __pyx_k_grads[] = "grads";
2793 static const char __pyx_k_int32[] = "int32";
2794 static const char __pyx_k_level[] = "level";
2795 static const char __pyx_k_model[] = "model";
2796 static const char __pyx_k_numpy[] = "numpy";
2797 static const char __pyx_k_print[] = "print";
2798 static const char __pyx_k_range[] = "range";
2799 static const char __pyx_k_shape[] = "shape";
2800 static const char __pyx_k_start[] = "start";
2801 static const char __pyx_k_t_max[] = "t_max";
2802 static const char __pyx_k_t_min[] = "t_min";
2803 static const char __pyx_k_throw[] = "throw";
2804 static const char __pyx_k_u_phi[] = "u_phi";
2805 static const char __pyx_k_zeros[] = "zeros";
2806 static const char __pyx_k_Commit[] = "Commit";
2807 static const char __pyx_k_DOUBLE[] = "DOUBLE";
2808 static const char __pyx_k_append[] = "append";
2809 static const char __pyx_k_encode[] = "encode";
2810 static const char __pyx_k_format[] = "format";
2811 static const char __pyx_k_import[] = "__import__";
2812 static const char __pyx_k_ls_phi[] = "ls_phi";
2813 static const char __pyx_k_mpi4py[] = "mpi4py";
2814 static const char __pyx_k_nNodes[] = "nNodes";
2815 static const char __pyx_k_name_2[] = "__name__";
2816 static const char __pyx_k_pickle[] = "pickle";
2817 static const char __pyx_k_reduce[] = "__reduce__";
2818 static const char __pyx_k_struct[] = "struct";
2819 static const char __pyx_k_unpack[] = "unpack";
2820 static const char __pyx_k_update[] = "update";
2821 static const char __pyx_k_xrange[] = "xrange";
2822 static const char __pyx_k_Gatherv[] = "Gatherv";
2823 static const char __pyx_k_barrier[] = "barrier";
2824 static const char __pyx_k_fortran[] = "fortran";
2825 static const char __pyx_k_genexpr[] = "genexpr";
2826 static const char __pyx_k_memview[] = "memview";
2827 static const char __pyx_k_proteus[] = "proteus";
2828 static const char __pyx_k_scalars[] = "scalars";
2829 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2830 static const char __pyx_k_femSpace[] = "femSpace";
2831 static const char __pyx_k_getstate[] = "__getstate__";
2832 static const char __pyx_k_itemsize[] = "itemsize";
2833 static const char __pyx_k_linspace[] = "linspace";
2834 static const char __pyx_k_logEvent[] = "logEvent";
2835 static const char __pyx_k_ntimes_i[] = "ntimes_i";
2836 static const char __pyx_k_pyx_type[] = "__pyx_type";
2837 static const char __pyx_k_setstate[] = "__setstate__";
2838 static const char __pyx_k_tompi4py[] = "tompi4py";
2839 static const char __pyx_k_TypeError[] = "TypeError";
2840 static const char __pyx_k_abs_det_J[] = "abs(det(J))";
2841 static const char __pyx_k_allreduce[] = "allreduce";
2842 static const char __pyx_k_enumerate[] = "enumerate";
2843 static const char __pyx_k_fixed_dir[] = "fixed_dir: ";
2844 static const char __pyx_k_nSmoothIn[] = "nSmoothIn";
2845 static const char __pyx_k_nodeArray[] = "nodeArray";
2846 static const char __pyx_k_pyx_state[] = "__pyx_state";
2847 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2848 static const char __pyx_k_Allgatherv[] = "Allgatherv";
2849 static const char __pyx_k_IndexError[] = "IndexError";
2850 static const char __pyx_k_ValueError[] = "ValueError";
2851 static const char __pyx_k_detJ_array[] = "detJ_array";
2852 static const char __pyx_k_globalMesh[] = "globalMesh";
2853 static const char __pyx_k_nSmoothOut[] = "nSmoothOut";
2854 static const char __pyx_k_pyx_result[] = "__pyx_result";
2855 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2856 static const char __pyx_k_ImportError[] = "ImportError";
2857 static const char __pyx_k_MemoryError[] = "MemoryError";
2858 static const char __pyx_k_PickleError[] = "PickleError";
2859 static const char __pyx_k_areas_nodes[] = "areas_nodes";
2860 static const char __pyx_k_elementMaps[] = "elementMaps";
2861 static const char __pyx_k_nodeArray_2[] = "nodeArray_";
2862 static const char __pyx_k_node_number[] = "node number";
2863 static const char __pyx_k_element_node[] = "element node: ";
2864 static const char __pyx_k_getAreaValue[] = "getAreaValue";
2865 static const char __pyx_k_nNodes_owned[] = "nNodes_owned";
2866 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2867 static const char __pyx_k_simultaneous[] = "simultaneous";
2868 static const char __pyx_k_stringsource[] = "stringsource";
2869 static const char __pyx_k_MeshSmoothing[] = "MeshSmoothing";
2870 static const char __pyx_k_cCoefficients[] = "cCoefficients";
2871 static const char __pyx_k_nNodes_global[] = "nNodes_global";
2872 static const char __pyx_k_nodeStarArray[] = "nodeStarArray";
2873 static const char __pyx_k_ntimes_solved[] = "ntimes_solved";
2874 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2875 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2876 static const char __pyx_k_AssertionError[] = "AssertionError";
2877 static const char __pyx_k_Done_smoothing[] = "Done smoothing";
2878 static const char __pyx_k_evaluateFunAtX[] = "evaluateFunAtX";
2879 static const char __pyx_k_nNodes_element[] = "nNodes_element";
2880 static const char __pyx_k_proteus_mprans[] = "proteus.mprans";
2881 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2882 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2883 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2884 static const char __pyx_k_getInverseValue[] = "getInverseValue";
2885 static const char __pyx_k_nElements_owned[] = "nElements_owned";
2886 static const char __pyx_k_nodeStarOffsets[] = "nodeStarOffsets";
2887 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2888 static const char __pyx_k_recoveryAtNodes[] = "recoveryAtNodes";
2889 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2890 static const char __pyx_k_getGradientValue[] = "getGradientValue";
2891 static const char __pyx_k_getLevelSetValue[] = "getLevelSetValue";
2892 static const char __pyx_k_nElements_global[] = "nElements_global";
2893 static const char __pyx_k_nVariables_owned[] = "nVariables_owned";
2894 static const char __pyx_k_nearestN_element[] = "nearestN (element): ";
2895 static const char __pyx_k_smoothBoundaries[] = "smoothBoundaries";
2896 static const char __pyx_k_type_should_be_1[] = "type (should be 1): ";
2897 static const char __pyx_k_Create_contiguous[] = "Create_contiguous";
2898 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
2899 static const char __pyx_k_nodeElementsArray[] = "nodeElementsArray";
2900 static const char __pyx_k_nodeMaterialTypes[] = "nodeMaterialTypes";
2901 static const char __pyx_k_node_materialType[] = "node materialType: ";
2902 static const char __pyx_k_proteus_Profiling[] = "proteus.Profiling";
2903 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2904 static const char __pyx_k_uOfXTatQuadrature[] = "uOfXTatQuadrature";
2905 static const char __pyx_k_variable_nb_local[] = "variable_nb_local";
2906 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2907 static const char __pyx_k_element_barycenter[] = "element barycenter: ";
2908 static const char __pyx_k_nodeElementOffsets[] = "nodeElementOffsets";
2909 static const char __pyx_k_smoothNodesLaplace[] = "smoothNodesLaplace";
2910 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2911 static const char __pyx_k_fixedNodesBoolArray[] = "fixedNodesBoolArray";
2912 static const char __pyx_k_node_new_coordinates[] = "node new coordinates: ";
2913 static const char __pyx_k_node_old_coordinates[] = "node old coordinates: ";
2914 static const char __pyx_k_pyCheckOwnedVariable[] = "pyCheckOwnedVariable";
2915 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2916 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2917 static const char __pyx_k_elementNeighborsArray[] = "elementNeighborsArray";
2918 static const char __pyx_k_getNonOwnedNodeValues[] = "getNonOwnedNodeValues";
2919 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2920 static const char __pyx_k_elementBoundariesArray[] = "elementBoundariesArray";
2921 static const char __pyx_k_nNodes_elementBoundary[] = "nNodes_elementBoundary";
2922 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2923 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2924 static const char __pyx_k_elementBarycentersArray[] = "elementBarycentersArray";
2925 static const char __pyx_k_gradientRecoveryAtNodes[] = "gradientRecoveryAtNodes";
2926 static const char __pyx_k_mprans_cMoveMeshMonitor[] = "mprans.cMoveMeshMonitor";
2927 static const char __pyx_k_recoveryAtNodesWeighted[] = "recoveryAtNodesWeighted";
2928 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2929 static const char __pyx_k_Done_pseudo_timestepping[] = "Done pseudo-timestepping";
2930 static const char __pyx_k_Pseudo_time_stepping_t_t[] = "Pseudo-time stepping t={t}";
2931 static const char __pyx_k_elementQuadratureWeights[] = "elementQuadratureWeights";
2932 static const char __pyx_k_nElementBoundaries_owned[] = "nElementBoundaries_owned";
2933 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2934 static const char __pyx_k_elementBoundaryNodesArray[] = "elementBoundaryNodesArray";
2935 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
2936 static const char __pyx_k_elementBoundaryNormalsArray[] = "elementBoundaryNormalsArray";
2937 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2938 static const char __pyx_k_nodeOffsets_subdomain_owned[] = "nodeOffsets_subdomain_owned";
2939 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
2940 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2941 static const char __pyx_k_elementOffsets_subdomain_owned[] = "elementOffsets_subdomain_owned";
2942 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
2943 static const char __pyx_k_nodeNumbering_subdomain2global[] = "nodeNumbering_subdomain2global";
2944 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2945 static const char __pyx_k_b_i_and_nearestN_cannot_be_both[] = "b_i and nearestN cannot be both -1";
2946 static const char __pyx_k_did_not_find_containing_element[] = "did not find containing element! coords outside domain?";
2947 static const char __pyx_k_elementBoundaryBarycentersArray[] = "elementBoundaryBarycentersArray";
2948 static const char __pyx_k_gradientRecoveryAtNodesWeighted[] = "gradientRecoveryAtNodesWeighted";
2949 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2950 static const char __pyx_k_proteus_mprans_cMoveMeshMonitor[] = "proteus/mprans/cMoveMeshMonitor.pyx";
2951 static const char __pyx_k_variableOffsets_subdomain_owned[] = "variableOffsets_subdomain_owned";
2952 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2953 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2954 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2955 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2956 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2957 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2958 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2959 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2960 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2961 static const char __pyx_k_Pseudo_time_stepping_with_dt_eps[] = "Pseudo-time stepping with dt={eps} ({t_min}<t<{t_max})";
2962 static const char __pyx_k_Smoothing_Mesh_with_Laplace_Smoo[] = "Smoothing Mesh with Laplace Smoothing - ";
2963 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2964 static const char __pyx_k_cCoefficients_cppPseudoTimeStepp[] = "cCoefficients.cppPseudoTimeSteppingParallel.<locals>.genexpr";
2965 static const char __pyx_k_elementBoundaryNumbering_subdoma[] = "elementBoundaryNumbering_subdomain2global";
2966 static const char __pyx_k_elementBoundaryOffsets_subdomain[] = "elementBoundaryOffsets_subdomain_owned";
2967 static const char __pyx_k_elementNumbering_subdomain2globa[] = "elementNumbering_subdomain2global";
2968 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2969 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2970 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2971 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2972 static const char __pyx_k_variableNumbering_subdomain2glob[] = "variableNumbering_subdomain2global";
2973 static const char __pyx_k_did_not_find_containing_element_2[] = "did not find containing element! coords outside domain\077\077";
2974 static PyObject *__pyx_n_s_ASCII;
2975 static PyObject *__pyx_n_s_Abort;
2976 static PyObject *__pyx_n_s_Allgatherv;
2977 static PyObject *__pyx_n_s_AssertionError;
2978 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2979 static PyObject *__pyx_n_s_C;
2980 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2981 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2982 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2983 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2984 static PyObject *__pyx_n_s_Comm;
2985 static PyObject *__pyx_n_s_Commit;
2986 static PyObject *__pyx_n_s_Create_contiguous;
2987 static PyObject *__pyx_n_s_DOUBLE;
2988 static PyObject *__pyx_kp_s_Done_pseudo_timestepping;
2989 static PyObject *__pyx_kp_s_Done_smoothing;
2990 static PyObject *__pyx_n_s_Ellipsis;
2991 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2992 static PyObject *__pyx_kp_s_Error;
2993 static PyObject *__pyx_n_s_Gatherv;
2994 static PyObject *__pyx_n_s_INT;
2995 static PyObject *__pyx_n_s_ImportError;
2996 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2997 static PyObject *__pyx_n_s_IndexError;
2998 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2999 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
3000 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
3001 static PyObject *__pyx_n_s_MPI;
3002 static PyObject *__pyx_n_s_MemoryError;
3003 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
3004 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
3005 static PyObject *__pyx_n_s_MeshSmoothing;
3006 static PyObject *__pyx_n_b_O;
3007 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
3008 static PyObject *__pyx_n_s_PickleError;
3009 static PyObject *__pyx_kp_s_Pseudo_time_stepping_t_t;
3010 static PyObject *__pyx_kp_s_Pseudo_time_stepping_with_dt_eps;
3011 static PyObject *__pyx_n_s_SUM;
3012 static PyObject *__pyx_kp_s_Smoothing_Mesh_with_Laplace_Smoo;
3013 static PyObject *__pyx_kp_b_T;
3014 static PyObject *__pyx_n_s_TypeError;
3015 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
3016 static PyObject *__pyx_n_s_ValueError;
3017 static PyObject *__pyx_n_s_View_MemoryView;
3018 static PyObject *__pyx_kp_b__31;
3019 static PyObject *__pyx_kp_b__32;
3020 static PyObject *__pyx_kp_b__33;
3021 static PyObject *__pyx_kp_b__34;
3022 static PyObject *__pyx_kp_u__35;
3023 static PyObject *__pyx_kp_s_abs_det_J;
3024 static PyObject *__pyx_n_s_allocate_buffer;
3025 static PyObject *__pyx_n_s_allreduce;
3026 static PyObject *__pyx_n_s_alpha;
3027 static PyObject *__pyx_n_s_append;
3028 static PyObject *__pyx_n_s_areas;
3029 static PyObject *__pyx_n_s_areas_nodes;
3030 static PyObject *__pyx_n_s_args;
3031 static PyObject *__pyx_n_s_array;
3032 static PyObject *__pyx_n_s_axis;
3033 static PyObject *__pyx_kp_s_b_i_and_nearestN_cannot_be_both;
3034 static PyObject *__pyx_n_s_barrier;
3035 static PyObject *__pyx_n_s_base;
3036 static PyObject *__pyx_n_s_c;
3037 static PyObject *__pyx_n_u_c;
3038 static PyObject *__pyx_n_s_cCoefficients;
3039 static PyObject *__pyx_n_s_cCoefficients_cppPseudoTimeStepp;
3040 static PyObject *__pyx_n_s_class;
3041 static PyObject *__pyx_n_s_cline_in_traceback;
3042 static PyObject *__pyx_n_s_close;
3043 static PyObject *__pyx_n_s_comm;
3044 static PyObject *__pyx_kp_s_contiguous_and_direct;
3045 static PyObject *__pyx_kp_s_contiguous_and_indirect;
3046 static PyObject *__pyx_n_s_detJ_array;
3047 static PyObject *__pyx_n_s_dict;
3048 static PyObject *__pyx_kp_s_did_not_find_containing_element;
3049 static PyObject *__pyx_kp_s_did_not_find_containing_element_2;
3050 static PyObject *__pyx_kp_s_dot;
3051 static PyObject *__pyx_n_s_dtype;
3052 static PyObject *__pyx_n_s_dtype_is_object;
3053 static PyObject *__pyx_n_s_elementBarycentersArray;
3054 static PyObject *__pyx_n_s_elementBoundariesArray;
3055 static PyObject *__pyx_n_s_elementBoundaryBarycentersArray;
3056 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
3057 static PyObject *__pyx_n_s_elementBoundaryNodesArray;
3058 static PyObject *__pyx_n_s_elementBoundaryNormalsArray;
3059 static PyObject *__pyx_n_s_elementBoundaryNumbering_subdoma;
3060 static PyObject *__pyx_n_s_elementBoundaryOffsets_subdomain;
3061 static PyObject *__pyx_n_s_elementMaps;
3062 static PyObject *__pyx_n_s_elementNeighborsArray;
3063 static PyObject *__pyx_n_s_elementNodesArray;
3064 static PyObject *__pyx_n_s_elementNumbering_subdomain2globa;
3065 static PyObject *__pyx_n_s_elementOffsets_subdomain_owned;
3066 static PyObject *__pyx_n_s_elementQuadratureWeights;
3067 static PyObject *__pyx_kp_s_element_barycenter;
3068 static PyObject *__pyx_kp_s_element_node;
3069 static PyObject *__pyx_n_s_encode;
3070 static PyObject *__pyx_n_s_end;
3071 static PyObject *__pyx_n_s_enumerate;
3072 static PyObject *__pyx_n_s_eps;
3073 static PyObject *__pyx_n_s_error;
3074 static PyObject *__pyx_n_s_evaluateFunAtX;
3075 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
3076 static PyObject *__pyx_n_s_f;
3077 static PyObject *__pyx_n_s_femSpace;
3078 static PyObject *__pyx_n_s_file;
3079 static PyObject *__pyx_n_s_fixedNodesBoolArray;
3080 static PyObject *__pyx_kp_s_fixed_dir;
3081 static PyObject *__pyx_n_s_flags;
3082 static PyObject *__pyx_n_s_format;
3083 static PyObject *__pyx_n_s_fortran;
3084 static PyObject *__pyx_n_u_fortran;
3085 static PyObject *__pyx_n_s_genexpr;
3086 static PyObject *__pyx_n_s_get;
3087 static PyObject *__pyx_n_s_getAreaValue;
3088 static PyObject *__pyx_n_s_getGradientValue;
3089 static PyObject *__pyx_n_s_getInverseValue;
3090 static PyObject *__pyx_n_s_getLevelSetValue;
3091 static PyObject *__pyx_n_s_getNonOwnedNodeValues;
3092 static PyObject *__pyx_n_s_getstate;
3093 static PyObject *__pyx_n_s_globalMesh;
3094 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
3095 static PyObject *__pyx_n_s_gradientRecoveryAtNodes;
3096 static PyObject *__pyx_n_s_gradientRecoveryAtNodesWeighted;
3097 static PyObject *__pyx_n_s_grads;
3098 static PyObject *__pyx_n_s_id;
3099 static PyObject *__pyx_n_s_import;
3100 static PyObject *__pyx_n_s_int32;
3101 static PyObject *__pyx_n_s_itemsize;
3102 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
3103 static PyObject *__pyx_n_s_join;
3104 static PyObject *__pyx_n_s_level;
3105 static PyObject *__pyx_n_s_linspace;
3106 static PyObject *__pyx_n_s_logEvent;
3107 static PyObject *__pyx_n_s_ls_phi;
3108 static PyObject *__pyx_n_s_main;
3109 static PyObject *__pyx_n_s_memview;
3110 static PyObject *__pyx_n_s_mesh;
3111 static PyObject *__pyx_n_s_mode;
3112 static PyObject *__pyx_n_s_model;
3113 static PyObject *__pyx_n_s_mpi4py;
3114 static PyObject *__pyx_n_s_mprans_cMoveMeshMonitor;
3115 static PyObject *__pyx_n_s_ms;
3116 static PyObject *__pyx_n_s_nElementBoundaries_global;
3117 static PyObject *__pyx_n_s_nElementBoundaries_owned;
3118 static PyObject *__pyx_n_s_nElements_global;
3119 static PyObject *__pyx_n_s_nElements_owned;
3120 static PyObject *__pyx_n_s_nNodes;
3121 static PyObject *__pyx_n_s_nNodes_element;
3122 static PyObject *__pyx_n_s_nNodes_elementBoundary;
3123 static PyObject *__pyx_n_s_nNodes_global;
3124 static PyObject *__pyx_n_s_nNodes_owned;
3125 static PyObject *__pyx_n_s_nSmoothIn;
3126 static PyObject *__pyx_n_s_nSmoothOut;
3127 static PyObject *__pyx_n_s_nVariables_owned;
3128 static PyObject *__pyx_n_s_name;
3129 static PyObject *__pyx_n_s_name_2;
3130 static PyObject *__pyx_n_s_nd;
3131 static PyObject *__pyx_n_s_ndim;
3132 static PyObject *__pyx_kp_s_nearestN_element;
3133 static PyObject *__pyx_n_s_new;
3134 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
3135 static PyObject *__pyx_n_s_nodeArray;
3136 static PyObject *__pyx_n_s_nodeArray_2;
3137 static PyObject *__pyx_n_s_nodeElementOffsets;
3138 static PyObject *__pyx_n_s_nodeElementsArray;
3139 static PyObject *__pyx_n_s_nodeMaterialTypes;
3140 static PyObject *__pyx_n_s_nodeNumbering_subdomain2global;
3141 static PyObject *__pyx_n_s_nodeOffsets_subdomain_owned;
3142 static PyObject *__pyx_n_s_nodeStarArray;
3143 static PyObject *__pyx_n_s_nodeStarOffsets;
3144 static PyObject *__pyx_kp_s_node_materialType;
3145 static PyObject *__pyx_kp_s_node_new_coordinates;
3146 static PyObject *__pyx_kp_s_node_number;
3147 static PyObject *__pyx_kp_s_node_old_coordinates;
3148 static PyObject *__pyx_n_s_np;
3149 static PyObject *__pyx_n_s_ntimes_i;
3150 static PyObject *__pyx_n_s_ntimes_solved;
3151 static PyObject *__pyx_n_s_numpy;
3152 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
3153 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
3154 static PyObject *__pyx_n_s_obj;
3155 static PyObject *__pyx_n_s_ones;
3156 static PyObject *__pyx_n_s_op;
3157 static PyObject *__pyx_n_s_pack;
3158 static PyObject *__pyx_n_s_pickle;
3159 static PyObject *__pyx_n_s_print;
3160 static PyObject *__pyx_n_s_proteus;
3161 static PyObject *__pyx_n_s_proteus_Profiling;
3162 static PyObject *__pyx_n_s_proteus_mprans;
3163 static PyObject *__pyx_kp_s_proteus_mprans_cMoveMeshMonitor;
3164 static PyObject *__pyx_n_s_pyCheckOwnedVariable;
3165 static PyObject *__pyx_n_s_pyx_PickleError;
3166 static PyObject *__pyx_n_s_pyx_checksum;
3167 static PyObject *__pyx_n_s_pyx_getbuffer;
3168 static PyObject *__pyx_n_s_pyx_result;
3169 static PyObject *__pyx_n_s_pyx_state;
3170 static PyObject *__pyx_n_s_pyx_type;
3171 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
3172 static PyObject *__pyx_n_s_pyx_vtable;
3173 static PyObject *__pyx_n_s_q;
3174 static PyObject *__pyx_n_s_r;
3175 static PyObject *__pyx_n_s_range;
3176 static PyObject *__pyx_n_s_rank;
3177 static PyObject *__pyx_n_s_recoveryAtNodes;
3178 static PyObject *__pyx_n_s_recoveryAtNodesWeighted;
3179 static PyObject *__pyx_n_s_reduce;
3180 static PyObject *__pyx_n_s_reduce_cython;
3181 static PyObject *__pyx_n_s_reduce_ex;
3182 static PyObject *__pyx_n_s_root;
3183 static PyObject *__pyx_kp_u_s;
3184 static PyObject *__pyx_n_s_scalars;
3185 static PyObject *__pyx_n_s_send;
3186 static PyObject *__pyx_n_s_setstate;
3187 static PyObject *__pyx_n_s_setstate_cython;
3188 static PyObject *__pyx_n_s_shape;
3189 static PyObject *__pyx_n_s_simultaneous;
3190 static PyObject *__pyx_n_s_size;
3191 static PyObject *__pyx_n_s_smoothBoundaries;
3192 static PyObject *__pyx_n_s_smoothNodesLaplace;
3193 static PyObject *__pyx_n_s_start;
3194 static PyObject *__pyx_n_s_step;
3195 static PyObject *__pyx_n_s_stop;
3196 static PyObject *__pyx_kp_s_strided_and_direct;
3197 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
3198 static PyObject *__pyx_kp_s_strided_and_indirect;
3199 static PyObject *__pyx_kp_s_stringsource;
3200 static PyObject *__pyx_n_s_struct;
3201 static PyObject *__pyx_n_s_t;
3202 static PyObject *__pyx_n_s_t_max;
3203 static PyObject *__pyx_n_s_t_min;
3204 static PyObject *__pyx_n_s_test;
3205 static PyObject *__pyx_n_s_throw;
3206 static PyObject *__pyx_n_s_tompi4py;
3207 static PyObject *__pyx_kp_s_type_should_be_1;
3208 static PyObject *__pyx_n_s_u;
3209 static PyObject *__pyx_n_s_uOfXTatQuadrature;
3210 static PyObject *__pyx_n_s_u_phi;
3211 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
3212 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
3213 static PyObject *__pyx_n_s_unpack;
3214 static PyObject *__pyx_n_s_update;
3215 static PyObject *__pyx_n_s_variableNumbering_subdomain2glob;
3216 static PyObject *__pyx_n_s_variableOffsets_subdomain_owned;
3217 static PyObject *__pyx_n_s_variable_nb_local;
3218 static PyObject *__pyx_n_s_x;
3219 static PyObject *__pyx_n_s_xrange;
3220 static PyObject *__pyx_n_s_xx;
3221 static PyObject *__pyx_n_s_zeros;
3222 static int __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients___cinit__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3223 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_2attachPyCoefficients(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, PyObject *__pyx_v_pyCoefficients); /* proto */
3224 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_4preStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3225 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_6postStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3226 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_8pseudoTimeStepping(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, PyObject *__pyx_v_xx, PyObject *__pyx_v_eps); /* proto */
3227 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_genexpr(PyObject *__pyx_self); /* proto */
3228 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_3genexpr(PyObject *__pyx_self); /* proto */
3229 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_6genexpr(PyObject *__pyx_self); /* proto */
3230 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_9genexpr(PyObject *__pyx_self); /* proto */
3231 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_14pyCoefficients___get__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3232 static int __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_14pyCoefficients_2__set__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3233 static int __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_14pyCoefficients_4__del__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3234 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_1C___get__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3235 static int __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_1C_2__set__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
3236 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self); /* proto */
3237 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3238 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_recoveryAtNodes(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_scalars, __Pyx_memviewslice __pyx_v_nodeElementsArray, __Pyx_memviewslice __pyx_v_nodeElementOffsets); /* proto */
3239 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_2recoveryAtNodesWeighted(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_scalars, __Pyx_memviewslice __pyx_v_nodeElementsArray, __Pyx_memviewslice __pyx_v_nodeElementOffsets, __Pyx_memviewslice __pyx_v_detJ_array, int __pyx_v_nNodes); /* proto */
3240 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_4gradientRecoveryAtNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_grads, PyObject *__pyx_v_nodeElementsArray, PyObject *__pyx_v_nodeElementOffsets, PyObject *__pyx_v_nd); /* proto */
3241 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_6gradientRecoveryAtNodesWeighted(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_grads, __Pyx_memviewslice __pyx_v_nodeElementsArray, __Pyx_memviewslice __pyx_v_nodeElementOffsets, __Pyx_memviewslice __pyx_v_detJ_array, int __pyx_v_nd); /* proto */
3242 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_8pyCheckOwnedVariable(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_variable_nb_local, int __pyx_v_rank, int __pyx_v_nVariables_owned, __Pyx_memviewslice __pyx_v_variableNumbering_subdomain2global, __Pyx_memviewslice __pyx_v_variableOffsets_subdomain_owned); /* proto */
3243 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 */
3244 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 */
3245 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3246 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3247 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3248 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
3249 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
3250 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 */
3251 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
3252 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 */
3253 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3254 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3255 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3256 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3257 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 */
3258 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3259 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
3260 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 */
3261 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 */
3262 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3263 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3264 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3265 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3266 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3267 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3268 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3269 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3270 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3271 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3272 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3273 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3274 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3275 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3276 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3277 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3278 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3279 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 */
3280 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3281 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3282 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3283 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 */
3284 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 */
3285 static PyObject *__pyx_tp_new_6mprans_16cMoveMeshMonitor_cCoefficients(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3286 static PyObject *__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3287 static PyObject *__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3288 static PyObject *__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3289 static PyObject *__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3290 static PyObject *__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3291 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3292 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3293 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3294 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3295 static PyObject *__pyx_float_0_;
3296 static PyObject *__pyx_float_1_;
3297 static PyObject *__pyx_int_0;
3298 static PyObject *__pyx_int_1;
3299 static PyObject *__pyx_int_3;
3300 static PyObject *__pyx_int_15;
3301 static PyObject *__pyx_int_112105877;
3302 static PyObject *__pyx_int_136983863;
3303 static PyObject *__pyx_int_184977713;
3304 static PyObject *__pyx_int_neg_1;
3305 static PyObject *__pyx_tuple_;
3306 static PyObject *__pyx_slice__4;
3307 static PyObject *__pyx_tuple__2;
3308 static PyObject *__pyx_tuple__3;
3309 static PyObject *__pyx_tuple__5;
3310 static PyObject *__pyx_tuple__6;
3311 static PyObject *__pyx_tuple__7;
3312 static PyObject *__pyx_tuple__8;
3313 static PyObject *__pyx_tuple__9;
3314 static PyObject *__pyx_slice__26;
3315 static PyObject *__pyx_tuple__10;
3316 static PyObject *__pyx_tuple__11;
3317 static PyObject *__pyx_tuple__12;
3318 static PyObject *__pyx_tuple__13;
3319 static PyObject *__pyx_tuple__14;
3320 static PyObject *__pyx_tuple__15;
3321 static PyObject *__pyx_tuple__16;
3322 static PyObject *__pyx_tuple__17;
3323 static PyObject *__pyx_tuple__18;
3324 static PyObject *__pyx_tuple__19;
3325 static PyObject *__pyx_tuple__20;
3326 static PyObject *__pyx_tuple__21;
3327 static PyObject *__pyx_tuple__22;
3328 static PyObject *__pyx_tuple__23;
3329 static PyObject *__pyx_tuple__24;
3330 static PyObject *__pyx_tuple__25;
3331 static PyObject *__pyx_tuple__27;
3332 static PyObject *__pyx_tuple__28;
3333 static PyObject *__pyx_tuple__29;
3334 static PyObject *__pyx_tuple__30;
3335 static PyObject *__pyx_tuple__36;
3336 static PyObject *__pyx_tuple__38;
3337 static PyObject *__pyx_tuple__40;
3338 static PyObject *__pyx_tuple__42;
3339 static PyObject *__pyx_tuple__44;
3340 static PyObject *__pyx_tuple__46;
3341 static PyObject *__pyx_tuple__47;
3342 static PyObject *__pyx_tuple__48;
3343 static PyObject *__pyx_tuple__49;
3344 static PyObject *__pyx_tuple__50;
3345 static PyObject *__pyx_tuple__51;
3346 static PyObject *__pyx_codeobj__37;
3347 static PyObject *__pyx_codeobj__39;
3348 static PyObject *__pyx_codeobj__41;
3349 static PyObject *__pyx_codeobj__43;
3350 static PyObject *__pyx_codeobj__45;
3351 static PyObject *__pyx_codeobj__52;
3352 /* Late includes */
3353 
3354 /* "mprans/cMoveMeshMonitor.pyx":20
3355  * double C
3356  *
3357  * def __cinit__(self): # <<<<<<<<<<<<<<
3358  * self.C = 1.
3359  *
3360  */
3361 
3362 /* Python wrapper */
3363 static int __pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3364 static int __pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3365  int __pyx_r;
3366  __Pyx_RefNannyDeclarations
3367  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
3368  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
3369  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
3370  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
3371  __pyx_r = __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients___cinit__(((struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self));
3372 
3373  /* function exit code */
3374  __Pyx_RefNannyFinishContext();
3375  return __pyx_r;
3376 }
3377 
3378 static int __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients___cinit__(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self) {
3379  int __pyx_r;
3380  __Pyx_RefNannyDeclarations
3381  __Pyx_RefNannySetupContext("__cinit__", 0);
3382 
3383  /* "mprans/cMoveMeshMonitor.pyx":21
3384  *
3385  * def __cinit__(self):
3386  * self.C = 1. # <<<<<<<<<<<<<<
3387  *
3388  * def attachPyCoefficients(self,
3389  */
3390  __pyx_v_self->C = 1.;
3391 
3392  /* "mprans/cMoveMeshMonitor.pyx":20
3393  * double C
3394  *
3395  * def __cinit__(self): # <<<<<<<<<<<<<<
3396  * self.C = 1.
3397  *
3398  */
3399 
3400  /* function exit code */
3401  __pyx_r = 0;
3402  __Pyx_RefNannyFinishContext();
3403  return __pyx_r;
3404 }
3405 
3406 /* "mprans/cMoveMeshMonitor.pyx":23
3407  * self.C = 1.
3408  *
3409  * def attachPyCoefficients(self, # <<<<<<<<<<<<<<
3410  * object pyCoefficients):
3411  * self.pyCoefficients = pyCoefficients
3412  */
3413 
3414 /* Python wrapper */
3415 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_3attachPyCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_v_pyCoefficients); /*proto*/
3416 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_3attachPyCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_v_pyCoefficients) {
3417  PyObject *__pyx_r = 0;
3418  __Pyx_RefNannyDeclarations
3419  __Pyx_RefNannySetupContext("attachPyCoefficients (wrapper)", 0);
3420  __pyx_r = __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_2attachPyCoefficients(((struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self), ((PyObject *)__pyx_v_pyCoefficients));
3421 
3422  /* function exit code */
3423  __Pyx_RefNannyFinishContext();
3424  return __pyx_r;
3425 }
3426 
3427 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_2attachPyCoefficients(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, PyObject *__pyx_v_pyCoefficients) {
3428  PyObject *__pyx_r = NULL;
3429  __Pyx_RefNannyDeclarations
3430  __Pyx_RefNannySetupContext("attachPyCoefficients", 0);
3431 
3432  /* "mprans/cMoveMeshMonitor.pyx":25
3433  * def attachPyCoefficients(self,
3434  * object pyCoefficients):
3435  * self.pyCoefficients = pyCoefficients # <<<<<<<<<<<<<<
3436  *
3437  * def preStep(self):
3438  */
3439  __Pyx_INCREF(__pyx_v_pyCoefficients);
3440  __Pyx_GIVEREF(__pyx_v_pyCoefficients);
3441  __Pyx_GOTREF(__pyx_v_self->pyCoefficients);
3442  __Pyx_DECREF(__pyx_v_self->pyCoefficients);
3443  __pyx_v_self->pyCoefficients = __pyx_v_pyCoefficients;
3444 
3445  /* "mprans/cMoveMeshMonitor.pyx":23
3446  * self.C = 1.
3447  *
3448  * def attachPyCoefficients(self, # <<<<<<<<<<<<<<
3449  * object pyCoefficients):
3450  * self.pyCoefficients = pyCoefficients
3451  */
3452 
3453  /* function exit code */
3454  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3455  __Pyx_XGIVEREF(__pyx_r);
3456  __Pyx_RefNannyFinishContext();
3457  return __pyx_r;
3458 }
3459 
3460 /* "mprans/cMoveMeshMonitor.pyx":27
3461  * self.pyCoefficients = pyCoefficients
3462  *
3463  * def preStep(self): # <<<<<<<<<<<<<<
3464  * pc = self.pyCoefficients
3465  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature,
3466  */
3467 
3468 /* Python wrapper */
3469 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_5preStep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3470 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_5preStep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3471  PyObject *__pyx_r = 0;
3472  __Pyx_RefNannyDeclarations
3473  __Pyx_RefNannySetupContext("preStep (wrapper)", 0);
3474  __pyx_r = __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_4preStep(((struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self));
3475 
3476  /* function exit code */
3477  __Pyx_RefNannyFinishContext();
3478  return __pyx_r;
3479 }
3480 
3481 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_4preStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self) {
3482  PyObject *__pyx_v_pc = NULL;
3483  PyObject *__pyx_r = NULL;
3484  __Pyx_RefNannyDeclarations
3485  PyObject *__pyx_t_1 = NULL;
3486  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
3487  PyObject *__pyx_t_3 = NULL;
3488  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
3489  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
3490  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
3491  __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
3492  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
3493  int __pyx_t_9;
3494  int __pyx_lineno = 0;
3495  const char *__pyx_filename = NULL;
3496  int __pyx_clineno = 0;
3497  __Pyx_RefNannySetupContext("preStep", 0);
3498 
3499  /* "mprans/cMoveMeshMonitor.pyx":28
3500  *
3501  * def preStep(self):
3502  * pc = self.pyCoefficients # <<<<<<<<<<<<<<
3503  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature,
3504  * q_J=pc.model.q['abs(det(J))'],
3505  */
3506  __pyx_t_1 = __pyx_v_self->pyCoefficients;
3507  __Pyx_INCREF(__pyx_t_1);
3508  __pyx_v_pc = __pyx_t_1;
3509  __pyx_t_1 = 0;
3510 
3511  /* "mprans/cMoveMeshMonitor.pyx":29
3512  * def preStep(self):
3513  * pc = self.pyCoefficients
3514  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature, # <<<<<<<<<<<<<<
3515  * q_J=pc.model.q['abs(det(J))'],
3516  * q_weights=pc.model.elementQuadratureWeights[('u', 0)],
3517  */
3518  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_uOfXTatQuadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
3519  __Pyx_GOTREF(__pyx_t_1);
3520  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 29, __pyx_L1_error)
3521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3522 
3523  /* "mprans/cMoveMeshMonitor.pyx":30
3524  * pc = self.pyCoefficients
3525  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature,
3526  * q_J=pc.model.q['abs(det(J))'], # <<<<<<<<<<<<<<
3527  * q_weights=pc.model.elementQuadratureWeights[('u', 0)],
3528  * areas_=pc.areas,
3529  */
3530  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
3531  __Pyx_GOTREF(__pyx_t_1);
3532  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_q); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
3533  __Pyx_GOTREF(__pyx_t_3);
3534  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3535  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_kp_s_abs_det_J); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
3536  __Pyx_GOTREF(__pyx_t_1);
3537  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3538  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 30, __pyx_L1_error)
3539  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3540 
3541  /* "mprans/cMoveMeshMonitor.pyx":31
3542  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature,
3543  * q_J=pc.model.q['abs(det(J))'],
3544  * q_weights=pc.model.elementQuadratureWeights[('u', 0)], # <<<<<<<<<<<<<<
3545  * areas_=pc.areas,
3546  * q_rci=pc.model.q[('r', 0)],
3547  */
3548  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
3549  __Pyx_GOTREF(__pyx_t_1);
3550  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)
3551  __Pyx_GOTREF(__pyx_t_3);
3552  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3553  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
3554  __Pyx_GOTREF(__pyx_t_1);
3555  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3556  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 31, __pyx_L1_error)
3557  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3558 
3559  /* "mprans/cMoveMeshMonitor.pyx":32
3560  * q_J=pc.model.q['abs(det(J))'],
3561  * q_weights=pc.model.elementQuadratureWeights[('u', 0)],
3562  * areas_=pc.areas, # <<<<<<<<<<<<<<
3563  * q_rci=pc.model.q[('r', 0)],
3564  * q_fci=pc.model.q[('f', 0)],
3565  */
3566  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_areas); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
3567  __Pyx_GOTREF(__pyx_t_1);
3568  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 32, __pyx_L1_error)
3569  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3570 
3571  /* "mprans/cMoveMeshMonitor.pyx":33
3572  * q_weights=pc.model.elementQuadratureWeights[('u', 0)],
3573  * areas_=pc.areas,
3574  * q_rci=pc.model.q[('r', 0)], # <<<<<<<<<<<<<<
3575  * q_fci=pc.model.q[('f', 0)],
3576  * nElements_owned=pc.mesh.nElements_owned)
3577  */
3578  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
3579  __Pyx_GOTREF(__pyx_t_1);
3580  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_q); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
3581  __Pyx_GOTREF(__pyx_t_3);
3582  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3583  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
3584  __Pyx_GOTREF(__pyx_t_1);
3585  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3586  __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 33, __pyx_L1_error)
3587  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3588 
3589  /* "mprans/cMoveMeshMonitor.pyx":34
3590  * areas_=pc.areas,
3591  * q_rci=pc.model.q[('r', 0)],
3592  * q_fci=pc.model.q[('f', 0)], # <<<<<<<<<<<<<<
3593  * nElements_owned=pc.mesh.nElements_owned)
3594  *
3595  */
3596  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
3597  __Pyx_GOTREF(__pyx_t_1);
3598  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_q); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
3599  __Pyx_GOTREF(__pyx_t_3);
3600  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3601  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
3602  __Pyx_GOTREF(__pyx_t_1);
3603  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3604  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 34, __pyx_L1_error)
3605  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3606 
3607  /* "mprans/cMoveMeshMonitor.pyx":35
3608  * q_rci=pc.model.q[('r', 0)],
3609  * q_fci=pc.model.q[('f', 0)],
3610  * nElements_owned=pc.mesh.nElements_owned) # <<<<<<<<<<<<<<
3611  *
3612  * cdef cppPreStep(self,
3613  */
3614  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
3615  __Pyx_GOTREF(__pyx_t_1);
3616  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nElements_owned); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
3617  __Pyx_GOTREF(__pyx_t_3);
3618  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3619  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 35, __pyx_L1_error)
3620  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3621 
3622  /* "mprans/cMoveMeshMonitor.pyx":29
3623  * def preStep(self):
3624  * pc = self.pyCoefficients
3625  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature, # <<<<<<<<<<<<<<
3626  * q_J=pc.model.q['abs(det(J))'],
3627  * q_weights=pc.model.elementQuadratureWeights[('u', 0)],
3628  */
3629  __pyx_t_3 = ((struct __pyx_vtabstruct_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self->__pyx_vtab)->cppPreStep(__pyx_v_self, __pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
3630  __Pyx_GOTREF(__pyx_t_3);
3631  __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
3632  __pyx_t_2.memview = NULL;
3633  __pyx_t_2.data = NULL;
3634  __PYX_XDEC_MEMVIEW(&__pyx_t_4, 1);
3635  __pyx_t_4.memview = NULL;
3636  __pyx_t_4.data = NULL;
3637  __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
3638  __pyx_t_5.memview = NULL;
3639  __pyx_t_5.data = NULL;
3640  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
3641  __pyx_t_6.memview = NULL;
3642  __pyx_t_6.data = NULL;
3643  __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
3644  __pyx_t_7.memview = NULL;
3645  __pyx_t_7.data = NULL;
3646  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
3647  __pyx_t_8.memview = NULL;
3648  __pyx_t_8.data = NULL;
3649  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3650 
3651  /* "mprans/cMoveMeshMonitor.pyx":27
3652  * self.pyCoefficients = pyCoefficients
3653  *
3654  * def preStep(self): # <<<<<<<<<<<<<<
3655  * pc = self.pyCoefficients
3656  * self.cppPreStep(q_uOfX=pc.uOfXTatQuadrature,
3657  */
3658 
3659  /* function exit code */
3660  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3661  goto __pyx_L0;
3662  __pyx_L1_error:;
3663  __Pyx_XDECREF(__pyx_t_1);
3664  __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
3665  __Pyx_XDECREF(__pyx_t_3);
3666  __PYX_XDEC_MEMVIEW(&__pyx_t_4, 1);
3667  __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
3668  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
3669  __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
3670  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
3671  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.preStep", __pyx_clineno, __pyx_lineno, __pyx_filename);
3672  __pyx_r = NULL;
3673  __pyx_L0:;
3674  __Pyx_XDECREF(__pyx_v_pc);
3675  __Pyx_XGIVEREF(__pyx_r);
3676  __Pyx_RefNannyFinishContext();
3677  return __pyx_r;
3678 }
3679 
3680 /* "mprans/cMoveMeshMonitor.pyx":37
3681  * nElements_owned=pc.mesh.nElements_owned)
3682  *
3683  * cdef cppPreStep(self, # <<<<<<<<<<<<<<
3684  * double[:,:] q_uOfX,
3685  * double[:,:] q_J,
3686  */
3687 
3688 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_13cCoefficients_cppPreStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, __Pyx_memviewslice __pyx_v_q_uOfX, __Pyx_memviewslice __pyx_v_q_J, __Pyx_memviewslice __pyx_v_q_weights, __Pyx_memviewslice __pyx_v_areas_, __Pyx_memviewslice __pyx_v_q_rci, __Pyx_memviewslice __pyx_v_q_fci, int __pyx_v_nElements_owned) {
3689  double __pyx_v_integral_1_over_f;
3690  CYTHON_UNUSED int __pyx_v_N_eN;
3691  int __pyx_v_nE;
3692  double __pyx_v_area;
3693  int __pyx_v_nJ;
3694  int __pyx_v_nk;
3695  int __pyx_v_eN;
3696  int __pyx_v_k;
3697  PyObject *__pyx_v_comm = NULL;
3698  double __pyx_v_C;
3699  int __pyx_v_nrci;
3700  PyObject *__pyx_v_pc = 0;
3701  PyObject *__pyx_v_mesh = 0;
3702  int __pyx_v_nd;
3703  __Pyx_memviewslice __pyx_v_elementBoundaryBarycentersArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3704  __Pyx_memviewslice __pyx_v_elementBarycentersArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3705  __Pyx_memviewslice __pyx_v_nodeArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3706  __Pyx_memviewslice __pyx_v_elementBoundaryNodesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3707  __Pyx_memviewslice __pyx_v_elementNodesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3708  __Pyx_memviewslice __pyx_v_elementBoundariesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3709  int __pyx_v_nElementBoundaries_global;
3710  int __pyx_v_nNodes_elementBoundary;
3711  int __pyx_v_nElements_global;
3712  int __pyx_v_nNodes_element;
3713  __Pyx_memviewslice __pyx_v_elementBoundaryNormalsArray = { 0, 0, { 0 }, { 0 }, { 0 } };
3714  int __pyx_v_ebN;
3715  int __pyx_v_nN;
3716  PyObject *__pyx_r = NULL;
3717  __Pyx_RefNannyDeclarations
3718  size_t __pyx_t_1;
3719  int __pyx_t_2;
3720  int __pyx_t_3;
3721  int __pyx_t_4;
3722  int __pyx_t_5;
3723  int __pyx_t_6;
3724  int __pyx_t_7;
3725  Py_ssize_t __pyx_t_8;
3726  Py_ssize_t __pyx_t_9;
3727  Py_ssize_t __pyx_t_10;
3728  int __pyx_t_11;
3729  Py_ssize_t __pyx_t_12;
3730  Py_ssize_t __pyx_t_13;
3731  PyObject *__pyx_t_14 = NULL;
3732  PyObject *__pyx_t_15 = NULL;
3733  PyObject *__pyx_t_16 = NULL;
3734  PyObject *__pyx_t_17 = NULL;
3735  PyObject *__pyx_t_18 = NULL;
3736  double __pyx_t_19;
3737  __Pyx_memviewslice __pyx_t_20 = { 0, 0, { 0 }, { 0 }, { 0 } };
3738  __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } };
3739  __Pyx_memviewslice __pyx_t_22 = { 0, 0, { 0 }, { 0 }, { 0 } };
3740  __Pyx_memviewslice __pyx_t_23 = { 0, 0, { 0 }, { 0 }, { 0 } };
3741  Py_ssize_t __pyx_t_24;
3742  int __pyx_lineno = 0;
3743  const char *__pyx_filename = NULL;
3744  int __pyx_clineno = 0;
3745  __Pyx_RefNannySetupContext("cppPreStep", 0);
3746 
3747  /* "mprans/cMoveMeshMonitor.pyx":45
3748  * double[:, :, :] q_fci,
3749  * int nElements_owned):
3750  * cdef double integral_1_over_f = 0. # <<<<<<<<<<<<<<
3751  * cdef int N_eN = q_J.shape[0]
3752  * cdef int nE = 0
3753  */
3754  __pyx_v_integral_1_over_f = 0.;
3755 
3756  /* "mprans/cMoveMeshMonitor.pyx":46
3757  * int nElements_owned):
3758  * cdef double integral_1_over_f = 0.
3759  * cdef int N_eN = q_J.shape[0] # <<<<<<<<<<<<<<
3760  * cdef int nE = 0
3761  * cdef double area = 0
3762  */
3763  __pyx_v_N_eN = (__pyx_v_q_J.shape[0]);
3764 
3765  /* "mprans/cMoveMeshMonitor.pyx":47
3766  * cdef double integral_1_over_f = 0.
3767  * cdef int N_eN = q_J.shape[0]
3768  * cdef int nE = 0 # <<<<<<<<<<<<<<
3769  * cdef double area = 0
3770  * cdef int nJ = len(q_J)
3771  */
3772  __pyx_v_nE = 0;
3773 
3774  /* "mprans/cMoveMeshMonitor.pyx":48
3775  * cdef int N_eN = q_J.shape[0]
3776  * cdef int nE = 0
3777  * cdef double area = 0 # <<<<<<<<<<<<<<
3778  * cdef int nJ = len(q_J)
3779  * cdef int nk = len(q_weights)
3780  */
3781  __pyx_v_area = 0.0;
3782 
3783  /* "mprans/cMoveMeshMonitor.pyx":49
3784  * cdef int nE = 0
3785  * cdef double area = 0
3786  * cdef int nJ = len(q_J) # <<<<<<<<<<<<<<
3787  * cdef int nk = len(q_weights)
3788  * for eN in xrange(nJ):
3789  */
3790  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_q_J);
3791  __pyx_v_nJ = __pyx_t_1;
3792 
3793  /* "mprans/cMoveMeshMonitor.pyx":50
3794  * cdef double area = 0
3795  * cdef int nJ = len(q_J)
3796  * cdef int nk = len(q_weights) # <<<<<<<<<<<<<<
3797  * for eN in xrange(nJ):
3798  * area = 0
3799  */
3800  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_q_weights);
3801  __pyx_v_nk = __pyx_t_1;
3802 
3803  /* "mprans/cMoveMeshMonitor.pyx":51
3804  * cdef int nJ = len(q_J)
3805  * cdef int nk = len(q_weights)
3806  * for eN in xrange(nJ): # <<<<<<<<<<<<<<
3807  * area = 0
3808  * for k in xrange(nk):
3809  */
3810  __pyx_t_2 = __pyx_v_nJ;
3811  __pyx_t_3 = __pyx_t_2;
3812  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
3813  __pyx_v_eN = __pyx_t_4;
3814 
3815  /* "mprans/cMoveMeshMonitor.pyx":52
3816  * cdef int nk = len(q_weights)
3817  * for eN in xrange(nJ):
3818  * area = 0 # <<<<<<<<<<<<<<
3819  * for k in xrange(nk):
3820  * area += q_J[eN, k]*q_weights[k]
3821  */
3822  __pyx_v_area = 0.0;
3823 
3824  /* "mprans/cMoveMeshMonitor.pyx":53
3825  * for eN in xrange(nJ):
3826  * area = 0
3827  * for k in xrange(nk): # <<<<<<<<<<<<<<
3828  * area += q_J[eN, k]*q_weights[k]
3829  * if eN < nElements_owned:
3830  */
3831  __pyx_t_5 = __pyx_v_nk;
3832  __pyx_t_6 = __pyx_t_5;
3833  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
3834  __pyx_v_k = __pyx_t_7;
3835 
3836  /* "mprans/cMoveMeshMonitor.pyx":54
3837  * area = 0
3838  * for k in xrange(nk):
3839  * area += q_J[eN, k]*q_weights[k] # <<<<<<<<<<<<<<
3840  * if eN < nElements_owned:
3841  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k]
3842  */
3843  __pyx_t_8 = __pyx_v_eN;
3844  __pyx_t_9 = __pyx_v_k;
3845  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_q_J.shape[0];
3846  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_q_J.shape[1];
3847  __pyx_t_10 = __pyx_v_k;
3848  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_q_weights.shape[0];
3849  __pyx_v_area = (__pyx_v_area + ((*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q_J.data + __pyx_t_8 * __pyx_v_q_J.strides[0]) ) + __pyx_t_9 * __pyx_v_q_J.strides[1]) ))) * (*((double *) ( /* dim=0 */ (__pyx_v_q_weights.data + __pyx_t_10 * __pyx_v_q_weights.strides[0]) )))));
3850 
3851  /* "mprans/cMoveMeshMonitor.pyx":55
3852  * for k in xrange(nk):
3853  * area += q_J[eN, k]*q_weights[k]
3854  * if eN < nElements_owned: # <<<<<<<<<<<<<<
3855  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k]
3856  * areas_[eN] = area
3857  */
3858  __pyx_t_11 = ((__pyx_v_eN < __pyx_v_nElements_owned) != 0);
3859  if (__pyx_t_11) {
3860 
3861  /* "mprans/cMoveMeshMonitor.pyx":56
3862  * area += q_J[eN, k]*q_weights[k]
3863  * if eN < nElements_owned:
3864  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k] # <<<<<<<<<<<<<<
3865  * areas_[eN] = area
3866  * if eN < nElements_owned:
3867  */
3868  __pyx_t_10 = __pyx_v_eN;
3869  __pyx_t_9 = __pyx_v_k;
3870  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_q_J.shape[0];
3871  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_q_J.shape[1];
3872  __pyx_t_8 = __pyx_v_k;
3873  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_q_weights.shape[0];
3874  __pyx_t_12 = __pyx_v_eN;
3875  __pyx_t_13 = __pyx_v_k;
3876  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_q_uOfX.shape[0];
3877  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_q_uOfX.shape[1];
3878  __pyx_v_integral_1_over_f = (__pyx_v_integral_1_over_f + (((*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q_J.data + __pyx_t_10 * __pyx_v_q_J.strides[0]) ) + __pyx_t_9 * __pyx_v_q_J.strides[1]) ))) * (*((double *) ( /* dim=0 */ (__pyx_v_q_weights.data + __pyx_t_8 * __pyx_v_q_weights.strides[0]) )))) / (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q_uOfX.data + __pyx_t_12 * __pyx_v_q_uOfX.strides[0]) ) + __pyx_t_13 * __pyx_v_q_uOfX.strides[1]) )))));
3879 
3880  /* "mprans/cMoveMeshMonitor.pyx":55
3881  * for k in xrange(nk):
3882  * area += q_J[eN, k]*q_weights[k]
3883  * if eN < nElements_owned: # <<<<<<<<<<<<<<
3884  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k]
3885  * areas_[eN] = area
3886  */
3887  }
3888  }
3889 
3890  /* "mprans/cMoveMeshMonitor.pyx":57
3891  * if eN < nElements_owned:
3892  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k]
3893  * areas_[eN] = area # <<<<<<<<<<<<<<
3894  * if eN < nElements_owned:
3895  * nE += 1
3896  */
3897  __pyx_t_13 = __pyx_v_eN;
3898  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_areas_.shape[0];
3899  *((double *) ( /* dim=0 */ (__pyx_v_areas_.data + __pyx_t_13 * __pyx_v_areas_.strides[0]) )) = __pyx_v_area;
3900 
3901  /* "mprans/cMoveMeshMonitor.pyx":58
3902  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k]
3903  * areas_[eN] = area
3904  * if eN < nElements_owned: # <<<<<<<<<<<<<<
3905  * nE += 1
3906  * comm = Comm.get().comm.tompi4py()
3907  */
3908  __pyx_t_11 = ((__pyx_v_eN < __pyx_v_nElements_owned) != 0);
3909  if (__pyx_t_11) {
3910 
3911  /* "mprans/cMoveMeshMonitor.pyx":59
3912  * areas_[eN] = area
3913  * if eN < nElements_owned:
3914  * nE += 1 # <<<<<<<<<<<<<<
3915  * comm = Comm.get().comm.tompi4py()
3916  * if comm.size > 1:
3917  */
3918  __pyx_v_nE = (__pyx_v_nE + 1);
3919 
3920  /* "mprans/cMoveMeshMonitor.pyx":58
3921  * integral_1_over_f += q_J[eN, k]*q_weights[k]/q_uOfX[eN, k]
3922  * areas_[eN] = area
3923  * if eN < nElements_owned: # <<<<<<<<<<<<<<
3924  * nE += 1
3925  * comm = Comm.get().comm.tompi4py()
3926  */
3927  }
3928  }
3929 
3930  /* "mprans/cMoveMeshMonitor.pyx":60
3931  * if eN < nElements_owned:
3932  * nE += 1
3933  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
3934  * if comm.size > 1:
3935  * integral_1_over_f = comm.allreduce(integral_1_over_f, op=MPI.SUM)
3936  */
3937  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_Comm); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 60, __pyx_L1_error)
3938  __Pyx_GOTREF(__pyx_t_16);
3939  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_get); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 60, __pyx_L1_error)
3940  __Pyx_GOTREF(__pyx_t_17);
3941  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3942  __pyx_t_16 = NULL;
3943  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
3944  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
3945  if (likely(__pyx_t_16)) {
3946  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
3947  __Pyx_INCREF(__pyx_t_16);
3948  __Pyx_INCREF(function);
3949  __Pyx_DECREF_SET(__pyx_t_17, function);
3950  }
3951  }
3952  __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_16) : __Pyx_PyObject_CallNoArg(__pyx_t_17);
3953  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3954  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 60, __pyx_L1_error)
3955  __Pyx_GOTREF(__pyx_t_15);
3956  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
3957  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_comm); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 60, __pyx_L1_error)
3958  __Pyx_GOTREF(__pyx_t_17);
3959  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3960  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 60, __pyx_L1_error)
3961  __Pyx_GOTREF(__pyx_t_15);
3962  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
3963  __pyx_t_17 = NULL;
3964  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
3965  __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
3966  if (likely(__pyx_t_17)) {
3967  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
3968  __Pyx_INCREF(__pyx_t_17);
3969  __Pyx_INCREF(function);
3970  __Pyx_DECREF_SET(__pyx_t_15, function);
3971  }
3972  }
3973  __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
3974  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
3975  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 60, __pyx_L1_error)
3976  __Pyx_GOTREF(__pyx_t_14);
3977  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3978  __pyx_v_comm = __pyx_t_14;
3979  __pyx_t_14 = 0;
3980 
3981  /* "mprans/cMoveMeshMonitor.pyx":61
3982  * nE += 1
3983  * comm = Comm.get().comm.tompi4py()
3984  * if comm.size > 1: # <<<<<<<<<<<<<<
3985  * integral_1_over_f = comm.allreduce(integral_1_over_f, op=MPI.SUM)
3986  * nE = comm.allreduce(nE, op=MPI.SUM)
3987  */
3988  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_size); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 61, __pyx_L1_error)
3989  __Pyx_GOTREF(__pyx_t_14);
3990  __pyx_t_15 = PyObject_RichCompare(__pyx_t_14, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 61, __pyx_L1_error)
3991  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3992  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 61, __pyx_L1_error)
3993  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3994  if (__pyx_t_11) {
3995 
3996  /* "mprans/cMoveMeshMonitor.pyx":62
3997  * comm = Comm.get().comm.tompi4py()
3998  * if comm.size > 1:
3999  * integral_1_over_f = comm.allreduce(integral_1_over_f, op=MPI.SUM) # <<<<<<<<<<<<<<
4000  * nE = comm.allreduce(nE, op=MPI.SUM)
4001  * cdef double C = integral_1_over_f/nE # update scaling coefficient
4002  */
4003  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_allreduce); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 62, __pyx_L1_error)
4004  __Pyx_GOTREF(__pyx_t_15);
4005  __pyx_t_14 = PyFloat_FromDouble(__pyx_v_integral_1_over_f); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 62, __pyx_L1_error)
4006  __Pyx_GOTREF(__pyx_t_14);
4007  __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 62, __pyx_L1_error)
4008  __Pyx_GOTREF(__pyx_t_17);
4009  __Pyx_GIVEREF(__pyx_t_14);
4010  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_14);
4011  __pyx_t_14 = 0;
4012  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 62, __pyx_L1_error)
4013  __Pyx_GOTREF(__pyx_t_14);
4014  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_MPI); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 62, __pyx_L1_error)
4015  __Pyx_GOTREF(__pyx_t_16);
4016  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_SUM); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 62, __pyx_L1_error)
4017  __Pyx_GOTREF(__pyx_t_18);
4018  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4019  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_op, __pyx_t_18) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
4020  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
4021  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, __pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 62, __pyx_L1_error)
4022  __Pyx_GOTREF(__pyx_t_18);
4023  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
4024  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
4025  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4026  __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_18); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L1_error)
4027  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
4028  __pyx_v_integral_1_over_f = __pyx_t_19;
4029 
4030  /* "mprans/cMoveMeshMonitor.pyx":63
4031  * if comm.size > 1:
4032  * integral_1_over_f = comm.allreduce(integral_1_over_f, op=MPI.SUM)
4033  * nE = comm.allreduce(nE, op=MPI.SUM) # <<<<<<<<<<<<<<
4034  * cdef double C = integral_1_over_f/nE # update scaling coefficient
4035  * self.C = C
4036  */
4037  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_allreduce); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 63, __pyx_L1_error)
4038  __Pyx_GOTREF(__pyx_t_18);
4039  __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_nE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 63, __pyx_L1_error)
4040  __Pyx_GOTREF(__pyx_t_14);
4041  __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 63, __pyx_L1_error)
4042  __Pyx_GOTREF(__pyx_t_17);
4043  __Pyx_GIVEREF(__pyx_t_14);
4044  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_14);
4045  __pyx_t_14 = 0;
4046  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 63, __pyx_L1_error)
4047  __Pyx_GOTREF(__pyx_t_14);
4048  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_MPI); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 63, __pyx_L1_error)
4049  __Pyx_GOTREF(__pyx_t_15);
4050  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_SUM); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 63, __pyx_L1_error)
4051  __Pyx_GOTREF(__pyx_t_16);
4052  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
4053  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_op, __pyx_t_16) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
4054  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4055  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_17, __pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 63, __pyx_L1_error)
4056  __Pyx_GOTREF(__pyx_t_16);
4057  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
4058  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
4059  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4060  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 63, __pyx_L1_error)
4061  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4062  __pyx_v_nE = __pyx_t_2;
4063 
4064  /* "mprans/cMoveMeshMonitor.pyx":61
4065  * nE += 1
4066  * comm = Comm.get().comm.tompi4py()
4067  * if comm.size > 1: # <<<<<<<<<<<<<<
4068  * integral_1_over_f = comm.allreduce(integral_1_over_f, op=MPI.SUM)
4069  * nE = comm.allreduce(nE, op=MPI.SUM)
4070  */
4071  }
4072 
4073  /* "mprans/cMoveMeshMonitor.pyx":64
4074  * integral_1_over_f = comm.allreduce(integral_1_over_f, op=MPI.SUM)
4075  * nE = comm.allreduce(nE, op=MPI.SUM)
4076  * cdef double C = integral_1_over_f/nE # update scaling coefficient # <<<<<<<<<<<<<<
4077  * self.C = C
4078  * cdef int nrci = len(q_rci)
4079  */
4080  __pyx_v_C = (__pyx_v_integral_1_over_f / __pyx_v_nE);
4081 
4082  /* "mprans/cMoveMeshMonitor.pyx":65
4083  * nE = comm.allreduce(nE, op=MPI.SUM)
4084  * cdef double C = integral_1_over_f/nE # update scaling coefficient
4085  * self.C = C # <<<<<<<<<<<<<<
4086  * cdef int nrci = len(q_rci)
4087  * for eN in range(nrci):
4088  */
4089  __pyx_v_self->C = __pyx_v_C;
4090 
4091  /* "mprans/cMoveMeshMonitor.pyx":66
4092  * cdef double C = integral_1_over_f/nE # update scaling coefficient
4093  * self.C = C
4094  * cdef int nrci = len(q_rci) # <<<<<<<<<<<<<<
4095  * for eN in range(nrci):
4096  * for k in range(nk):
4097  */
4098  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_q_rci);
4099  __pyx_v_nrci = __pyx_t_1;
4100 
4101  /* "mprans/cMoveMeshMonitor.pyx":67
4102  * self.C = C
4103  * cdef int nrci = len(q_rci)
4104  * for eN in range(nrci): # <<<<<<<<<<<<<<
4105  * for k in range(nk):
4106  * q_fci[eN, k, :] = 0.0
4107  */
4108  __pyx_t_2 = __pyx_v_nrci;
4109  __pyx_t_3 = __pyx_t_2;
4110  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
4111  __pyx_v_eN = __pyx_t_4;
4112 
4113  /* "mprans/cMoveMeshMonitor.pyx":68
4114  * cdef int nrci = len(q_rci)
4115  * for eN in range(nrci):
4116  * for k in range(nk): # <<<<<<<<<<<<<<
4117  * q_fci[eN, k, :] = 0.0
4118  * q_rci[eN, k] = -(1./(q_uOfX[eN, k]*C)-1./areas_[eN])
4119  */
4120  __pyx_t_5 = __pyx_v_nk;
4121  __pyx_t_6 = __pyx_t_5;
4122  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
4123  __pyx_v_k = __pyx_t_7;
4124 
4125  /* "mprans/cMoveMeshMonitor.pyx":69
4126  * for eN in range(nrci):
4127  * for k in range(nk):
4128  * q_fci[eN, k, :] = 0.0 # <<<<<<<<<<<<<<
4129  * q_rci[eN, k] = -(1./(q_uOfX[eN, k]*C)-1./areas_[eN])
4130  *
4131  */
4132  __pyx_t_20.data = __pyx_v_q_fci.data;
4133  __pyx_t_20.memview = __pyx_v_q_fci.memview;
4134  __PYX_INC_MEMVIEW(&__pyx_t_20, 0);
4135  {
4136  Py_ssize_t __pyx_tmp_idx = __pyx_v_eN;
4137  Py_ssize_t __pyx_tmp_shape = __pyx_v_q_fci.shape[0];
4138  Py_ssize_t __pyx_tmp_stride = __pyx_v_q_fci.strides[0];
4139  if (__pyx_tmp_idx < 0)
4140  __pyx_tmp_idx += __pyx_tmp_shape;
4141  __pyx_t_20.data += __pyx_tmp_idx * __pyx_tmp_stride;
4142 }
4143 
4144 {
4145  Py_ssize_t __pyx_tmp_idx = __pyx_v_k;
4146  Py_ssize_t __pyx_tmp_shape = __pyx_v_q_fci.shape[1];
4147  Py_ssize_t __pyx_tmp_stride = __pyx_v_q_fci.strides[1];
4148  if (__pyx_tmp_idx < 0)
4149  __pyx_tmp_idx += __pyx_tmp_shape;
4150  __pyx_t_20.data += __pyx_tmp_idx * __pyx_tmp_stride;
4151 }
4152 
4153 __pyx_t_20.shape[0] = __pyx_v_q_fci.shape[2];
4154 __pyx_t_20.strides[0] = __pyx_v_q_fci.strides[2];
4155  __pyx_t_20.suboffsets[0] = -1;
4156 
4157 {
4158  double __pyx_temp_scalar = 0.0;
4159  {
4160  Py_ssize_t __pyx_temp_extent_0 = __pyx_t_20.shape[0];
4161  Py_ssize_t __pyx_temp_stride_0 = __pyx_t_20.strides[0];
4162  char *__pyx_temp_pointer_0;
4163  Py_ssize_t __pyx_temp_idx_0;
4164  __pyx_temp_pointer_0 = __pyx_t_20.data;
4165  for (__pyx_temp_idx_0 = 0; __pyx_temp_idx_0 < __pyx_temp_extent_0; __pyx_temp_idx_0++) {
4166  *((double *) __pyx_temp_pointer_0) = __pyx_temp_scalar;
4167  __pyx_temp_pointer_0 += __pyx_temp_stride_0;
4168  }
4169  }
4170  }
4171  __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
4172  __pyx_t_20.memview = NULL;
4173  __pyx_t_20.data = NULL;
4174 
4175  /* "mprans/cMoveMeshMonitor.pyx":70
4176  * for k in range(nk):
4177  * q_fci[eN, k, :] = 0.0
4178  * q_rci[eN, k] = -(1./(q_uOfX[eN, k]*C)-1./areas_[eN]) # <<<<<<<<<<<<<<
4179  *
4180  * # update other element values
4181  */
4182  __pyx_t_13 = __pyx_v_eN;
4183  __pyx_t_12 = __pyx_v_k;
4184  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_q_uOfX.shape[0];
4185  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_q_uOfX.shape[1];
4186  __pyx_t_8 = __pyx_v_eN;
4187  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_areas_.shape[0];
4188  __pyx_t_9 = __pyx_v_eN;
4189  __pyx_t_10 = __pyx_v_k;
4190  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_q_rci.shape[0];
4191  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_q_rci.shape[1];
4192  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q_rci.data + __pyx_t_9 * __pyx_v_q_rci.strides[0]) ) + __pyx_t_10 * __pyx_v_q_rci.strides[1]) )) = (-((1. / ((*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q_uOfX.data + __pyx_t_13 * __pyx_v_q_uOfX.strides[0]) ) + __pyx_t_12 * __pyx_v_q_uOfX.strides[1]) ))) * __pyx_v_C)) - (1. / (*((double *) ( /* dim=0 */ (__pyx_v_areas_.data + __pyx_t_8 * __pyx_v_areas_.strides[0]) ))))));
4193  }
4194  }
4195 
4196  /* "mprans/cMoveMeshMonitor.pyx":73
4197  *
4198  * # update other element values
4199  * cdef object pc = self.pyCoefficients # <<<<<<<<<<<<<<
4200  * cdef object mesh = pc.mesh
4201  * cdef int nd = pc.nd
4202  */
4203  __pyx_t_16 = __pyx_v_self->pyCoefficients;
4204  __Pyx_INCREF(__pyx_t_16);
4205  __pyx_v_pc = __pyx_t_16;
4206  __pyx_t_16 = 0;
4207 
4208  /* "mprans/cMoveMeshMonitor.pyx":74
4209  * # update other element values
4210  * cdef object pc = self.pyCoefficients
4211  * cdef object mesh = pc.mesh # <<<<<<<<<<<<<<
4212  * cdef int nd = pc.nd
4213  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4214  */
4215  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_mesh); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L1_error)
4216  __Pyx_GOTREF(__pyx_t_16);
4217  __pyx_v_mesh = __pyx_t_16;
4218  __pyx_t_16 = 0;
4219 
4220  /* "mprans/cMoveMeshMonitor.pyx":75
4221  * cdef object pc = self.pyCoefficients
4222  * cdef object mesh = pc.mesh
4223  * cdef int nd = pc.nd # <<<<<<<<<<<<<<
4224  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4225  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
4226  */
4227  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_nd); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 75, __pyx_L1_error)
4228  __Pyx_GOTREF(__pyx_t_16);
4229  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error)
4230  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4231  __pyx_v_nd = __pyx_t_2;
4232 
4233  /* "mprans/cMoveMeshMonitor.pyx":76
4234  * cdef object mesh = pc.mesh
4235  * cdef int nd = pc.nd
4236  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray # <<<<<<<<<<<<<<
4237  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
4238  * cdef double[:,:] nodeArray = mesh.nodeArray
4239  */
4240  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBoundaryBarycentersArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 76, __pyx_L1_error)
4241  __Pyx_GOTREF(__pyx_t_16);
4242  __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_16, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 76, __pyx_L1_error)
4243  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4244  __pyx_v_elementBoundaryBarycentersArray = __pyx_t_21;
4245  __pyx_t_21.memview = NULL;
4246  __pyx_t_21.data = NULL;
4247 
4248  /* "mprans/cMoveMeshMonitor.pyx":77
4249  * cdef int nd = pc.nd
4250  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4251  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray # <<<<<<<<<<<<<<
4252  * cdef double[:,:] nodeArray = mesh.nodeArray
4253  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
4254  */
4255  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBarycentersArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 77, __pyx_L1_error)
4256  __Pyx_GOTREF(__pyx_t_16);
4257  __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_16, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 77, __pyx_L1_error)
4258  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4259  __pyx_v_elementBarycentersArray = __pyx_t_21;
4260  __pyx_t_21.memview = NULL;
4261  __pyx_t_21.data = NULL;
4262 
4263  /* "mprans/cMoveMeshMonitor.pyx":78
4264  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4265  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
4266  * cdef double[:,:] nodeArray = mesh.nodeArray # <<<<<<<<<<<<<<
4267  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
4268  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
4269  */
4270  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 78, __pyx_L1_error)
4271  __Pyx_GOTREF(__pyx_t_16);
4272  __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_16, PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 78, __pyx_L1_error)
4273  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4274  __pyx_v_nodeArray = __pyx_t_21;
4275  __pyx_t_21.memview = NULL;
4276  __pyx_t_21.data = NULL;
4277 
4278  /* "mprans/cMoveMeshMonitor.pyx":79
4279  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
4280  * cdef double[:,:] nodeArray = mesh.nodeArray
4281  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray # <<<<<<<<<<<<<<
4282  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
4283  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
4284  */
4285  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBoundaryNodesArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 79, __pyx_L1_error)
4286  __Pyx_GOTREF(__pyx_t_16);
4287  __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_16, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 79, __pyx_L1_error)
4288  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4289  __pyx_v_elementBoundaryNodesArray = __pyx_t_22;
4290  __pyx_t_22.memview = NULL;
4291  __pyx_t_22.data = NULL;
4292 
4293  /* "mprans/cMoveMeshMonitor.pyx":80
4294  * cdef double[:,:] nodeArray = mesh.nodeArray
4295  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
4296  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray # <<<<<<<<<<<<<<
4297  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
4298  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
4299  */
4300  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 80, __pyx_L1_error)
4301  __Pyx_GOTREF(__pyx_t_16);
4302  __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_16, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 80, __pyx_L1_error)
4303  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4304  __pyx_v_elementNodesArray = __pyx_t_22;
4305  __pyx_t_22.memview = NULL;
4306  __pyx_t_22.data = NULL;
4307 
4308  /* "mprans/cMoveMeshMonitor.pyx":81
4309  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
4310  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
4311  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray # <<<<<<<<<<<<<<
4312  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
4313  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
4314  */
4315  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBoundariesArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 81, __pyx_L1_error)
4316  __Pyx_GOTREF(__pyx_t_16);
4317  __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_16, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 81, __pyx_L1_error)
4318  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4319  __pyx_v_elementBoundariesArray = __pyx_t_22;
4320  __pyx_t_22.memview = NULL;
4321  __pyx_t_22.data = NULL;
4322 
4323  /* "mprans/cMoveMeshMonitor.pyx":82
4324  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
4325  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
4326  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
4327  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
4328  * cdef int nElements_global = mesh.nElements_global
4329  */
4330  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 82, __pyx_L1_error)
4331  __Pyx_GOTREF(__pyx_t_16);
4332  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error)
4333  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4334  __pyx_v_nElementBoundaries_global = __pyx_t_2;
4335 
4336  /* "mprans/cMoveMeshMonitor.pyx":83
4337  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
4338  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
4339  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
4340  * cdef int nElements_global = mesh.nElements_global
4341  * cdef int nNodes_element = mesh.nNodes_element
4342  */
4343  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 83, __pyx_L1_error)
4344  __Pyx_GOTREF(__pyx_t_16);
4345  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error)
4346  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4347  __pyx_v_nNodes_elementBoundary = __pyx_t_2;
4348 
4349  /* "mprans/cMoveMeshMonitor.pyx":84
4350  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
4351  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
4352  * cdef int nElements_global = mesh.nElements_global # <<<<<<<<<<<<<<
4353  * cdef int nNodes_element = mesh.nNodes_element
4354  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray
4355  */
4356  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 84, __pyx_L1_error)
4357  __Pyx_GOTREF(__pyx_t_16);
4358  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L1_error)
4359  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4360  __pyx_v_nElements_global = __pyx_t_2;
4361 
4362  /* "mprans/cMoveMeshMonitor.pyx":85
4363  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
4364  * cdef int nElements_global = mesh.nElements_global
4365  * cdef int nNodes_element = mesh.nNodes_element # <<<<<<<<<<<<<<
4366  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray
4367  * # update element boundary barycenters
4368  */
4369  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 85, __pyx_L1_error)
4370  __Pyx_GOTREF(__pyx_t_16);
4371  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error)
4372  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4373  __pyx_v_nNodes_element = __pyx_t_2;
4374 
4375  /* "mprans/cMoveMeshMonitor.pyx":86
4376  * cdef int nElements_global = mesh.nElements_global
4377  * cdef int nNodes_element = mesh.nNodes_element
4378  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray # <<<<<<<<<<<<<<
4379  * # update element boundary barycenters
4380  * for ebN in range(nElementBoundaries_global):
4381  */
4382  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_mesh); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 86, __pyx_L1_error)
4383  __Pyx_GOTREF(__pyx_t_16);
4384  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_elementBoundaryNormalsArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 86, __pyx_L1_error)
4385  __Pyx_GOTREF(__pyx_t_14);
4386  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4387  __pyx_t_23 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_t_14, PyBUF_WRITABLE); if (unlikely(!__pyx_t_23.memview)) __PYX_ERR(0, 86, __pyx_L1_error)
4388  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4389  __pyx_v_elementBoundaryNormalsArray = __pyx_t_23;
4390  __pyx_t_23.memview = NULL;
4391  __pyx_t_23.data = NULL;
4392 
4393  /* "mprans/cMoveMeshMonitor.pyx":88
4394  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray
4395  * # update element boundary barycenters
4396  * for ebN in range(nElementBoundaries_global): # <<<<<<<<<<<<<<
4397  * elementBoundaryBarycentersArray[ebN, 0] = 0.
4398  * elementBoundaryBarycentersArray[ebN, 1] = 0.
4399  */
4400  __pyx_t_2 = __pyx_v_nElementBoundaries_global;
4401  __pyx_t_3 = __pyx_t_2;
4402  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
4403  __pyx_v_ebN = __pyx_t_4;
4404 
4405  /* "mprans/cMoveMeshMonitor.pyx":89
4406  * # update element boundary barycenters
4407  * for ebN in range(nElementBoundaries_global):
4408  * elementBoundaryBarycentersArray[ebN, 0] = 0. # <<<<<<<<<<<<<<
4409  * elementBoundaryBarycentersArray[ebN, 1] = 0.
4410  * elementBoundaryBarycentersArray[ebN, 2] = 0.
4411  */
4412  __pyx_t_8 = __pyx_v_ebN;
4413  __pyx_t_12 = 0;
4414  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4415  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4416  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_8 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) = 0.;
4417 
4418  /* "mprans/cMoveMeshMonitor.pyx":90
4419  * for ebN in range(nElementBoundaries_global):
4420  * elementBoundaryBarycentersArray[ebN, 0] = 0.
4421  * elementBoundaryBarycentersArray[ebN, 1] = 0. # <<<<<<<<<<<<<<
4422  * elementBoundaryBarycentersArray[ebN, 2] = 0.
4423  * for nN in range(nNodes_elementBoundary):
4424  */
4425  __pyx_t_12 = __pyx_v_ebN;
4426  __pyx_t_8 = 1;
4427  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4428  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4429  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_12 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) = 0.;
4430 
4431  /* "mprans/cMoveMeshMonitor.pyx":91
4432  * elementBoundaryBarycentersArray[ebN, 0] = 0.
4433  * elementBoundaryBarycentersArray[ebN, 1] = 0.
4434  * elementBoundaryBarycentersArray[ebN, 2] = 0. # <<<<<<<<<<<<<<
4435  * for nN in range(nNodes_elementBoundary):
4436  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
4437  */
4438  __pyx_t_8 = __pyx_v_ebN;
4439  __pyx_t_12 = 2;
4440  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4441  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4442  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_8 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) = 0.;
4443 
4444  /* "mprans/cMoveMeshMonitor.pyx":92
4445  * elementBoundaryBarycentersArray[ebN, 1] = 0.
4446  * elementBoundaryBarycentersArray[ebN, 2] = 0.
4447  * for nN in range(nNodes_elementBoundary): # <<<<<<<<<<<<<<
4448  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
4449  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
4450  */
4451  __pyx_t_5 = __pyx_v_nNodes_elementBoundary;
4452  __pyx_t_6 = __pyx_t_5;
4453  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
4454  __pyx_v_nN = __pyx_t_7;
4455 
4456  /* "mprans/cMoveMeshMonitor.pyx":93
4457  * elementBoundaryBarycentersArray[ebN, 2] = 0.
4458  * for nN in range(nNodes_elementBoundary):
4459  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0] # <<<<<<<<<<<<<<
4460  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
4461  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
4462  */
4463  __pyx_t_12 = __pyx_v_ebN;
4464  __pyx_t_8 = __pyx_v_nN;
4465  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryNodesArray.shape[0];
4466  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryNodesArray.shape[1];
4467  __pyx_t_13 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryNodesArray.data + __pyx_t_12 * __pyx_v_elementBoundaryNodesArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBoundaryNodesArray.strides[1]) )));
4468  __pyx_t_10 = 0;
4469  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_nodeArray.shape[0];
4470  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_nodeArray.shape[1];
4471  __pyx_t_9 = __pyx_v_ebN;
4472  __pyx_t_24 = 0;
4473  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4474  if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4475  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_24 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_13 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_10 * __pyx_v_nodeArray.strides[1]) )));
4476 
4477  /* "mprans/cMoveMeshMonitor.pyx":94
4478  * for nN in range(nNodes_elementBoundary):
4479  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
4480  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1] # <<<<<<<<<<<<<<
4481  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
4482  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
4483  */
4484  __pyx_t_8 = __pyx_v_ebN;
4485  __pyx_t_12 = __pyx_v_nN;
4486  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryNodesArray.shape[0];
4487  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryNodesArray.shape[1];
4488  __pyx_t_10 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryNodesArray.data + __pyx_t_8 * __pyx_v_elementBoundaryNodesArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBoundaryNodesArray.strides[1]) )));
4489  __pyx_t_13 = 1;
4490  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_nodeArray.shape[0];
4491  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_nodeArray.shape[1];
4492  __pyx_t_24 = __pyx_v_ebN;
4493  __pyx_t_9 = 1;
4494  if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4495  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4496  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_24 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_10 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_13 * __pyx_v_nodeArray.strides[1]) )));
4497 
4498  /* "mprans/cMoveMeshMonitor.pyx":95
4499  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
4500  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
4501  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2] # <<<<<<<<<<<<<<
4502  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
4503  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary
4504  */
4505  __pyx_t_12 = __pyx_v_ebN;
4506  __pyx_t_8 = __pyx_v_nN;
4507  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryNodesArray.shape[0];
4508  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryNodesArray.shape[1];
4509  __pyx_t_13 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryNodesArray.data + __pyx_t_12 * __pyx_v_elementBoundaryNodesArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBoundaryNodesArray.strides[1]) )));
4510  __pyx_t_10 = 2;
4511  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_nodeArray.shape[0];
4512  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_nodeArray.shape[1];
4513  __pyx_t_9 = __pyx_v_ebN;
4514  __pyx_t_24 = 2;
4515  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4516  if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4517  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_24 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_13 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_10 * __pyx_v_nodeArray.strides[1]) )));
4518  }
4519 
4520  /* "mprans/cMoveMeshMonitor.pyx":96
4521  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
4522  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
4523  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary # <<<<<<<<<<<<<<
4524  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary
4525  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary
4526  */
4527  __pyx_t_8 = __pyx_v_ebN;
4528  __pyx_t_12 = 0;
4529  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4530  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4531  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_8 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_elementBoundary;
4532 
4533  /* "mprans/cMoveMeshMonitor.pyx":97
4534  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
4535  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
4536  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary # <<<<<<<<<<<<<<
4537  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary
4538  * # update element barycenters
4539  */
4540  __pyx_t_12 = __pyx_v_ebN;
4541  __pyx_t_8 = 1;
4542  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4543  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4544  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_12 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_elementBoundary;
4545 
4546  /* "mprans/cMoveMeshMonitor.pyx":98
4547  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
4548  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary
4549  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary # <<<<<<<<<<<<<<
4550  * # update element barycenters
4551  * for eN in range(nElements_global):
4552  */
4553  __pyx_t_8 = __pyx_v_ebN;
4554  __pyx_t_12 = 2;
4555  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
4556  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
4557  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_8 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_elementBoundary;
4558  }
4559 
4560  /* "mprans/cMoveMeshMonitor.pyx":100
4561  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary
4562  * # update element barycenters
4563  * for eN in range(nElements_global): # <<<<<<<<<<<<<<
4564  * elementBarycentersArray[eN, 0] = 0.
4565  * elementBarycentersArray[eN, 1] = 0.
4566  */
4567  __pyx_t_2 = __pyx_v_nElements_global;
4568  __pyx_t_3 = __pyx_t_2;
4569  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
4570  __pyx_v_eN = __pyx_t_4;
4571 
4572  /* "mprans/cMoveMeshMonitor.pyx":101
4573  * # update element barycenters
4574  * for eN in range(nElements_global):
4575  * elementBarycentersArray[eN, 0] = 0. # <<<<<<<<<<<<<<
4576  * elementBarycentersArray[eN, 1] = 0.
4577  * elementBarycentersArray[eN, 2] = 0.
4578  */
4579  __pyx_t_12 = __pyx_v_eN;
4580  __pyx_t_8 = 0;
4581  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBarycentersArray.shape[0];
4582  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBarycentersArray.shape[1];
4583  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_12 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBarycentersArray.strides[1]) )) = 0.;
4584 
4585  /* "mprans/cMoveMeshMonitor.pyx":102
4586  * for eN in range(nElements_global):
4587  * elementBarycentersArray[eN, 0] = 0.
4588  * elementBarycentersArray[eN, 1] = 0. # <<<<<<<<<<<<<<
4589  * elementBarycentersArray[eN, 2] = 0.
4590  * for ebN in range(nNodes_element):
4591  */
4592  __pyx_t_8 = __pyx_v_eN;
4593  __pyx_t_12 = 1;
4594  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBarycentersArray.shape[0];
4595  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBarycentersArray.shape[1];
4596  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_8 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBarycentersArray.strides[1]) )) = 0.;
4597 
4598  /* "mprans/cMoveMeshMonitor.pyx":103
4599  * elementBarycentersArray[eN, 0] = 0.
4600  * elementBarycentersArray[eN, 1] = 0.
4601  * elementBarycentersArray[eN, 2] = 0. # <<<<<<<<<<<<<<
4602  * for ebN in range(nNodes_element):
4603  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
4604  */
4605  __pyx_t_12 = __pyx_v_eN;
4606  __pyx_t_8 = 2;
4607  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBarycentersArray.shape[0];
4608  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBarycentersArray.shape[1];
4609  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_12 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBarycentersArray.strides[1]) )) = 0.;
4610 
4611  /* "mprans/cMoveMeshMonitor.pyx":104
4612  * elementBarycentersArray[eN, 1] = 0.
4613  * elementBarycentersArray[eN, 2] = 0.
4614  * for ebN in range(nNodes_element): # <<<<<<<<<<<<<<
4615  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
4616  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
4617  */
4618  __pyx_t_5 = __pyx_v_nNodes_element;
4619  __pyx_t_6 = __pyx_t_5;
4620  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
4621  __pyx_v_ebN = __pyx_t_7;
4622 
4623  /* "mprans/cMoveMeshMonitor.pyx":105
4624  * elementBarycentersArray[eN, 2] = 0.
4625  * for ebN in range(nNodes_element):
4626  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0] # <<<<<<<<<<<<<<
4627  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
4628  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
4629  */
4630  __pyx_t_8 = __pyx_v_eN;
4631  __pyx_t_12 = __pyx_v_ebN;
4632  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementNodesArray.shape[0];
4633  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementNodesArray.shape[1];
4634  __pyx_t_10 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementNodesArray.data + __pyx_t_8 * __pyx_v_elementNodesArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementNodesArray.strides[1]) )));
4635  __pyx_t_13 = 0;
4636  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_nodeArray.shape[0];
4637  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_nodeArray.shape[1];
4638  __pyx_t_24 = __pyx_v_eN;
4639  __pyx_t_9 = 0;
4640  if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_elementBarycentersArray.shape[0];
4641  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[1];
4642  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_24 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_10 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_13 * __pyx_v_nodeArray.strides[1]) )));
4643 
4644  /* "mprans/cMoveMeshMonitor.pyx":106
4645  * for ebN in range(nNodes_element):
4646  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
4647  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1] # <<<<<<<<<<<<<<
4648  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
4649  * elementBarycentersArray[eN, 0] /= nNodes_element
4650  */
4651  __pyx_t_12 = __pyx_v_eN;
4652  __pyx_t_8 = __pyx_v_ebN;
4653  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementNodesArray.shape[0];
4654  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementNodesArray.shape[1];
4655  __pyx_t_13 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementNodesArray.data + __pyx_t_12 * __pyx_v_elementNodesArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementNodesArray.strides[1]) )));
4656  __pyx_t_10 = 1;
4657  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_nodeArray.shape[0];
4658  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_nodeArray.shape[1];
4659  __pyx_t_9 = __pyx_v_eN;
4660  __pyx_t_24 = 1;
4661  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[0];
4662  if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_elementBarycentersArray.shape[1];
4663  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_24 * __pyx_v_elementBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_13 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_10 * __pyx_v_nodeArray.strides[1]) )));
4664 
4665  /* "mprans/cMoveMeshMonitor.pyx":107
4666  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
4667  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
4668  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2] # <<<<<<<<<<<<<<
4669  * elementBarycentersArray[eN, 0] /= nNodes_element
4670  * elementBarycentersArray[eN, 1] /= nNodes_element
4671  */
4672  __pyx_t_8 = __pyx_v_eN;
4673  __pyx_t_12 = __pyx_v_ebN;
4674  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementNodesArray.shape[0];
4675  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementNodesArray.shape[1];
4676  __pyx_t_10 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementNodesArray.data + __pyx_t_8 * __pyx_v_elementNodesArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementNodesArray.strides[1]) )));
4677  __pyx_t_13 = 2;
4678  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_nodeArray.shape[0];
4679  if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_v_nodeArray.shape[1];
4680  __pyx_t_24 = __pyx_v_eN;
4681  __pyx_t_9 = 2;
4682  if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_v_elementBarycentersArray.shape[0];
4683  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[1];
4684  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_24 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_10 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_13 * __pyx_v_nodeArray.strides[1]) )));
4685  }
4686 
4687  /* "mprans/cMoveMeshMonitor.pyx":108
4688  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
4689  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
4690  * elementBarycentersArray[eN, 0] /= nNodes_element # <<<<<<<<<<<<<<
4691  * elementBarycentersArray[eN, 1] /= nNodes_element
4692  * elementBarycentersArray[eN, 2] /= nNodes_element
4693  */
4694  __pyx_t_12 = __pyx_v_eN;
4695  __pyx_t_8 = 0;
4696  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBarycentersArray.shape[0];
4697  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBarycentersArray.shape[1];
4698  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_12 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_element;
4699 
4700  /* "mprans/cMoveMeshMonitor.pyx":109
4701  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
4702  * elementBarycentersArray[eN, 0] /= nNodes_element
4703  * elementBarycentersArray[eN, 1] /= nNodes_element # <<<<<<<<<<<<<<
4704  * elementBarycentersArray[eN, 2] /= nNodes_element
4705  * # update normals
4706  */
4707  __pyx_t_8 = __pyx_v_eN;
4708  __pyx_t_12 = 1;
4709  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBarycentersArray.shape[0];
4710  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBarycentersArray.shape[1];
4711  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_8 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_12 * __pyx_v_elementBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_element;
4712 
4713  /* "mprans/cMoveMeshMonitor.pyx":110
4714  * elementBarycentersArray[eN, 0] /= nNodes_element
4715  * elementBarycentersArray[eN, 1] /= nNodes_element
4716  * elementBarycentersArray[eN, 2] /= nNodes_element # <<<<<<<<<<<<<<
4717  * # update normals
4718  * if nd == 2:
4719  */
4720  __pyx_t_12 = __pyx_v_eN;
4721  __pyx_t_8 = 2;
4722  if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_elementBarycentersArray.shape[0];
4723  if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_v_elementBarycentersArray.shape[1];
4724  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_12 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_8 * __pyx_v_elementBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_element;
4725  }
4726 
4727  /* "mprans/cMoveMeshMonitor.pyx":112
4728  * elementBarycentersArray[eN, 2] /= nNodes_element
4729  * # update normals
4730  * if nd == 2: # <<<<<<<<<<<<<<
4731  * # triangle
4732  * ms.pyxUpdateElementBoundaryNormalsTriangle(elementBoundaryNormalsArray_=elementBoundaryNormalsArray,
4733  */
4734  switch (__pyx_v_nd) {
4735  case 2:
4736 
4737  /* "mprans/cMoveMeshMonitor.pyx":114
4738  * if nd == 2:
4739  * # triangle
4740  * ms.pyxUpdateElementBoundaryNormalsTriangle(elementBoundaryNormalsArray_=elementBoundaryNormalsArray, # <<<<<<<<<<<<<<
4741  * nodeArray=nodeArray,
4742  * elementBoundariesArray=elementBoundariesArray,
4743  */
4744  __pyx_f_7proteus_6mprans_13MeshSmoothing_pyxUpdateElementBoundaryNormalsTriangle(__pyx_v_elementBoundaryNormalsArray, __pyx_v_nodeArray, __pyx_v_elementBoundariesArray, __pyx_v_elementBoundaryNodesArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementBarycentersArray, __pyx_v_nElements_global);
4745 
4746  /* "mprans/cMoveMeshMonitor.pyx":112
4747  * elementBarycentersArray[eN, 2] /= nNodes_element
4748  * # update normals
4749  * if nd == 2: # <<<<<<<<<<<<<<
4750  * # triangle
4751  * ms.pyxUpdateElementBoundaryNormalsTriangle(elementBoundaryNormalsArray_=elementBoundaryNormalsArray,
4752  */
4753  break;
4754  case 3:
4755 
4756  /* "mprans/cMoveMeshMonitor.pyx":123
4757  * elif nd == 3:
4758  * # tetra
4759  * ms.pyxUpdateElementBoundaryNormalsTetra(elementBoundaryNormalsArray_=elementBoundaryNormalsArray, # <<<<<<<<<<<<<<
4760  * nodeArray=nodeArray,
4761  * elementBoundariesArray=elementBoundariesArray,
4762  */
4763  __pyx_f_7proteus_6mprans_13MeshSmoothing_pyxUpdateElementBoundaryNormalsTetra(__pyx_v_elementBoundaryNormalsArray, __pyx_v_nodeArray, __pyx_v_elementBoundariesArray, __pyx_v_elementBoundaryNodesArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementBarycentersArray, __pyx_v_nElements_global);
4764 
4765  /* "mprans/cMoveMeshMonitor.pyx":121
4766  * elementBarycentersArray=elementBarycentersArray,
4767  * nElements=nElements_global)
4768  * elif nd == 3: # <<<<<<<<<<<<<<
4769  * # tetra
4770  * ms.pyxUpdateElementBoundaryNormalsTetra(elementBoundaryNormalsArray_=elementBoundaryNormalsArray,
4771  */
4772  break;
4773  default: break;
4774  }
4775 
4776  /* "mprans/cMoveMeshMonitor.pyx":37
4777  * nElements_owned=pc.mesh.nElements_owned)
4778  *
4779  * cdef cppPreStep(self, # <<<<<<<<<<<<<<
4780  * double[:,:] q_uOfX,
4781  * double[:,:] q_J,
4782  */
4783 
4784  /* function exit code */
4785  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4786  goto __pyx_L0;
4787  __pyx_L1_error:;
4788  __Pyx_XDECREF(__pyx_t_14);
4789  __Pyx_XDECREF(__pyx_t_15);
4790  __Pyx_XDECREF(__pyx_t_16);
4791  __Pyx_XDECREF(__pyx_t_17);
4792  __Pyx_XDECREF(__pyx_t_18);
4793  __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1);
4794  __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1);
4795  __PYX_XDEC_MEMVIEW(&__pyx_t_22, 1);
4796  __PYX_XDEC_MEMVIEW(&__pyx_t_23, 1);
4797  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.cppPreStep", __pyx_clineno, __pyx_lineno, __pyx_filename);
4798  __pyx_r = 0;
4799  __pyx_L0:;
4800  __Pyx_XDECREF(__pyx_v_comm);
4801  __Pyx_XDECREF(__pyx_v_pc);
4802  __Pyx_XDECREF(__pyx_v_mesh);
4803  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundaryBarycentersArray, 1);
4804  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBarycentersArray, 1);
4805  __PYX_XDEC_MEMVIEW(&__pyx_v_nodeArray, 1);
4806  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundaryNodesArray, 1);
4807  __PYX_XDEC_MEMVIEW(&__pyx_v_elementNodesArray, 1);
4808  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundariesArray, 1);
4809  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundaryNormalsArray, 1);
4810  __Pyx_XGIVEREF(__pyx_r);
4811  __Pyx_RefNannyFinishContext();
4812  return __pyx_r;
4813 }
4814 
4815 /* "mprans/cMoveMeshMonitor.pyx":132
4816  *
4817  *
4818  * def postStep(self): # <<<<<<<<<<<<<<
4819  * pc = self.pyCoefficients
4820  * self.cppPostStep()
4821  */
4822 
4823 /* Python wrapper */
4824 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_7postStep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4825 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_7postStep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4826  PyObject *__pyx_r = 0;
4827  __Pyx_RefNannyDeclarations
4828  __Pyx_RefNannySetupContext("postStep (wrapper)", 0);
4829  __pyx_r = __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_6postStep(((struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self));
4830 
4831  /* function exit code */
4832  __Pyx_RefNannyFinishContext();
4833  return __pyx_r;
4834 }
4835 
4836 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_6postStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self) {
4837  CYTHON_UNUSED PyObject *__pyx_v_pc = NULL;
4838  PyObject *__pyx_r = NULL;
4839  __Pyx_RefNannyDeclarations
4840  PyObject *__pyx_t_1 = NULL;
4841  int __pyx_lineno = 0;
4842  const char *__pyx_filename = NULL;
4843  int __pyx_clineno = 0;
4844  __Pyx_RefNannySetupContext("postStep", 0);
4845 
4846  /* "mprans/cMoveMeshMonitor.pyx":133
4847  *
4848  * def postStep(self):
4849  * pc = self.pyCoefficients # <<<<<<<<<<<<<<
4850  * self.cppPostStep()
4851  *
4852  */
4853  __pyx_t_1 = __pyx_v_self->pyCoefficients;
4854  __Pyx_INCREF(__pyx_t_1);
4855  __pyx_v_pc = __pyx_t_1;
4856  __pyx_t_1 = 0;
4857 
4858  /* "mprans/cMoveMeshMonitor.pyx":134
4859  * def postStep(self):
4860  * pc = self.pyCoefficients
4861  * self.cppPostStep() # <<<<<<<<<<<<<<
4862  *
4863  * cdef cppPostStep(self):
4864  */
4865  __pyx_t_1 = ((struct __pyx_vtabstruct_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self->__pyx_vtab)->cppPostStep(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
4866  __Pyx_GOTREF(__pyx_t_1);
4867  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4868 
4869  /* "mprans/cMoveMeshMonitor.pyx":132
4870  *
4871  *
4872  * def postStep(self): # <<<<<<<<<<<<<<
4873  * pc = self.pyCoefficients
4874  * self.cppPostStep()
4875  */
4876 
4877  /* function exit code */
4878  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4879  goto __pyx_L0;
4880  __pyx_L1_error:;
4881  __Pyx_XDECREF(__pyx_t_1);
4882  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.postStep", __pyx_clineno, __pyx_lineno, __pyx_filename);
4883  __pyx_r = NULL;
4884  __pyx_L0:;
4885  __Pyx_XDECREF(__pyx_v_pc);
4886  __Pyx_XGIVEREF(__pyx_r);
4887  __Pyx_RefNannyFinishContext();
4888  return __pyx_r;
4889 }
4890 
4891 /* "mprans/cMoveMeshMonitor.pyx":136
4892  * self.cppPostStep()
4893  *
4894  * cdef cppPostStep(self): # <<<<<<<<<<<<<<
4895  * cdef object pc = self.pyCoefficients
4896  * cdef object mesh = pc.mesh
4897  */
4898 
4899 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_13cCoefficients_cppPostStep(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self) {
4900  PyObject *__pyx_v_pc = 0;
4901  PyObject *__pyx_v_mesh = 0;
4902  int __pyx_v_nd;
4903  __Pyx_memviewslice __pyx_v_elementBoundaryBarycentersArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4904  __Pyx_memviewslice __pyx_v_elementBarycentersArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4905  __Pyx_memviewslice __pyx_v_nodeArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4906  __Pyx_memviewslice __pyx_v_elementBoundaryNodesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4907  __Pyx_memviewslice __pyx_v_elementNodesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4908  __Pyx_memviewslice __pyx_v_elementBoundariesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4909  int __pyx_v_nElementBoundaries_global;
4910  int __pyx_v_nNodes_elementBoundary;
4911  int __pyx_v_nElements_global;
4912  int __pyx_v_nNodes_element;
4913  __Pyx_memviewslice __pyx_v_elementBoundaryNormalsArray = { 0, 0, { 0 }, { 0 }, { 0 } };
4914  int __pyx_v_ebN;
4915  int __pyx_v_nN;
4916  int __pyx_v_eN;
4917  PyObject *__pyx_r = NULL;
4918  __Pyx_RefNannyDeclarations
4919  PyObject *__pyx_t_1 = NULL;
4920  int __pyx_t_2;
4921  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
4922  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
4923  PyObject *__pyx_t_5 = NULL;
4924  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
4925  int __pyx_t_7;
4926  int __pyx_t_8;
4927  Py_ssize_t __pyx_t_9;
4928  Py_ssize_t __pyx_t_10;
4929  int __pyx_t_11;
4930  int __pyx_t_12;
4931  int __pyx_t_13;
4932  Py_ssize_t __pyx_t_14;
4933  Py_ssize_t __pyx_t_15;
4934  Py_ssize_t __pyx_t_16;
4935  Py_ssize_t __pyx_t_17;
4936  int __pyx_lineno = 0;
4937  const char *__pyx_filename = NULL;
4938  int __pyx_clineno = 0;
4939  __Pyx_RefNannySetupContext("cppPostStep", 0);
4940 
4941  /* "mprans/cMoveMeshMonitor.pyx":137
4942  *
4943  * cdef cppPostStep(self):
4944  * cdef object pc = self.pyCoefficients # <<<<<<<<<<<<<<
4945  * cdef object mesh = pc.mesh
4946  * cdef int nd = pc.nd
4947  */
4948  __pyx_t_1 = __pyx_v_self->pyCoefficients;
4949  __Pyx_INCREF(__pyx_t_1);
4950  __pyx_v_pc = __pyx_t_1;
4951  __pyx_t_1 = 0;
4952 
4953  /* "mprans/cMoveMeshMonitor.pyx":138
4954  * cdef cppPostStep(self):
4955  * cdef object pc = self.pyCoefficients
4956  * cdef object mesh = pc.mesh # <<<<<<<<<<<<<<
4957  * cdef int nd = pc.nd
4958  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4959  */
4960  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
4961  __Pyx_GOTREF(__pyx_t_1);
4962  __pyx_v_mesh = __pyx_t_1;
4963  __pyx_t_1 = 0;
4964 
4965  /* "mprans/cMoveMeshMonitor.pyx":139
4966  * cdef object pc = self.pyCoefficients
4967  * cdef object mesh = pc.mesh
4968  * cdef int nd = pc.nd # <<<<<<<<<<<<<<
4969  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4970  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
4971  */
4972  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
4973  __Pyx_GOTREF(__pyx_t_1);
4974  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
4975  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4976  __pyx_v_nd = __pyx_t_2;
4977 
4978  /* "mprans/cMoveMeshMonitor.pyx":140
4979  * cdef object mesh = pc.mesh
4980  * cdef int nd = pc.nd
4981  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray # <<<<<<<<<<<<<<
4982  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
4983  * cdef double[:,:] nodeArray = mesh.nodeArray
4984  */
4985  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBoundaryBarycentersArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
4986  __Pyx_GOTREF(__pyx_t_1);
4987  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 140, __pyx_L1_error)
4988  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4989  __pyx_v_elementBoundaryBarycentersArray = __pyx_t_3;
4990  __pyx_t_3.memview = NULL;
4991  __pyx_t_3.data = NULL;
4992 
4993  /* "mprans/cMoveMeshMonitor.pyx":141
4994  * cdef int nd = pc.nd
4995  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
4996  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray # <<<<<<<<<<<<<<
4997  * cdef double[:,:] nodeArray = mesh.nodeArray
4998  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
4999  */
5000  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBarycentersArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
5001  __Pyx_GOTREF(__pyx_t_1);
5002  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 141, __pyx_L1_error)
5003  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5004  __pyx_v_elementBarycentersArray = __pyx_t_3;
5005  __pyx_t_3.memview = NULL;
5006  __pyx_t_3.data = NULL;
5007 
5008  /* "mprans/cMoveMeshMonitor.pyx":142
5009  * cdef double[:,:] elementBoundaryBarycentersArray = mesh.elementBoundaryBarycentersArray
5010  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
5011  * cdef double[:,:] nodeArray = mesh.nodeArray # <<<<<<<<<<<<<<
5012  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
5013  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
5014  */
5015  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
5016  __Pyx_GOTREF(__pyx_t_1);
5017  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 142, __pyx_L1_error)
5018  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5019  __pyx_v_nodeArray = __pyx_t_3;
5020  __pyx_t_3.memview = NULL;
5021  __pyx_t_3.data = NULL;
5022 
5023  /* "mprans/cMoveMeshMonitor.pyx":143
5024  * cdef double[:,:] elementBarycentersArray = mesh.elementBarycentersArray
5025  * cdef double[:,:] nodeArray = mesh.nodeArray
5026  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray # <<<<<<<<<<<<<<
5027  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
5028  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
5029  */
5030  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBoundaryNodesArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
5031  __Pyx_GOTREF(__pyx_t_1);
5032  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 143, __pyx_L1_error)
5033  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5034  __pyx_v_elementBoundaryNodesArray = __pyx_t_4;
5035  __pyx_t_4.memview = NULL;
5036  __pyx_t_4.data = NULL;
5037 
5038  /* "mprans/cMoveMeshMonitor.pyx":144
5039  * cdef double[:,:] nodeArray = mesh.nodeArray
5040  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
5041  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray # <<<<<<<<<<<<<<
5042  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
5043  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
5044  */
5045  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
5046  __Pyx_GOTREF(__pyx_t_1);
5047  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 144, __pyx_L1_error)
5048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5049  __pyx_v_elementNodesArray = __pyx_t_4;
5050  __pyx_t_4.memview = NULL;
5051  __pyx_t_4.data = NULL;
5052 
5053  /* "mprans/cMoveMeshMonitor.pyx":145
5054  * cdef int[:,:] elementBoundaryNodesArray = mesh.elementBoundaryNodesArray
5055  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
5056  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray # <<<<<<<<<<<<<<
5057  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
5058  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
5059  */
5060  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_elementBoundariesArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
5061  __Pyx_GOTREF(__pyx_t_1);
5062  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 145, __pyx_L1_error)
5063  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5064  __pyx_v_elementBoundariesArray = __pyx_t_4;
5065  __pyx_t_4.memview = NULL;
5066  __pyx_t_4.data = NULL;
5067 
5068  /* "mprans/cMoveMeshMonitor.pyx":146
5069  * cdef int[:,:] elementNodesArray = mesh.elementNodesArray
5070  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
5071  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
5072  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
5073  * cdef int nElements_global = mesh.nElements_global
5074  */
5075  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
5076  __Pyx_GOTREF(__pyx_t_1);
5077  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L1_error)
5078  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5079  __pyx_v_nElementBoundaries_global = __pyx_t_2;
5080 
5081  /* "mprans/cMoveMeshMonitor.pyx":147
5082  * cdef int[:,:] elementBoundariesArray = mesh.elementBoundariesArray
5083  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
5084  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
5085  * cdef int nElements_global = mesh.nElements_global
5086  * cdef int nNodes_element = mesh.nNodes_element
5087  */
5088  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
5089  __Pyx_GOTREF(__pyx_t_1);
5090  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L1_error)
5091  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5092  __pyx_v_nNodes_elementBoundary = __pyx_t_2;
5093 
5094  /* "mprans/cMoveMeshMonitor.pyx":148
5095  * cdef int nElementBoundaries_global = mesh.nElementBoundaries_global
5096  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
5097  * cdef int nElements_global = mesh.nElements_global # <<<<<<<<<<<<<<
5098  * cdef int nNodes_element = mesh.nNodes_element
5099  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray
5100  */
5101  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
5102  __Pyx_GOTREF(__pyx_t_1);
5103  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L1_error)
5104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5105  __pyx_v_nElements_global = __pyx_t_2;
5106 
5107  /* "mprans/cMoveMeshMonitor.pyx":149
5108  * cdef int nNodes_elementBoundary = mesh.nNodes_elementBoundary
5109  * cdef int nElements_global = mesh.nElements_global
5110  * cdef int nNodes_element = mesh.nNodes_element # <<<<<<<<<<<<<<
5111  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray
5112  * # update element boundary barycenters
5113  */
5114  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
5115  __Pyx_GOTREF(__pyx_t_1);
5116  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error)
5117  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5118  __pyx_v_nNodes_element = __pyx_t_2;
5119 
5120  /* "mprans/cMoveMeshMonitor.pyx":150
5121  * cdef int nElements_global = mesh.nElements_global
5122  * cdef int nNodes_element = mesh.nNodes_element
5123  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray # <<<<<<<<<<<<<<
5124  * # update element boundary barycenters
5125  * for ebN in range(nElementBoundaries_global):
5126  */
5127  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pc, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
5128  __Pyx_GOTREF(__pyx_t_1);
5129  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementBoundaryNormalsArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
5130  __Pyx_GOTREF(__pyx_t_5);
5131  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5132  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 150, __pyx_L1_error)
5133  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5134  __pyx_v_elementBoundaryNormalsArray = __pyx_t_6;
5135  __pyx_t_6.memview = NULL;
5136  __pyx_t_6.data = NULL;
5137 
5138  /* "mprans/cMoveMeshMonitor.pyx":152
5139  * cdef double[:,:,:] elementBoundaryNormalsArray = pc.mesh.elementBoundaryNormalsArray
5140  * # update element boundary barycenters
5141  * for ebN in range(nElementBoundaries_global): # <<<<<<<<<<<<<<
5142  * elementBoundaryBarycentersArray[ebN, 0] = 0.
5143  * elementBoundaryBarycentersArray[ebN, 1] = 0.
5144  */
5145  __pyx_t_2 = __pyx_v_nElementBoundaries_global;
5146  __pyx_t_7 = __pyx_t_2;
5147  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
5148  __pyx_v_ebN = __pyx_t_8;
5149 
5150  /* "mprans/cMoveMeshMonitor.pyx":153
5151  * # update element boundary barycenters
5152  * for ebN in range(nElementBoundaries_global):
5153  * elementBoundaryBarycentersArray[ebN, 0] = 0. # <<<<<<<<<<<<<<
5154  * elementBoundaryBarycentersArray[ebN, 1] = 0.
5155  * elementBoundaryBarycentersArray[ebN, 2] = 0.
5156  */
5157  __pyx_t_9 = __pyx_v_ebN;
5158  __pyx_t_10 = 0;
5159  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5160  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5161  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) = 0.;
5162 
5163  /* "mprans/cMoveMeshMonitor.pyx":154
5164  * for ebN in range(nElementBoundaries_global):
5165  * elementBoundaryBarycentersArray[ebN, 0] = 0.
5166  * elementBoundaryBarycentersArray[ebN, 1] = 0. # <<<<<<<<<<<<<<
5167  * elementBoundaryBarycentersArray[ebN, 2] = 0.
5168  * for nN in range(nNodes_elementBoundary):
5169  */
5170  __pyx_t_10 = __pyx_v_ebN;
5171  __pyx_t_9 = 1;
5172  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5173  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5174  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_10 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) = 0.;
5175 
5176  /* "mprans/cMoveMeshMonitor.pyx":155
5177  * elementBoundaryBarycentersArray[ebN, 0] = 0.
5178  * elementBoundaryBarycentersArray[ebN, 1] = 0.
5179  * elementBoundaryBarycentersArray[ebN, 2] = 0. # <<<<<<<<<<<<<<
5180  * for nN in range(nNodes_elementBoundary):
5181  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
5182  */
5183  __pyx_t_9 = __pyx_v_ebN;
5184  __pyx_t_10 = 2;
5185  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5186  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5187  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) = 0.;
5188 
5189  /* "mprans/cMoveMeshMonitor.pyx":156
5190  * elementBoundaryBarycentersArray[ebN, 1] = 0.
5191  * elementBoundaryBarycentersArray[ebN, 2] = 0.
5192  * for nN in range(nNodes_elementBoundary): # <<<<<<<<<<<<<<
5193  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
5194  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
5195  */
5196  __pyx_t_11 = __pyx_v_nNodes_elementBoundary;
5197  __pyx_t_12 = __pyx_t_11;
5198  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
5199  __pyx_v_nN = __pyx_t_13;
5200 
5201  /* "mprans/cMoveMeshMonitor.pyx":157
5202  * elementBoundaryBarycentersArray[ebN, 2] = 0.
5203  * for nN in range(nNodes_elementBoundary):
5204  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0] # <<<<<<<<<<<<<<
5205  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
5206  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
5207  */
5208  __pyx_t_10 = __pyx_v_ebN;
5209  __pyx_t_9 = __pyx_v_nN;
5210  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryNodesArray.shape[0];
5211  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryNodesArray.shape[1];
5212  __pyx_t_14 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryNodesArray.data + __pyx_t_10 * __pyx_v_elementBoundaryNodesArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBoundaryNodesArray.strides[1]) )));
5213  __pyx_t_15 = 0;
5214  if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_nodeArray.shape[0];
5215  if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_nodeArray.shape[1];
5216  __pyx_t_16 = __pyx_v_ebN;
5217  __pyx_t_17 = 0;
5218  if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5219  if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5220  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_16 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_17 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_14 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_15 * __pyx_v_nodeArray.strides[1]) )));
5221 
5222  /* "mprans/cMoveMeshMonitor.pyx":158
5223  * for nN in range(nNodes_elementBoundary):
5224  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
5225  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1] # <<<<<<<<<<<<<<
5226  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
5227  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
5228  */
5229  __pyx_t_9 = __pyx_v_ebN;
5230  __pyx_t_10 = __pyx_v_nN;
5231  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryNodesArray.shape[0];
5232  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryNodesArray.shape[1];
5233  __pyx_t_15 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryNodesArray.data + __pyx_t_9 * __pyx_v_elementBoundaryNodesArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBoundaryNodesArray.strides[1]) )));
5234  __pyx_t_14 = 1;
5235  if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_nodeArray.shape[0];
5236  if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_nodeArray.shape[1];
5237  __pyx_t_17 = __pyx_v_ebN;
5238  __pyx_t_16 = 1;
5239  if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5240  if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5241  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_17 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_16 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_15 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_14 * __pyx_v_nodeArray.strides[1]) )));
5242 
5243  /* "mprans/cMoveMeshMonitor.pyx":159
5244  * elementBoundaryBarycentersArray[ebN, 0] += nodeArray[elementBoundaryNodesArray[ebN, nN], 0]
5245  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
5246  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2] # <<<<<<<<<<<<<<
5247  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
5248  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary
5249  */
5250  __pyx_t_10 = __pyx_v_ebN;
5251  __pyx_t_9 = __pyx_v_nN;
5252  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryNodesArray.shape[0];
5253  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryNodesArray.shape[1];
5254  __pyx_t_14 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryNodesArray.data + __pyx_t_10 * __pyx_v_elementBoundaryNodesArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBoundaryNodesArray.strides[1]) )));
5255  __pyx_t_15 = 2;
5256  if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_nodeArray.shape[0];
5257  if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_nodeArray.shape[1];
5258  __pyx_t_16 = __pyx_v_ebN;
5259  __pyx_t_17 = 2;
5260  if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5261  if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5262  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_16 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_17 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_14 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_15 * __pyx_v_nodeArray.strides[1]) )));
5263  }
5264 
5265  /* "mprans/cMoveMeshMonitor.pyx":160
5266  * elementBoundaryBarycentersArray[ebN, 1] += nodeArray[elementBoundaryNodesArray[ebN, nN], 1]
5267  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
5268  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary # <<<<<<<<<<<<<<
5269  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary
5270  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary
5271  */
5272  __pyx_t_9 = __pyx_v_ebN;
5273  __pyx_t_10 = 0;
5274  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5275  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5276  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_elementBoundary;
5277 
5278  /* "mprans/cMoveMeshMonitor.pyx":161
5279  * elementBoundaryBarycentersArray[ebN, 2] += nodeArray[elementBoundaryNodesArray[ebN, nN], 2]
5280  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
5281  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary # <<<<<<<<<<<<<<
5282  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary
5283  * # update element barycenters
5284  */
5285  __pyx_t_10 = __pyx_v_ebN;
5286  __pyx_t_9 = 1;
5287  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5288  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5289  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_10 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_elementBoundary;
5290 
5291  /* "mprans/cMoveMeshMonitor.pyx":162
5292  * elementBoundaryBarycentersArray[ebN, 0] /= nNodes_elementBoundary
5293  * elementBoundaryBarycentersArray[ebN, 1] /= nNodes_elementBoundary
5294  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary # <<<<<<<<<<<<<<
5295  * # update element barycenters
5296  * for eN in range(nElements_global):
5297  */
5298  __pyx_t_9 = __pyx_v_ebN;
5299  __pyx_t_10 = 2;
5300  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBoundaryBarycentersArray.shape[0];
5301  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBoundaryBarycentersArray.shape[1];
5302  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBoundaryBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBoundaryBarycentersArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBoundaryBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_elementBoundary;
5303  }
5304 
5305  /* "mprans/cMoveMeshMonitor.pyx":164
5306  * elementBoundaryBarycentersArray[ebN, 2] /= nNodes_elementBoundary
5307  * # update element barycenters
5308  * for eN in range(nElements_global): # <<<<<<<<<<<<<<
5309  * elementBarycentersArray[eN, 0] = 0.
5310  * elementBarycentersArray[eN, 1] = 0.
5311  */
5312  __pyx_t_2 = __pyx_v_nElements_global;
5313  __pyx_t_7 = __pyx_t_2;
5314  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
5315  __pyx_v_eN = __pyx_t_8;
5316 
5317  /* "mprans/cMoveMeshMonitor.pyx":165
5318  * # update element barycenters
5319  * for eN in range(nElements_global):
5320  * elementBarycentersArray[eN, 0] = 0. # <<<<<<<<<<<<<<
5321  * elementBarycentersArray[eN, 1] = 0.
5322  * elementBarycentersArray[eN, 2] = 0.
5323  */
5324  __pyx_t_10 = __pyx_v_eN;
5325  __pyx_t_9 = 0;
5326  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBarycentersArray.shape[0];
5327  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[1];
5328  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_10 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[1]) )) = 0.;
5329 
5330  /* "mprans/cMoveMeshMonitor.pyx":166
5331  * for eN in range(nElements_global):
5332  * elementBarycentersArray[eN, 0] = 0.
5333  * elementBarycentersArray[eN, 1] = 0. # <<<<<<<<<<<<<<
5334  * elementBarycentersArray[eN, 2] = 0.
5335  * for ebN in range(nNodes_element):
5336  */
5337  __pyx_t_9 = __pyx_v_eN;
5338  __pyx_t_10 = 1;
5339  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[0];
5340  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBarycentersArray.shape[1];
5341  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBarycentersArray.strides[1]) )) = 0.;
5342 
5343  /* "mprans/cMoveMeshMonitor.pyx":167
5344  * elementBarycentersArray[eN, 0] = 0.
5345  * elementBarycentersArray[eN, 1] = 0.
5346  * elementBarycentersArray[eN, 2] = 0. # <<<<<<<<<<<<<<
5347  * for ebN in range(nNodes_element):
5348  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
5349  */
5350  __pyx_t_10 = __pyx_v_eN;
5351  __pyx_t_9 = 2;
5352  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBarycentersArray.shape[0];
5353  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[1];
5354  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_10 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[1]) )) = 0.;
5355 
5356  /* "mprans/cMoveMeshMonitor.pyx":168
5357  * elementBarycentersArray[eN, 1] = 0.
5358  * elementBarycentersArray[eN, 2] = 0.
5359  * for ebN in range(nNodes_element): # <<<<<<<<<<<<<<
5360  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
5361  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
5362  */
5363  __pyx_t_11 = __pyx_v_nNodes_element;
5364  __pyx_t_12 = __pyx_t_11;
5365  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
5366  __pyx_v_ebN = __pyx_t_13;
5367 
5368  /* "mprans/cMoveMeshMonitor.pyx":169
5369  * elementBarycentersArray[eN, 2] = 0.
5370  * for ebN in range(nNodes_element):
5371  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0] # <<<<<<<<<<<<<<
5372  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
5373  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
5374  */
5375  __pyx_t_9 = __pyx_v_eN;
5376  __pyx_t_10 = __pyx_v_ebN;
5377  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementNodesArray.shape[0];
5378  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementNodesArray.shape[1];
5379  __pyx_t_15 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementNodesArray.data + __pyx_t_9 * __pyx_v_elementNodesArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementNodesArray.strides[1]) )));
5380  __pyx_t_14 = 0;
5381  if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_nodeArray.shape[0];
5382  if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_nodeArray.shape[1];
5383  __pyx_t_17 = __pyx_v_eN;
5384  __pyx_t_16 = 0;
5385  if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_elementBarycentersArray.shape[0];
5386  if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_elementBarycentersArray.shape[1];
5387  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_17 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_16 * __pyx_v_elementBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_15 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_14 * __pyx_v_nodeArray.strides[1]) )));
5388 
5389  /* "mprans/cMoveMeshMonitor.pyx":170
5390  * for ebN in range(nNodes_element):
5391  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
5392  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1] # <<<<<<<<<<<<<<
5393  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
5394  * elementBarycentersArray[eN, 0] /= nNodes_element
5395  */
5396  __pyx_t_10 = __pyx_v_eN;
5397  __pyx_t_9 = __pyx_v_ebN;
5398  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementNodesArray.shape[0];
5399  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementNodesArray.shape[1];
5400  __pyx_t_14 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementNodesArray.data + __pyx_t_10 * __pyx_v_elementNodesArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementNodesArray.strides[1]) )));
5401  __pyx_t_15 = 1;
5402  if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_nodeArray.shape[0];
5403  if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_nodeArray.shape[1];
5404  __pyx_t_16 = __pyx_v_eN;
5405  __pyx_t_17 = 1;
5406  if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_elementBarycentersArray.shape[0];
5407  if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_elementBarycentersArray.shape[1];
5408  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_16 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_17 * __pyx_v_elementBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_14 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_15 * __pyx_v_nodeArray.strides[1]) )));
5409 
5410  /* "mprans/cMoveMeshMonitor.pyx":171
5411  * elementBarycentersArray[eN, 0] += nodeArray[elementNodesArray[eN, ebN], 0]
5412  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
5413  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2] # <<<<<<<<<<<<<<
5414  * elementBarycentersArray[eN, 0] /= nNodes_element
5415  * elementBarycentersArray[eN, 1] /= nNodes_element
5416  */
5417  __pyx_t_9 = __pyx_v_eN;
5418  __pyx_t_10 = __pyx_v_ebN;
5419  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementNodesArray.shape[0];
5420  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementNodesArray.shape[1];
5421  __pyx_t_15 = (*((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementNodesArray.data + __pyx_t_9 * __pyx_v_elementNodesArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementNodesArray.strides[1]) )));
5422  __pyx_t_14 = 2;
5423  if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_nodeArray.shape[0];
5424  if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_nodeArray.shape[1];
5425  __pyx_t_17 = __pyx_v_eN;
5426  __pyx_t_16 = 2;
5427  if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_elementBarycentersArray.shape[0];
5428  if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_elementBarycentersArray.shape[1];
5429  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_17 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_16 * __pyx_v_elementBarycentersArray.strides[1]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nodeArray.data + __pyx_t_15 * __pyx_v_nodeArray.strides[0]) ) + __pyx_t_14 * __pyx_v_nodeArray.strides[1]) )));
5430  }
5431 
5432  /* "mprans/cMoveMeshMonitor.pyx":172
5433  * elementBarycentersArray[eN, 1] += nodeArray[elementNodesArray[eN, ebN], 1]
5434  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
5435  * elementBarycentersArray[eN, 0] /= nNodes_element # <<<<<<<<<<<<<<
5436  * elementBarycentersArray[eN, 1] /= nNodes_element
5437  * elementBarycentersArray[eN, 2] /= nNodes_element
5438  */
5439  __pyx_t_10 = __pyx_v_eN;
5440  __pyx_t_9 = 0;
5441  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBarycentersArray.shape[0];
5442  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[1];
5443  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_10 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_element;
5444 
5445  /* "mprans/cMoveMeshMonitor.pyx":173
5446  * elementBarycentersArray[eN, 2] += nodeArray[elementNodesArray[eN, ebN], 2]
5447  * elementBarycentersArray[eN, 0] /= nNodes_element
5448  * elementBarycentersArray[eN, 1] /= nNodes_element # <<<<<<<<<<<<<<
5449  * elementBarycentersArray[eN, 2] /= nNodes_element
5450  * # update normals
5451  */
5452  __pyx_t_9 = __pyx_v_eN;
5453  __pyx_t_10 = 1;
5454  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[0];
5455  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBarycentersArray.shape[1];
5456  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_10 * __pyx_v_elementBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_element;
5457 
5458  /* "mprans/cMoveMeshMonitor.pyx":174
5459  * elementBarycentersArray[eN, 0] /= nNodes_element
5460  * elementBarycentersArray[eN, 1] /= nNodes_element
5461  * elementBarycentersArray[eN, 2] /= nNodes_element # <<<<<<<<<<<<<<
5462  * # update normals
5463  * if nd == 2:
5464  */
5465  __pyx_t_10 = __pyx_v_eN;
5466  __pyx_t_9 = 2;
5467  if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_elementBarycentersArray.shape[0];
5468  if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_elementBarycentersArray.shape[1];
5469  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_elementBarycentersArray.data + __pyx_t_10 * __pyx_v_elementBarycentersArray.strides[0]) ) + __pyx_t_9 * __pyx_v_elementBarycentersArray.strides[1]) )) /= __pyx_v_nNodes_element;
5470  }
5471 
5472  /* "mprans/cMoveMeshMonitor.pyx":176
5473  * elementBarycentersArray[eN, 2] /= nNodes_element
5474  * # update normals
5475  * if nd == 2: # <<<<<<<<<<<<<<
5476  * # triangle
5477  * ms.pyxUpdateElementBoundaryNormalsTriangle(elementBoundaryNormalsArray_=elementBoundaryNormalsArray,
5478  */
5479  switch (__pyx_v_nd) {
5480  case 2:
5481 
5482  /* "mprans/cMoveMeshMonitor.pyx":178
5483  * if nd == 2:
5484  * # triangle
5485  * ms.pyxUpdateElementBoundaryNormalsTriangle(elementBoundaryNormalsArray_=elementBoundaryNormalsArray, # <<<<<<<<<<<<<<
5486  * nodeArray=nodeArray,
5487  * elementBoundariesArray=elementBoundariesArray,
5488  */
5489  __pyx_f_7proteus_6mprans_13MeshSmoothing_pyxUpdateElementBoundaryNormalsTriangle(__pyx_v_elementBoundaryNormalsArray, __pyx_v_nodeArray, __pyx_v_elementBoundariesArray, __pyx_v_elementBoundaryNodesArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementBarycentersArray, __pyx_v_nElements_global);
5490 
5491  /* "mprans/cMoveMeshMonitor.pyx":176
5492  * elementBarycentersArray[eN, 2] /= nNodes_element
5493  * # update normals
5494  * if nd == 2: # <<<<<<<<<<<<<<
5495  * # triangle
5496  * ms.pyxUpdateElementBoundaryNormalsTriangle(elementBoundaryNormalsArray_=elementBoundaryNormalsArray,
5497  */
5498  break;
5499  case 3:
5500 
5501  /* "mprans/cMoveMeshMonitor.pyx":187
5502  * elif nd == 3:
5503  * # tetra
5504  * ms.pyxUpdateElementBoundaryNormalsTetra(elementBoundaryNormalsArray_=elementBoundaryNormalsArray, # <<<<<<<<<<<<<<
5505  * nodeArray=nodeArray,
5506  * elementBoundariesArray=elementBoundariesArray,
5507  */
5508  __pyx_f_7proteus_6mprans_13MeshSmoothing_pyxUpdateElementBoundaryNormalsTetra(__pyx_v_elementBoundaryNormalsArray, __pyx_v_nodeArray, __pyx_v_elementBoundariesArray, __pyx_v_elementBoundaryNodesArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementBarycentersArray, __pyx_v_nElements_global);
5509 
5510  /* "mprans/cMoveMeshMonitor.pyx":185
5511  * elementBarycentersArray=elementBarycentersArray,
5512  * nElements=nElements_global)
5513  * elif nd == 3: # <<<<<<<<<<<<<<
5514  * # tetra
5515  * ms.pyxUpdateElementBoundaryNormalsTetra(elementBoundaryNormalsArray_=elementBoundaryNormalsArray,
5516  */
5517  break;
5518  default: break;
5519  }
5520 
5521  /* "mprans/cMoveMeshMonitor.pyx":136
5522  * self.cppPostStep()
5523  *
5524  * cdef cppPostStep(self): # <<<<<<<<<<<<<<
5525  * cdef object pc = self.pyCoefficients
5526  * cdef object mesh = pc.mesh
5527  */
5528 
5529  /* function exit code */
5530  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5531  goto __pyx_L0;
5532  __pyx_L1_error:;
5533  __Pyx_XDECREF(__pyx_t_1);
5534  __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
5535  __PYX_XDEC_MEMVIEW(&__pyx_t_4, 1);
5536  __Pyx_XDECREF(__pyx_t_5);
5537  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
5538  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.cppPostStep", __pyx_clineno, __pyx_lineno, __pyx_filename);
5539  __pyx_r = 0;
5540  __pyx_L0:;
5541  __Pyx_XDECREF(__pyx_v_pc);
5542  __Pyx_XDECREF(__pyx_v_mesh);
5543  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundaryBarycentersArray, 1);
5544  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBarycentersArray, 1);
5545  __PYX_XDEC_MEMVIEW(&__pyx_v_nodeArray, 1);
5546  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundaryNodesArray, 1);
5547  __PYX_XDEC_MEMVIEW(&__pyx_v_elementNodesArray, 1);
5548  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundariesArray, 1);
5549  __PYX_XDEC_MEMVIEW(&__pyx_v_elementBoundaryNormalsArray, 1);
5550  __Pyx_XGIVEREF(__pyx_r);
5551  __Pyx_RefNannyFinishContext();
5552  return __pyx_r;
5553 }
5554 
5555 /* "mprans/cMoveMeshMonitor.pyx":195
5556  * nElements=nElements_global)
5557  *
5558  * def pseudoTimeStepping(self, # <<<<<<<<<<<<<<
5559  * xx,
5560  * eps=1.):
5561  */
5562 
5563 /* Python wrapper */
5564 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_9pseudoTimeStepping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5565 static PyObject *__pyx_pw_6mprans_16cMoveMeshMonitor_13cCoefficients_9pseudoTimeStepping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5566  PyObject *__pyx_v_xx = 0;
5567  PyObject *__pyx_v_eps = 0;
5568  int __pyx_lineno = 0;
5569  const char *__pyx_filename = NULL;
5570  int __pyx_clineno = 0;
5571  PyObject *__pyx_r = 0;
5572  __Pyx_RefNannyDeclarations
5573  __Pyx_RefNannySetupContext("pseudoTimeStepping (wrapper)", 0);
5574  {
5575  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xx,&__pyx_n_s_eps,0};
5576  PyObject* values[2] = {0,0};
5577  values[1] = ((PyObject *)__pyx_float_1_);
5578  if (unlikely(__pyx_kwds)) {
5579  Py_ssize_t kw_args;
5580  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5581  switch (pos_args) {
5582  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5583  CYTHON_FALLTHROUGH;
5584  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5585  CYTHON_FALLTHROUGH;
5586  case 0: break;
5587  default: goto __pyx_L5_argtuple_error;
5588  }
5589  kw_args = PyDict_Size(__pyx_kwds);
5590  switch (pos_args) {
5591  case 0:
5592  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xx)) != 0)) kw_args--;
5593  else goto __pyx_L5_argtuple_error;
5594  CYTHON_FALLTHROUGH;
5595  case 1:
5596  if (kw_args > 0) {
5597  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eps);
5598  if (value) { values[1] = value; kw_args--; }
5599  }
5600  }
5601  if (unlikely(kw_args > 0)) {
5602  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pseudoTimeStepping") < 0)) __PYX_ERR(0, 195, __pyx_L3_error)
5603  }
5604  } else {
5605  switch (PyTuple_GET_SIZE(__pyx_args)) {
5606  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5607  CYTHON_FALLTHROUGH;
5608  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5609  break;
5610  default: goto __pyx_L5_argtuple_error;
5611  }
5612  }
5613  __pyx_v_xx = values[0];
5614  __pyx_v_eps = values[1];
5615  }
5616  goto __pyx_L4_argument_unpacking_done;
5617  __pyx_L5_argtuple_error:;
5618  __Pyx_RaiseArgtupleInvalid("pseudoTimeStepping", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 195, __pyx_L3_error)
5619  __pyx_L3_error:;
5620  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.pseudoTimeStepping", __pyx_clineno, __pyx_lineno, __pyx_filename);
5621  __Pyx_RefNannyFinishContext();
5622  return NULL;
5623  __pyx_L4_argument_unpacking_done:;
5624  __pyx_r = __pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_8pseudoTimeStepping(((struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self), __pyx_v_xx, __pyx_v_eps);
5625 
5626  /* function exit code */
5627  __Pyx_RefNannyFinishContext();
5628  return __pyx_r;
5629 }
5630 
5631 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_8pseudoTimeStepping(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, PyObject *__pyx_v_xx, PyObject *__pyx_v_eps) {
5632  CYTHON_UNUSED PyObject *__pyx_v_pc = NULL;
5633  PyObject *__pyx_r = NULL;
5634  __Pyx_RefNannyDeclarations
5635  PyObject *__pyx_t_1 = NULL;
5636  __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
5637  double __pyx_t_3;
5638  int __pyx_lineno = 0;
5639  const char *__pyx_filename = NULL;
5640  int __pyx_clineno = 0;
5641  __Pyx_RefNannySetupContext("pseudoTimeStepping", 0);
5642 
5643  /* "mprans/cMoveMeshMonitor.pyx":198
5644  * xx,
5645  * eps=1.):
5646  * pc = self.pyCoefficients # <<<<<<<<<<<<<<
5647  * return self.cppPseudoTimeSteppingParallel(xx=xx,
5648  * eps=eps)
5649  */
5650  __pyx_t_1 = __pyx_v_self->pyCoefficients;
5651  __Pyx_INCREF(__pyx_t_1);
5652  __pyx_v_pc = __pyx_t_1;
5653  __pyx_t_1 = 0;
5654 
5655  /* "mprans/cMoveMeshMonitor.pyx":199
5656  * eps=1.):
5657  * pc = self.pyCoefficients
5658  * return self.cppPseudoTimeSteppingParallel(xx=xx, # <<<<<<<<<<<<<<
5659  * eps=eps)
5660  *
5661  */
5662  __Pyx_XDECREF(__pyx_r);
5663  __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_v_xx, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 199, __pyx_L1_error)
5664 
5665  /* "mprans/cMoveMeshMonitor.pyx":200
5666  * pc = self.pyCoefficients
5667  * return self.cppPseudoTimeSteppingParallel(xx=xx,
5668  * eps=eps) # <<<<<<<<<<<<<<
5669  *
5670  * cdef cppPseudoTimeSteppingParallel(self,
5671  */
5672  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_eps); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 200, __pyx_L1_error)
5673 
5674  /* "mprans/cMoveMeshMonitor.pyx":199
5675  * eps=1.):
5676  * pc = self.pyCoefficients
5677  * return self.cppPseudoTimeSteppingParallel(xx=xx, # <<<<<<<<<<<<<<
5678  * eps=eps)
5679  *
5680  */
5681  __pyx_t_1 = ((struct __pyx_vtabstruct_6mprans_16cMoveMeshMonitor_cCoefficients *)__pyx_v_self->__pyx_vtab)->cppPseudoTimeSteppingParallel(__pyx_v_self, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
5682  __Pyx_GOTREF(__pyx_t_1);
5683  __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
5684  __pyx_t_2.memview = NULL;
5685  __pyx_t_2.data = NULL;
5686  __pyx_r = __pyx_t_1;
5687  __pyx_t_1 = 0;
5688  goto __pyx_L0;
5689 
5690  /* "mprans/cMoveMeshMonitor.pyx":195
5691  * nElements=nElements_global)
5692  *
5693  * def pseudoTimeStepping(self, # <<<<<<<<<<<<<<
5694  * xx,
5695  * eps=1.):
5696  */
5697 
5698  /* function exit code */
5699  __pyx_L1_error:;
5700  __Pyx_XDECREF(__pyx_t_1);
5701  __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
5702  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.pseudoTimeStepping", __pyx_clineno, __pyx_lineno, __pyx_filename);
5703  __pyx_r = NULL;
5704  __pyx_L0:;
5705  __Pyx_XDECREF(__pyx_v_pc);
5706  __Pyx_XGIVEREF(__pyx_r);
5707  __Pyx_RefNannyFinishContext();
5708  return __pyx_r;
5709 }
5710 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
5711 
5712 /* "mprans/cMoveMeshMonitor.pyx":597
5713  * comm.Gatherv(coords_2rank[rank_recv],
5714  * [coords_2doArray,
5715  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
5716  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
5717  * MPI.DOUBLE],
5718  */
5719 
5720 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_genexpr(PyObject *__pyx_self) {
5721  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
5722  PyObject *__pyx_r = NULL;
5723  __Pyx_RefNannyDeclarations
5724  int __pyx_lineno = 0;
5725  const char *__pyx_filename = NULL;
5726  int __pyx_clineno = 0;
5727  __Pyx_RefNannySetupContext("genexpr", 0);
5728  __pyx_cur_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr(__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
5729  if (unlikely(!__pyx_cur_scope)) {
5730  __pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr *)Py_None);
5731  __Pyx_INCREF(Py_None);
5732  __PYX_ERR(0, 597, __pyx_L1_error)
5733  } else {
5734  __Pyx_GOTREF(__pyx_cur_scope);
5735  }
5736  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *) __pyx_self;
5737  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
5738  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
5739  {
5740  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cCoefficients_cppPseudoTimeStepp, __pyx_n_s_mprans_cMoveMeshMonitor); if (unlikely(!gen)) __PYX_ERR(0, 597, __pyx_L1_error)
5741  __Pyx_DECREF(__pyx_cur_scope);
5742  __Pyx_RefNannyFinishContext();
5743  return (PyObject *) gen;
5744  }
5745 
5746  /* function exit code */
5747  __pyx_L1_error:;
5748  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.cppPseudoTimeSteppingParallel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5749  __pyx_r = NULL;
5750  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5751  __Pyx_XGIVEREF(__pyx_r);
5752  __Pyx_RefNannyFinishContext();
5753  return __pyx_r;
5754 }
5755 
5756 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
5757 {
5758  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
5759  PyObject *__pyx_r = NULL;
5760  int __pyx_t_1;
5761  int __pyx_t_2;
5762  int __pyx_t_3;
5763  Py_ssize_t __pyx_t_4;
5764  PyObject *__pyx_t_5 = NULL;
5765  int __pyx_lineno = 0;
5766  const char *__pyx_filename = NULL;
5767  int __pyx_clineno = 0;
5768  __Pyx_RefNannyDeclarations
5769  __Pyx_RefNannySetupContext("genexpr", 0);
5770  switch (__pyx_generator->resume_label) {
5771  case 0: goto __pyx_L3_first_run;
5772  case 1: goto __pyx_L6_resume_from_yield;
5773  default: /* CPython raises the right error here */
5774  __Pyx_RefNannyFinishContext();
5775  return NULL;
5776  }
5777  __pyx_L3_first_run:;
5778  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 597, __pyx_L1_error)
5779  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_comm_size;
5780  __pyx_t_2 = __pyx_t_1;
5781  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
5782  __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
5783  __pyx_t_4 = __pyx_cur_scope->__pyx_v_i;
5784  if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_cur_scope->__pyx_outer_scope->__pyx_v_counts_in.shape[0];
5785  __pyx_t_5 = PyInt_FromSsize_t(((*((int *) ( /* dim=0 */ (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_counts_in.data + __pyx_t_4 * __pyx_cur_scope->__pyx_outer_scope->__pyx_v_counts_in.strides[0]) ))) * (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_coords_2doArray.shape[1]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 597, __pyx_L1_error)
5786  __Pyx_GOTREF(__pyx_t_5);
5787  __pyx_r = __pyx_t_5;
5788  __pyx_t_5 = 0;
5789  __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
5790  __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
5791  __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
5792  __Pyx_XGIVEREF(__pyx_r);
5793  __Pyx_RefNannyFinishContext();
5794  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
5795  /* return from generator, yielding value */
5796  __pyx_generator->resume_label = 1;
5797  return __pyx_r;
5798  __pyx_L6_resume_from_yield:;
5799  __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
5800  __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
5801  __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
5802  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 597, __pyx_L1_error)
5803  }
5804  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
5805 
5806  /* function exit code */
5807  PyErr_SetNone(PyExc_StopIteration);
5808  goto __pyx_L0;
5809  __pyx_L1_error:;
5810  __Pyx_XDECREF(__pyx_t_5);
5811  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5812  __pyx_L0:;
5813  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
5814  #if !CYTHON_USE_EXC_INFO_STACK
5815  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
5816  #endif
5817  __pyx_generator->resume_label = -1;
5818  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
5819  __Pyx_RefNannyFinishContext();
5820  return __pyx_r;
5821 }
5822 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
5823 
5824 /* "mprans/cMoveMeshMonitor.pyx":598
5825  * [coords_2doArray,
5826  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
5827  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
5828  * MPI.DOUBLE],
5829  * root=rank_recv)
5830  */
5831 
5832 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_3genexpr(PyObject *__pyx_self) {
5833  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
5834  PyObject *__pyx_r = NULL;
5835  __Pyx_RefNannyDeclarations
5836  int __pyx_lineno = 0;
5837  const char *__pyx_filename = NULL;
5838  int __pyx_clineno = 0;
5839  __Pyx_RefNannySetupContext("genexpr", 0);
5840  __pyx_cur_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr *)__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr(__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
5841  if (unlikely(!__pyx_cur_scope)) {
5842  __pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr *)Py_None);
5843  __Pyx_INCREF(Py_None);
5844  __PYX_ERR(0, 598, __pyx_L1_error)
5845  } else {
5846  __Pyx_GOTREF(__pyx_cur_scope);
5847  }
5848  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *) __pyx_self;
5849  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
5850  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
5851  {
5852  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_5generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cCoefficients_cppPseudoTimeStepp, __pyx_n_s_mprans_cMoveMeshMonitor); if (unlikely(!gen)) __PYX_ERR(0, 598, __pyx_L1_error)
5853  __Pyx_DECREF(__pyx_cur_scope);
5854  __Pyx_RefNannyFinishContext();
5855  return (PyObject *) gen;
5856  }
5857 
5858  /* function exit code */
5859  __pyx_L1_error:;
5860  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.cppPseudoTimeSteppingParallel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5861  __pyx_r = NULL;
5862  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5863  __Pyx_XGIVEREF(__pyx_r);
5864  __Pyx_RefNannyFinishContext();
5865  return __pyx_r;
5866 }
5867 
5868 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
5869 {
5870  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
5871  PyObject *__pyx_r = NULL;
5872  int __pyx_t_1;
5873  int __pyx_t_2;
5874  int __pyx_t_3;
5875  Py_ssize_t __pyx_t_4;
5876  PyObject *__pyx_t_5 = NULL;
5877  int __pyx_lineno = 0;
5878  const char *__pyx_filename = NULL;
5879  int __pyx_clineno = 0;
5880  __Pyx_RefNannyDeclarations
5881  __Pyx_RefNannySetupContext("genexpr", 0);
5882  switch (__pyx_generator->resume_label) {
5883  case 0: goto __pyx_L3_first_run;
5884  case 1: goto __pyx_L6_resume_from_yield;
5885  default: /* CPython raises the right error here */
5886  __Pyx_RefNannyFinishContext();
5887  return NULL;
5888  }
5889  __pyx_L3_first_run:;
5890  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 598, __pyx_L1_error)
5891  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_comm_size;
5892  __pyx_t_2 = __pyx_t_1;
5893  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
5894  __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
5895  __pyx_t_4 = __pyx_cur_scope->__pyx_v_i;
5896  if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_cur_scope->__pyx_outer_scope->__pyx_v_displacements_in.shape[0];
5897  __pyx_t_5 = PyInt_FromSsize_t(((*((int *) ( /* dim=0 */ (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_displacements_in.data + __pyx_t_4 * __pyx_cur_scope->__pyx_outer_scope->__pyx_v_displacements_in.strides[0]) ))) * (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_coords_2doArray.shape[1]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error)
5898  __Pyx_GOTREF(__pyx_t_5);
5899  __pyx_r = __pyx_t_5;
5900  __pyx_t_5 = 0;
5901  __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
5902  __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
5903  __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
5904  __Pyx_XGIVEREF(__pyx_r);
5905  __Pyx_RefNannyFinishContext();
5906  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
5907  /* return from generator, yielding value */
5908  __pyx_generator->resume_label = 1;
5909  return __pyx_r;
5910  __pyx_L6_resume_from_yield:;
5911  __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
5912  __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
5913  __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
5914  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 598, __pyx_L1_error)
5915  }
5916  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
5917 
5918  /* function exit code */
5919  PyErr_SetNone(PyExc_StopIteration);
5920  goto __pyx_L0;
5921  __pyx_L1_error:;
5922  __Pyx_XDECREF(__pyx_t_5);
5923  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5924  __pyx_L0:;
5925  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
5926  #if !CYTHON_USE_EXC_INFO_STACK
5927  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
5928  #endif
5929  __pyx_generator->resume_label = -1;
5930  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
5931  __Pyx_RefNannyFinishContext();
5932  return __pyx_r;
5933 }
5934 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_8generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
5935 
5936 /* "mprans/cMoveMeshMonitor.pyx":793
5937  * comm.Gatherv(coords_2rank[rank_recv],
5938  * [coords_2doArray,
5939  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
5940  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
5941  * MPI.DOUBLE],
5942  */
5943 
5944 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_6genexpr(PyObject *__pyx_self) {
5945  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
5946  PyObject *__pyx_r = NULL;
5947  __Pyx_RefNannyDeclarations
5948  int __pyx_lineno = 0;
5949  const char *__pyx_filename = NULL;
5950  int __pyx_clineno = 0;
5951  __Pyx_RefNannySetupContext("genexpr", 0);
5952  __pyx_cur_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr *)__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr(__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
5953  if (unlikely(!__pyx_cur_scope)) {
5954  __pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr *)Py_None);
5955  __Pyx_INCREF(Py_None);
5956  __PYX_ERR(0, 793, __pyx_L1_error)
5957  } else {
5958  __Pyx_GOTREF(__pyx_cur_scope);
5959  }
5960  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *) __pyx_self;
5961  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
5962  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
5963  {
5964  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_8generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cCoefficients_cppPseudoTimeStepp, __pyx_n_s_mprans_cMoveMeshMonitor); if (unlikely(!gen)) __PYX_ERR(0, 793, __pyx_L1_error)
5965  __Pyx_DECREF(__pyx_cur_scope);
5966  __Pyx_RefNannyFinishContext();
5967  return (PyObject *) gen;
5968  }
5969 
5970  /* function exit code */
5971  __pyx_L1_error:;
5972  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.cppPseudoTimeSteppingParallel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5973  __pyx_r = NULL;
5974  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
5975  __Pyx_XGIVEREF(__pyx_r);
5976  __Pyx_RefNannyFinishContext();
5977  return __pyx_r;
5978 }
5979 
5980 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_8generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
5981 {
5982  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
5983  PyObject *__pyx_r = NULL;
5984  int __pyx_t_1;
5985  int __pyx_t_2;
5986  int __pyx_t_3;
5987  Py_ssize_t __pyx_t_4;
5988  PyObject *__pyx_t_5 = NULL;
5989  int __pyx_lineno = 0;
5990  const char *__pyx_filename = NULL;
5991  int __pyx_clineno = 0;
5992  __Pyx_RefNannyDeclarations
5993  __Pyx_RefNannySetupContext("genexpr", 0);
5994  switch (__pyx_generator->resume_label) {
5995  case 0: goto __pyx_L3_first_run;
5996  case 1: goto __pyx_L6_resume_from_yield;
5997  default: /* CPython raises the right error here */
5998  __Pyx_RefNannyFinishContext();
5999  return NULL;
6000  }
6001  __pyx_L3_first_run:;
6002  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 793, __pyx_L1_error)
6003  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_comm_size;
6004  __pyx_t_2 = __pyx_t_1;
6005  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
6006  __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
6007  __pyx_t_4 = __pyx_cur_scope->__pyx_v_i;
6008  if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_cur_scope->__pyx_outer_scope->__pyx_v_counts_in.shape[0];
6009  __pyx_t_5 = PyInt_FromSsize_t(((*((int *) ( /* dim=0 */ (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_counts_in.data + __pyx_t_4 * __pyx_cur_scope->__pyx_outer_scope->__pyx_v_counts_in.strides[0]) ))) * (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_coords_2doArray.shape[1]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
6010  __Pyx_GOTREF(__pyx_t_5);
6011  __pyx_r = __pyx_t_5;
6012  __pyx_t_5 = 0;
6013  __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
6014  __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
6015  __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
6016  __Pyx_XGIVEREF(__pyx_r);
6017  __Pyx_RefNannyFinishContext();
6018  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
6019  /* return from generator, yielding value */
6020  __pyx_generator->resume_label = 1;
6021  return __pyx_r;
6022  __pyx_L6_resume_from_yield:;
6023  __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
6024  __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
6025  __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
6026  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 793, __pyx_L1_error)
6027  }
6028  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
6029 
6030  /* function exit code */
6031  PyErr_SetNone(PyExc_StopIteration);
6032  goto __pyx_L0;
6033  __pyx_L1_error:;
6034  __Pyx_XDECREF(__pyx_t_5);
6035  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
6036  __pyx_L0:;
6037  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
6038  #if !CYTHON_USE_EXC_INFO_STACK
6039  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
6040  #endif
6041  __pyx_generator->resume_label = -1;
6042  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
6043  __Pyx_RefNannyFinishContext();
6044  return __pyx_r;
6045 }
6046 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_11generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
6047 
6048 /* "mprans/cMoveMeshMonitor.pyx":794
6049  * [coords_2doArray,
6050  * tuple(counts_in[i]*coords_2doArray.shape[1] for i in range(comm_size)),
6051  * tuple(displacements_in[i]*coords_2doArray.shape[1] for i in range(comm_size)), # <<<<<<<<<<<<<<
6052  * MPI.DOUBLE],
6053  * root=rank_recv)
6054  */
6055 
6056 static PyObject *__pyx_pf_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_9genexpr(PyObject *__pyx_self) {
6057  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
6058  PyObject *__pyx_r = NULL;
6059  __Pyx_RefNannyDeclarations
6060  int __pyx_lineno = 0;
6061  const char *__pyx_filename = NULL;
6062  int __pyx_clineno = 0;
6063  __Pyx_RefNannySetupContext("genexpr", 0);
6064  __pyx_cur_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr *)__pyx_tp_new_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr(__pyx_ptype_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
6065  if (unlikely(!__pyx_cur_scope)) {
6066  __pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr *)Py_None);
6067  __Pyx_INCREF(Py_None);
6068  __PYX_ERR(0, 794, __pyx_L1_error)
6069  } else {
6070  __Pyx_GOTREF(__pyx_cur_scope);
6071  }
6072  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *) __pyx_self;
6073  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
6074  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
6075  {
6076  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_11generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cCoefficients_cppPseudoTimeStepp, __pyx_n_s_mprans_cMoveMeshMonitor); if (unlikely(!gen)) __PYX_ERR(0, 794, __pyx_L1_error)
6077  __Pyx_DECREF(__pyx_cur_scope);
6078  __Pyx_RefNannyFinishContext();
6079  return (PyObject *) gen;
6080  }
6081 
6082  /* function exit code */
6083  __pyx_L1_error:;
6084  __Pyx_AddTraceback("mprans.cMoveMeshMonitor.cCoefficients.cppPseudoTimeSteppingParallel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
6085  __pyx_r = NULL;
6086  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
6087  __Pyx_XGIVEREF(__pyx_r);
6088  __Pyx_RefNannyFinishContext();
6089  return __pyx_r;
6090 }
6091 
6092 static PyObject *__pyx_gb_6mprans_16cMoveMeshMonitor_13cCoefficients_29cppPseudoTimeSteppingParallel_11generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
6093 {
6094  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
6095  PyObject *__pyx_r = NULL;
6096  int __pyx_t_1;
6097  int __pyx_t_2;
6098  int __pyx_t_3;
6099  Py_ssize_t __pyx_t_4;
6100  PyObject *__pyx_t_5 = NULL;
6101  int __pyx_lineno = 0;
6102  const char *__pyx_filename = NULL;
6103  int __pyx_clineno = 0;
6104  __Pyx_RefNannyDeclarations
6105  __Pyx_RefNannySetupContext("genexpr", 0);
6106  switch (__pyx_generator->resume_label) {
6107  case 0: goto __pyx_L3_first_run;
6108  case 1: goto __pyx_L6_resume_from_yield;
6109  default: /* CPython raises the right error here */
6110  __Pyx_RefNannyFinishContext();
6111  return NULL;
6112  }
6113  __pyx_L3_first_run:;
6114  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 794, __pyx_L1_error)
6115  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_comm_size;
6116  __pyx_t_2 = __pyx_t_1;
6117  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
6118  __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
6119  __pyx_t_4 = __pyx_cur_scope->__pyx_v_i;
6120  if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_cur_scope->__pyx_outer_scope->__pyx_v_displacements_in.shape[0];
6121  __pyx_t_5 = PyInt_FromSsize_t(((*((int *) ( /* dim=0 */ (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_displacements_in.data + __pyx_t_4 * __pyx_cur_scope->__pyx_outer_scope->__pyx_v_displacements_in.strides[0]) ))) * (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_coords_2doArray.shape[1]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error)
6122  __Pyx_GOTREF(__pyx_t_5);
6123  __pyx_r = __pyx_t_5;
6124  __pyx_t_5 = 0;
6125  __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
6126  __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
6127  __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
6128  __Pyx_XGIVEREF(__pyx_r);
6129  __Pyx_RefNannyFinishContext();
6130  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
6131  /* return from generator, yielding value */
6132  __pyx_generator->resume_label = 1;
6133  return __pyx_r;
6134  __pyx_L6_resume_from_yield:;
6135  __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
6136  __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
6137  __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
6138  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 794, __pyx_L1_error)
6139  }
6140  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
6141 
6142  /* function exit code */
6143  PyErr_SetNone(PyExc_StopIteration);
6144  goto __pyx_L0;
6145  __pyx_L1_error:;
6146  __Pyx_XDECREF(__pyx_t_5);
6147  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
6148  __pyx_L0:;
6149  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
6150  #if !CYTHON_USE_EXC_INFO_STACK
6151  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
6152  #endif
6153  __pyx_generator->resume_label = -1;
6154  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
6155  __Pyx_RefNannyFinishContext();
6156  return __pyx_r;
6157 }
6158 
6159 /* "mprans/cMoveMeshMonitor.pyx":202
6160  * eps=eps)
6161  *
6162  * cdef cppPseudoTimeSteppingParallel(self, # <<<<<<<<<<<<<<
6163  * double[:,:] xx,
6164  * double eps):
6165  */
6166 
6167 static PyObject *__pyx_f_6mprans_16cMoveMeshMonitor_13cCoefficients_cppPseudoTimeSteppingParallel(struct __pyx_obj_6mprans_16cMoveMeshMonitor_cCoefficients *__pyx_v_self, __Pyx_memviewslice __pyx_v_xx, double __pyx_v_eps) {
6168  struct __pyx_obj_6mprans_16cMoveMeshMonitor___pyx_scope_struct__cppPseudoTimeSteppingParallel *__pyx_cur_scope;
6169  PyObject *__pyx_v_pc = NULL;
6170  int __pyx_v_ntimes_solved;
6171  int __pyx_v_ntimes_i;
6172  double __pyx_v_t_min;
6173  double __pyx_v_t_max;
6174  __Pyx_memviewslice __pyx_v_t_range = { 0, 0, { 0 }, { 0 }, { 0 } };
6175  int __pyx_v_ntimesteps;
6176  __Pyx_memviewslice __pyx_v_eN_phi = { 0, 0, { 0 }, { 0 }, { 0 } };
6177  __Pyx_memviewslice __pyx_v_normal = { 0, 0, { 0 }, { 0 }, { 0 } };
6178  double __pyx_v_t_last;
6179  double __pyx_v_dt;
6180  int __pyx_v_flag;
6181  bool __pyx_v_fixed;
6182  double __pyx_v_area;
6183  int __pyx_v_eN;
6184  double __pyx_v_ls_phi;
6185  double __pyx_v_f;
6186  double __pyx_v_Ccoeff;
6187  int __pyx_v_nd;
6188  __Pyx_memviewslice __pyx_v_dphi = { 0, 0, { 0 }, { 0 }, { 0 } };
6189  __Pyx_memviewslice __pyx_v_grads = { 0, 0, { 0 }, { 0 }, { 0 } };
6190  __Pyx_memviewslice __pyx_v_v_grad = { 0, 0, { 0 }, { 0 }, { 0 } };
6191  __Pyx_memviewslice __pyx_v_areas_nodes = { 0, 0, { 0 }, { 0 }, { 0 } };
6192  CYTHON_UNUSED __Pyx_memviewslice __pyx_v_areas = { 0, 0, { 0 }, { 0 }, { 0 } };
6193  __Pyx_memviewslice __pyx_v_u_phi = { 0, 0, { 0 }, { 0 }, { 0 } };
6194  int __pyx_v_i;
6195  int __pyx_v_ii;
6196  int __pyx_v_iN;
6197  PyObject *__pyx_v_femSpace = 0;
6198  __Pyx_memviewslice __pyx_v_nodeArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6199  __Pyx_memviewslice __pyx_v_nodeStarOffsets = { 0, 0, { 0 }, { 0 }, { 0 } };
6200  __Pyx_memviewslice __pyx_v_nodeStarArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6201  __Pyx_memviewslice __pyx_v_nodeElementOffsets = { 0, 0, { 0 }, { 0 }, { 0 } };
6202  __Pyx_memviewslice __pyx_v_nodeElementsArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6203  __Pyx_memviewslice __pyx_v_nodeMaterialTypes = { 0, 0, { 0 }, { 0 }, { 0 } };
6204  __Pyx_memviewslice __pyx_v_elementBarycentersArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6205  __Pyx_memviewslice __pyx_v_elementBoundaryElementsArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6206  __Pyx_memviewslice __pyx_v_elementBoundariesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6207  __Pyx_memviewslice __pyx_v_elementNodesArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6208  __Pyx_memviewslice __pyx_v_elementBoundaryBarycentersArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6209  __Pyx_memviewslice __pyx_v_exteriorElementBoundariesBoolArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6210  int __pyx_v_bb_i;
6211  __Pyx_memviewslice __pyx_v_elementBoundaryNormalsArray = { 0, 0, { 0 }, { 0 }, { 0 } };
6212  int __pyx_v_nNodes_owned;
6213